The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(context): remove MEMORY.md and PROFILE.md from bootstrap prompt
Steven Enamakel1681e2e68901
diff --git a/crates/openhuman-core/src/agent/context/channels_prompt.rs b/crates/openhuman-core/src/agent/context/channels_prompt.rsindex e137c4f8bd..759facfbb4 100644--- a/crates/openhuman-core/src/agent/context/channels_prompt.rs+++ b/crates/openhuman-core/src/agent/context/channels_prompt.rs@@ -30,16 +30,14 @@ pub(crate) const BOOTSTRAP_MAX_CHARS: usize = 20_000;/// Identity content that takes the place of a workspace-root file in the/// rendered prompt.///-/// When present, each override replaces the root file in its slot, so the-/// model never sees two identities side by side. `IDENTITY.md` and-/// `PROFILE.md` are never overridden because they describe the workspace.-/// An empty override renders exactly what the root files render.+/// When present, the override replaces the root file in its slot, so the+/// model never sees two identities side by side. `IDENTITY.md` is never+/// overridden because it describes the workspace. An empty override renders+/// exactly what the root files render.#[derive(Debug, Clone, Copy, Default)]pub struct PromptIdentityOverride<'a> {/// Replaces the root `SOUL.md` slot.pub soul_md: Option<&'a str>,- /// Replaces the root `MEMORY.md` slot.- pub memory_md: Option<&'a str>,}/// Where [`build_system_prompt_with_identity`] puts the `## Project Context`@@ -58,7 +56,7 @@ pub enum ProjectContextPlacement {}/// Appends the `## Project Context` block — the identity files, with a-/// profile's soul / memory substituted per `identity` — to `prompt`.+/// profile's soul substituted per `identity` — to `prompt`.pub fn render_project_context(prompt: &mut String,workspace_dir: &Path,@@ -89,27 +87,6 @@ fn load_openclaw_bootstrap_files(}inject_workspace_file(prompt, workspace_dir, "IDENTITY.md", max_chars_per_file);- // PROFILE.md — generated by the onboarding enrichment pipeline (e.g.- // LinkedIn scrape). Not bundled; only exists after the user completes- // the context-gathering onboarding step.- if workspace_dir.join("PROFILE.md").is_file() {- inject_workspace_file(prompt, workspace_dir, "PROFILE.md", max_chars_per_file);- }-- // MEMORY.md — the archivist agent writes long-term curated knowledge here.- // It starts out missing on a fresh install, so inject silently (no- // missing-file marker). `is_file` (rather than `exists`) rejects a- // stray directory with the same name that would otherwise route- // through the error path in `inject_workspace_file`. A profile with its- // own MEMORY.md replaces the root one here, as on the desktop path.- match identity.memory_md {- Some(memory) => inject_inline_content(prompt, "MEMORY.md", memory, max_chars_per_file),- None => {- if workspace_dir.join("MEMORY.md").is_file() {- inject_workspace_file(prompt, workspace_dir, "MEMORY.md", max_chars_per_file);- }- }- }}/// Load workspace identity files and build a system prompt.@@ -119,15 +96,12 @@ fn load_openclaw_bootstrap_files(/// 2. Safety — guardrail reminder/// 3. Skills — compact list with paths (loaded on-demand)/// 4. Workspace — working directory-/// 5. Bootstrap files — SOUL, IDENTITY, USER (+ MEMORY if the archivist has written one)+/// 5. Bootstrap files — SOUL, IDENTITY/// 6. Date & Time — timezone for cache stability/// 7. Runtime — host, OS, model///-/// Daily memory files (`memory/*.md`) are NOT injected — they are accessed-/// on-demand via `memory_recall` / `memory_search` tools.-////// Renders the workspace-root identity. [`build_system_prompt_with_identity`]-/// is the same render with a profile's soul / memory in place of the root+/// is the same render with a profile's soul in place of the root/// files; this wrapper is byte-for-byte what it produces for an empty/// override.pub fn build_system_prompt(