Skip to content

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

refactor(docs, tests): update agent documentation and tests

Steven Enamakele0bc918c691a
diff --git a/crates/openhuman-core/src/agent/README.md b/crates/openhuman-core/src/agent/README.md
index 6dc9554a46..6297322900 100644
--- a/crates/openhuman-core/src/agent/README.md
+++ b/crates/openhuman-core/src/agent/README.md
@@ -357,7 +357,7 @@ All controllers register under `DomainGroup::Agent` in [`core/all.rs`](../core/a
| Namespace | Owner | Methods |
| --- | --- | --- |
-| `agent` | `schemas.rs` | `chat`, `chat_simple`, `server_status`, `list_definitions`, `get_definition`, `reload_definitions`, `triage_evaluate`, `graph_topologies`, `registry_snapshot`, `context_breakdown` |
+| `agent` | `schemas.rs` | `chat`, `chat_simple`, `server_status`, `list_definitions`, `get_definition`, `reload_definitions`, `triage_evaluate`, `registry_snapshot`, `context_breakdown` |
| `agent` | [`tinyagents/replay/`](./tinyagents/replay/) | `runs_active`, `run_status`, `run_events` (read-only journal replay) |
| `agent` | [`../threads/run_mode.rs`](./../threads/run_mode.rs) | `set_run_mode`, `get_run_mode` |
| `agent_registry` | `registry/` | `list`, `available_tools`, `get`, `upsert_custom`, `create_custom`, `update`, `set_enabled`, `remove` |
diff --git a/crates/openhuman-core/src/agent_registry/README.md b/crates/openhuman-core/src/agent_registry/README.md
index 1fa2a9442b..8c0d6c021c 100644
--- a/crates/openhuman-core/src/agent_registry/README.md
+++ b/crates/openhuman-core/src/agent_registry/README.md
@@ -138,7 +138,7 @@ ranking works.
- [`agent/session_host/builder/factory.rs`](../agent/session_host/builder/factory.rs):
`Agent::from_config_for_agent` falls back to `find_custom_in_config` +
`definition_from_registry_entry` when an id is not in the harness registry.
-- [`agent_runs/schemas.rs`](../agent_runs/schemas.rs): `agent.graph_topologies` and `agent.registry_snapshot`
+- [`agent_runs/schemas.rs`](../agent_runs/schemas.rs): `agent.registry_snapshot`
enumerate `load_builtins()`.
- `flows/` (`ops/inference_readiness.rs`, `ops/builder_gates.rs`,
`builder_tools/kind_reads.rs`, `tinyflows/caps/agent.rs`): resolve a flow
diff --git a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests_session_routing_tests.rs b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests_session_routing_tests.rs
index b217885994..07ab79b556 100644
--- a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests_session_routing_tests.rs
+++ b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests_session_routing_tests.rs
@@ -178,8 +178,7 @@ fn skill_sections_name_the_hand_off_this_session_can_call() {
hand_off_route(&ctx, "image_agent").as_deref(),
Some("`create_image` (`use_skill` skill `media`)")
);
- // Not in the orchestrator's allowlist: no route, so name nothing. `planner`
- // is not a chat delegate.
+ // Not in the orchestrator's allowlist: no route, so name nothing.
assert_eq!(hand_off_route(&ctx, "summarizer"), None);
assert_eq!(hand_off_route(&ctx, "planner"), None);
diff --git a/docs/gitbooks/en/developing/architecture/agent-harness.md b/docs/gitbooks/en/developing/architecture/agent-harness.md
index 3a36dbac51..f4bf4ea4c1 100644
--- a/docs/gitbooks/en/developing/architecture/agent-harness.md
+++ b/docs/gitbooks/en/developing/architecture/agent-harness.md
@@ -335,7 +335,7 @@ Note `action_dir/workspace/` is a scratch folder inside the agent's action root.
Two halves enforce the convention:
-- Prompt. A sub-agent that actually holds `file_write` gets a Long-horizon Artifact Offload contract in its system prompt: results past roughly 2 000 tokens go to a file under `outputs/`, and the reply is that relative path plus a short abstract. The gate is deliberate, a prompt may only name tools the agent can really call, or the model emits calls that fail. Skill-filtered specialists get no contract text, and a dedicated guard asserts their prompts never mention a filesystem tool. They stay covered by the harness half below, which needs no cooperation from the model. The `planner` prompt spells out what the convention means for its own work; the planner is told to reference artifact paths across DAG nodes rather than pasting payloads forward.
+- Prompt. A sub-agent that actually holds `file_write` gets a Long-horizon Artifact Offload contract in its system prompt: results past roughly 2 000 tokens go to a file under `outputs/`, and the reply is that relative path plus a short abstract. The gate is deliberate, a prompt may only name tools the agent can really call, or the model emits calls that fail. Skill-filtered specialists get no contract text, and a dedicated guard asserts their prompts never mention a filesystem tool. They stay covered by the harness half below, which needs no cooperation from the model.
- Harness. `offload_oversized_result` runs on every sub-agent outcome, so an oversized result is offloaded even when the worker inlined it anyway. It fires before the definition's `max_result_chars` cap, so the full body lands on disk instead of being cut.
What the parent receives is a pointer, not a payload:
@@ -460,8 +460,8 @@ Each `AgentDefinition` carries an `agent_tier` field (`chat` / `reasoning` / `wo
| Tier | May spawn | Must NOT spawn | Typical members |
| ----------- | --------------------- | ------------------------------- | ------------------------------------------------------------------------------- |
| `chat` | `reasoning`, `worker` | another `chat` | `orchestrator` |
-| `reasoning` | `worker` | another `reasoning`, any `chat` | `planner` (today the canonical one) |
-| `worker` | nothing[^1] | anything | critic, image_agent, task_manager_agent, … |
+| `reasoning` | `worker` | another `reasoning`, any `chat` | reasoning-tier custom agents |
+| `worker` | nothing[^1] | anything | image_agent, task_manager_agent, … |
[^1]: Skill-wildcard entries (`{ skills = "*" }`) are exempt because they name no agent: they expand to the connected Composio actions as `Deferred` tools the agent reaches through `tool_search`, not to a spawn.
diff --git a/tests/in_process/agent_approval_memory_coverage_e2e.rs b/tests/in_process/agent_approval_memory_coverage_e2e.rs
index 75bc154118..35338b4680 100644
--- a/tests/in_process/agent_approval_memory_coverage_e2e.rs
+++ b/tests/in_process/agent_approval_memory_coverage_e2e.rs
@@ -584,46 +584,9 @@ async fn agent_runs_active_accepts_every_filter_combination() {
}
// ---------------------------------------------------------------------------
-// agent.graph_topologies / agent.registry_snapshot
+// agent.registry_snapshot
// ---------------------------------------------------------------------------
-/// `agent_graph_topologies` exports structure only. The contract in its own
-/// schema is explicit — "never closure bodies or run state" — so this asserts
-/// the negative as well as the positive: a topology export that started leaking
-/// prompt text or run state would be a privacy regression that a
-/// shape-only check would not catch.
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-async fn agent_graph_topologies_exports_structure_without_run_state() {
- let _lock = env_lock_async().await;
- let harness = setup().await;
-
- let response = rpc(
- &harness.rpc_base,
- 18,
- "openhuman.agent_graph_topologies",
- json!({}),
- )
- .await;
- let body = payload(&response, "agent_graph_topologies");
-
- // `is_some()` would accept `null` or a scalar, so a schema regression that
- // dropped the field could still pass. Require the array itself — the handler
- // builds `graphs` as a `Vec<Value>` and returns
- // `json!({ "graphs": graphs, "agents": agents })`
- // (`crates/openhuman-core/src/agent/schemas.rs:486`), so it is an array, not an object.
- body.get("graphs")
- .and_then(Value::as_array)
- .unwrap_or_else(|| panic!("graph_topologies must return a `graphs` array: {body}"));
-
- let serialized = body.to_string();
- for leaked in ["system_prompt", "prompt_text", "api_key", "tool_arguments"] {
- assert!(
- !serialized.contains(leaked),
- "graph topology export is structure-only but contained {leaked:?}"
- );
- }
-}
-
/// `agent_registry_snapshot` projects the capability registry as metadata only.
/// `counts` must agree with the length of `components` — they are derived from
/// the same inventory, so a mismatch means one of the two was assembled from a