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: update module paths in agent and memory docs
Steven Enamakel40a322fddc4f
diff --git a/crates/openhuman-core/src/agent/README.md b/crates/openhuman-core/src/agent/README.mdindex 530d6075b8..c2e101af73 100644--- a/crates/openhuman-core/src/agent/README.md+++ b/crates/openhuman-core/src/agent/README.md@@ -359,7 +359,7 @@ All controllers register under `DomainGroup::Agent` in [`core/all.rs`](../core/a| --- | --- | --- || `agent` | `schemas.rs` | `chat`, `chat_simple`, `server_status`, `list_definitions`, `get_definition`, `reload_definitions`, `triage_evaluate`, `graph_topologies`, `registry_snapshot`, `context_breakdown` || `agent` | [`tinyagents/replay/`](./tinyagents/replay/) | `runs_active`, `run_status`, `run_events` (read-only journal replay) |-| `agent` | [`tinyagents/run_mode.rs`](./tinyagents/run_mode.rs) | `set_run_mode`, `get_run_mode` |+| `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` || `plan_review` | `../plan_review/` | `decide` || `ai` | `artifacts/` | `list_artifacts`, `get_artifact`, `delete_artifact`, `regenerate` |diff --git a/crates/openhuman-core/src/agent/orchestration/README.md b/crates/openhuman-core/src/agent/orchestration/README.mdindex c1f959cecd..a167965c7c 100644--- a/crates/openhuman-core/src/agent/orchestration/README.md+++ b/crates/openhuman-core/src/agent/orchestration/README.md@@ -152,7 +152,7 @@ name:`dispatch.rs` (the shared spawn path every tool abovecalls), `awaiting_user.rs` (the awaiting-user envelope), and-`worker_thread.rs` (worker thread creation) are `pub(crate)` helpers, not+`threads/worker_thread.rs` (worker thread creation) are `pub(crate)` helpers, nottools. Live harness registrations use typed `ToolDispatch<(),OpenHumanRunContext>` wrappers and fork the parent carrier for every child,so cancellation, origin, progress, dispatch state, thread, and workspace staydiff --git a/crates/openhuman-core/src/agent/orchestration/tools.rs b/crates/openhuman-core/src/agent/orchestration/tools.rsindex a802725b9f..3dcd73a96e 100644--- a/crates/openhuman-core/src/agent/orchestration/tools.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools.rs@@ -4,7 +4,7 @@//!//! Tools, by role://! - **Spawn**: `spawn_subagent`, `spawn_async_subagent`,-//! `spawn_parallel_agents`, `spawn_worker_thread`.+//! `spawn_parallel_agents`, `spawn_worker_thread` (in `tools::impl::threads`).//! - **Control**: `steer_subagent`, `continue_subagent`, `close_subagent`,//! `wait_subagent`, `wait` / `wait_loop`, `list_subagents`.//! - **Delegation**: `DelegateGraphTool`, `ArchetypeDelegationTool`,diff --git a/crates/openhuman-core/src/agent/tools/plan_exit.rs b/crates/openhuman-core/src/agent/tools/plan_exit.rsindex 8d98d04c3f..db94bda655 100644--- a/crates/openhuman-core/src/agent/tools/plan_exit.rs+++ b/crates/openhuman-core/src/agent/tools/plan_exit.rs@@ -3,7 +3,7 @@//! Coding-harness baseline tool (issue #1205). When a plan-mode agent//! is ready to hand off to an execution-mode agent, it calls//! `plan_exit { plan }`. The tool returns a structured marker AND flips the-//! calling thread's `RunMode` (`agent::tinyagents::run_mode::set_mode`) back+//! calling thread's `RunMode` (`threads::run_mode::set_mode`) back//! to `Build`, so the very next tool exposure/execution check on that thread//! sees every tool again — the actual gating lives in//! `PlanModeMiddleware` (wired per-turn in `turn_middleware.rs`), not here;diff --git a/crates/openhuman-core/src/memory/README.md b/crates/openhuman-core/src/memory/README.mdindex c2fbb0b872..dfee63ec03 100644--- a/crates/openhuman-core/src/memory/README.md+++ b/crates/openhuman-core/src/memory/README.md@@ -405,7 +405,7 @@ sits in the app directory shared by all accounts`tinymemory-integrations`, `tinymemory-import`; the CortexDB engine is inits nested `tinycortex`). Fix engine or lifecycle behavior there.- Turn delivery belongs to the agent harness: the session host prelude- (`agent/session_host/runtime_session/memory_ingest.rs`), the pack+ (`memory/lifecycle/session_hooks.rs`), the packmiddleware and the compaction summarizer live under `agent/`.- Chat transcripts are owned by `threads`; this folder only reads them forbackfill and forgets their memory on delete.diff --git a/docs/gitbooks/en/developing/architecture/agent-harness.md b/docs/gitbooks/en/developing/architecture/agent-harness.mdindex 7cb49d78f4..6a8b39feca 100644--- a/docs/gitbooks/en/developing/architecture/agent-harness.md+++ b/docs/gitbooks/en/developing/architecture/agent-harness.md@@ -562,7 +562,7 @@ New/extended socket events (bridged from `DomainEvent` onto `WebChannelEvent` by- `chat_error{error_type:"guardrail"}`: carries a `guardrail: { verdict, score, reasons: [{code,message}] }` payload when `start_chat` rejects a message via `StartChatError::Guardrail` (the prompt-injection/security guardrail). Every other rejection stays `error_type:"inference"`. The RPC surface (`channel.web_chat`'s `Result<_, String>`) encodes the same structured verdict as a `GUARDRAIL:<json>` sentinel string (`web_chat::ops::start_chat::{GUARDRAIL_ERROR_PREFIX, is_guardrail_error_message}`, mirroring the existing `BACKEND_UNAVAILABLE:` pattern).- `turn_cost`: live per-turn cost readout from `AgentProgress::TurnCostUpdated`, throttled to at most one emission per 750ms per turn (the first update always emits immediately): `{ thread_id, client_id, request_id, round, usage: { input_tokens, output_tokens, cached_input_tokens, cost_usd, context_window, context_tokens, subagents } }`. `context_tokens` is the root agent's final-call input plus output, for its context-window gauge; it is not summed over calls or sub-agents. `subagents` is always empty on this live event (it is the parent's cumulative rollup only); per-sub-agent attribution still only shows up on the terminal `chat_done.usage`.- `approval_decided` / `plan_review_decided`: bridged from `DomainEvent::ApprovalDecided` / `PlanReviewDecided`, which gained `thread_id`, `client_id`, `tool_call_id`, and `resolution` (`"expired"` on TTL/sweep, `"cancelled"` on a dropped decision channel, `None` for an ordinary user decision, carried on the wire as the existing `cancel_reason` field). Only surfaced when the original park had both `thread_id` and `client_id` (chat-routed).-- `run_mode_changed`: `{ thread_id, client_id: "", message: "plan" | "build" }`, bridged from `DomainEvent::ThreadRunModeChanged`, published by `agent::tinyagents::run_mode::set_mode`.+- `run_mode_changed`: `{ thread_id, client_id: "", message: "plan" | "build" }`, bridged from `DomainEvent::ThreadRunModeChanged`, published by `threads::run_mode::set_mode`.- `thread_todos_changed`, `queue_item_queued` / `queue_item_delivered` / `queue_item_removed`, `queue_item` carries `{ id, lane, text_preview }`.- Sub-agent correlation: `subagent_spawned`/`subagent_completed`/`subagent_failed`/`subagent_awaiting_user` carry `subagent.parent_call_id` (the spawning tool call's id: every worker of one `spawn_parallel_agents` call shares it); `subagent_completed` also carries `subagent.output` (capped final text). `tool_call.args`/`tool_result.args`+`elapsed_ms` now carry real arguments and timing instead of `null` (from tinyagents' `AgentEvent::ToolStarted.input`).- Artifact events (`ArtifactPending`/`ArtifactReady`/`ArtifactFailed`) carry `tool_call_id` and `turn_request_id`, the latter filled from the originating turn's `ApprovalChatContext::request_id` so the frontend can bind an artifact card to the exact turn that produced it (`None` for CLI/cron/sub-agent producers with no chat context).diff --git a/docs/gitbooks/en/developing/architecture/memory.md b/docs/gitbooks/en/developing/architecture/memory.mdindex 81312d456e..ed7f64fdbf 100644--- a/docs/gitbooks/en/developing/architecture/memory.md+++ b/docs/gitbooks/en/developing/architecture/memory.md@@ -45,9 +45,9 @@ The behavior is specified in [`docs/specs/memory-v2.md`](https://github.com/tiny| Hook | File || --- | --- |-| Pre-turn (take cached pack, queue logging and refresh) | `agent/session_host/runtime_session/memory_ingest.rs`, from `before_turn` in `runtime_session.rs` |+| Pre-turn (take cached pack, queue logging and refresh) | `memory/lifecycle/session_hooks.rs`, from `before_turn` in `runtime_session.rs` || Pack injection, ephemeral, every model request of the turn | `agent/tinyagents/middleware/memory_pack.rs` |-| Post-turn (log the reply, queue builds), after the durable commit | `memory_ingest.rs`, from `finalize_after_durable_commit` |+| Post-turn (log the reply, queue builds), after the durable commit | `session_hooks.rs`, from `finalize_after_durable_commit` || Compaction enrichment from completed cache, with background refresh | `agent/tinyagents/memory_summarizer.rs`, wrapped around the summarizer in `context_wiring.rs` (ladder order and sizing live in `tinyagents-harness` `ContextLadder`) |Automatic packs are keyed by CoreContext, workspace, config fingerprint, resolved memory identity and thread. They expire after 60 seconds. The cache holds at most 64 entries per context and 64 KiB per pack; eight workers globally process bounded queues of at most 16 pending operations per entry, with a 120-second deadline per operation. Saturation skips best-effort automatic work rather than waiting. Packs identify themselves as results of an earlier lookup, not authoritative answers to the current question.diff --git a/docs/specs/memory-v2.md b/docs/specs/memory-v2.mdindex 076dbc5a6a..6f5f251173 100644--- a/docs/specs/memory-v2.md+++ b/docs/specs/memory-v2.md@@ -94,7 +94,7 @@ credential.| Hook | Where | What || --- | --- | --- |-| pre-turn | session host `before_turn` (`agent/session_host/runtime_session/memory_ingest.rs`) | `lifecycle::prefetch::pre_turn` takes a completed cached pack immediately, or none on a cold cache, and queues scoped `AgentMemory::pre_turn` logging and recall |+| pre-turn | session host `before_turn` (`memory/lifecycle/session_hooks.rs`) | `lifecycle::prefetch::pre_turn` takes a completed cached pack immediately, or none on a cold cache, and queues scoped `AgentMemory::pre_turn` logging and recall || inject | `MemoryPackMiddleware` (`agent/tinyagents/middleware/memory_pack.rs`) | adds the pack, wrapped in `<memory-context>`, to every model request of the turn with `push_ephemeral_instruction` || post-turn | scoped background work after the durable commit | `AgentMemory::post_turn`: logs the reply with its tool calls (name, id, and a one-line result per call), queues the belief build it hands back || compaction | `MemoryRecallSummarizer` (`agent/tinyagents/memory_summarizer.rs`) wrapping the turn's summarizer | Takes completed cached context for "Recalled from memory" and queues `AgentMemory::recall_for_compaction`; engine I/O never delays the inner summarizer |