Skip to content

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

docs: add README files for triage and config schema, and update Rust core build guide

Steven Enamakel2f7da4628598
diff --git a/crates/openhuman-core/src/agent/triage/README.md b/crates/openhuman-core/src/agent/triage/README.md
index 5d6962cd1a..4835cabf34 100644
--- a/crates/openhuman-core/src/agent/triage/README.md
+++ b/crates/openhuman-core/src/agent/triage/README.md
@@ -1,47 +1,46 @@
# Triage
-Classification pipeline for external triggers. Turns a source-specific event
-(Composio webhook, incoming HTTP webhook, task-source card, desktop
+Classification pipeline for external triggers. It turns a source-specific
+event (Composio webhook, incoming HTTP webhook, task-source card, desktop
notification, ad hoc RPC) into a `drop` / `acknowledge` / `react` / `escalate`
-decision, then dispatches the sub-agent that decision implies. Does NOT own
-the trigger sources themselves (Composio sync, webhook tunnels, notification
-ingest) — those build a `TriggerEnvelope` and call in.
+decision, then dispatches the sub-agent that decision implies. It does not
+own the trigger sources themselves (Composio sync, webhook tunnels,
+notification ingest); those build a `TriggerEnvelope` and call in.
## Pipeline
-1. **Envelope** (`envelope.rs`) — caller builds a `TriggerEnvelope` via
+1. Envelope (`envelope.rs`): the caller builds a `TriggerEnvelope` via
`from_composio`, `from_webhook`, `from_cron` or `from_external`, or by
filling the struct directly (`desktop/notifications/rpc.rs` does this for
- `TriggerSource::WebviewIntegration`). Carries the `TriggerSource`, the raw
- payload (truncated to 8 KB when rendered into the prompt).
-2. **Evaluator** (`evaluator*.rs`) — `run_triage` sends the `trigger_triage`
+ `TriggerSource::WebviewIntegration`). It carries the `TriggerSource` and
+ the raw payload, truncated to 8 KB when rendered into the prompt.
+2. Evaluator (`evaluator*.rs`): `run_triage` sends the `trigger_triage`
agent turn over the native bus (`agent.run_turn`, zero tools, origin
`AgentTurnOrigin::ExternalChannel`) through a tiered chain: cloud, one
retry on 429/transient/malformed-reply, then a local-model arm. Budget
exhaustion and prompt-guard rejections skip the cloud retry and go
- straight to the local arm. If the local arm is unavailable or also fails
+ straight to the local arm. If the local arm is unavailable or also fails,
the result is `TriageOutcome::Deferred { defer_until_ms, reason }` (30 s
- tick) rather than `Err`; only non-retryable failures (auth, missing
+ tick) rather than `Err`. Only non-retryable failures (auth, missing
registry or definition) return `Err`, and those also publish
`TriggerEscalationFailed`. `decision.rs::parse_triage_decision` parses
the reply tolerantly (fenced JSON, prose around the object, trailing
commas, wrong-case action).
-3. **Escalation** (`escalation.rs`) — `apply_decision` publishes
- `TriggerEvaluated` for every action. `drop`/`acknowledge` do no work
- . `react`/`escalate`
- first pass `ApprovalGate::intercept_audited` with tool key
- `triage.react` / `triage.escalate`, then build a root
+3. Escalation (`escalation.rs`): `apply_decision` publishes
+ `TriggerEvaluated` for every action. `drop`/`acknowledge` do no further
+ work. `react`/`escalate` first pass `ApprovalGate::intercept_audited` with
+ tool key `triage.react` / `triage.escalate`, then build a root
`ParentExecutionContext` (`orchestration::parent_context::build_root_parent`)
and dispatch `trigger_reactor` or `orchestrator` via
`agent::subagent_host::run_subagent`.
-4. **Origin** (`origin.rs`) — every caller scopes an `AgentTurnOrigin` around
+4. Origin (`origin.rs`): every caller scopes an `AgentTurnOrigin` around
`apply_decision` because `AGENT_TURN_ORIGIN` is a task-local and none of
the callers inherit one; an unscoped call reads `Unknown` and the gate
fails closed. `local_trigger_origin` (`Cli`, trust root, no audit row) is
for triggers the machine generated itself; `remote_trigger_origin`
(`TrustedAutomation::Workflow { require_approval: true }`) is for anything
whose payload came from outside.
-5. **Events** (`events.rs`) — thin wrappers around `DomainEvent::Trigger*`
+5. Events (`events.rs`): thin wrappers around `DomainEvent::Trigger*`
(`TriggerEvaluated`, `TriggerEscalated`, `TriggerEscalationFailed`) so the
field list lives in one place.
@@ -72,45 +71,45 @@ delivered notification for display.
Re-exported from `mod.rs`:
-- `TriggerEnvelope`, `TriggerSource` — `envelope.rs`.
-- `TriageAction`, `TriageDecision`, `parse_triage_decision`, `ParseError` —
+- `TriggerEnvelope`, `TriggerSource`: `envelope.rs`.
+- `TriageAction`, `TriageDecision`, `parse_triage_decision`, `ParseError`:
`decision.rs`.
- `run_triage(&envelope) -> anyhow::Result<TriageOutcome>`, `TriageOutcome`,
- `TriageRun`, `TriageResolutionPath` — `evaluator*.rs`. Also `pub` on the
+ `TriageRun`, `TriageResolutionPath`: `evaluator*.rs`. Also `pub` on the
module: `run_triage_with_arms`, `TRIGGER_TRIAGE_AGENT_ID`.
-- `apply_decision(run, &envelope) -> anyhow::Result<()>` — `escalation.rs`.
-- `local_trigger_origin()`, `remote_trigger_origin(&envelope)` — `origin.rs`.
+- `apply_decision(run, &envelope) -> anyhow::Result<()>`: `escalation.rs`.
+- `local_trigger_origin()`, `remote_trigger_origin(&envelope)`: `origin.rs`.
- `resolve_provider()`, `build_local_provider_with_config(&config)`,
- `ResolvedProvider` — `routing.rs`. Also `pub` on the module:
+ `ResolvedProvider`: `routing.rs`. Also `pub` on the module:
`resolve_provider_with_config`.
## Called by
-- `crates/openhuman-core/src/skills/webhooks/bus.rs` — incoming webhook
+- `crates/openhuman-core/src/skills/webhooks/bus.rs`: incoming webhook
requests on a tunnel registered to an agent.
-- `crates/openhuman-core/src/skills/webhooks/ops.rs` — `webhooks.trigger_agent`
+- `crates/openhuman-core/src/skills/webhooks/ops.rs`: `webhooks.trigger_agent`
manual RPC (`webhook` / `cron` / `external` sources).
-- `crates/openhuman-core/src/memory/sync/composio/bus*.rs` — Composio
+- `crates/openhuman-core/src/memory/sync/composio/bus*.rs`: Composio
trigger events; `OPENHUMAN_TRIGGER_TRIAGE_DISABLED`,
`composio.triage_disabled`, and `composio.triage_disabled_toolkits` skip
the pipeline.
-- `crates/openhuman-core/src/integrations/task_sources/route.rs` — proactive
+- `crates/openhuman-core/src/integrations/task_sources/route.rs`: proactive
task-source cards targeting `SourceTarget::AgentTodoProactive`.
-- `crates/openhuman-core/src/desktop/notifications/rpc.rs` — background
+- `crates/openhuman-core/src/desktop/notifications/rpc.rs`: background
triage spawned after `notification_ingest`; score persisted via
`store::update_triage`, origin `local_trigger_origin`.
-- `crates/openhuman-core/src/agent/schemas.rs` — `agent.triage_evaluate` RPC
+- `crates/openhuman-core/src/agent/schemas.rs`: `agent.triage_evaluate` RPC
(synthetic trigger from any source, optional dry-run without
`apply_decision`).
## Related
-- `crates/openhuman-core/src/agent/registry/agents/trigger_triage/` — the
+- `crates/openhuman-core/src/agent/registry/agents/trigger_triage/`: the
classifier agent definition; `prompt.md` describes the JSON contract
`decision.rs` parses.
-- `crates/openhuman-core/src/agent/registry/agents/trigger_reactor/` — the
+- `crates/openhuman-core/src/agent/registry/agents/trigger_reactor/`: the
single-step sub-agent `react` decisions dispatch to.
-- `crates/openhuman-core/src/cron/scheduler_gate/README.md` — the LLM-permit
+- `crates/openhuman-core/src/cron/scheduler_gate/README.md`: the LLM-permit
gate the local arm waits on.
## Tests
diff --git a/crates/openhuman-core/src/config/schema/README.md b/crates/openhuman-core/src/config/schema/README.md
index 99ed67c25c..61029ec90b 100644
--- a/crates/openhuman-core/src/config/schema/README.md
+++ b/crates/openhuman-core/src/config/schema/README.md
@@ -193,10 +193,10 @@ Per-section `*_tests.rs` files, plus `load_tests.rs` (split into
## Related docs
-- [../README.md](../README.md) — the `config` module overview.
-- [../ops/README.md](../ops/README.md) — the mutation/RPC surface built on
+- [../README.md](../README.md): the `config` module overview.
+- [../ops/README.md](../ops/README.md): the mutation/RPC surface built on
top of this schema.
-- [../migrations/README.md](../migrations/README.md) — automatic
+- [../migrations/README.md](../migrations/README.md): automatic
schema-version upgrades run during load.
-- [../../security/README.md](../../security/README.md) — enforces the
+- [../../security/README.md](../../security/README.md): enforces the
`action_dir` / `workspace_dir` boundary this module only describes.
diff --git a/gitbooks/developing/building-rust-core.md b/gitbooks/developing/building-rust-core.md
index eae62aaf76..87562764d1 100644
--- a/gitbooks/developing/building-rust-core.md
+++ b/gitbooks/developing/building-rust-core.md
@@ -53,8 +53,12 @@ That is enough for the Rust workspace. Core sources, the package manifest, and
the authoritative domain implementation live under `crates/openhuman-core/`.
The stable host-facing library facade is the sibling
`crates/openhuman-embed/` package, while the terminal frontend is
-`crates/openhuman-tui/`. Shared JSON-RPC contracts and the HTTP client used by
-the Tauri shell and the TUI live in `crates/openhuman-rpc/`.
+`crates/openhuman-tui/`. The `openhuman-core` binary itself, the developer and
+benchmark bins, and the root `tests/*.rs` / `examples/*.rs` targets live in
+`crates/openhuman-cli/`, which depends on `crates/openhuman-tinyhumans/` for
+the SDK-backed backend transport the core does not carry on its own. Shared
+JSON-RPC contracts and the HTTP client used by the Tauri shell and the TUI
+live in `crates/openhuman-rpc/`.
The recursive submodules under repo-root `vendor/` are required for the core
build too, not just the desktop shell: `crates/openhuman-core/Cargo.toml`