The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
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.mdindex 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, desktopnotification, 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 byfilling 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, oneretry on 429/transient/malformed-reply, then a local-model arm. Budgetexhaustion 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, missingregistry or definition) return `Err`, and those also publish`TriggerEscalationFailed`. `decision.rs::parse_triage_decision` parsesthe reply tolerantly (fenced JSON, prose around the object, trailingcommas, 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 ofthe callers inherit one; an unscoped call reads `Unknown` and the gatefails closed. `local_trigger_origin` (`Cli`, trust root, no audit row) isfor triggers the machine generated itself; `remote_trigger_origin`(`TrustedAutomation::Workflow { require_approval: true }`) is for anythingwhose 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 thefield 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 themodule: `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 webhookrequests 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`: Composiotrigger events; `OPENHUMAN_TRIGGER_TRIAGE_DISABLED`,`composio.triage_disabled`, and `composio.triage_disabled_toolkits` skipthe pipeline.-- `crates/openhuman-core/src/integrations/task_sources/route.rs` — proactive+- `crates/openhuman-core/src/integrations/task_sources/route.rs`: proactivetask-source cards targeting `SourceTarget::AgentTodoProactive`.-- `crates/openhuman-core/src/desktop/notifications/rpc.rs` — background+- `crates/openhuman-core/src/desktop/notifications/rpc.rs`: backgroundtriage 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/`: theclassifier 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/`: thesingle-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-permitgate the local arm waits on.## Testsdiff --git a/crates/openhuman-core/src/config/schema/README.md b/crates/openhuman-core/src/config/schema/README.mdindex 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 ontop of this schema.-- [../migrations/README.md](../migrations/README.md) — automatic+- [../migrations/README.md](../migrations/README.md): automaticschema-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.mdindex 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, andthe 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 corebuild too, not just the desktop shell: `crates/openhuman-core/Cargo.toml`