Skip to content

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

fix(agent): correct planner prompt and toolpack registry

Steven Enamakela159f04c1c1b
diff --git a/crates/openhuman-core/src/agent/registry/agents/critic/agent.toml b/crates/openhuman-core/src/agent/registry/agents/critic/agent.toml
index 31b31baf38..1bb48bd2a0 100644
--- a/crates/openhuman-core/src/agent/registry/agents/critic/agent.toml
+++ b/crates/openhuman-core/src/agent/registry/agents/critic/agent.toml
@@ -1,7 +1,7 @@
id = "critic"
display_name = "Critic"
delegate_name = "review_code"
-when_to_use = "Adversarial read-only review of diffs and code: vulnerabilities, regressions, missing tests."
+when_to_use = "Workflow-run worker: adversarial read-only cross-check of claims, diffs and code (vulnerabilities, regressions, missing tests). Not a chat delegate."
temperature = 0.4
max_iterations = 5
# Bound the review verdict that flows up to the orchestrator verbatim
diff --git a/crates/openhuman-core/src/agent/registry/agents/planner/agent.toml b/crates/openhuman-core/src/agent/registry/agents/planner/agent.toml
index 45b915dd31..b61563e999 100644
--- a/crates/openhuman-core/src/agent/registry/agents/planner/agent.toml
+++ b/crates/openhuman-core/src/agent/registry/agents/planner/agent.toml
@@ -1,7 +1,7 @@
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."
+when_to_use = "Workflow-run worker: decompose a question into independent research angles, or research one angle, grounded in memory and the web. Read-only; not a chat delegate."
temperature = 0.4
max_iterations = 8
iteration_policy = "extended"
diff --git a/crates/openhuman-core/src/agent/registry/agents/planner/prompt.md b/crates/openhuman-core/src/agent/registry/agents/planner/prompt.md
index c770362bfe..cce2e154df 100644
--- a/crates/openhuman-core/src/agent/registry/agents/planner/prompt.md
+++ b/crates/openhuman-core/src/agent/registry/agents/planner/prompt.md
@@ -22,7 +22,7 @@ Return **only** valid JSON matching this schema:
{
"id": "task-1",
"description": "Clear, actionable instruction for the sub-agent",
- "agent_id": "code_executor",
+ "agent_id": "planner",
"depends_on": [],
"acceptance_criteria": "How to verify this task is done correctly"
}
@@ -30,17 +30,16 @@ Return **only** valid JSON matching this schema:
}
```
-## Available Agent IDs
+## Where your output goes
-- `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.
+You run as a worker inside a workflow run (the `parallel_research_cross_check` template), not as a chat delegate. The run hands your result to the next phase:
-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`.
+- In a **decompose** phase, return the plan JSON above; each node is one independent research angle, and `agent_id` names the phase worker (`planner`) or is omitted.
+- In a **research** phase, you are given one angle: gather evidence for it with `web_answer_tool` (`depth: "deep"` for multi-source research, when offered), `web_search_tool`, `web_contents_tool`, `web_fetch` and `memory_recall`, and return the findings with their sources instead of a plan.
## 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.
+0. **You are a read-only reasoning worker.** You never spawn other agents. Connected-service actions and writes belong to the caller, not to you.
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.
@@ -49,7 +48,7 @@ Web research is not a worker node: gather it yourself before planning with `web_
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.
+9. **Read-only** — You have no write tools. If a plan depends on saving something, say so in the node's description so the caller performs the write.
## Long-horizon Artifacts
diff --git a/crates/openhuman-core/src/tools/toolpacks/registry.rs b/crates/openhuman-core/src/tools/toolpacks/registry.rs
index cccdab4275..546368044b 100644
--- a/crates/openhuman-core/src/tools/toolpacks/registry.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/registry.rs
@@ -108,7 +108,7 @@ pub const PACKS: &[ToolPack] = &[
// The orchestrator owns it so the four registry tools on its belt stay
// advertised; the catalogue readers are `Deferred` and reached through
// `tool_search` or this skill.
- owners: &["orchestrator"],
+ owners: &["orchestrator", "planner"],
guide: include_str!("guides/mcp.md"),
},
ToolPack {
@@ -133,7 +133,8 @@ pub const PACKS: &[ToolPack] = &[
// reported a marketing figure of "1,552+ apps" instead of this
// install's real 119.
//
- // Its own owner keeps it by DECLARING it (`workflow_builder/agent.toml`).
+ // Its own owners keep it by DECLARING it (`workflow_builder/agent.toml`,
+ // `planner/agent.toml`).
tools: &[
"composio",
"composio_authorize",
@@ -141,7 +142,7 @@ pub const PACKS: &[ToolPack] = &[
"composio_list_connections",
"composio_list_tools",
],
- owners: &["workflow_builder"],
+ owners: &["workflow_builder", "planner"],
guide: "",
},
ToolPack {
@@ -310,7 +311,9 @@ pub const PACKS: &[ToolPack] = &[
"run_linter",
"run_tests",
],
- owners: &["image_agent", "video_agent", "vision_agent"],
+ // `planner` and `critic` are workflow-run workers, not chat
+ // delegates; inspecting files is their loop, so they keep the family.
+ owners: &["planner", "critic", "image_agent", "video_agent", "vision_agent"],
guide: include_str!("guides/coding.md"),
},
ToolPack {