Skip to content

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

docs(agent): update definition references to tinyagents-definition

Steven Enamakel543e79855c6f
diff --git a/crates/openhuman-core/src/agent/README.md b/crates/openhuman-core/src/agent/README.md
index 92a5cf8841..b2c2bd44f0 100644
--- a/crates/openhuman-core/src/agent/README.md
+++ b/crates/openhuman-core/src/agent/README.md
@@ -218,13 +218,13 @@ coding workers, and background completion delivery. See
### Agent definitions, registry and prompts
-An `AgentDefinition` ([`harness/definition/`](./harness/definition/)) is an archetype: id, tier,
+An `AgentDefinition` ([`harness/host_definition.rs`](./harness/host_definition.rs), vocabulary in `tinyagents-definition`) is an archetype: id, tier,
prompt source, model spec, `ToolScope`, `SandboxMode`, iteration policy and
allowed sub-agents. Built-ins live in `registry/agents/<id>/` as an
`agent.toml` plus `prompt.md` (orchestrator, planner, critic, summarizer,
trigger_triage, trigger_reactor, vision_agent and others). Custom
definitions are TOML files under `<workspace>/agents/*.toml`, with
-`~/.openhuman/agents/*.toml` as a fallback ([`harness/definition_loader.rs`](./harness/definition_loader.rs)).
+`~/.openhuman/agents/*.toml` as a fallback (`tinyagents_definition::DefinitionSet::load_dirs`, driven from [`harness/host_definition.rs`](./harness/host_definition.rs)).
`AgentDefinitionRegistry` holds the merged set; `agent.reload_definitions`
rebuilds it.
@@ -342,7 +342,7 @@ Persistence, setup and RPC:
- `AgentProgress` (`progress.rs`): turn, iteration, tool, text and thinking
deltas, cost updates and the `Subagent*` family.
- `AgentDefinition`, `AgentDefinitionRegistry`, `ToolScope`, `SandboxMode`
- (`harness/definition/`): what an agent is.
+ (`harness/host_definition.rs` + `tinyagents-definition`): what an agent is.
- `ParentExecutionContext` ([`harness/fork_context.rs`](./harness/fork_context.rs)): task-local parent
state a sub-agent reads; `orchestration::parent_context::build_root_parent`
builds one for runs with no parent turn.
diff --git a/crates/openhuman-core/src/agent/harness/README.md b/crates/openhuman-core/src/agent/harness/README.md
index 2fa716142d..742bb2bb0b 100644
--- a/crates/openhuman-core/src/agent/harness/README.md
+++ b/crates/openhuman-core/src/agent/harness/README.md
@@ -39,7 +39,7 @@ used here (not defined here) by [`fork_context.rs`](./fork_context.rs).
| Module | Role |
| --- | --- |
-| `definition*.rs`, [`builtin_definitions.rs`](./builtin_definitions.rs), [`definition_loader.rs`](./definition_loader.rs) | `AgentDefinition`/`AgentDefinitionRegistry`/`SandboxMode`/`ToolScope`/`PromptSource`/`ModelSpec`; loads built-ins from `crate::agent::registry::agents` and user TOML from the workspace/home `agents/` directory. |
+| [`host_definition.rs`](./host_definition.rs), [`builtin_definitions.rs`](./builtin_definitions.rs) | The host side of agent definitions: `AgentExt` (prompt omissions, TokenJuice profile, MCP flag, prompt builder) over `tinyagents_definition::AgentDefinition<X>`, plus `AgentDefinitionRegistry` (a `DefinitionSet<AgentExt>` with the process/context singleton) and user-definition path resolution. The vocabulary (`ModelSpec`, `ToolScope`, `SandboxMode`, `AgentTier`, `PromptSource`, ...) and the TOML directory loader live in `tinyagents-definition`. Built-ins come from `crate::agent::registry::agents`. |
| `fork_context.rs` | Parent-handle context for direct host dispatch. `fork_context.rs` also carries the `RunQueue` handle (from `tinyagents_harness::run_queue`) down to a forked turn. |
| `graph.rs` | `run_channel_turn_via_graph` (`pub(crate)`): the channel/CLI turn graph, thin over `run_turn_via_tinyagents_shared`; called by the `agent.run_turn` native-bus handler in [`agent/bus.rs`](../bus.rs). |
| `artifact_offload/` | The `outputs/` / `workspace/` convention under `action_dir`: prompt half (`contract.rs`) and host policy half (`policy.rs`); mechanics (thresholds, path resolution, pointer rendering, the writer) live in `tinyagents_harness::artifacts` and are re-exported here. |
@@ -79,7 +79,7 @@ turn lifecycle are in `../session_host/`; `run_subagent`,
p-format). This crate is a test-only dependency of `harness/`; the parsers
are not called from production code here.
- `crate::agent::registry::agents`: built-in agent archetype TOML/prompt
- bundles loaded by `definition_loader`/`builtin_definitions`.
+ bundles loaded by `tinyagents_definition` (user TOML) and `builtin_definitions`.
- `crate::security::SecurityPolicy`: workspace containment policy plumbed
into `artifact_offload::new_artifact_offload`.
- `tinymemory-api`: provenance classification and untrusted-context wrapping,
diff --git a/crates/openhuman-core/src/agent/registry/README.md b/crates/openhuman-core/src/agent/registry/README.md
index ae936fe6fa..b722a7fe16 100644
--- a/crates/openhuman-core/src/agent/registry/README.md
+++ b/crates/openhuman-core/src/agent/registry/README.md
@@ -80,7 +80,7 @@ other domains: `skill_setup`
`workflow_builder` and `flow_discovery` ([`flows/agents/`](../../flows/agents/), feature `flows`).
Workspace-level overrides (`<workspace_dir>/agents/*.toml`, with a
`~/.openhuman/agents/` fallback) are loaded separately by
-`agent::harness::definition_loader` and replace built-ins on id collision;
+`tinyagents_definition::DefinitionSet::load_dirs` and replace built-ins on id collision;
`AgentDefinitionRegistry::load` re-runs `validate_tier_hierarchy` after that
merge.
@@ -137,7 +137,7 @@ ranking works.
- [`config/schema/`](../../config/schema/): `Config.agent_registry: AgentRegistryConfig` is the
persisted store every `ops.rs` function reads and writes.
- [`agent/harness/builtin_definitions.rs`](../harness/builtin_definitions.rs): `load_builtins()` seeds the
- process-global `AgentDefinitionRegistry`; [`agent/harness/definition/registry.rs`](../harness/definition/registry.rs)
+ process-global `AgentDefinitionRegistry`; [`agent/harness/host_definition.rs`](../harness/host_definition.rs)
calls `validate_tier_hierarchy` again after workspace overrides merge.
- [`agent/session_host/builder/factory.rs`](../session_host/builder/factory.rs):
`Agent::from_config_for_agent` falls back to `find_custom_in_config` +
diff --git a/crates/openhuman-core/src/agent/subagent_host/README.md b/crates/openhuman-core/src/agent/subagent_host/README.md
index 6adb8b6b6e..40aee3d0ba 100644
--- a/crates/openhuman-core/src/agent/subagent_host/README.md
+++ b/crates/openhuman-core/src/agent/subagent_host/README.md
@@ -32,7 +32,7 @@ survive that boundary on its own.
## Where next
-- `crate::agent::harness::definition` for `AgentDefinition`, `AgentTier`,
+- `crate::agent::harness::host_definition` for `AgentDefinition` (and `tinyagents_definition` for `AgentTier`,
`SandboxMode`, and the other archetype shapes this module resolves against.
- `crate::agent::orchestration` for `spawn_subagent` and the other
user-facing tools that call into this runner.
diff --git a/crates/openhuman-core/src/sandbox/README.md b/crates/openhuman-core/src/sandbox/README.md
index 749b495d56..e2cfc53099 100644
--- a/crates/openhuman-core/src/sandbox/README.md
+++ b/crates/openhuman-core/src/sandbox/README.md
@@ -47,7 +47,7 @@ backend, execute.
### Resolving a policy
`resolve_sandbox_policy` ([`ops.rs`](./ops.rs)) maps the agent's declared
-`SandboxMode` (`agent::harness::definition`) to a `SandboxBackendKind`:
+`SandboxMode` (`tinyagents_definition::SandboxMode`) to a `SandboxBackendKind`:
- `None` and `ReadOnly` resolve to `SandboxBackendKind::None`.
- `Sandboxed` resolves to `Docker` when `runtime_config.kind == "docker"` or
@@ -198,7 +198,7 @@ The settings surface (`get_sandbox_settings`, `[security.sandbox]` and
(`SelectShell` / `StartNativeShellExec`); `agent::host_runtime::host_shell_flavor`
only tells the model which family that is.
- The agent's `SandboxMode` is declared in its definition
- (`agent::harness::definition`) and read per call through
+ (`tinyagents_definition::SandboxMode`) and read per call through
the explicit agent sandbox mode supplied by the tool execution context.
## Gotchas
diff --git a/docs/gitbooks/en/developing/architecture/agent-harness.md b/docs/gitbooks/en/developing/architecture/agent-harness.md
index 2d096d0993..94573c3521 100644
--- a/docs/gitbooks/en/developing/architecture/agent-harness.md
+++ b/docs/gitbooks/en/developing/architecture/agent-harness.md
@@ -625,7 +625,7 @@ The harness shell lives under `crates/openhuman-core/src/agent/`, with the tinya
| `harness/graph.rs` | The channel/CLI bus turn route into the tinyagents runner. |
| `subagent_host/` | Direct OpenHuman planner/executor/persistence adapters for `tinyagents-orchestration::subagent`; product prompt/tool/model/security/artifact/progress behavior remains here. |
| `orchestration/subagent_sessions/` | Durable reusable sub-agent identity, compatibility matching, persisted status/history. |
-| `harness/definition.rs` | `AgentDefinition`: what an archetype declares. |
+| `harness/host_definition.rs` | Host extension and registry over `tinyagents_definition::AgentDefinition`. |
| `subagent_host/ops/runner.rs` | Integration-tool ranking and the host execution leaf; generic lifecycle stays in `tinyagents-orchestration`. |
| `tinyagents/payload_summarizer.rs` | The model call behind TinyJuice's oversized-tool-result summary. |
| `session_host/tool_progress.rs` | Surviving OpenHuman seam: `TurnProgress`. |