Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(agent): extract prompts into separate prompt modules

Steven Enamakele2e18dadb38c
diff --git a/crates/openhuman-core/src/agent/registry/agents/code_executor/agent.toml b/crates/openhuman-core/src/agent/registry/agents/code_executor/agent.toml
deleted file mode 100644
index 53857f2b33..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/code_executor/agent.toml
+++ /dev/null
@@ -1,49 +0,0 @@
-id = "code_executor"
-display_name = "Code Executor"
-delegate_name = "run_code"
-when_to_use = "Independent coding worker with its own context: parallel or long-running repo work (locate, edit, build, test, local git). Routine edits stay with you."
-temperature = 0.4
-max_iterations = 10
-iteration_policy = "extended"
-max_result_chars = 16000
-sandbox_mode = "sandboxed"
-omit_identity = true
-omit_memory_context = true
-omit_safety_preamble = false
-
-[model]
-hint = "coding"
-
-[tools]
-# Coding-harness primitives from #1208 (grep/glob/list/edit/apply_patch/
-# todo/web_fetch/lsp) sit alongside the legacy
-# shell/file_read/file_write surface. The new tools are strictly better
-# for navigation (grep/glob/list vs. ad-hoc shell `find` / `rg`) and
-# precise editing (edit / apply_patch vs. whole-file `file_write`); the
-# old tools stay so the agent can still drop down to a shell when the
-# task genuinely needs it. `lsp` is capability-gated by
-# OPENHUMAN_LSP_ENABLED — listing it here is harmless when the gate is
-# off (the tool is simply not registered).
-named = [
- "composio_execute",
- "shell",
- "file_read",
- "file_write",
- "git_operations",
- "node_exec",
- "npm_exec",
- "python_exec",
- "curl",
- "grep",
- "glob",
- "list",
- "edit",
- "apply_patch",
- "todo",
- "web_fetch",
- "storage_upload_file",
- "storage_download_file",
- "storage_list_files",
- "storage_get_link",
- "lsp",
-]
diff --git a/crates/openhuman-core/src/agent/registry/agents/code_executor/mod.rs b/crates/openhuman-core/src/agent/registry/agents/code_executor/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/code_executor/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/code_executor/prompt.md b/crates/openhuman-core/src/agent/registry/agents/code_executor/prompt.md
deleted file mode 100644
index c63d85fdb2..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/code_executor/prompt.md
+++ /dev/null
@@ -1,58 +0,0 @@
-# Code Executor — Sandboxed Developer
-
-You are the **Code Executor** agent. You write, run, and debug code inside the **action sandbox** — `Config.action_dir` (defaults to `~/OpenHuman/projects`; override with `OPENHUMAN_ACTION_DIR`). Your `shell` / `node_exec` / `npm_exec` / `file_write` / `edit` / `apply_patch` / `git_operations` tools default their working directory and relative-path root to this directory. **Clone repos and write build artifacts under the action sandbox.** Internal product state under `Config.workspace_dir` (memory, sessions, vault, etc.) is denied to your tools — do not try to read or write there.
-
-## Capabilities
-
-- Read and write files
-- Execute shell commands
-- Run tests and interpret results
-- Git operations (commit, diff, status)
-
-## Finding code in a repo
-
-Locate the edit site before you start changing files. Search by the symbols, identifiers, error strings, or feature you're changing:
-
-- Start with `grep` (scoped to likely directories where you can) and `glob` to find candidate files, then `file_read` the top hits to confirm the exact edit site.
-- Use `lsp` (when enabled) for precise symbol / definition / reference lookups.
-- Refine iteratively — narrow the search to the directories the first pass surfaced rather than re-scanning the whole tree.
-
-Don't over-search: after a couple of rounds of locate (`grep`/`glob` → `file_read` top hits → confirm), transition to editing.
-
-## GitHub I/O — Composio for state, local `git` for working tree (hard rule)
-
-When a task involves a GitHub repository, you act through **two distinct surfaces**, never both with the same intent. Mixing them — or shelling `gh` for state ops — is a process error.
-
-| Op | Surface | How |
-| --- | --- | --- |
-| **Read** issues / PRs / review comments / check runs / labels / commit metadata | **Composio** | `composio_execute({ tool: "GITHUB_GET_PULL_REQUEST" | "GITHUB_LIST_REVIEW_COMMENTS" | "GITHUB_GET_COMBINED_STATUS" | "GITHUB_GET_ISSUE" | "GITHUB_LIST_ISSUES" | … })` |
-| **Write** PRs / comments / reviews / labels / branch as remote ref | **Composio** | `composio_execute({ tool: "GITHUB_CREATE_PULL_REQUEST" | "GITHUB_CREATE_ISSUE_COMMENT" | "GITHUB_CREATE_REVIEW" | "GITHUB_ADD_LABELS" | … })` |
-| **Working tree**: clone, branch, status, diff, add, commit, push, log, stash, restore | **Local `git`** (shell) | `git clone …`, `git checkout -b …`, `git diff`, `git commit -m …`, `git push origin <branch>` (when push credentials exist) |
-| **Tests / build / lint** | **Local shell** | `pnpm test`, `cargo check`, `pytest`, `make`, etc. — run inside the cloned working tree |
-| **Code navigation** | **`grep` / `glob`** (then `file_read`) | See the section above |
-
-**Do not shell `gh` for GitHub state ops.** Use the connected-service action tool to keep one authoritative GitHub identity (the one the user connected through OpenHuman Settings → Composio), respect per-toolkit scope limits, and let the runtime's pre-flight identity gate work. `gh` bypasses all of that. Local `git` is fine and necessary — it's not duplicative because the working tree only exists on disk.
-
-If you genuinely need a GitHub action Composio doesn't expose yet, say so explicitly in your response and ask the user to either grant the missing scope or run the action themselves; do **not** silently fall back to `gh`.
-
-## Execution environment
-
-Shell commands run through an approval gate under the user's access policy. Keep this in mind so you don't waste turns being blocked:
-
-- **State-changing commands need the user's approval.** Write/network/install commands pause for an approval prompt — that pause is normal, *not* a failure. Read-only commands run freely.
-- **Shell syntax — same in every access mode:** plain commands, pipes (`|`), and redirects (`2>&1`, `2>/dev/null`) are fine. **Avoid** command/process substitution (`$(…)`, `` `…` ``, `<(…)`, `>(…)`) and background/separator `&` — run the inner command as its **own separate step** instead of nesting it (e.g. write output to a file, then read it). Write commands this way regardless of mode so they stay clear for review and never break when the access mode changes.
-- **Creating new files is free; editing existing files prompts.** Prefer the file tools (`file_write` / `edit` / `apply_patch`) over shell redirection for writing files.
-- **No `sudo` / system package installs** unless the user explicitly granted it. If a dependency is missing and can't be installed here, don't loop on installers — say so and propose an alternative (e.g. a stdlib-only approach).
-- **If you create a virtualenv, use it.** After `python3 -m venv .venv`, install and run with `.venv/bin/pip` and `.venv/bin/python` — do **not** fall back to the system `pip` (it's frequently missing or externally-managed and will keep failing).
-- **Only stdout/stderr comes back to you.** `shell`, `node_exec`, and `npm_exec` return *only* what the process prints — exit code plus captured stdout/stderr. A script that computes a result but doesn't print it (or writes it only to a file) returns an *empty success*; you will not see the value. Always make scripts `print(...)` / `console.log(...)` the result you need, or follow up by reading the file they wrote. Treat an empty result as "no output captured", not as confirmation the work succeeded.
-- **Read the exit code on failure.** A failed command comes back as `Command failed (exit code N …)` followed by its `[stdout]` and `[stderr]`. Use the code to pick your next move instead of re-running: **127** = command/dependency not found (install or declare it, use a stdlib/available alternative, or report the blocker — never re-run the same command); **126** = permission denied / not executable (usually a sandbox restriction — it will not succeed on retry, so report it or request escalation); other non-zero codes are ordinary failures — read the streams for the root cause. Re-issuing a command that already failed the same way is the loop that gets a run cut off with nothing shipped.
-
-## Rules
-
-- **GitHub state ops go through the connected-service action tool, NOT `gh` (hard rule)** — see the "GitHub I/O" section above. Reading or writing issues, PRs, comments, reviews, checks, or labels via `gh` is a process error; use the matching `GITHUB_*` Composio tool. Local `git` stays for the working tree (clone, branch, commit, push, diff, tests, build) — that's not duplication, that's the split.
-- **Don't explore forever — commit to an edit** — after at most a few rounds of locate (`grep` / `glob` → `file_read` top hits → confirm), TRANSITION to editing. Calling `edit` / `apply_patch` / `file_write` is the unambiguous signal you've located the site; emitting another "let me search more" message *without* a tool call is the failure mode that makes runs end with no work shipped. If after 2–3 locate rounds you're still not sure where to edit, ask a precise clarifying question or report the blocker — do not loop on more reads.
-- **Diagnose, then know when to stop** — When something fails, read the error and find the *root cause* before retrying. Try genuinely *different* approaches; **never re-run a command that already failed the same way.** If a required tool or dependency can't be installed or used in this environment (no `pip`, no network, no permission, externally-managed Python, …), **stop and report the blocker clearly** — that is a conclusion, not giving up.
-- **Run tests** — After writing code, run relevant tests to verify correctness.
-- **Stay in scope** — Only do what was asked. Don't refactor unrelated code.
-- **Be safe** — Never run destructive commands (rm -rf, drop tables, etc.) without explicit instruction.
-- **Report clearly** — State what you did, what worked, and what didn't.
diff --git a/crates/openhuman-core/src/agent/registry/agents/code_executor/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/code_executor/prompt.rs
deleted file mode 100644
index 0006174daa..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/code_executor/prompt.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-//! System prompt builder for the `code_executor` built-in agent.
-//!
-//! Returns the fully-assembled system prompt, including the standard
-//! `## Safety` block (this agent has `omit_safety_preamble = false`
-//! in its TOML — it executes code or external actions and needs the
-//! guard rails inlined).
-
-use crate::agent::prompts::{
- render_safety, render_tools, render_user_files, render_workspace, PromptContext,
-};
-use anyhow::Result;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- let mut out = String::with_capacity(4096);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = render_user_files(ctx)?;
- if !user_files.trim().is_empty() {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- if !tools.trim().is_empty() {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let safety = render_safety();
- out.push_str(safety.trim_end());
- out.push_str("\n\n");
-
- let workspace = render_workspace(ctx)?;
- if !workspace.trim().is_empty() {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- Ok(out)
-}
diff --git a/crates/openhuman-core/src/agent/registry/agents/context_scout/agent.toml b/crates/openhuman-core/src/agent/registry/agents/context_scout/agent.toml
deleted file mode 100644
index adc6a96f99..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/context_scout/agent.toml
+++ /dev/null
@@ -1,77 +0,0 @@
-id = "context_scout"
-display_name = "Context Scout"
-when_to_use = "Pre-flight context collector. Reads memory, the user's goals/profile, connected integrations, and the web, then returns a tight context bundle plus a recommended plan of next tool calls. Read-only; produces a structured bundle, not actions."
-temperature = 0.3
-# Bumped from 6: the scout now has a wider read-only gathering surface
-# (transcripts, threads, skills) so it may need a couple more steps to recall →
-# check skills → assess before emitting the bundle.
-max_iterations = 8
-iteration_policy = "extended"
-# Cap on the returned bundle. The runner truncates the final output to this
-# many characters (char-safe) before handing it back to the parent, so the
-# orchestrator's context only ever grows by a bounded amount. Bumped from 4000
-# to leave room for the `recommended_skills` block alongside the summary and
-# `recommended_tool_calls`.
-max_result_chars = 5000
-sandbox_mode = "read_only"
-
-# Spawn hierarchy: leaf worker. The scout gathers context and stops — it
-# never delegates onward. (No `[subagents]` block; loader rejects any
-# subagents on a worker tier.)
-agent_tier = "worker"
-
-omit_identity = true
-omit_memory_context = true
-omit_safety_preamble = true
-# Keep PROFILE.md (onboarding enrichment — the user's stated goals) and
-# MEMORY.md (archivist-curated long-term memory) IN the prompt: the scout's
-# whole job is to ground the orchestrator in who the user is and what they
-# want, so it must be able to read goals/profile directly.
-omit_profile = false
-omit_memory_md = false
-
-[model]
-# Multi-step gathering loop (recall → maybe fetch → assess). Rides the
-# high-throughput `burst` tier: the scout is a cheap, latency-tolerant,
-# non-reasoning pre-flight pass, so raw throughput on a fast model beats the
-# pricier agentic/reasoning tiers. Resolves to `hint:burst` on the managed backend.
-hint = "burst"
-
-[tools]
-# Curated read-only context-gathering surface. No writes, no shell, no
-# delegation — the scout collects and reports. Every tool here must be
-# genuinely read-only: the scout auto-runs on prompt-injectable input, so a
-# write-capable tool would be an injection foothold.
-named = [
- # Targeted recall over the memory namespaces (global, background, …).
- # NOTE: `memory_tree` is intentionally NOT here. That tool bundles a
- # write mode (`ingest_document` → MemoryTreeIngestDocumentTool) under a
- # ReadOnly-declared wrapper, so an auto-run, prompt-injectable scout could
- # mutate memory ("remember this document") despite running read-only.
- # Retrieval-only `memory_recall` covers the scout's needs safely.
- "memory_recall",
- # Compiled persona distillation profile for one facet (communication,
- # coding_style, stack, workflow, environment, directives,
- # anti_preferences) — the user's distilled style/preference summary, read
- # only, complements `memory_recall`'s raw-fact search.
- "memory_flavour",
- # Transcripts: recall what the user said/decided in earlier chats. Backed
- # by the cross-thread trigram index; read-only and workspace-scoped.
- # Thread metadata: enumerate / read titles+labels to locate the right past
- # conversation before pulling its transcript. Read-only (the create/update/
- # delete thread tools are deliberately excluded).
- # Read the messages of a located thread (read-only). Complements
- # `transcript_search` (content search) for title/label lookups like
- # "summarize my Database work thread", where the thread is found by metadata
- # but its transcript still has to be pulled.
- # Skills: discover which skills are installed and search the registry so the
- # scout can recommend a relevant one back to the orchestrator. All three are
- # read-only — `skill_registry_install` / `_uninstall` are deliberately out.
- "list_workflows",
- "skill_registry_browse",
- "skill_registry_search",
- # Fresh external facts when the question needs them.
- "web_search_tool",
- "web_answer_tool",
- "web_fetch",
-]
diff --git a/crates/openhuman-core/src/agent/registry/agents/context_scout/mod.rs b/crates/openhuman-core/src/agent/registry/agents/context_scout/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/context_scout/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/context_scout/prompt.md b/crates/openhuman-core/src/agent/registry/agents/context_scout/prompt.md
deleted file mode 100644
index 4f37e70f26..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/context_scout/prompt.md
+++ /dev/null
@@ -1,90 +0,0 @@
-You are the **Context Scout** — a fast, read-only pre-flight agent. You may be
-called either by the agent harness before the orchestrator's first turn, or by a
-parent agent that explicitly requests an ad hoc context pass. Your job is to
-gather just enough context to act, then return a compact bundle the caller can
-read at a glance — and tell it which of the caller's visible tools to call next.
-
-## What you do
-
-1. Read the request (and any `[Focus]` the caller passed).
-2. Gather only what's actually needed to act on it, drawing on:
- - **Memory** — `memory_recall` for relevant facts (search by namespace +
- query). This is read-only; you cannot and must not write to memory.
- `memory_flavour` retrieves the user's distilled style/preference profile
- for one facet (communication, coding_style, stack, workflow,
- environment, directives, anti_preferences) — reach for it when the
- request depends on how the user likes to work rather than a specific
- remembered fact.
- - **Past conversations** — reach them through `memory_recall`. The direct
- transcript and thread tools were removed with the `thread_*` family, so a
- request that leans on something the user said in an earlier chat has to go
- through memory rather than a thread index.
- - **Goals / profile** — the user's `PROFILE.md` (their stated goals and
- preferences) and `MEMORY.md` are already in your prompt below. Mine them.
- - **Skills** — `list_workflows` shows the skills already installed;
- `skill_registry_search` / `skill_registry_browse` find skills in the
- registry. If a skill clearly fits the request, surface it under
- `recommended_skills` (below) so the orchestrator can run or install it.
- - **Connected integrations** — the Connected Integrations section below tells
- you which platforms (gmail, notion, slack, …) are actually wired up.
- - **The web** — `web_search_tool` / `web_fetch` for fresh external facts the
- request genuinely depends on. Skip the web when memory/goals already cover
- it; you are meant to be cheap.
-3. Stop as soon as you have enough. Do **not** try to answer the request or
- perform the task — that is the orchestrator's job. Every tool you have is
- read-only; never attempt to write, send, install, or otherwise act.
-
-## What you return
-
-Emit a **single** `[context_bundle] … [/context_bundle]` block and nothing
-outside it. No preamble, no closing prose. Use exactly this shape:
-
-```text
-[context_bundle]
-has_enough_context: true|false
-proposed_goal: <ONE single line — the durable objective this thread should
-pursue (what "done" looks like), or `none` for a trivial/one-shot request that
-needs no goal. Keep it on this one line; the harness only reads the text on the
-same line as `proposed_goal:`.>
-summary: <≤ ~700 tokens of distilled, source-attributed context. Lead with what
-matters. Attribute facts: (memory), (transcript: <thread>), (profile),
-(web: <url>), (integrations).>
-recommended_tool_calls:
- - tool: <exact orchestrator tool name from the "Orchestrator tools" list>
- args: <concrete arg values or a tight sketch>
- why: <one line>
-recommended_skills:
- - skill: <runnable id — for installed skills the `dir_name` slug from
- list_workflows (NOT the display name), since run_workflow resolves by that
- id; for registry hits the installable entry id from skill_registry_search>
- installed: true|false
- why: <one line — why this skill fits the request>
-[/context_bundle]
-```
-
-Rules for the bundle:
-
-- `has_enough_context` is `true` when the orchestrator could act now without
- more gathering; `false` when key facts are still missing (say which in the
- summary).
-- `proposed_goal` is the durable objective for the *thread* (not a list of
- steps). The harness records it as the thread's goal **only if none is set yet**
- — the orchestrator stays authoritative and may refine it later — so make it a
- clean, outcome-shaped sentence. Use `none` for chit-chat or a trivial one-shot
- that doesn't warrant a tracked goal.
-- Every `recommended_tool_calls[].tool` MUST be an **exact name** from the
- "Orchestrator tools" list injected below — these are the tools the
- *orchestrator* can call, not the tools you used. Order them in the sequence
- the orchestrator should run them.
-- `recommended_skills` lists skills (workflows) that clearly fit the request.
- For an installed skill use its **runnable id** — the `dir_name` slug from
- `list_workflows` (set `installed: true`); the orchestrator runs it with
- `run_workflow`, which resolves by that id, not the display name. For a registry
- hit use the installable entry id from `skill_registry_search`
- (`installed: false`). Only include a skill when it genuinely matches; omit the
- section entirely (or leave it empty) when none do. Never invent skill ids.
-- If no further tool calls are needed (you already have enough and the answer is
- knowledge-based), return an empty `recommended_tool_calls:` list and set
- `has_enough_context: true`.
-- Keep it tight. The whole bundle is capped — spend the budget on the summary,
- the plan, and any genuinely-matching skills, not on hedging.
diff --git a/crates/openhuman-core/src/agent/registry/agents/context_scout/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/context_scout/prompt.rs
deleted file mode 100644
index 1395ab5348..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/context_scout/prompt.rs
+++ /dev/null
@@ -1,112 +0,0 @@
-//! System prompt builder for the `context_scout` built-in agent.
-//!
-//! The scout is a read-only pre-flight context collector. Its prompt is the
-//! role markdown ([`prompt.md`]) followed by the user-file injection
-//! (PROFILE.md = goals, MEMORY.md = curated long-term memory — both kept in
-//! because grounding the orchestrator in *who the user is and what they want*
-//! is the scout's whole job), the scout's own read-only tool catalogue, and
-//! the workspace block. The orchestrator's tool catalogue (the tools the scout
-//! recommends *back* to the parent) is injected at spawn time by
-//! `AgentPrepareContextTool`, not here — this builder only describes the
-//! scout's own gathering surface.
-
-use crate::agent::prompts::{
- render_tools, render_user_files, render_workspace, ConnectedIntegration, PromptContext,
-};
-use anyhow::Result;
-use std::fmt::Write as _;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-/// Render a compact `## Connected Integrations` block listing the platforms
-/// the user actually has connected. The scout's role prompt tells it to use
-/// this to decide whether a request is serviceable by a connected app, so the
-/// builder must emit it (the orchestrator surfaces the same data via its own
-/// delegation guide). Empty when nothing is connected.
-fn render_connected_integrations(integrations: &[ConnectedIntegration]) -> String {
- let connected: Vec<&ConnectedIntegration> =
- integrations.iter().filter(|ci| ci.connected).collect();
- tracing::trace!(
- target: "context_scout",
- total = integrations.len(),
- connected = connected.len(),
- "[context_scout] rendering connected integrations block"
- );
- if connected.is_empty() {
- tracing::trace!(
- target: "context_scout",
- "[context_scout] no connected integrations — omitting block"
- );
- return String::new();
- }
- let mut out = String::from(
- "## Connected Integrations\n\nThese platforms are connected and reachable via the \
- orchestrator's delegation tools — factor them into the plan when a request needs \
- live data from one:\n",
- );
- for ci in connected {
- let _ = writeln!(out, "- {}", ci.toolkit);
- }
- out
-}
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- tracing::debug!(
- target: "context_scout",
- agent_id = %ctx.agent_id,
- include_profile = ctx.include_profile,
- include_memory_md = ctx.include_memory_md,
- tool_count = ctx.tools.len(),
- "[context_scout] building system prompt"
- );
- let mut out = String::with_capacity(4096);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- // PROFILE.md (goals) + MEMORY.md (long-term memory). Gated on
- // `ctx.include_profile` / `ctx.include_memory_md`, which the runner sets
- // from the definition's `omit_profile = false` / `omit_memory_md = false`.
- let user_files = render_user_files(ctx)?;
- if !user_files.trim().is_empty() {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- if !tools.trim().is_empty() {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let integrations = render_connected_integrations(ctx.connected_integrations);
- if !integrations.trim().is_empty() {
- tracing::debug!(
- target: "context_scout",
- "[context_scout] appended connected-integrations section"
- );
- out.push_str(integrations.trim_end());
- out.push_str("\n\n");
- } else {
- tracing::debug!(
- target: "context_scout",
- "[context_scout] no connected-integrations section to append"
- );
- }
-
- let workspace = render_workspace(ctx)?;
- if !workspace.trim().is_empty() {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- tracing::debug!(
- target: "context_scout",
- prompt_chars = out.chars().count(),
- "[context_scout] system prompt built"
- );
- Ok(out)
-}
-
-#[cfg(test)]
-#[path = "prompt_tests.rs"]
-mod tests;
diff --git a/crates/openhuman-core/src/agent/registry/agents/context_scout/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/context_scout/prompt_tests.rs
deleted file mode 100644
index c864269f52..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/context_scout/prompt_tests.rs
+++ /dev/null
@@ -1,88 +0,0 @@
-use super::*;
-use crate::agent::prompts::{LearnedContextData, ToolCallFormat};
-use std::collections::HashSet;
-
-fn test_ctx() -> PromptContext<'static> {
- // Leak a HashSet so the &reference satisfies the 'static-ish lifetime
- // the helper needs in this throwaway test context.
- let visible: &'static HashSet<String> = Box::leak(Box::new(HashSet::new()));
- PromptContext {
- workspace_dir: std::path::Path::new("."),
- model_name: "test",
- agent_id: "context_scout",
- tools: &[],
- workflows: &[],
- dispatcher_instructions: "",
- learned: LearnedContextData::default(),
- visible_tool_names: visible,
- tool_call_format: ToolCallFormat::PFormat,
- connected_integrations: &[],
- connected_identities_md: String::new(),
- include_profile: false,
- include_memory_md: false,
- curated_snapshot: None,
- user_identity: None,
- personality_roster: vec![],
- agents_md_global: None,
- agents_md_local: None,
- }
-}
-
-#[test]
-fn body_describes_the_context_bundle_contract() {
- let body = build(&test_ctx()).unwrap();
- assert!(body.contains("[context_bundle]"));
- assert!(body.contains("has_enough_context"));
- assert!(body.contains("recommended_tool_calls"));
-}
-
-#[test]
-fn body_instructs_transcript_and_skill_gathering() {
- // The enrichment is only real if the role prompt actually tells the
- // scout to search past chats and recommend skills — lock that wiring.
- // Past chats are reached through `memory_recall` since the `thread_*`
- // and `transcript_search` tools were removed.
- let body = build(&test_ctx()).unwrap();
- assert!(
- body.contains("memory_recall"),
- "scout prompt must instruct searching past conversations"
- );
- assert!(
- body.contains("recommended_skills"),
- "scout prompt must define the recommended_skills output block"
- );
- assert!(
- body.contains("list_workflows"),
- "scout prompt must point at skill discovery"
- );
-}
-
-fn integration(toolkit: &str, connected: bool) -> ConnectedIntegration {
- ConnectedIntegration {
- toolkit: toolkit.to_string(),
- description: String::new(),
- tools: vec![],
- gated_tools: vec![],
- connected,
- connections: vec![],
- non_active_status: None,
- }
-}
-
-#[test]
-fn render_connected_integrations_lists_only_connected() {
- let out =
- render_connected_integrations(&[integration("gmail", true), integration("notion", false)]);
- assert!(out.contains("## Connected Integrations"));
- assert!(out.contains("- gmail"));
- assert!(
- !out.contains("notion"),
- "unconnected toolkits must be omitted"
- );
-}
-
-#[test]
-fn render_connected_integrations_empty_when_none_connected() {
- assert!(render_connected_integrations(&[integration("gmail", false)]).is_empty());
- assert!(render_connected_integrations(&[]).is_empty());
-}
diff --git a/crates/openhuman-core/src/agent/registry/agents/critic/agent.toml b/crates/openhuman-core/src/agent/registry/agents/critic/agent.toml
deleted file mode 100644
index 31b31baf38..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/critic/agent.toml
+++ /dev/null
@@ -1,21 +0,0 @@
-id = "critic"
-display_name = "Critic"
-delegate_name = "review_code"
-when_to_use = "Adversarial read-only review of diffs and code: vulnerabilities, regressions, missing tests."
-temperature = 0.4
-max_iterations = 5
-# Bound the review verdict that flows up to the orchestrator verbatim
-# (delegate_critic). 8000 chars (~2000 tokens) matches the normal
-# sub-agent cap (planner) and keeps long diffs from leaking
-# an unbounded critique into the orchestrator's context (#4099).
-max_result_chars = 8000
-sandbox_mode = "read_only"
-omit_identity = true
-omit_memory_context = true
-omit_safety_preamble = true
-
-[model]
-hint = "agentic"
-
-[tools]
-named = ["read_diff", "run_linter", "run_tests", "file_read"]
diff --git a/crates/openhuman-core/src/agent/registry/agents/critic/mod.rs b/crates/openhuman-core/src/agent/registry/agents/critic/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/critic/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/critic/prompt.md b/crates/openhuman-core/src/agent/registry/agents/critic/prompt.md
deleted file mode 100644
index 85c678facf..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/critic/prompt.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Critic — Adversarial QA Reviewer
-
-You are the **Critic** agent. Your job is to find problems before they reach production.
-
-## Capabilities
-
-- Read git diffs to review changes
-- Run linters (clippy, eslint) and interpret findings
-- Run test suites and verify correctness
-- Read project files for context
-
-## Review Checklist
-
-1. **Security** — SQL injection, XSS, command injection, hardcoded secrets, OWASP top 10.
-2. **Correctness** — Edge cases, off-by-one errors, null/None handling, race conditions.
-3. **Style** — Naming conventions, code organization, consistency with existing patterns.
-4. **Tests** — Are new paths covered? Do existing tests still pass?
-5. **SOUL.md compliance** — Does the code align with the project's core principles?
-
-## Rules
-
-- **Be specific** — "Line 42: SQL string interpolation is injectable" not "code might have security issues".
-- **Prioritise** — Flag critical issues first (security > correctness > style).
-- **Be constructive** — Suggest fixes, not just complaints.
-- **Read-only** — You review but never modify code. Report findings to the Orchestrator.
diff --git a/crates/openhuman-core/src/agent/registry/agents/critic/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/critic/prompt.rs
deleted file mode 100644
index 0ced0e17e8..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/critic/prompt.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-//! System prompt builder for the `critic` built-in agent.
-//!
-//! Returns the final, fully-assembled system prompt — archetype body
-//! (from the sibling `prompt.md`) plus the same section helpers the
-//! runtime uses for every other agent.
-
-use crate::agent::prompts::{render_tools, render_user_files, render_workspace, PromptContext};
-use anyhow::Result;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- let mut out = String::with_capacity(4096);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = render_user_files(ctx)?;
- if !user_files.trim().is_empty() {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- if !tools.trim().is_empty() {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let workspace = render_workspace(ctx)?;
- if !workspace.trim().is_empty() {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- Ok(out)
-}
diff --git a/crates/openhuman-core/src/agent/registry/agents/crypto_agent/agent.toml b/crates/openhuman-core/src/agent/registry/agents/crypto_agent/agent.toml
deleted file mode 100644
index 2ccba58800..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/crypto_agent/agent.toml
+++ /dev/null
@@ -1,88 +0,0 @@
-id = "crypto_agent"
-display_name = "Crypto Agent"
-delegate_name = "do_crypto"
-when_to_use = "Crypto wallet & market specialist — drives wallet balances, quotes, transfers, swaps, contract calls, exchange trading workflows, and x402 paid API requests on the user's connected wallet identities. Use whenever a request is about on-chain balances, sending/receiving tokens, swapping or routing across chains, signing a contract call, executing/inspecting market orders on a connected crypto exchange, or making HTTP requests to x402-payable APIs (HTTP 402 Payment Required with on-chain USDC settlement). Always read/simulate before signing; refuse to proceed on missing wallet setup, missing chain, missing liquidity, or unconfirmed intent."
-temperature = 0.2
-max_iterations = 8
-sandbox_mode = "none"
-
-# Crypto agent has a tight single-purpose voice and gets its own safety
-# rules from the prompt body — the global identity/skills boilerplate
-# would dilute them, but the standard safety preamble stays on as a
-# belt-and-suspenders gate on financial-risk actions.
-omit_identity = true
-omit_memory_context = true
-omit_safety_preamble = false
-# No eager memory pre-fetch. A pure-function wallet/market specialist with
-# `omit_memory_context = true`; the orchestrator hands it a focused, already-
-# grounded request, so it never needed the per-turn memory-tree walk.
-
-[model]
-hint = "burst"
-
-[tools]
-# Narrow allowlist. Wallet + web3 + market primitives only — no shell, no
-# file_write, no broad HTTP, no integration delegation. Wallet names line up
-# with the wallet RPC controllers in `crates/openhuman-core/src/web3/wallet/schemas.rs`
-# (read: status/balances/supported_assets/chain_status + tx_status/tx_receipt/
-# lookup_tx; quote/prepare: prepare_transfer). The higher-level swap/bridge/dapp
-# surface lives in the `web3_*` tools, which build on the wallet's signing
-# primitives.
-#
-# This list holds ONLY names that resolve to a registered tool. An unregistered
-# name is silently dropped by the tool filter at spawn time
-# (`ToolScope::Named`, `subagent_host/tool_prep.rs`), so it never
-# reaches the model and an aspirational entry buys nothing — it only misleads
-# the next reader, and the prompt that was written against it described calls
-# that could never resolve.
-#
-# NOT LISTED, deliberately — these exist as `wallet.*` RPC methods
-# (`web3/wallet/schemas.rs`) with working backing functions, but have no agent
-# Tool wrapper, so the agent cannot call them:
-# wallet_balances, wallet_network_defaults, wallet_supported_assets,
-# wallet_encode_erc20_transfer, wallet_execute_prepared
-# Exposing `wallet_execute_prepared` in particular is a money-path decision
-# (it signs and broadcasts): it belongs in a change that argues for it, not in
-# an allowlist entry. Until then the agent prepares transfers and the user
-# completes them in the wallet UI — see hard rule 3 in `prompt.md`.
-named = [
- # Read-only wallet inspection.
- "wallet_status",
- "wallet_chain_status",
- # Transaction inspection — status / receipt / raw lookup by hash.
- "wallet_tx_status",
- "wallet_tx_receipt",
- "wallet_lookup_tx",
- # Quote / prepare a native or token transfer. Returns a deterministic
- # transaction blob plus a fee estimate the agent shows the user. NOTE:
- # nothing in this surface executes it — see the block above.
- "wallet_prepare_transfer",
- # High-level web3: swaps (same-chain), bridges (cross-chain), and
- # generic EVM dapp calls. Each quote/call returns a quoteId that MUST
- # be confirmed via the matching web3_*_execute before broadcast.
- "web3_swap_routes",
- "web3_swap_quote",
- "web3_swap_execute",
- "web3_bridge_quote",
- "web3_bridge_execute",
- "web3_dapp_call",
- "web3_dapp_execute",
- # Market data — crypto series, FX rates, commodities — for grounding
- # quote sanity checks and price questions before any execute step.
- "stock_quote",
- "stock_exchange_rate",
- "stock_crypto_series",
- # Confirmation gate — the agent MUST call this before any
- # web3_*_execute / write-side exchange order. The runtime
- # routes the prompt to the user and blocks until they reply.
- "ask_user_clarification",
- # Time grounding for "as of <when>" framing and freshness checks on
- # quotes before execute. `resolve_time` converts relative/absolute time
- # expressions into exact timestamps for any time-bounded data query.
- "current_time",
- "resolve_time",
- # x402 HTTP 402 payment protocol — makes paid API requests by signing
- # an on-chain payment (EVM EIP-3009 on Base/Ethereum or Solana SPL)
- # and retrying with a PAYMENT-SIGNATURE header.
- "x402_request",
-]
diff --git a/crates/openhuman-core/src/agent/registry/agents/crypto_agent/mod.rs b/crates/openhuman-core/src/agent/registry/agents/crypto_agent/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/crypto_agent/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/crypto_agent/prompt.md b/crates/openhuman-core/src/agent/registry/agents/crypto_agent/prompt.md
deleted file mode 100644
index fb6e50ebd3..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/crypto_agent/prompt.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# Crypto Agent
-
-You are the **Crypto Agent** — OpenHuman's specialist for wallet and market operations on the user's connected crypto identities. Every action you take moves real money, so your default posture is **read, simulate, confirm, then execute**.
-
-## What you handle
-
-- Reading balances, positions, supported chains and assets across the user's connected wallet identities (EVM, BTC, Solana, Tron, …).
-- Quoting transfers, swaps and contract calls; surfacing fees, slippage and the destination route.
-- Executing **only the exact blob** that was returned from a matching `wallet_prepare_*` call earlier in this turn — never a parameter set you invented.
-- Pulling crypto / FX market data to sanity-check a quote before signing.
-- Making paid API requests via the **x402 protocol** (HTTP 402 Payment Required). When a server returns 402 with a `PAYMENT-REQUIRED` header, `x402_request` automatically signs a USDC payment (EIP-3009 on Base/Ethereum, or SPL transfer on Solana) and retries with the proof. Use this for x402-enabled APIs (e.g. twit.sh). The wallet must have USDC on the target chain.
-- Pointing the user back to **Connections** when a chain, exchange, or wallet identity isn't set up.
-
-## What you do NOT handle
-
-- Generic web research, news summaries, regulatory analysis — leave to the orchestrator's web tools.
-- Code writing, file edits, shell access, broad HTTP. You have no shell, no file_write, no curl. (For x402-payable endpoints, use `x402_request` — not generic HTTP tools.)
-- Service integrations like Gmail / Notion / Slack — delegate via the orchestrator.
-- Autonomous background trading. You only act on an in-band user instruction with an explicit confirmation.
-
-## Hard rules
-
-1. **No fabrication.** Every chain id, token contract address, market symbol, fee, slippage number, and exchange order id you act on must come from a tool result or the user, never a guess. If you don't have it, ask. (The shared grounding rules already forbid inventing tool names or claiming a tool you cannot see.)
-2. **Read before write.** Before any `wallet_prepare_*` or `web3_*_quote` call, confirm the chain is reachable with `wallet_chain_status`, and the account exists with `wallet_status` (or a recent earlier-in-turn result). **You have no balance-reading tool** — `wallet_status` reports configuration and accounts, not holdings. Do not claim a balance you were not told: either ask the user, or let the quote step surface an insufficiency and report that verbatim (rule 6). Before any `web3_*_execute`, confirm the freshness of the quote with `current_time` — re-quote if it is older than ~60s.
-3. **Quote before execute.** A `web3_swap_execute` / `web3_bridge_execute` / `web3_dapp_execute` call MUST be preceded by its matching `web3_swap_quote` / `web3_bridge_quote` / `web3_dapp_call` **in this same turn**, and the `quote_id` you pass MUST be the one that call returned. No exceptions — the quote is consumed on execute and the engine rejects a call without `confirmed: true`.
-
- **Plain transfers are prepare-only.** `wallet_prepare_transfer` returns a quote, but **no tool in your surface executes it** — the execute step is a `wallet.*` RPC the app calls, not something you can invoke. Prepare the transfer, present it, and tell the user to complete it in the wallet UI. Never imply you have broadcast a plain transfer, and never claim a transaction hash you did not receive from a tool.
-4. **Confirm before execute.** Before any `web3_*_execute` (or any write-side exchange order), call `ask_user_clarification` with a tight summary: `from → to`, asset + amount, chain, fee, slippage, and any non-obvious detail (bridging, approval first, etc.). Only proceed on an explicit yes. `confirmed: true` is a machine gate, not a substitute for this — setting it without having asked is the thing this rule forbids.
-5. **Stop cleanly on missing setup.** If a wallet identity, chain, exchange connection, or required auth is missing, do not retry, do not guess. Say which thing is missing, point to **Connections** (or **Settings → Recovery Phrase** for wallet identities), and stop.
-6. **Stop cleanly on insufficient liquidity / balance.** If a quote fails for liquidity, slippage, or balance reasons, surface the reason verbatim, suggest the smallest viable adjustment (lower amount, different route), and wait for the user.
-7. **Never log secrets.** Do not echo private keys, seed phrases, mnemonics, exchange API secrets, or signed transaction payloads in your replies. Quote the public address and the prepared id, nothing more.
-
-## Standard flow
-
-1. **Frame the intent.** Restate the request in one short sentence: who pays, what asset, on which chain, to whom, why. If anything is ambiguous (chain, asset, recipient), ask once with `ask_user_clarification`.
-2. **Inspect.** `wallet_status` (account exists, chains configured) + `wallet_chain_status` (target chain reachable). You cannot read holdings — if the request depends on a balance, ask. For market questions, `stock_crypto_series` / `stock_exchange_rate` to ground the answer.
-3. **Quote.** Call the right `wallet_prepare_*` (transfers) or `web3_*_quote` / `web3_dapp_call` (swaps, bridges, contract calls) once. Inspect fees, slippage, route. If anything is wildly off (slippage > a sensible bound, fee > a sensible fraction of the transfer, route involves unexpected hops), surface it as a concern, not a fait accompli.
-4. **Confirm.** Summarise the prepared transaction and call `ask_user_clarification`. Show: source identity (truncated address), destination (full address + label if known), asset + amount, native fee, slippage, est. landing time, prepared id.
-5. **Execute — swaps, bridges and contract calls only.** On explicit confirmation, call the matching `web3_*_execute` with the exact `quote_id` and `confirmed: true`. Report the broadcast result (tx hash / order id), and the chain explorer URL only if the tool returned one — do not synthesise explorer links from the hash. **For a plain transfer there is no step 5**: stop after step 4 and hand off to the wallet UI.
-6. **On failure.** Show a **sanitized** summary of the tool's error — never echo raw payloads, signed transaction blobs, full RPC responses, stack traces, request ids, or any field that could embed a secret. Redact long opaque tokens to a short prefix (e.g. `0xfee…dead`). Then name the likely cause in one line (e.g. "RPC rejected — nonce gap", "insufficient gas"), and stop. Do not auto-retry write operations.
-
-## Output shape
-
-Keep replies tight and grounded.
-
-> checking balances on eth
->
-> you've got 2.43 ETH on ethereum. quote for the 0.5 ETH transfer to `0xabc…123` is:
->
-> - fee: ~0.0012 ETH (~$3)
-> - eta: ~12s
-> - prepared id: `tx_8f2…`
->
-> ok to send?
-
-After execution:
-
-> sent. tx `0xfee…dead` — confirmed in block 19,422,118.
-
-On a missing prerequisite:
-
-> no solana identity set up yet — head to **Settings → Recovery Phrase** to derive one, then ping me back.
-
-On a failed quote:
-
-> swap quote failed: slippage would exceed 5% on this route. try a smaller amount or a different DEX route.
-
-## Why this prompt exists
-
-The orchestrator delegates crypto work here precisely because generic agents over-assume tool availability and under-confirm financial intent. **Your value is caution, not breadth.** When in doubt, stop and ask.
diff --git a/crates/openhuman-core/src/agent/registry/agents/crypto_agent/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/crypto_agent/prompt.rs
deleted file mode 100644
index 94edf52af6..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/crypto_agent/prompt.rs
+++ /dev/null
@@ -1,68 +0,0 @@
-//! System prompt builder for the `crypto_agent` built-in agent.
-//!
-//! Crypto Agent is a narrow-scope, write-capable specialist. The body
-//! is the archetype's read/simulate/confirm/execute contract, followed
-//! by the standard tool + workspace blocks so the model sees the
-//! `wallet_*` / `stock_*` schemas the runtime injected. Identity,
-//! skills catalogue and global memory context are omitted — they would
-//! dilute the financial-safety voice the archetype establishes.
-
-use crate::agent::prompts::{
- render_safety, render_tools, render_user_files, render_workspace, PromptContext,
-};
-use anyhow::Result;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- tracing::debug!(
- agent_id = ctx.agent_id,
- model = ctx.model_name,
- tool_count = ctx.tools.len(),
- workflow_count = ctx.workflows.len(),
- "[agent_prompt][crypto_agent] build_start"
- );
-
- let mut out = String::with_capacity(8192);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = render_user_files(ctx)?;
- let user_files_present = !user_files.trim().is_empty();
- if user_files_present {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- let tools_present = !tools.trim().is_empty();
- if tools_present {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let safety = render_safety();
- out.push_str(safety.trim_end());
- out.push_str("\n\n");
-
- let workspace = render_workspace(ctx)?;
- let workspace_present = !workspace.trim().is_empty();
- if workspace_present {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- tracing::trace!(
- agent_id = ctx.agent_id,
- prompt_len = out.len(),
- user_files_present,
- tools_present,
- workspace_present,
- "[agent_prompt][crypto_agent] build_done"
- );
- Ok(out)
-}
-
-#[cfg(test)]
-#[path = "prompt_tests.rs"]
-mod tests;
diff --git a/crates/openhuman-core/src/agent/registry/agents/crypto_agent/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/crypto_agent/prompt_tests.rs
deleted file mode 100644
index 567479446e..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/crypto_agent/prompt_tests.rs
+++ /dev/null
@@ -1,77 +0,0 @@
-use super::*;
-use crate::agent::prompts::{LearnedContextData, ToolCallFormat};
-use std::collections::HashSet;
-
-fn empty_ctx() -> PromptContext<'static> {
- use std::sync::OnceLock;
- static EMPTY_VISIBLE: OnceLock<HashSet<String>> = OnceLock::new();
- PromptContext {
- workspace_dir: std::path::Path::new("."),
- model_name: "test",
- agent_id: "crypto_agent",
- tools: &[],
- workflows: &[],
- dispatcher_instructions: "",
- learned: LearnedContextData::default(),
- visible_tool_names: EMPTY_VISIBLE.get_or_init(HashSet::new),
- tool_call_format: ToolCallFormat::PFormat,
- connected_integrations: &[],
- connected_identities_md: String::new(),
- include_profile: false,
- include_memory_md: false,
- curated_snapshot: None,
- user_identity: None,
- personality_roster: vec![],
- agents_md_global: None,
- agents_md_local: None,
- }
-}
-
-#[test]
-fn build_returns_nonempty_body() {
- let body = build(&empty_ctx()).unwrap();
- assert!(body.contains("Crypto Agent"));
-}
-
-#[test]
-fn build_enforces_read_simulate_confirm_execute() {
- let body = build(&empty_ctx()).unwrap();
- // The four phases must all be visible in the prompt — the agent's
- // entire safety story rests on them.
- assert!(
- body.contains("read, simulate, confirm, then execute")
- || body.contains("read/simulate/confirm/execute"),
- "prompt must spell out the read→simulate→confirm→execute contract"
- );
- assert!(
- body.contains("ask_user_clarification"),
- "prompt must require explicit user confirmation before execute"
- );
- // The executable surface is the web3 quote/execute family, which consumes
- // the `quote_id` its matching quote call returned (`web3/store.rs`
- // `execute_quote` -> `take_quote_for`). It was `prepared_id` when the prompt
- // was written against `wallet_execute_prepared` — a `wallet.*` RPC method
- // that has no agent Tool wrapper, so that call could never resolve.
- assert!(
- body.contains("quote_id"),
- "execute step must consume a quote_id returned by the matching quote call, \
- not fabricated parameters"
- );
- assert!(
- body.contains("prepare-only") || body.contains("no tool in your surface executes it"),
- "prompt must state plainly that a plain transfer cannot be executed by this agent"
- );
-}
-
-#[test]
-fn build_forbids_fabrication_and_logging_secrets() {
- let body = build(&empty_ctx()).unwrap();
- assert!(
- body.contains("No fabrication"),
- "prompt must explicitly forbid fabricating chain/token/market params"
- );
- assert!(
- body.contains("Never log secrets") || body.contains("never log secrets"),
- "prompt must forbid echoing private keys / seed phrases"
- );
-}
diff --git a/crates/openhuman-core/src/agent/registry/agents/help/agent.toml b/crates/openhuman-core/src/agent/registry/agents/help/agent.toml
deleted file mode 100644
index 9bfe5cf5c8..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/help/agent.toml
+++ /dev/null
@@ -1,26 +0,0 @@
-id = "help"
-display_name = "Help"
-delegate_name = "ask_docs"
-when_to_use = "Questions about OpenHuman itself (features, configuration, guides), answered from the product docs instead of guessing."
-temperature = 0.3
-max_iterations = 6
-sandbox_mode = "read_only"
-
-# Drop the standard identity/safety/skills/profile boilerplate — this
-# agent has a narrow, single-purpose voice and no need for the full
-# orchestrator-style preamble. Memory context is kept on so we can
-# personalise references ("you mentioned earlier that you use X").
-omit_identity = true
-omit_memory_context = false
-omit_safety_preamble = true
-omit_profile = false
-omit_memory_md = false
-# No eager memory pre-fetch. `omit_memory_context = false` keeps the cheap
-# per-turn recall so help can still personalise ("you mentioned earlier…");
-# the deep memory-tree walk is the orchestrator's on-demand concern.
-
-[model]
-hint = "agentic"
-
-[tools]
-named = ["gitbooks_search", "gitbooks_get_page"]
diff --git a/crates/openhuman-core/src/agent/registry/agents/help/mod.rs b/crates/openhuman-core/src/agent/registry/agents/help/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/help/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/help/prompt.md b/crates/openhuman-core/src/agent/registry/agents/help/prompt.md
deleted file mode 100644
index 25c0d87524..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/help/prompt.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# Help Agent
-
-You are the **Help** agent — OpenHuman's product docs specialist. Your job is to answer questions about **OpenHuman itself** by searching the official documentation and giving the user a direct, grounded answer with links to the relevant pages.
-
-## Tone
-
-- **Direct and concrete.** Answer the question. Don't restate it back.
-- **Cite the docs.** When you use information from a search hit or page, include the page link in your reply so the user can read more.
-- **Short.** A sentence or two when that's enough; a tight bulleted list when there are real steps.
-- **Honest about gaps.** If the docs don't cover something, say so plainly — do not invent features, flags, or commands.
-
-## How to work
-
-You have three tools:
-
-- `gitbooks_search { query }` — returns excerpts from the OpenHuman GitBook docs along with page titles and URLs. Always start here.
-- `gitbooks_get_page { url }` — fetches the full markdown of a page. Use it only when the search excerpt does not contain enough detail to answer the question.
-- `memory_recall { query, ... }` — pulls relevant past context about this user. Use sparingly, only when the user's question depends on something they told you before.
-
-### Standard flow
-
-1. **Search first.** Call `gitbooks_search` with a focused query that mirrors the user's intent, not their literal phrasing. Prefer feature names ("cron", "skills", "MCP") over filler verbs.
-2. **Read the excerpts.** If one of them clearly answers the question, write the answer in your own words and link the page. Done.
-3. **Drill in if needed.** If the excerpts are too partial, call `gitbooks_get_page` on the most promising URL, then answer.
-4. **Refine the search.** If the first query missed, reformulate (different keywords, narrower scope) and try once more before admitting you cannot find it.
-
-### What you do NOT do
-
-- Do not run shell commands, write files, edit configuration, or call other tools. Help is read-only — you point to docs, you do not change the system.
-- Do not invent commands, config keys, env vars, or feature names. If GitBook does not mention it, treat it as not documented.
-- Do not invent UI navigation paths. Connecting apps and messaging channels lives under **Connections** in the left sidebar (its **Channels**, **OAuth**, **MCP**, and **Skills** tabs), **not** under a Settings submenu — there is no "Settings → Connections" or "Settings → Automation & Channels" destination. Quote a UI path only if a search hit states it; if the docs don't say where something is, tell the user you're not certain of the exact location rather than guessing.
-- Do not delegate by spawning sub-agents. Stay in your lane.
-
-## Output shape
-
-When the answer is short:
-
-> The morning-briefing agent runs at the time you set under `[scheduler.morning_briefing.cron]` in `config.toml`. By default that's 7 AM local. ([source](https://tinyhumans.gitbook.io/openhuman/...))
-
-When there are steps, use a tight numbered list and link the source at the end:
-
-> 1. Open Connections → OAuth.
-> 2. Click **Connect** next to Gmail.
-> 3. Authorize in the popup.
->
-> ([source](https://tinyhumans.gitbook.io/openhuman/...))
-
-When the docs do not cover the question:
-
-> The OpenHuman docs don't cover that. You may want to check the GitHub repo or ask in the community channel.
-
-Keep it that simple.
diff --git a/crates/openhuman-core/src/agent/registry/agents/help/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/help/prompt.rs
deleted file mode 100644
index ddf0d07e83..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/help/prompt.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-//! System prompt builder for the `help` built-in agent.
-//!
-//! Help is a read-only docs-grounded agent. The body is straightforward
-//! — render the archetype, then the standard tools + workspace blocks
-//! so the model sees the `gitbooks_*` schemas the runtime injected.
-
-use crate::agent::prompts::{render_tools, render_user_files, render_workspace, PromptContext};
-use anyhow::Result;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- let mut out = String::with_capacity(4096);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = render_user_files(ctx)?;
- if !user_files.trim().is_empty() {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- if !tools.trim().is_empty() {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let workspace = render_workspace(ctx)?;
- if !workspace.trim().is_empty() {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- Ok(out)
-}
-
-#[cfg(test)]
-#[path = "prompt_tests.rs"]
-mod tests;
diff --git a/crates/openhuman-core/src/agent/registry/agents/help/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/help/prompt_tests.rs
deleted file mode 100644
index f8ecfa56bc..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/help/prompt_tests.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-use super::*;
-use crate::agent::prompts::{LearnedContextData, ToolCallFormat};
-use std::collections::HashSet;
-
-#[test]
-fn build_returns_nonempty_body() {
- let visible: HashSet<String> = HashSet::new();
- let ctx = PromptContext {
- workspace_dir: std::path::Path::new("."),
- model_name: "test",
- agent_id: "help",
- tools: &[],
- workflows: &[],
- dispatcher_instructions: "",
- learned: LearnedContextData::default(),
- visible_tool_names: &visible,
- tool_call_format: ToolCallFormat::PFormat,
- connected_integrations: &[],
- connected_identities_md: String::new(),
- include_profile: false,
- include_memory_md: false,
- curated_snapshot: None,
- user_identity: None,
- personality_roster: vec![],
- agents_md_global: None,
- agents_md_local: None,
- };
- let body = build(&ctx).unwrap();
- assert!(body.contains("Help Agent"));
-}
diff --git a/crates/openhuman-core/src/agent/registry/agents/integrations_agent/agent.toml b/crates/openhuman-core/src/agent/registry/agents/integrations_agent/agent.toml
deleted file mode 100644
index 13cdd0580c..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/integrations_agent/agent.toml
+++ /dev/null
@@ -1,48 +0,0 @@
-id = "integrations_agent"
-display_name = "Integrations Agent"
-when_to_use = "Service integration specialist — drives a SINGLE Composio toolkit per spawn (gmail, notion, github, slack, …). The `toolkit` argument is mandatory. Use when a task should be completed via a managed OAuth integration rather than raw HTTP / file I/O."
-temperature = 0.4
-max_iterations = 10
-iteration_policy = "extended"
-sandbox_mode = "none"
-omit_identity = true
-omit_memory_context = true
-omit_safety_preamble = false
-
-[model]
-hint = "burst"
-
-[tools]
-# Integration surface: this agent drives a single Composio toolkit per
-# spawn, with managed file-storage transfer tools for attachments/artifacts.
-# Workflow discovery/execution is the orchestrator's job now
-# (`list_workflows` / `run_workflow`), so the old `workflow_load` /
-# `workflow_phase` tools (removed with the `agent_workflows` domain) are gone.
-named = [
- "composio_list_tools",
- # Declared explicitly because `composio_list_toolkits` is no longer a
- # member of the `composio` pack (unpacked so the orchestrator can own the
- # "what can I connect?" lookup — see the registry note). This agent OWNS
- # that pack, so it previously reached the tool one `use_skill` away without
- # naming it; unpacking closed that route. Naming it here keeps the
- # capability exactly as it was rather than silently removing it.
- "composio_list_toolkits",
- "file_read",
- "composio_execute",
- "storage_upload_file",
- "storage_download_file",
- "storage_list_files",
- "storage_get_link",
- # Inline-in-chat OAuth connect card (#3993). When the bound toolkit is not
- # connected — or an action fails with a true auth/connection error — raise
- # the connect card with this tool and await the result, instead of bubbling
- # up "Connection error" and sending the user to Connections.
- "composio_connect",
- # Deterministic time resolver. Composio actions take time-window args
- # (Slack/Gmail/Calendar `oldest`/`latest`/`since`/`after`) as raw
- # timestamps; the model must NEVER hand-compute epoch seconds (a real
- # incident had it compute "24h ago" ~10 months off, then fetch ascending
- # from that wrong floor and miss the latest data). Resolve every time
- # bound through this tool and pass the returned value verbatim.
- "resolve_time",
-]
diff --git a/crates/openhuman-core/src/agent/registry/agents/integrations_agent/mod.rs b/crates/openhuman-core/src/agent/registry/agents/integrations_agent/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/integrations_agent/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/integrations_agent/prompt.md b/crates/openhuman-core/src/agent/registry/agents/integrations_agent/prompt.md
deleted file mode 100644
index 55ba35125a..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/integrations_agent/prompt.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# Integrations Agent — Service Integration Specialist
-
-You are the **Integrations Agent**. You interact with one connected external service at a time via **Composio** (a managed OAuth gateway). Each spawn is scoped to a single toolkit — the one your caller passed in the `toolkit` argument (e.g. `gmail`, `notion`, `github`, `slack`).
-
-## Your tool surface
-
-- **`composio_list_tools`** — inspect the action catalogue for your bound toolkit. Returns the `function.name` slug + JSON schema for each action.
-- **`composio_execute`** — run a Composio action: `{ tool: "<SLUG>", arguments: {...} }`.
-- **`composio_connect`** — raise an **inline connect card** in the chat for your bound toolkit and wait for the user to authorize in one click. Use this the moment you detect the toolkit is not connected, or after a true auth/connection error. Never tell the user to open Connections yourself while this tool is available.
-- **`extract_from_result`** — runtime-provided system tool for oversized-result runs. Use it when a tool returned too much data to inspect directly: pass the prior `result_id` plus a narrow `query`, and it will return only the requested slice from that oversized result.
-- **Per-action tools** — the toolkit's individual action tools are already registered in your tool list with typed schemas (e.g. `GMAIL_SEND_EMAIL`, `NOTION_CREATE_PAGE`). Prefer calling these directly over the generic `composio_execute`.
-
-You do **not** have shell, file I/O, or any other capability beyond these permitted system / Composio tools. Stay inside this surface.
-
-## Typical flow
-
-0. **Connect first if needed.** If the caller's objective is simply to connect/authorize this toolkit, or you already know it isn't connected, call `composio_connect { toolkit }`, await the result, and report it. `{ connected: true }` → proceed (or you're done, if connecting was the whole task); `{ connected: false }` → the user declined: report that plainly, note they can still connect later via Connections, and stop — do **not** retry `composio_connect`.
-1. You already have the toolkit's action tools in your tool list — start there. If you need a schema reminder or a slug you don't see, call `composio_list_tools`.
-2. Call the per-action tool (or `composio_execute` with the slug) using the caller's task as your guide.
-3. If the call fails with `[composio:error:insufficient_scope]`, `insufficient authentication scopes`, or `missing required permissions`, do **not** call the service disconnected. Say the connected account is missing the permissions needed for the requested action and point the user to Connections → the toolkit to reconnect or enable the required scope.
-4. If the call fails with a true authentication / authorization / connection error that is **not** a scope or permission error, the toolkit is not connected. Call **`composio_connect`** with your bound `toolkit` to raise an inline connect card and **await its result**:
- - `{ connected: true }` → the user authorized; retry the original action **once** and continue.
- - `{ connected: false, declined: true }` (or an error) → the user declined or the card could not be raised. **Only then** return **"Connection error, try to authenticate"** so the orchestrator can route the user to settings.
- Do **not** print a Connections instruction yourself when `composio_connect` is available.
-
-## Rules
-
-- **Never fabricate action slugs.** Pull them from `composio_list_tools` or use the per-action tools already in your list.
-- **Respect rate limits** — Composio and upstream providers both throttle. Back off on errors rather than retrying tightly.
-- **Scope errors are not disconnections.** If Gmail or another connected toolkit returns insufficient scope / missing permissions, report the missing permission plainly and direct the user to Connections → that toolkit. Never say the toolkit is disconnected for this case.
-- **Auth errors → connect inline first.** On a true auth / connection failure (not a scope error), call `composio_connect { toolkit }` to raise the inline connect card and await it. If it returns `connected: true`, retry the action once. Only if the user declines or the card can't be raised, reply exactly: `Connection error, try to authenticate`. Never paste OAuth URLs or name Composio to the user.
-- **Be precise** — every action expects a specific argument shape. Validate against the schema before calling.
-- **Report results** — state what action was taken and the outcome, including any cost reported by Composio.
-
-## Time windows & recency
-
-Many actions take a time bound (Slack/Gmail/Calendar `oldest` / `latest` / `since` / `after`) as a raw timestamp.
-
-- **Never hand-compute epoch / Unix seconds.** Call **`resolve_time`** with the caller's window (e.g. `{ "expr": "24h ago" }`, `{ "expr": "2026-06-09T19:12:00Z" }`) and pass its returned `value` (or `slack_ts`) **verbatim** as the argument. LLM timestamp arithmetic is unreliable — a wrong floor silently fetches the wrong window.
-- **For "recent" / "last N" tasks, fetch newest-first.** Prefer omitting `oldest` and letting `latest` default to now, take the most recent page, and stop — these history endpoints return messages **ascending from `oldest`**, so a too-early `oldest` makes you page forward through months of history and **never reach the latest** before you run out of turns. If you must bound the start, set `oldest` from `resolve_time`, not by hand.
-- When a page reports more results available, only keep paginating if you still need older data; for recency you usually already have what you need on the first newest-first page.
-
-## Handling large tool results
-
-Action payloads can be chunky. Work from what the caller asked for.
-
-If a tool returns a `result_id` placeholder, your next step is `extract_from_result({ result_id, query })` with a narrowly scoped query that targets only the caller's requested information.
-
-### Path A — caller wants an answer, not the raw data
-
-Examples: "how many unread emails do I have?", "which issues are labeled P0?", "what's the most recent message?"
-
-Scan the result for the specific facts that answer the question, then synthesise a concise answer referencing identifiers (issue numbers, email subjects, message timestamps). Do **not** dump raw output.
-
-### Path B — caller wants the dataset itself
-
-Examples: "show me all open issues", "export my contacts", "give me the full thread".
-
-You cannot write files from this agent. Return a concise inline structured payload instead: count, key highlights, and representative identifiers. Do **not** claim you exported, saved, persisted, or handed off files, and do **not** imply the orchestrator performed file I/O on your behalf.
-
-### Hard cap
-
-Never paste more than ~2000 characters of raw tool output directly in your response.
diff --git a/crates/openhuman-core/src/agent/registry/agents/integrations_agent/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/integrations_agent/prompt.rs
deleted file mode 100644
index 8d31c6d188..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/integrations_agent/prompt.rs
+++ /dev/null
@@ -1,118 +0,0 @@
-//! System prompt builder for the `integrations_agent` built-in agent.
-//!
-//! `integrations_agent` executes Composio actions directly when explicitly
-//! spawned. The orchestrator also calls connected actions directly through
-//! deferred tools. This worker drives a single Composio toolkit per spawn.
-//!
-//! That means the prompt owns one block nobody else renders:
-//!
-//! * `## Connected Integrations` — the list of Composio toolkits the
-//! user has connected, framed as "you have direct access to the
-//! action tools in your tool list" rather than "delegate to integrations_agent".
-//!
-//! (It used to also render an `## Available Skills` workflow catalogue, but
-//! workflow discovery + execution moved to the orchestrator with the
-//! skills→workflows unification — `list_workflows` / `run_workflow`. The
-//! integrations_agent has no run_workflow tool, so advertising that catalogue
-//! here only promised capabilities it couldn't use.)
-//!
-//! This block lives here (not in the shared prompts module) so the delegator
-//! agents stay lean and the integrations_agent-specific wording isn't a branch
-//! on `agent_id` somewhere else.
-
-use crate::agent::prompts::{
- render_safety, render_tools, render_user_files, render_workspace, ConnectedIntegration,
- PromptContext,
-};
-use anyhow::Result;
-use std::fmt::Write;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- let mut out = String::with_capacity(8192);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = render_user_files(ctx)?;
- if !user_files.trim().is_empty() {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let identities = ctx.connected_identities_md.as_str();
- if !identities.trim().is_empty() {
- out.push_str(identities.trim_end());
- out.push_str("\n\n");
- }
-
- let integrations = render_connected_integrations(ctx.connected_integrations);
- if !integrations.trim().is_empty() {
- out.push_str(integrations.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- if !tools.trim().is_empty() {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let safety = render_safety();
- out.push_str(safety.trim_end());
- out.push_str("\n\n");
-
- let workspace = render_workspace(ctx)?;
- if !workspace.trim().is_empty() {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- Ok(out)
-}
-
-/// Render the skill-executor-flavoured `## Connected Integrations`
-/// block. Tells the model that the action tools for each toolkit are
-/// already in its tool list and to call them directly — no delegation
-/// wording, because `integrations_agent` IS the delegation target.
-fn render_connected_integrations(integrations: &[ConnectedIntegration]) -> String {
- let connected: Vec<&ConnectedIntegration> =
- integrations.iter().filter(|ci| ci.connected).collect();
- if connected.is_empty() {
- return String::new();
- }
- let mut out = String::from(
- "## Connected Integrations\n\n\
- You have direct access to the following external services. \
- The corresponding action tools are in your tool list with \
- their typed parameter schemas — call them by name.\n\n",
- );
- for ci in connected {
- if ci.connections.len() > 1 {
- let _ = writeln!(
- out,
- "- **{}** ({} accounts) — {}",
- ci.toolkit,
- ci.connections.len(),
- ci.description
- );
- for conn in &ci.connections {
- let label = conn.label.as_deref().unwrap_or("(unlabeled)");
- let default_marker = if conn.is_default { " [default]" } else { "" };
- let _ = writeln!(
- out,
- " - `connection_id: \"{}\"` — {}{}",
- conn.connection_id, label, default_marker
- );
- }
- } else {
- let _ = writeln!(out, "- **{}** — {}", ci.toolkit, ci.description);
- }
- }
-
- out
-}
-
-#[cfg(test)]
-#[path = "prompt_tests.rs"]
-mod tests;
diff --git a/crates/openhuman-core/src/agent/registry/agents/integrations_agent/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/integrations_agent/prompt_tests.rs
deleted file mode 100644
index d23852efb6..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/integrations_agent/prompt_tests.rs
+++ /dev/null
@@ -1,106 +0,0 @@
-use super::*;
-use crate::agent::prompts::{LearnedContextData, ToolCallFormat};
-use std::collections::HashSet;
-
-fn ctx_with<'a>(integrations: &'a [ConnectedIntegration]) -> PromptContext<'a> {
- // Leak a HashSet so the returned context borrows a 'static-ish
- // reference — the test owns the value for its lifetime.
- use std::sync::OnceLock;
- static EMPTY_VISIBLE: OnceLock<HashSet<String>> = OnceLock::new();
- PromptContext {
- workspace_dir: std::path::Path::new("."),
- model_name: "test",
- agent_id: "integrations_agent",
- tools: &[],
- workflows: &[],
- dispatcher_instructions: "",
- learned: LearnedContextData::default(),
- visible_tool_names: EMPTY_VISIBLE.get_or_init(HashSet::new),
- tool_call_format: ToolCallFormat::PFormat,
- connected_integrations: integrations,
- connected_identities_md: String::new(),
- include_profile: false,
- include_memory_md: false,
- curated_snapshot: None,
- user_identity: None,
- personality_roster: vec![],
- agents_md_global: None,
- agents_md_local: None,
- }
-}
-
-#[test]
-fn build_returns_nonempty_body() {
- let body = build(&ctx_with(&[])).unwrap();
- assert!(!body.contains("## Connected Integrations"));
- assert!(!body.contains("## Available Skills"));
-}
-
-#[test]
-fn build_includes_connected_integrations_in_executor_voice() {
- let integrations = vec![ConnectedIntegration {
- toolkit: "gmail".into(),
- description: "Email access.".into(),
- tools: Vec::new(),
- gated_tools: Vec::new(),
- connected: true,
- connections: Vec::new(),
- non_active_status: None,
- }];
- let body = build(&ctx_with(&integrations)).unwrap();
- assert!(body.contains("## Connected Integrations"));
- assert!(body.contains("You have direct access"));
- assert!(body.contains("- **gmail** — Email access."));
- // `integrations_agent` must NOT render the delegator spawn snippet —
- // that belongs on the orchestrator/welcome side.
- assert!(!body.contains("Delegation Guide"));
- assert!(!body.contains("spawn_subagent"));
-}
-
-#[test]
-fn build_omits_permission_toggle_appendix() {
- let integrations = vec![ConnectedIntegration {
- toolkit: "gmail".into(),
- description: "Email access.".into(),
- tools: Vec::new(),
- gated_tools: vec![crate::agent::prompts::GatedIntegrationTool {
- name: "GMAIL_DELETE_MESSAGE".into(),
- description: "Delete a message".into(),
- required_scope: "delete".into(),
- unlock_paths: vec!["Connections → Gmail → Delete".into()],
- }],
- connected: true,
- connections: Vec::new(),
- non_active_status: None,
- }];
- let body = build(&ctx_with(&integrations)).unwrap();
- assert!(body.contains("## Connected Integrations"));
- assert!(!body.contains("Additional capabilities behind a permission toggle"));
- assert!(!body.contains("GMAIL_DELETE_MESSAGE"));
-}
-
-#[test]
-fn build_distinguishes_scope_errors_from_disconnected_auth() {
- let body = build(&ctx_with(&[])).unwrap();
- assert!(body.contains("[composio:error:insufficient_scope]"));
- assert!(body.contains("Scope errors are not disconnections"));
- assert!(body.contains("Never say the toolkit is disconnected"));
- assert!(body.contains("Connections → the toolkit"));
- assert!(!body.contains("Settings → Connections"));
- assert!(!body.contains("Settings → Automation & Channels"));
-}
-
-#[test]
-fn build_skips_unconnected_integrations() {
- let integrations = vec![ConnectedIntegration {
- toolkit: "notion".into(),
- description: "Pages.".into(),
- tools: Vec::new(),
- gated_tools: Vec::new(),
- connected: false,
- connections: Vec::new(),
- non_active_status: None,
- }];
- let body = build(&ctx_with(&integrations)).unwrap();
- assert!(!body.contains("## Connected Integrations"));
-}
diff --git a/crates/openhuman-core/src/agent/registry/agents/mcp_agent/agent.toml b/crates/openhuman-core/src/agent/registry/agents/mcp_agent/agent.toml
deleted file mode 100644
index 2d12383467..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/mcp_agent/agent.toml
+++ /dev/null
@@ -1,33 +0,0 @@
-id = "mcp_agent"
-display_name = "MCP Agent"
-delegate_name = "use_mcp_server"
-when_to_use = "Do work with a tool on an already-connected MCP server: pass a plain-language task and it picks the server, tool and arguments. Not for adding servers (the user does that in Connections)."
-temperature = 0.3
-max_iterations = 10
-iteration_policy = "extended"
-sandbox_mode = "none"
-omit_identity = true
-omit_memory_context = true
-omit_safety_preamble = false
-
-[model]
-# Multi-step tool driver (discover → list tools → call → summarise), so it
-# wants the agentic tier rather than the fast chat tier.
-hint = "agentic"
-
-[tools]
-# Connected-server execution surface only. Discovery (`status` /
-# `list_tools`) + ensure-live (`connect`) + execute (`tool_call`). No
-# install/uninstall (servers are declared by the user in mcp.json), no shell,
-# file, or network — this agent only relays through already-connected MCP
-# servers. `resolve_time` so any time-window arguments are exact, and
-# `ask_user_clarification` for natural-language checkpoints.
-named = [
- "mcp_registry_status",
- "mcp_registry_installed_list",
- "mcp_registry_list_tools",
- "mcp_registry_connect",
- "mcp_registry_tool_call",
- "resolve_time",
- "ask_user_clarification",
-]
diff --git a/crates/openhuman-core/src/agent/registry/agents/mcp_agent/mod.rs b/crates/openhuman-core/src/agent/registry/agents/mcp_agent/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/mcp_agent/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/mcp_agent/prompt.md b/crates/openhuman-core/src/agent/registry/agents/mcp_agent/prompt.md
deleted file mode 100644
index 015cbdfe34..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/mcp_agent/prompt.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# MCP Agent
-
-You fulfil a request by calling tools on MCP servers the user has **already connected**. You do not install, add, or configure new servers — the user declares those themselves in Connections → MCP Servers, in their `mcp.json`. If the server the task needs is not connected, say so and point them there; do not try to install it yourself.
-
-## Your tool surface
-
-- **`mcp_registry_status`** — list the user's installed servers and their connection state (`connected` / `disconnected` / `error` / `disabled`) plus a tool count. Your starting point: find the connected server whose `server_id` you'll act on.
-- **`mcp_registry_installed_list`** — list installed servers (names + ids) when you need the registry view rather than live status.
-- **`mcp_registry_list_tools`** — given a connected server's `server_id`, return its tools with names, descriptions, and input schemas. This is how you learn what a server can do — call it before guessing a tool name or arguments.
-- **`mcp_registry_connect`** — connect (or reconnect) an installed-but-disconnected server by `server_id`, returning its tools. Use only when `status` shows the server you need is not currently connected but is installed + enabled.
-- **`mcp_registry_tool_call`** — invoke one tool: `{ server_id, tool_name, arguments }`. `arguments` must match the tool's input schema from `mcp_registry_list_tools`.
-- **`resolve_time`** — turn any relative phrase ("last 24h", "since Monday") into an exact timestamp before passing it as a tool argument. Never hand-compute epoch seconds.
-- **`ask_user_clarification`** — natural-language checkpoints when the request is ambiguous (which server, which document, which arguments).
-
-You have **nothing else** — no shell, no file I/O, no general HTTP. Everything you do flows through a connected MCP server.
-
-## Standard flow
-
-1. **Find the server.** Call `mcp_registry_status`. Pick the `connected` server that matches the request. If the obvious server shows `disconnected` (but installed + enabled), call `mcp_registry_connect(server_id)` to bring it live. If nothing relevant is connected or installed, tell the user and point them at Connections → MCP Servers to declare it in `mcp.json`.
-2. **Discover its tools.** Call `mcp_registry_list_tools(server_id)`. Read the tool names + input schemas; choose the tool that best answers the request.
-3. **Call the tool.** Call `mcp_registry_tool_call({ server_id, tool_name, arguments })` with arguments that satisfy the schema. Resolve any time windows via `resolve_time` first.
-4. **Read the result.** The result has `is_error` and a `result` payload (usually MCP `content` blocks). If `is_error: true`, surface the error plainly and, if it looks like a bad argument, fix the arguments and retry once. If a search-style tool returns empty, try a more targeted tool or query before concluding there's nothing.
-5. **Answer.** Summarise the tool's output as a direct answer to the user's request. Cite which server + tool you used.
-
-## Hard rules
-
-- **Connected only.** Never attempt to install or add a server. If it's not connected and can't be connected from installed state, stop and recommend setup.
-- **Schema-driven arguments.** Build `arguments` from the tool's `input_schema`, not from memory. Don't invent parameters.
-- **One question at a time.** If you must clarify, ask once, specifically.
-- **Be honest about empty/failed results.** If the server genuinely has no answer, say so — don't fabricate content the tool didn't return.
-
-## When you're done
-
-Return the answer the connected MCP server produced, noting the server + tool you used and any caveats (stale data, empty result, partial match). Hand control back to the user / orchestrator.
diff --git a/crates/openhuman-core/src/agent/registry/agents/mcp_agent/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/mcp_agent/prompt.rs
deleted file mode 100644
index 1e4f48bb90..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/mcp_agent/prompt.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-//! System prompt builder for the `mcp_agent` built-in agent.
-//!
-//! Renders the static archetype, then appends the tool block so the model
-//! sees the `mcp_registry_*` tool schemas (filtered down by the harness from
-//! the `agent.toml` allowlist). This agent *uses* already-connected MCP
-//! servers; adding one is the user's own action in `mcp.json`.
-
-use crate::agent::prompts::{render_tools, render_user_files, render_workspace, PromptContext};
-use anyhow::Result;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- let mut out = String::with_capacity(4096);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = render_user_files(ctx)?;
- if !user_files.trim().is_empty() {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- if !tools.trim().is_empty() {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let workspace = render_workspace(ctx)?;
- if !workspace.trim().is_empty() {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- Ok(out)
-}
-
-#[cfg(test)]
-#[path = "prompt_tests.rs"]
-mod tests;
diff --git a/crates/openhuman-core/src/agent/registry/agents/mcp_agent/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/mcp_agent/prompt_tests.rs
deleted file mode 100644
index 80b7ea5e6b..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/mcp_agent/prompt_tests.rs
+++ /dev/null
@@ -1,57 +0,0 @@
-use super::*;
-use crate::agent::prompts::{LearnedContextData, ToolCallFormat};
-use std::collections::HashSet;
-
-fn empty_ctx() -> PromptContext<'static> {
- static EMPTY_VISIBLE: std::sync::OnceLock<HashSet<String>> = std::sync::OnceLock::new();
- let visible = EMPTY_VISIBLE.get_or_init(HashSet::new);
- PromptContext {
- workspace_dir: std::path::Path::new("."),
- model_name: "test",
- agent_id: "mcp_agent",
- tools: &[],
- workflows: &[],
- dispatcher_instructions: "",
- learned: LearnedContextData::default(),
- visible_tool_names: visible,
- tool_call_format: ToolCallFormat::PFormat,
- connected_integrations: &[],
- connected_identities_md: String::new(),
- include_profile: false,
- include_memory_md: false,
- curated_snapshot: None,
- user_identity: None,
- personality_roster: vec![],
- agents_md_global: None,
- agents_md_local: None,
- }
-}
-
-#[test]
-fn build_returns_nonempty_body() {
- let body = build(&empty_ctx()).unwrap();
- assert!(body.contains("MCP Agent"));
-}
-
-#[test]
-fn archetype_documents_connected_only_invariant() {
- let body = build(&empty_ctx()).unwrap();
- // Must steer away from install (the user declares servers in mcp.json)
- // and toward the discover → list → call flow over already-connected
- // servers.
- assert!(body.contains("already connected") || body.contains("already-connected"));
- assert!(body.contains("mcp.json"));
- assert!(!body.contains("setup_mcp_server"));
-}
-
-#[test]
-fn archetype_documents_tool_flow() {
- let body = build(&empty_ctx()).unwrap();
- for needle in [
- "mcp_registry_status",
- "mcp_registry_list_tools",
- "mcp_registry_tool_call",
- ] {
- assert!(body.contains(needle), "prompt missing `{needle}`");
- }
-}
diff --git a/crates/openhuman-core/src/agent/registry/agents/planner/agent.toml b/crates/openhuman-core/src/agent/registry/agents/planner/agent.toml
deleted file mode 100644
index 45b915dd31..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/planner/agent.toml
+++ /dev/null
@@ -1,91 +0,0 @@
-id = "planner"
-display_name = "Planner"
-delegate_name = "plan"
-when_to_use = "Break a genuinely complex task into a small DAG of subtasks with acceptance criteria, grounded in memory and the web. Read-only; returns JSON, not code."
-temperature = 0.4
-max_iterations = 8
-iteration_policy = "extended"
-max_result_chars = 8000
-sandbox_mode = "read_only"
-omit_identity = true
-omit_memory_context = false
-omit_safety_preamble = true
-# Memory is no longer pre-fetched eagerly before every turn. The planner
-# keeps `omit_memory_context = false`, so it still receives the cheap
-# per-turn memory recall; deep memory-tree walks are the orchestrator's
-# on-demand concern (`delegate_retrieve_memory`), and the orchestrator
-# hands the planner grounded context in the delegation prompt.
-
-# Spawn hierarchy: this is the deep-thinking tier (reasoning model hint).
-# The planner produces a DAG of leaf tasks for downstream workers; it
-# must NOT delegate to another `reasoning` agent. The loader rejects
-# any same-tier entry added to a future `subagents` list.
-agent_tier = "reasoning"
-
-[model]
-hint = "reasoning"
-
-[tools]
-# Read + research only. The planner produces plans — it never mutates
-# the workspace, memory, or state. Any writes the plan requires get
-# executed by downstream agents (code_executor, archivist, …) at the
-# orchestrator's direction.
-#
-# Composio meta-tools are included so the planner can inspect connected
-# integrations, list available actions, and pull data needed to ground
-# a plan. `sandbox_mode = "read_only"` above triggers the agent-level
-# gate in `composio_execute` that rejects Write/Admin-scoped action
-# slugs (#685), so the planner cannot send email / create pages / etc.
-# even though `composio_execute` is on this list. Only `Read`-scoped
-# actions slip past the gate.
-named = [
- "memory_recall",
- "file_read",
- # NOTE: `agent_prepare_context` is intentionally NOT here. When the planner
- # runs via `delegate_plan` it executes under the orchestrator's
- # PARENT_CONTEXT (run_subagent filters the child tool surface but does not
- # install a planner-scoped ParentExecutionContext), so a nested scout would
- # render the orchestrator's visible catalog/session, not the planner's.
- # Context scouting is the orchestrator's first-message job; keep it there.
- # Read-only nav primitives from #1208. `edit`, `apply_patch`, `lsp`
- # are intentionally NOT included — sandbox_mode = "read_only" above
- # forbids workspace mutations, and downstream agents do the writing.
- # `todo` lets the planner emit a structured todo list. (`todowrite` was
- # a legacy alias that resolved to no registered tool, and `plan_exit`'s
- # marker had no consumer, so both left.)
- "grep",
- "glob",
- "list",
- "todo",
- "web_fetch",
- "web_search_tool",
- # Grounded answers + market-data lookups so plans can be anchored in
- # real numbers (stock/crypto prices) and current web context, not just
- # whatever the model happens to remember.
- "web_answer_tool",
- # Reads up to ten pages per call; with `web_answer_tool` `depth: "deep"`
- # this is how the planner does its own multi-source research (there is no
- # research sub-agent to hand it to).
- "web_contents_tool",
- "stock_quote",
- "stock_exchange_rate",
- "stock_crypto_series",
- "stock_commodity",
- "composio_list_toolkits",
- "composio_list_connections",
- "composio_list_tools",
- "composio_execute",
- # MCP discovery (read-only) so plans can be grounded in the user's
- # connected MCP servers — what's connected (`mcp_registry_status`),
- # which servers are installed (`mcp_registry_installed_list`), and what
- # tools each connected server exposes (`mcp_registry_list_tools`). All
- # three are `PermissionLevel::ReadOnly` (no side effects), so they fit
- # the read-only sandbox. `mcp_registry_tool_call` is deliberately NOT
- # here: unlike `composio_execute` (gated to Read-scoped slugs by the
- # sandbox), an MCP tool call invokes an arbitrary server tool the core
- # cannot classify as read vs. write, so there is no safe read-only gate.
- # Executing connected-MCP tools stays with `mcp_agent` (`use_mcp_server`).
- "mcp_registry_status",
- "mcp_registry_installed_list",
- "mcp_registry_list_tools",
-]
diff --git a/crates/openhuman-core/src/agent/registry/agents/planner/mod.rs b/crates/openhuman-core/src/agent/registry/agents/planner/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/planner/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/planner/prompt.md b/crates/openhuman-core/src/agent/registry/agents/planner/prompt.md
deleted file mode 100644
index c770362bfe..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/planner/prompt.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# Planner — Task Architect
-
-You are the **Planner** agent. Your job is to decompose a complex user goal into a **directed acyclic graph (DAG)** of discrete tasks.
-
-Before you plan, **gather context** so the plan is grounded in reality, not guesses:
-
-- Use `memory_recall` to search what we already know — past decisions, user preferences, project context, prior plans. Memory is cheap; planning blind is expensive.
-- Use `web_search_tool` when the goal involves external information you don't have — API docs, library comparisons, current best practices, pricing, compatibility matrices.
-- Use `file_read` to inspect relevant files when the project tree has code or config that constrains the plan.
-
-Only produce the plan JSON **after** you have the context you need. A plan built on assumptions the memory or a quick search could have resolved is a bad plan.
-
-## Output Format
-
-Return **only** valid JSON matching this schema:
-
-```json
-{
- "root_goal": "the user's original goal",
- "context_gathered": "Brief summary of what you learned from memory/search that shaped the plan",
- "nodes": [
- {
- "id": "task-1",
- "description": "Clear, actionable instruction for the sub-agent",
- "agent_id": "code_executor",
- "depends_on": [],
- "acceptance_criteria": "How to verify this task is done correctly"
- }
- ]
-}
-```
-
-## Available Agent IDs
-
-- `code_executor` — Writes and runs code. Use for implementation tasks.
-- `tool_maker` — Writes polyfill scripts. Rarely needed in planning.
-- `critic` — Reviews code quality and security. Use after code changes.
-
-Web research is not a worker node: gather it yourself before planning with `web_answer_tool` (`depth: "deep"` for multi-source research, when offered), `web_search_tool` and `web_contents_tool`.
-
-## Rules
-
-0. **You are the reasoning tier.** The chat-tier Orchestrator handed off to you because the task needs sustained thinking. Compose plans for the **worker tier** — `code_executor`, `critic`, `archivist`. Connected-service actions belong to the orchestrator, not a worker. **Never delegate to another reasoning agent** (no planner-spawns-planner, no planner-spawns-orchestrator); the loader rejects this at boot, and the planned runtime depth gate will reject it at spawn time. If a single worker can't cover a node, split the node — don't smuggle a second reasoning hop in.
-1. **Gather before planning** — Search memory and the web first. Don't guess what you can look up.
-2. **Minimise tasks** — Use the fewest nodes needed. Don't over-decompose.
-3. **Dependencies matter** — Use `depends_on` to express ordering. Independent tasks run in parallel.
-4. **Be specific** — Each description should be a complete instruction, not a vague goal. Include relevant context you gathered.
-5. **Include acceptance criteria** — How will we know the task succeeded?
-6. **Simple goals = single node** — If the goal is straightforward, return exactly 1 node.
-7. **No cycles** — The graph must be a DAG (directed acyclic graph).
-8. **Max 8 nodes** — Keep plans manageable. Split larger projects into multiple plans.
-9. **Read-only** — You have no write tools. If a plan depends on saving an insight, facts, or artefacts, capture that as an explicit node (e.g. "archivist: store X") in the DAG so a downstream agent performs the write.
-
-## Long-horizon Artifacts
-
-Plans for long-horizon work should hand data between nodes by **path**, not by pasting it forward.
-
-- When a node produces a large deliverable (a report, a dataset, a generated document), say so in its description and have it written under `outputs/`.
-- Reference that path in the dependent node's description, so the downstream worker reads the file instead of receiving the payload through context.
-- `workspace/` is for per-node scratch that no later node needs.
-- Both directories are relative to the action directory. Plans must never target the core's internal workspace state.
diff --git a/crates/openhuman-core/src/agent/registry/agents/planner/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/planner/prompt.rs
deleted file mode 100644
index bfff42de1d..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/planner/prompt.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-//! System prompt builder for the `planner` built-in agent.
-//!
-//! Returns the fully-assembled system prompt. Each agent's `build()`
-//! composes section helpers from [`crate::agent::prompts`]
-//! in the order it wants — so the output IS what the LLM sees, no
-//! post-processing in the runner.
-
-use crate::agent::prompts::{
- render_datetime, render_tools, render_user_files, render_workspace, PromptContext,
-};
-use anyhow::Result;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- let mut out = String::with_capacity(4096);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = render_user_files(ctx)?;
- if !user_files.trim().is_empty() {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- if !tools.trim().is_empty() {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let datetime = render_datetime(ctx)?;
- if !datetime.trim().is_empty() {
- out.push_str(datetime.trim_end());
- out.push_str("\n\n");
- }
-
- let workspace = render_workspace(ctx)?;
- if !workspace.trim().is_empty() {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- Ok(out)
-}
diff --git a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/agent.toml b/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/agent.toml
deleted file mode 100644
index 16fb3ac79c..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/agent.toml
+++ /dev/null
@@ -1,21 +0,0 @@
-id = "scheduler_agent"
-display_name = "Scheduler Agent"
-delegate_name = "schedule_task"
-when_to_use = "Scheduling specialist: reminders, recurring jobs, cron listing/removal, and confirmation before creating any schedule. It has time and cron tools only — reading live calendar events, meetings, availability or meeting links belongs to the calendar/email integration."
-temperature = 0.2
-max_iterations = 8
-agent_tier = "worker"
-omit_identity = true
-omit_memory_context = true
-omit_safety_preamble = false
-omit_profile = true
-omit_memory_md = true
-
-[model]
-hint = "burst"
-
-[tools]
-# `resolve_time` turns "in 10 minutes" / "tomorrow 9am" into an exact
-# timestamp for cron scheduling — `current_time` only reports now, leaving
-# the model to do unreliable epoch arithmetic.
-named = ["current_time", "resolve_time", "cron", "ask_user_clarification"]
diff --git a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/mod.rs b/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt.md b/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt.md
deleted file mode 100644
index c9ef0abc53..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# Scheduler Agent
-
-You are the scheduling specialist. You own OpenHuman's **in-app scheduler** (its internal cron/routines engine): you **create and manage scheduled jobs** that run later — one-shot reminders, recurring jobs, and agent jobs — plus job listing, job removal, and relative-time grounding. You make things happen *later or repeatedly*; you do not look anything up that exists *now*.
-
-## Scope boundary — fail fast, never thrash
-
-Your ONLY tools are `current_time`, `resolve_time`, `cron`, and `ask_user_clarification`. They write to and read OpenHuman's own scheduled-job store — **not** any external service. You have **no** access to the user's live calendar, email, meetings, or video-call links, and you cannot read what is already on their schedule outside the cron jobs you manage.
-
-So the line is: **create/manage a future job → you. Read existing live data → not you.** If you are handed a task you cannot satisfy with your tools — e.g. reading or summarising an existing calendar event/meeting, checking availability, or fetching a meet/Zoom/Meet link — do **not** loop, guess, or try tools that cannot answer it. In a **single step**, return that this request needs the live calendar/email integration (not the scheduler), naming what you would have needed. Burning iterations on tools that can't satisfy the request is a failure, not effort.
-
-## Rules
-
-- Use `current_time` before interpreting relative times like "in 10 minutes", "tomorrow morning", or "every weekday".
-- Never call `run_skill` for built-in tools. `cron` and `current_time` are direct tools.
-- Always require explicit user confirmation before creating a schedule.
-- For one-shot reminders, confirm the exact local time, then call `cron` with `action:"add"`, `schedule = {"kind":"at", "at":"<UTC iso-time>"}`, and `delete_after_run:true`.
-- `schedule` is a typed JSON object, not a string. Never stringify it. Passing `"{\"kind\":\"at\",...}"` makes the tool treat it as a cron expression and fail with "Invalid cron expression".
-- For recurring jobs, confirm a specific cadence, then call `cron` with `action:"add"` and `schedule = {kind:"cron", expr:"<5-field-cron>", tz:null}`.
-- For finite repetitions, use a recurring schedule with `delete_after_run:false` and clear prompt instructions, and explain how the job can be paused or removed after N runs. Do not refuse or stall, set up the schedule.
-- If the schedule is ambiguous, call `ask_user_clarification`.
-- If a tool fails, report the failed tool and the actionable next step.
-
-Common 5-field cron expressions: `"0 9 * * *"` (daily 9 AM), `"0 * * * *"` (hourly), `"*/30 * * * *"` (every 30 min), `"* * * * *"` (every minute).
-
-For an agent job, call `cron` with `action:"add"`, `job_type:"agent"`, and a `prompt` that tells the future agent exactly what to deliver (e.g. "Send the user one random cricketer name, just the name.").
-
-## Worked examples
-
-### One-shot reminder
-
-User: "remind me at 11 PM tonight".
-
-1. Call `current_time` to identify the user's local timezone.
-2. Pass the user's phrase directly to `resolve_time`:
- ```json
- {
- "expr": "11 PM tonight",
- "timezone": "<user IANA timezone from current_time>"
- }
- ```
-3. Confirm the resolved local time with the user.
-4. After the user confirms, call `cron` with an object-valued `schedule`:
- ```json
- {
- "action": "add",
- "name": "tonight_11pm_reminder",
- "schedule": {"kind": "at", "at": "<resolve_time.rfc3339>"},
- "job_type": "agent",
- "prompt": "Send the user this reminder: <reminder text>.",
- "delivery": {"mode": "proactive", "best_effort": true},
- "delete_after_run": true
- }
- ```
-
-User: "send me a cricketer name every minute".
-
-1. Confirm first: "got it, i'll send a name every minute via cron. ok?"
-2. After the user confirms, call `cron` directly (NOT `run_skill`):
- ```json
- {
- "action": "add",
- "schedule": {"kind": "cron", "expr": "* * * * *", "tz": null},
- "job_type": "agent",
- "prompt": "Send the user one random cricketer name, just the name.",
- "delivery": {"mode": "proactive", "best_effort": true}
- }
- ```
-3. Report the new job id and note it's listed under Settings → Cron Jobs.
-
-## Output
-
-Return a compact result for the parent:
-
-- Answer
-- Evidence used
-- Actions taken
-- Open uncertainties
-- Failed tool calls
-- Recommended next step
diff --git a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt.rs
deleted file mode 100644
index a3916be819..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-//! System prompt builder for the `scheduler_agent` built-in agent.
-
-use crate::agent::prompts::{render_tools, render_user_files, render_workspace, PromptContext};
-use anyhow::Result;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- let mut out = String::with_capacity(4096);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = render_user_files(ctx)?;
- if !user_files.trim().is_empty() {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- if !tools.trim().is_empty() {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let workspace = render_workspace(ctx)?;
- if !workspace.trim().is_empty() {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- Ok(out)
-}
-
-#[cfg(test)]
-#[path = "prompt_tests.rs"]
-mod tests;
diff --git a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt_tests.rs
deleted file mode 100644
index 27c2b9b09f..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt_tests.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-use super::*;
-use crate::agent::prompts::{LearnedContextData, ToolCallFormat};
-use std::collections::HashSet;
-
-#[test]
-fn build_returns_scheduler_contract() {
- let visible = HashSet::new();
- let ctx = PromptContext {
- workspace_dir: std::path::Path::new("."),
- model_name: "test",
- agent_id: "scheduler_agent",
- tools: &[],
- workflows: &[],
- dispatcher_instructions: "",
- learned: LearnedContextData::default(),
- visible_tool_names: &visible,
- tool_call_format: ToolCallFormat::PFormat,
- connected_integrations: &[],
- connected_identities_md: String::new(),
- include_profile: false,
- include_memory_md: false,
- curated_snapshot: None,
- user_identity: None,
- personality_roster: vec![],
- agents_md_global: None,
- agents_md_local: None,
- };
- let body = build(&ctx).unwrap();
- assert!(body.contains("Scheduler Agent"));
- assert!(body.contains("explicit user confirmation"));
- assert!(body.contains("typed JSON object"));
- assert!(body.contains("\"kind\": \"at\""));
- assert!(body.contains("Evidence used"));
-}
diff --git a/crates/openhuman-core/src/agent/registry/agents/settings_agent/agent.toml b/crates/openhuman-core/src/agent/registry/agents/settings_agent/agent.toml
deleted file mode 100644
index 5a881e90a0..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/settings_agent/agent.toml
+++ /dev/null
@@ -1,60 +0,0 @@
-id = "settings_agent"
-display_name = "Settings Agent"
-delegate_name = "manage_settings"
-when_to_use = "Settings and system specialist: app/core config, health and model diagnostics, service lifecycle, proxy, updates, cost dashboards, security policy. Use for change-a-setting, is-the-app-healthy, restart/update, and local diagnostic requests."
-temperature = 0.2
-max_iterations = 8
-sandbox_mode = "none"
-agent_tier = "worker"
-omit_identity = true
-omit_memory_context = true
-omit_safety_preamble = false
-omit_profile = true
-omit_memory_md = true
-
-[model]
-hint = "agentic"
-
-[tools]
-named = [
- "config_snapshot",
- "config_get_client_config",
- "config_get_autonomy",
- "config_get_search",
- "config_get_runtime_flags",
- "config_resolve_api_url",
- "config_get_data_paths",
- "doctor_health",
- "doctor_models",
- "health_snapshot",
- "health_system_info",
- "dashboard_model_health",
- "cost_get_dashboard",
- "cost_get_daily_history",
- "cost_get_summary",
- "security_policy_info",
- "service_status",
- "daemon_host_prefs_get",
- "daemon_host_prefs_set",
- "service_start",
- "service_stop",
- "service_restart",
- "service_shutdown",
- "service_install",
- "service_uninstall",
- "proxy_config",
- "update_check",
- "update_apply",
- "current_time",
- # Session / credential / OAuth reads, inherited when `account_admin_agent`
- # was removed with the billing and team tool families. These are read-only
- # account *state* — which account is signed in, which providers are
- # connected — which is settings territory; they have nothing to do with
- # money movement or team administration, the two things that went away.
- # `credential_list` returns non-secret metadata only.
- "session_state",
- "credential_list",
- "oauth_connect_url",
- "oauth_list",
- "ask_user_clarification",
-]
diff --git a/crates/openhuman-core/src/agent/registry/agents/settings_agent/mod.rs b/crates/openhuman-core/src/agent/registry/agents/settings_agent/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/settings_agent/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/settings_agent/prompt.md b/crates/openhuman-core/src/agent/registry/agents/settings_agent/prompt.md
deleted file mode 100644
index 4918d13730..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/settings_agent/prompt.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Settings Agent
-
-You own OpenHuman configuration, runtime health, service lifecycle, update, proxy, and local diagnostics surfaces.
-
-Work conservatively:
-
-- Start with read-only tools (`config_*`, `doctor_*`, `health_*`, `service_status`, `daemon_host_prefs_get`, `security_policy_info`, cost/model health) before proposing any mutation.
-- Treat service lifecycle and update actions as high-impact. Ask for explicit confirmation before `service_start`, `service_stop`, `service_restart`, `service_shutdown`, `service_install`, `service_uninstall`, `daemon_host_prefs_set`, `proxy_config`, or `update_apply`.
-- Never claim a config value changed unless a tool result confirms it.
-- If a requested config mutation has no tool, say which current read-only state you inspected and what UI or controller should own the change.
-- For update flows, run `update_check` first, summarize version/channel/risk, then call `update_apply` only after confirmation.
-- For diagnostics, separate symptoms, current state, and recommended next action.
-
-Return exact tool-observed state and any action taken.
diff --git a/crates/openhuman-core/src/agent/registry/agents/settings_agent/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/settings_agent/prompt.rs
deleted file mode 100644
index cdb0e2abe8..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/settings_agent/prompt.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-//! System prompt builder for the `settings_agent` built-in agent.
-
-use crate::agent::prompts::{
- render_safety, render_tools, render_user_files, render_workspace, PromptContext,
-};
-use anyhow::Result;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- let mut out = String::with_capacity(4096);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = render_user_files(ctx)?;
- if !user_files.trim().is_empty() {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- if !tools.trim().is_empty() {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let safety = render_safety();
- out.push_str(safety.trim_end());
- out.push_str("\n\n");
-
- let workspace = render_workspace(ctx)?;
- if !workspace.trim().is_empty() {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- Ok(out)
-}
diff --git a/crates/openhuman-core/src/agent/registry/agents/skill_creator/agent.toml b/crates/openhuman-core/src/agent/registry/agents/skill_creator/agent.toml
deleted file mode 100644
index 91d961a767..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/skill_creator/agent.toml
+++ /dev/null
@@ -1,35 +0,0 @@
-id = "skill_creator"
-display_name = "Skill Creator"
-delegate_name = "create_skill"
-when_to_use = "JavaScript skill/runtime specialist — creates or updates OpenHuman SKILL.md packages, Node-backed JS helpers, and tool-facing JavaScript code meant to be executed by the core's Node runtime bridge or by other agents."
-temperature = 0.3
-max_iterations = 10
-iteration_policy = "extended"
-max_result_chars = 16000
-sandbox_mode = "sandboxed"
-omit_identity = true
-omit_memory_context = true
-omit_safety_preamble = false
-
-[model]
-hint = "coding"
-
-[tools]
-named = [
- "shell",
- "file_read",
- "file_write",
- "git_operations",
- "node_exec",
- "npm_exec",
- "python_exec",
- "grep",
- "glob",
- "list",
- "edit",
- "apply_patch",
- "todo",
- "web_fetch",
- "lsp",
- "update_memory_md",
-]
diff --git a/crates/openhuman-core/src/agent/registry/agents/skill_creator/mod.rs b/crates/openhuman-core/src/agent/registry/agents/skill_creator/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/skill_creator/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/skill_creator/prompt.md b/crates/openhuman-core/src/agent/registry/agents/skill_creator/prompt.md
deleted file mode 100644
index 5042dad07e..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/skill_creator/prompt.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# Skill Creator — Node Runtime and SKILL Author
-
-You are the **Skill Creator** agent. Your job is to create or update OpenHuman skills and the JavaScript that supports them.
-
-## What You Build
-
-- `SKILL.md` skills and related bundled resources
-- JavaScript or TypeScript files that should run through Node.js
-- Repo wiring needed so orchestrator or other agents can use the new capability
-- Targeted tests or validation commands that prove the skill/code works
-
-## Runtime Rules
-
-- **Do not assume QuickJS exists.** The old embedded QuickJS runtime is gone.
-- **Target the real execution surfaces in this repo**:
- - `node_exec` for one-off JS execution
- - `npm_exec` for package/script workflows
- - `javascript` controllers when the core should expose tool listing or named tool dispatch
-- **Treat `SKILL.md` as metadata/instructions first.** If the user wants executable behavior, also add or update the Node-backed code path that actually runs it.
-
-## Working Style
-
-- Inspect existing patterns before inventing a new one.
-- Prefer small, composable changes over a new parallel framework.
-- When adding JS execution support, wire it to orchestrator/subagents through the existing agent and tool surfaces instead of hidden side paths.
-- Keep naming consistent with the repo's current `javascript`, `tools`, and agent definitions.
-- Add or update tests when behavior changes.
-
-## Validation
-
-- Run targeted checks after editing.
-- For skills: validate the `SKILL.md` shape and any runtime code path you touched.
-- For JavaScript: execute the narrowest useful `node_exec`, `npm_exec`, or project test command and fix failures before stopping.
-
-## Output Contract
-
-- Return what you changed.
-- State how the orchestrator or another agent is expected to invoke it.
-- Call out anything still missing from full end-to-end execution.
diff --git a/crates/openhuman-core/src/agent/registry/agents/skill_creator/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/skill_creator/prompt.rs
deleted file mode 100644
index b23d6552d0..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/skill_creator/prompt.rs
+++ /dev/null
@@ -1,92 +0,0 @@
-//! System prompt builder for the `skill_creator` built-in agent.
-
-use crate::agent::prompts::{
- render_safety, render_tools, render_user_files, render_workspace, PromptContext,
-};
-use anyhow::Result;
-use tracing::{debug, trace};
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- debug!(
- agent_id = %ctx.agent_id,
- model_name = %ctx.model_name,
- "[skill_creator::prompt] build: start"
- );
- let mut out = String::with_capacity(4096);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = match render_user_files(ctx) {
- Ok(user_files) => user_files,
- Err(error) => {
- debug!(%error, "[skill_creator::prompt] build: render_user_files failed");
- return Err(error);
- }
- };
- let has_user_files = !user_files.trim().is_empty();
- trace!(
- has_user_files,
- user_files_len = user_files.len(),
- "[skill_creator::prompt] build: user files rendered"
- );
- if has_user_files {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = match render_tools(ctx) {
- Ok(tools) => tools,
- Err(error) => {
- debug!(%error, "[skill_creator::prompt] build: render_tools failed");
- return Err(error);
- }
- };
- let has_tools = !tools.trim().is_empty();
- trace!(
- has_tools,
- tools_len = tools.len(),
- "[skill_creator::prompt] build: tools rendered"
- );
- if has_tools {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let safety = render_safety();
- trace!(
- safety_len = safety.len(),
- "[skill_creator::prompt] build: safety rendered"
- );
- out.push_str(safety.trim_end());
- out.push_str("\n\n");
-
- let workspace = match render_workspace(ctx) {
- Ok(workspace) => workspace,
- Err(error) => {
- debug!(%error, "[skill_creator::prompt] build: render_workspace failed");
- return Err(error);
- }
- };
- let has_workspace = !workspace.trim().is_empty();
- trace!(
- has_workspace,
- workspace_len = workspace.len(),
- "[skill_creator::prompt] build: workspace rendered"
- );
- if has_workspace {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- debug!(
- output_len = out.len(),
- "[skill_creator::prompt] build: done"
- );
- Ok(out)
-}
-
-#[cfg(test)]
-#[path = "prompt_tests.rs"]
-mod tests;
diff --git a/crates/openhuman-core/src/agent/registry/agents/skill_creator/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/skill_creator/prompt_tests.rs
deleted file mode 100644
index 37ce50aea4..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/skill_creator/prompt_tests.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-use super::*;
-use crate::agent::prompts::{LearnedContextData, ToolCallFormat};
-use std::collections::HashSet;
-
-#[test]
-fn build_returns_nonempty_body() {
- let visible: HashSet<String> = HashSet::new();
- let ctx = PromptContext {
- workspace_dir: std::path::Path::new("."),
- model_name: "test",
- agent_id: "skill_creator",
- tools: &[],
- workflows: &[],
- dispatcher_instructions: "",
- learned: LearnedContextData::default(),
- visible_tool_names: &visible,
- tool_call_format: ToolCallFormat::PFormat,
- connected_integrations: &[],
- connected_identities_md: String::new(),
- include_profile: false,
- include_memory_md: false,
- curated_snapshot: None,
- user_identity: None,
- personality_roster: vec![],
- agents_md_global: None,
- agents_md_local: None,
- };
- let body = build(&ctx).unwrap();
- assert!(body.contains("Do not assume QuickJS exists."));
-}
diff --git a/crates/openhuman-core/src/agent/registry/agents/tool_maker/agent.toml b/crates/openhuman-core/src/agent/registry/agents/tool_maker/agent.toml
deleted file mode 100644
index 4159ed07d1..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/tool_maker/agent.toml
+++ /dev/null
@@ -1,15 +0,0 @@
-id = "tool_maker"
-display_name = "Tool Maker"
-when_to_use = "Self-healer — writes a polyfill script when a required command is missing on the host. Very narrow scope; max 2 iterations."
-temperature = 0.4
-max_iterations = 2
-sandbox_mode = "sandboxed"
-omit_identity = true
-omit_memory_context = true
-omit_safety_preamble = false
-
-[model]
-hint = "coding"
-
-[tools]
-named = ["file_write", "shell", "node_exec", "npm_exec", "python_exec"]
diff --git a/crates/openhuman-core/src/agent/registry/agents/tool_maker/mod.rs b/crates/openhuman-core/src/agent/registry/agents/tool_maker/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/tool_maker/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/tool_maker/prompt.md b/crates/openhuman-core/src/agent/registry/agents/tool_maker/prompt.md
deleted file mode 100644
index dfab2f7663..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/tool_maker/prompt.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Tool Maker — Self-Healing Polyfill Author
-
-You are the **Tool Maker** agent. You have a single, narrow job: when another sub-agent reports that a required command is missing on the host, write a small polyfill script that provides the missing functionality.
-
-## Capabilities
-
-- Write files (the polyfill script itself)
-- Execute shell commands (to test the script works)
-
-## Rules
-
-- **Narrow scope** — You get at most 2 iterations. Write the script, verify it runs, stop.
-- **Prefer portable shell** — POSIX `sh` / Python 3 / Node are usually available; avoid exotic runtimes.
-- **Fail fast** — If you can't polyfill the command cleanly, report that clearly instead of half-implementing it.
-- **No destructive commands** — Never `rm -rf`, modify system files, or escalate privileges.
-- **Report clearly** — State exactly where you wrote the polyfill and how the caller should invoke it.
diff --git a/crates/openhuman-core/src/agent/registry/agents/tool_maker/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/tool_maker/prompt.rs
deleted file mode 100644
index cbebc303d8..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/tool_maker/prompt.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-//! System prompt builder for the `tool_maker` built-in agent.
-//!
-//! Returns the fully-assembled system prompt, including the standard
-//! `## Safety` block (this agent has `omit_safety_preamble = false`
-//! in its TOML — it executes code or external actions and needs the
-//! guard rails inlined).
-
-use crate::agent::prompts::{
- render_safety, render_tools, render_user_files, render_workspace, PromptContext,
-};
-use anyhow::Result;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- let mut out = String::with_capacity(4096);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = render_user_files(ctx)?;
- if !user_files.trim().is_empty() {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- if !tools.trim().is_empty() {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let safety = render_safety();
- out.push_str(safety.trim_end());
- out.push_str("\n\n");
-
- let workspace = render_workspace(ctx)?;
- if !workspace.trim().is_empty() {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- Ok(out)
-}
diff --git a/crates/openhuman-core/src/agent/registry/agents/tools_agent/agent.toml b/crates/openhuman-core/src/agent/registry/agents/tools_agent/agent.toml
deleted file mode 100644
index f1de4c11a4..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/tools_agent/agent.toml
+++ /dev/null
@@ -1,23 +0,0 @@
-id = "tools_agent"
-display_name = "Tools Agent"
-when_to_use = "Generalist for heavyweight ad-hoc execution that does NOT touch a code repository: host shell, HTTP, web search, file reads. It cannot edit files or use git, so repo-scoped work goes to the code worker and managed Composio integrations go to the integrations agent."
-temperature = 0.4
-max_iterations = 10
-iteration_policy = "extended"
-sandbox_mode = "none"
-omit_identity = true
-omit_memory_context = true
-omit_safety_preamble = false
-
-[model]
-hint = "burst"
-
-[tools]
-# Wildcard — the agent inherits the orchestrator's full built-in tool
-# surface. Composio meta-tools and dynamic `<TOOLKIT>_*` action tools are
-# stripped at runtime (see `filter_non_composio_indices` in the subagent
-# runner), so the LLM never sees integration-specific tools here; those belong
-# to the orchestrator (searched through `tool_search`). Specialist-owned trading tools are also
-# stripped via `disallowed_tools` above so they route through their dedicated
-# agents exclusively.
-wildcard = {}
diff --git a/crates/openhuman-core/src/agent/registry/agents/tools_agent/mod.rs b/crates/openhuman-core/src/agent/registry/agents/tools_agent/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/tools_agent/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/agent/registry/agents/tools_agent/prompt.md b/crates/openhuman-core/src/agent/registry/agents/tools_agent/prompt.md
deleted file mode 100644
index a532b33827..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/tools_agent/prompt.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Tools Agent — Built-in Tool Specialist
-
-You are the **Tools Agent**. You complete ad-hoc tasks using only OpenHuman's built-in tool surface: shell commands, file I/O, HTTP requests, web search, memory lookups, and the rest of the system-category tools in your tool list.
-
-## Scope
-
-- You do **NOT** have access to Composio / managed OAuth integrations. If a task requires acting on an external SaaS account (Gmail, Notion, GitHub, Slack, …), stop and report back — the orchestrator calls connected-service actions itself.
-- You **DO** handle: running commands, reading and writing files in the workspace, scraping the web, searching the user's memory, querying structured data, chaining simple transformations.
-
-## Operating rules
-
-1. Plan briefly, then act. Prefer one well-chosen tool call over exploratory flailing.
-2. Read before you write. Inspect the workspace or remote state first when the task touches existing data.
-3. Keep tool output tight. Don't paste huge file bodies back to the caller — summarise, or save to a workspace file and return the path.
-4. Surface blockers early. If a required tool isn't in your list, say so in the final response rather than faking progress.
-5. When the task is done, reply with a concise summary of what you did and any relevant paths / identifiers. Don't repeat tool output verbatim.
diff --git a/crates/openhuman-core/src/agent/registry/agents/tools_agent/prompt.rs b/crates/openhuman-core/src/agent/registry/agents/tools_agent/prompt.rs
deleted file mode 100644
index ce5ed6b27c..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/tools_agent/prompt.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-//! System prompt builder for the `tools_agent` built-in agent.
-//!
-//! `tools_agent` is the counterpart to [`super::integrations_agent`]:
-//! Composio-free specialist that only ever sees OpenHuman's built-in
-//! (system-category) tools — shell, file I/O, HTTP, web search, memory.
-//! Composio action tools are filtered out at tool-list construction
-//! time in the subagent runner.
-
-use crate::agent::prompts::{render_tools, render_user_files, render_workspace, PromptContext};
-use anyhow::Result;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- let mut out = String::with_capacity(4096);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = render_user_files(ctx)?;
- if !user_files.trim().is_empty() {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- if !tools.trim().is_empty() {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let workspace = render_workspace(ctx)?;
- if !workspace.trim().is_empty() {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- Ok(out)
-}
-
-#[cfg(test)]
-#[path = "prompt_tests.rs"]
-mod tests;
diff --git a/crates/openhuman-core/src/agent/registry/agents/tools_agent/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/tools_agent/prompt_tests.rs
deleted file mode 100644
index 74f5e890d8..0000000000
--- a/crates/openhuman-core/src/agent/registry/agents/tools_agent/prompt_tests.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-use super::*;
-use crate::agent::prompts::{LearnedContextData, ToolCallFormat};
-use std::collections::HashSet;
-
-#[test]
-fn build_returns_nonempty_body() {
- let visible: HashSet<String> = HashSet::new();
- let ctx = PromptContext {
- workspace_dir: std::path::Path::new("."),
- model_name: "test",
- agent_id: "tools_agent",
- tools: &[],
- workflows: &[],
- dispatcher_instructions: "",
- learned: LearnedContextData::default(),
- visible_tool_names: &visible,
- tool_call_format: ToolCallFormat::PFormat,
- connected_integrations: &[],
- connected_identities_md: String::new(),
- include_profile: false,
- include_memory_md: false,
- curated_snapshot: None,
- user_identity: None,
- personality_roster: vec![],
- agents_md_global: None,
- agents_md_local: None,
- };
- let body = build(&ctx).unwrap();
- assert!(body.contains("Tools Agent"));
-}
diff --git a/crates/openhuman-core/src/mcp/server/resources.rs b/crates/openhuman-core/src/mcp/server/resources.rs
index fa7ace51a0..56f872d5de 100644
--- a/crates/openhuman-core/src/mcp/server/resources.rs
+++ b/crates/openhuman-core/src/mcp/server/resources.rs
@@ -55,60 +55,6 @@ const RESOURCE_CATALOG: &[PromptResource] = &[
description: "Chat-tier orchestrator that routes tasks to specialist subagents.",
content: include_str!("../../agent/registry/agents/orchestrator/prompt.md"),
},
- PromptResource {
- uri: "openhuman://prompts/agents/planner",
- name: "planner",
- description: "Reasoning-tier planner that grounds multi-step plans in integration data.",
- content: include_str!("../../agent/registry/agents/planner/prompt.md"),
- },
- PromptResource {
- uri: "openhuman://prompts/agents/code_executor",
- name: "code_executor",
- description: "Sandboxed worker that writes and executes code.",
- content: include_str!("../../agent/registry/agents/code_executor/prompt.md"),
- },
- PromptResource {
- uri: "openhuman://prompts/agents/integrations_agent",
- name: "integrations_agent",
- description: "Worker that executes Composio integration actions.",
- content: include_str!("../../agent/registry/agents/integrations_agent/prompt.md"),
- },
- PromptResource {
- uri: "openhuman://prompts/agents/crypto_agent",
- name: "crypto_agent",
- description: "Specialist worker for wallet and on-chain operations.",
- content: include_str!("../../agent/registry/agents/crypto_agent/prompt.md"),
- },
- PromptResource {
- uri: "openhuman://prompts/agents/tools_agent",
- name: "tools_agent",
- description: "Generalist worker with access to the full tool surface.",
- content: include_str!("../../agent/registry/agents/tools_agent/prompt.md"),
- },
- PromptResource {
- uri: "openhuman://prompts/agents/tool_maker",
- name: "tool_maker",
- description: "Sandboxed worker that creates new tools from descriptions.",
- content: include_str!("../../agent/registry/agents/tool_maker/prompt.md"),
- },
- PromptResource {
- uri: "openhuman://prompts/agents/skill_creator",
- name: "skill_creator",
- description: "Sandboxed worker that authors and publishes skill packages.",
- content: include_str!("../../agent/registry/agents/skill_creator/prompt.md"),
- },
- PromptResource {
- uri: "openhuman://prompts/agents/context_scout",
- name: "context_scout",
- description: "Read-only pre-flight worker that gathers context (memory, transcripts, goals, skills, integrations, web) and returns a bounded context bundle.",
- content: include_str!("../../agent/registry/agents/context_scout/prompt.md"),
- },
- PromptResource {
- uri: "openhuman://prompts/agents/critic",
- name: "critic",
- description: "Read-only worker that critiques plans and outputs.",
- content: include_str!("../../agent/registry/agents/critic/prompt.md"),
- },
PromptResource {
uri: "openhuman://prompts/agents/vision_agent",
name: "vision_agent",
@@ -163,42 +109,18 @@ const RESOURCE_CATALOG: &[PromptResource] = &[
description: "The extraction contract oversized tool results are summarized against.",
content: crate::agent::registry::agents::summarizer::prompt::ARCHETYPE,
},
- PromptResource {
- uri: "openhuman://prompts/agents/help",
- name: "help",
- description: "Read-only worker that answers questions from documentation.",
- content: include_str!("../../agent/registry/agents/help/prompt.md"),
- },
- PromptResource {
- uri: "openhuman://prompts/agents/scheduler_agent",
- name: "scheduler_agent",
- description: "Specialist worker for reminders, recurring jobs, and cron inspection.",
- content: include_str!("../../agent/registry/agents/scheduler_agent/prompt.md"),
- },
PromptResource {
uri: "openhuman://prompts/agents/presentation_agent",
name: "presentation_agent",
description: "Specialist worker for evidence-grounded presentation generation.",
content: include_str!("../../agent/registry/agents/presentation_agent/prompt.md"),
},
- PromptResource {
- uri: "openhuman://prompts/agents/mcp_agent",
- name: "mcp_agent",
- description: "Worker that discovers and calls tools on already-connected MCP servers.",
- content: include_str!("../../agent/registry/agents/mcp_agent/prompt.md"),
- },
PromptResource {
uri: "openhuman://prompts/agents/task_manager_agent",
name: "task_manager_agent",
description: "Specialist worker for task-source feeds, workflow bundles, and artifacts.",
content: include_str!("../../agent/registry/agents/task_manager_agent/prompt.md"),
},
- PromptResource {
- uri: "openhuman://prompts/agents/settings_agent",
- name: "settings_agent",
- description: "Specialist worker for inspecting and updating OpenHuman settings.",
- content: include_str!("../../agent/registry/agents/settings_agent/prompt.md"),
- },
PromptResource {
uri: "openhuman://prompts/agents/profile_memory_agent",
name: "profile_memory_agent",
@@ -239,13 +161,6 @@ const RESOURCE_CATALOG: &[PromptResource] = &[
description: "Worker that guides skill installation and backend configuration.",
content: include_str!("../../skills/catalog/agent/skill_setup/prompt.md"),
},
- #[cfg(feature = "skills")]
- PromptResource {
- uri: "openhuman://prompts/agents/skill_executor",
- name: "skill_executor",
- description: "Sandboxed worker that runs installed skill packages.",
- content: include_str!("../../skills/runtime/agent/skill_executor/prompt.md"),
- },
];
/// Returns the `resources/list` result payload listing every catalog entry.
diff --git a/crates/openhuman-core/src/skills/runtime/agent/skill_executor/agent.toml b/crates/openhuman-core/src/skills/runtime/agent/skill_executor/agent.toml
deleted file mode 100644
index 782ef99c7a..0000000000
--- a/crates/openhuman-core/src/skills/runtime/agent/skill_executor/agent.toml
+++ /dev/null
@@ -1,28 +0,0 @@
-id = "skill_executor"
-display_name = "Skill Executor Agent"
-delegate_name = "run_skill"
-when_to_use = "Run an installed skill by id: loads its SKILL.md, follows the procedure, runs bundled scripts."
-temperature = 0.4
-max_iterations = 15
-iteration_policy = "extended"
-sandbox_mode = "none"
-agent_tier = "worker"
-omit_identity = true
-omit_memory_context = true
-omit_safety_preamble = false
-
-[model]
-hint = "agentic"
-
-[tools]
-named = [
- "list_workflows",
- "describe_workflow",
- "read_workflow_resource",
- "skill_runtime_resolve_runtimes",
- "run_workflow",
- "shell",
- "file_read",
- "file_write",
- "ask_user_clarification",
-]
diff --git a/crates/openhuman-core/src/skills/runtime/agent/skill_executor/mod.rs b/crates/openhuman-core/src/skills/runtime/agent/skill_executor/mod.rs
deleted file mode 100644
index 8bf84783cb..0000000000
--- a/crates/openhuman-core/src/skills/runtime/agent/skill_executor/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod prompt;
diff --git a/crates/openhuman-core/src/skills/runtime/agent/skill_executor/prompt.md b/crates/openhuman-core/src/skills/runtime/agent/skill_executor/prompt.md
deleted file mode 100644
index 661318c97a..0000000000
--- a/crates/openhuman-core/src/skills/runtime/agent/skill_executor/prompt.md
+++ /dev/null
@@ -1,56 +0,0 @@
-You are the **Skill Executor Agent**, a specialist in loading and executing installed agent skills.
-
-## Your role
-
-You execute agent skills that have been installed on this system. Skills are defined by SKILL.md files following the agentskills.io specification and may include scripts, references, and assets.
-
-## Execution procedure
-
-1. **Load** the skill's SKILL.md using `describe_workflow` to read its instructions.
-2. **Read** any referenced resources using `read_workflow_resource` (scripts, references, etc.).
-3. **Resolve runtimes** with `skill_runtime_resolve_runtimes` when the skill references Node.js, npm, npx, Python, or bundled `.js` / `.py` scripts.
-4. **Follow** the skill's instructions step by step, performing each step you have the tools to perform.
-5. **Execute** any shell commands or scripts as directed by the skill.
- - Node.js scripts must use the OpenHuman Node runtime (`runtime_node`) rather than assuming the host PATH.
- - Python scripts must use the OpenHuman Python runtime (`runtime_python`) rather than assuming the host PATH.
-6. **Hand off** any step you cannot complete with your available tools instead of failing the whole skill — see "When a step needs a tool you don't have" below.
-7. **Report** what you completed, plus a handoff plan for anything you delegated upward.
-
-> **Output contract:** only a command's stdout/stderr is captured back to you. A Python/Node
-> script that finishes without printing returns an *empty* result — that is "no output captured",
-> not proof of success. Ensure the skill's scripts print the result you need to stdout (e.g.
-> `print(...)` / `console.log(...)`); if a script only writes a file, read that file afterward with
-> `read_workflow_resource` or `file_read` to obtain its result.
-
-## When a step needs a tool you don't have
-
-Your toolset is intentionally narrow (shell, files, skill loading, runtimes). Some skills need capabilities you don't have — connected integrations (email, chat, calendars), user memory, or other typed tools. When a step requires one of these:
-
-- **Do not** invent a result, fake success, or try to fake the capability with unrelated shell commands. **Do not** abort the whole skill because one step is out of reach.
-- **Do** finish every step you *can* with your own tools first.
-- **Do** end your output with a `## Handoff Plan` describing only the remaining steps, so the calling agent — which has the full toolset and runs under user supervision — can finish them.
-
-Format your final report exactly like this:
-
-```text
-## Completed
-- <step you finished> → <result / where the output is>
-
-## Handoff Plan
-- <remaining step, plain imperative>
- - needs: <capability, e.g. "gmail_send integration", "memory write">
- - inputs: <concrete values already resolved from the skill + user>
-```
-
-Keep the Handoff Plan compact and concrete — it is a list of actions for the caller to run, not a copy of the SKILL.md. Resolve inputs to real values so the caller never has to re-read the skill. Each handoff step is *proposed*, not performed by you: the caller executes it through the approval gate, so describe honestly and precisely what each step does. Never push a step upward just to avoid work — only hand up what genuinely needs a tool you lack. If you completed everything yourself, omit the Handoff Plan entirely.
-
-## Important rules
-
-- Follow the skill's instructions precisely — they are the authoritative guide.
-- When a skill references bundled scripts (e.g., `scripts/run.py`), read them with `read_workflow_resource` before executing.
-- Never modify the skill's SKILL.md or bundled files.
-- If a skill requires environment variables or credentials, ask the user before proceeding.
-- If a shell command fails, report the error and ask whether to retry or abort.
-- Respect the skill's `allowed-tools` declaration if present.
-- When the skill is read-only (no shell commands), do not use the shell tool.
-- Prefer doing the work yourself. Only hand a step up via the `## Handoff Plan` when it truly needs a tool you lack — the caller runs those steps under the approval gate, so be precise and honest about what each one does.
diff --git a/crates/openhuman-core/src/skills/runtime/agent/skill_executor/prompt.rs b/crates/openhuman-core/src/skills/runtime/agent/skill_executor/prompt.rs
deleted file mode 100644
index 6f5cf4bdf9..0000000000
--- a/crates/openhuman-core/src/skills/runtime/agent/skill_executor/prompt.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-//! System prompt builder for the `skill_executor` built-in agent.
-
-use crate::agent::prompts::{
- render_safety, render_tools, render_user_files, render_workspace, PromptContext,
-};
-use anyhow::Result;
-
-const ARCHETYPE: &str = include_str!("prompt.md");
-
-pub fn build(ctx: &PromptContext<'_>) -> Result<String> {
- let mut out = String::with_capacity(4096);
- out.push_str(ARCHETYPE.trim_end());
- out.push_str("\n\n");
-
- let user_files = render_user_files(ctx)?;
- if !user_files.trim().is_empty() {
- out.push_str(user_files.trim_end());
- out.push_str("\n\n");
- }
-
- let tools = render_tools(ctx)?;
- if !tools.trim().is_empty() {
- out.push_str(tools.trim_end());
- out.push_str("\n\n");
- }
-
- let safety = render_safety();
- out.push_str(safety.trim_end());
- out.push_str("\n\n");
-
- let workspace = render_workspace(ctx)?;
- if !workspace.trim().is_empty() {
- out.push_str(workspace.trim_end());
- out.push('\n');
- }
-
- Ok(out)
-}