Skip to content

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

docs(registry): update module-level docs to reflect current architecture

Steven Enamakelf3f21d07dfef
diff --git a/crates/openhuman-core/src/agent/registry/README.md b/crates/openhuman-core/src/agent/registry/README.md
index f42a86c41d..575c090ea5 100644
--- a/crates/openhuman-core/src/agent/registry/README.md
+++ b/crates/openhuman-core/src/agent/registry/README.md
@@ -60,8 +60,8 @@ Each built-in agent owns a subfolder with an `agent.toml` (id, `when_to_use`,
model, tool scope, sandbox mode, iteration cap, tier, `omit_*` flags —
parsed directly into `AgentDefinition`), a `prompt.md` holding the static
archetype body, and a `prompt.rs` that `include_str!`s that body and exposes
-`pub fn build(&PromptContext) -> anyhow::Result<String>`, appending runtime
-sections (tools, user files, workspace) to it. `researcher` additionally
+`pub fn build(&PromptContext) -> anyhow::Result<String>`, appending
+runtime-dependent sections (rendered tool list, user files, workspace) to it. `researcher` additionally
owns a `graph.rs` for a bespoke `AgentGraph`; every other archetype uses
`AgentGraph::Default`. The per-archetype contract is documented on
[`agents/mod.rs`](agents/mod.rs).
@@ -143,8 +143,7 @@ orchestrator tool synthesis in `tools/orchestrator_tools.rs` and
enumerate `load_builtins()`.
- `flows/` (`ops_part_02.rs`, `ops_part_03.rs`, `builder_tools_part_04.rs`,
`tinyflows/caps/agent.rs`) — resolve a flow `agent` node's `agent_ref`
- through `list_agents`/`get_agent`/`find_custom_in_config`, honouring the
- enabled flag.
+ through `list_agents`/`get_agent`/`find_custom_in_config`.
## Tests
diff --git a/crates/openhuman-core/src/agent/registry/agents/mod.rs b/crates/openhuman-core/src/agent/registry/agents/mod.rs
index 8854ff2e5a..c5605647a3 100644
--- a/crates/openhuman-core/src/agent/registry/agents/mod.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/mod.rs
@@ -1,25 +1,30 @@
//! Built-in agent archetypes.
//!
//! Each submodule below is one shipped agent and owns the same three
-//! files, so none of the 30 leaf `mod.rs` files need their own doc
+//! files, so none of the 29 leaf `mod.rs` files need their own doc
//! comment:
//!
-//! * `agent.toml` — id, `when_to_use`, model, tool allowlist, sandbox,
-//! iteration cap, and `omit_*` flags. Parsed directly into
-//! [`crate::agent::harness::definition::AgentDefinition`].
-//! * `prompt.md` — legacy static prompt body, kept for reference and as
-//! the workspace-override target.
+//! * `agent.toml` — id, `when_to_use`, model, tool scope, sandbox mode,
+//! iteration cap, tier, and `omit_*` flags. Parsed directly into
+//! [`crate::agent::harness::definition::AgentDefinition`]; ships without
+//! a `system_prompt`.
+//! * `prompt.md` — the static archetype body. `prompt.rs` embeds it with
+//! `include_str!`; nothing else reads it.
//! * `prompt.rs` — exposes `pub fn build(&PromptContext) ->
-//! anyhow::Result<String>`, wired into `PromptSource::Dynamic` by
-//! [`loader::BUILTINS`] so the prompt can branch on runtime state
-//! (available tools, user profile, connected integrations, model hint).
+//! anyhow::Result<String>`, which appends runtime-dependent sections
+//! (rendered tool list, user files, workspace) to the `prompt.md` body.
+//! [`BUILTINS`] installs it as `PromptSource::Dynamic` on the parsed
+//! definition. Most archetypes keep a `prompt_tests.rs` beside it.
//!
-//! A handful of archetypes (currently only `researcher`) additionally own a
-//! `graph.rs` exposing `fn graph() -> AgentGraph` for a bespoke turn graph;
-//! see [`loader::BuiltinAgent::graph_fn`].
+//! `researcher` additionally owns a `graph.rs` exposing
+//! `fn graph() -> AgentGraph` for a bespoke turn graph; see
+//! [`BuiltinAgent::graph_fn`].
//!
-//! See the [package README](../README.md) for what each archetype does and
-//! [`loader`] for how this list turns into the running registry.
+//! `loader.rs` holds [`BUILTINS`], [`load_builtins`] and
+//! [`validate_tier_hierarchy`]. The slice also registers archetypes that
+//! live with other domains (`memory/agent/agent/`, `skills/*/agent/`,
+//! `flows/agents/`), so this directory is not the full built-in set. The
+//! package `README.md` one level up describes what each archetype does.
mod loader;