Skip to content

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

docs: add architecture overview for developers

Steven Enamakelc7ab8417b50c
diff --git a/docs/gitbooks/en/developing/architecture.md b/docs/gitbooks/en/developing/architecture.md
index 352cffef2f..1c95d446dd 100644
--- a/docs/gitbooks/en/developing/architecture.md
+++ b/docs/gitbooks/en/developing/architecture.md
@@ -23,7 +23,7 @@ OpenHuman ships for desktop only: Windows, macOS and Linux. Web is not a support
| `crates/openhuman-app/` | Thin Tauri v2 desktop host (Cargo package `openhuman-app`). Built from its own manifest and lockfile, excluded from the root workspace; depends on `openhuman-rpc` only and hosts the core as an in-process tokio task (`src/core_process.rs`, `openhuman_rpc::host::desktop`). |
| `crates/openhuman-core/` | Cargo package `openhuman`, library `openhuman_core`, with no `tinyhumans-sdk` dependency and no backend module: it holds no hosted port, route or hostname, and `scripts/ci/check-core-hosted-free.mjs` enforces that. Hosted behavior plugs in from `openhuman-tinyhumans` through generic registries (`tools::sources`, `voice::factory::registry`, `voice::live::registry`, `inference::registry`, `channels::callback_slot`, `config::register_enricher`, `memory::engine_registry`, the Composio route builder, the connector proxy target, the wallet backend and the controller-extension registry). Hosted memory is the one path where `vendor/tinymemory`'s own HTTP client calls the backend directly. Flat domain modules directly under `src/` (`agent`, `channels`, `config`, `cron`, `desktop`, `flows`, `hooks`, `hosting`, `inference`, `integrations`, `mcp`, `media`, `memory`, `modules`, `platform`, `runtime`, `sandbox`, `search`, `security`, `skills`, `threads`, `tools`, `util`, `voice`, `web3`, `web_chat`, …). `src/core/` holds the CLI (`cli.rs`), dispatch, controller registry (`all.rs`), event bus (`bus.rs`), `runtime/` (`CoreBuilder`/`CoreRuntime`) and `subsystem/`. |
| `crates/openhuman-rpc/` | Top of the library chain (depends on `openhuman-tinyhumans`): JSON-RPC 2.0 envelopes, the server (router, Socket.IO, listener, `run_server*`), and the shared host boot `host::{cli, desktop, tui}` the three hosts call; re-exports `embed` and `tinyhumans` as their curated facade. The `http-client` feature (default on; off for root-workspace consumers) adds `post_json_rpc`, `bearer_header`, `redact_url_for_log`, `HttpRpcResponse`. Used by the Tauri shell (`core_rpc.rs` → `relay_http_rpc`) and the TUI (envelope decoding). The core does not depend on this crate and does not re-export it: the controller contract (`Outcome`, `ControllerSchema`, `StructuredRpcError`, params rules, in-process dispatch) lives in `crates/openhuman-core/src/core/`, and this crate sits above it. Behind `server` it also owns the `http_host` static-directory file server and registers its controllers as a core extension. |
-| `crates/openhuman-embed/` | Typed library facade (`Runtime`/`RuntimeBuilder` → `Agent`, host presets, `embed::process`, and the `config` / `artifacts` / `chat_surface` / `modules` facades) for embedding the core in another product; forwards the core's feature gates. Installs no backend transport itself. |
+| `crates/openhuman-embed/` | Typed library facade (`Runtime`/`RuntimeBuilder` → `Agent`, host presets, `embed::process`, and the `config` / `artifacts` / `chat_surface` / `modules` facades) for embedding the core in another product; forwards the core's feature gates. Contains no hosted code or transport. |
| `crates/openhuman-tinyhumans/` | The TinyHumans layer above embed and the owner of everything hosted: the transport port and `SdkBackendTransport` (the only crate that depends on the vendored `tinyhumans-sdk`), the authenticated `BackendClient`, the hosted providers for integrations, voice, inference, channels and memory (each registered into the core's generic registries), `install()` for hosts that boot the core themselves, a `RuntimeBuilder` that boots an embed runtime connected, the hosted RPC proxies (`hosted/`, all on the SDK's typed clients through one `hosted::client::HostedClient`: billing, team and usage, referral, announcements, webhook tunnels, managed Telegram/Discord linking, and backend-brokered OAuth; registered into the core's controller registry as an extension, some sharing the core's `auth` / `channels` / `webhooks` namespaces), and the host-side login/session owner (`session/`). A user without a TinyHumans account gets the core's `BACKEND_UNAVAILABLE:` sentinel from these without a request. |
| `crates/openhuman-cli/` | The `openhuman-core` binary (`openhuman_rpc::host::cli`), the ops bins, and every root `tests/*.rs` / `examples/*.rs` target (which reach the core through dev-dependencies). The benchmark bins live in [openhuman-benchmarks](https://github.com/tinyhumansai/openhuman-benchmarks). |
| `crates/openhuman-tui/` | Standalone ratatui terminal frontend. Boots the core in-process via `openhuman_rpc::host::tui` (every domain, no background services), no HTTP. |