Skip to content

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

docs: move gitbooks under docs/gitbooks/en

Steven Enamakelb4a062396eb8
diff --git a/.claude/agents/deploy-agent.md b/.claude/agents/deploy-agent.md
index c96656cdec..2779ac1162 100644
--- a/.claude/agents/deploy-agent.md
+++ b/.claude/agents/deploy-agent.md
@@ -114,7 +114,7 @@ hand instead: *"Verify the command you are documenting exists in the current rep
A one-off correction like this one does not stop it happening again. What reduces the
inconsistencies is a markdown structure chosen for this project rather than inherited from a
template: source-of-truth files first, per-subsystem notes, deeper architecture left in
-`gitbooks/developing/` rather than duplicated, and one place where the paths an agent doc cites
+`docs/gitbooks/en/developing/` rather than duplicated, and one place where the paths an agent doc cites
are resolved against the tree. With thirteen agent definitions under `.claude/agents/` and
outside-fork PRs merging by the dozen in a single day, that structure is the durable fix, not
another pass of manual proofreading.
diff --git a/.claude/rules/README.md b/.claude/rules/README.md
index dcb2182843..4767eb9b0f 100644
--- a/.claude/rules/README.md
+++ b/.claude/rules/README.md
@@ -5,14 +5,14 @@ This directory is intentionally near-empty.
Authoritative docs for AI agents and contributors:
- **[`AGENTS.md`](../../AGENTS.md)** — all project conventions, commands, architecture, testing, patterns. (`CLAUDE.md` redirects here.)
-- **[`gitbooks/developing/architecture.md`](../../gitbooks/developing/architecture.md)** — narrative architecture, dual-socket sync.
-- **[`gitbooks/developing/architecture/frontend.md`](../../gitbooks/developing/architecture/frontend.md)** — frontend layout.
-- **[`gitbooks/developing/architecture/tauri-shell.md`](../../gitbooks/developing/architecture/tauri-shell.md)** — Tauri shell.
-- **[`gitbooks/developing/architecture/agent-harness.md`](../../gitbooks/developing/architecture/agent-harness.md)** — agent harness / tool surface.
-- **[`gitbooks/developing/e2e-testing.md`](../../gitbooks/developing/e2e-testing.md)** — WDIO/Appium testing.
-- **[`gitbooks/developing/cef.md`](../../gitbooks/developing/cef.md)** — historical CEF runtime notes (the shell now uses Wry).
-- **[`gitbooks/developing/testing-strategy.md`](../../gitbooks/developing/testing-strategy.md)** — testing strategy.
-- **[`gitbooks/developing/agent-observability.md`](../../gitbooks/developing/agent-observability.md)** — agent observability.
+- **[`docs/gitbooks/en/developing/architecture.md`](../../docs/gitbooks/en/developing/architecture.md)** — narrative architecture, dual-socket sync.
+- **[`docs/gitbooks/en/developing/architecture/frontend.md`](../../docs/gitbooks/en/developing/architecture/frontend.md)** — frontend layout.
+- **[`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../docs/gitbooks/en/developing/architecture/tauri-shell.md)** — Tauri shell.
+- **[`docs/gitbooks/en/developing/architecture/agent-harness.md`](../../docs/gitbooks/en/developing/architecture/agent-harness.md)** — agent harness / tool surface.
+- **[`docs/gitbooks/en/developing/e2e-testing.md`](../../docs/gitbooks/en/developing/e2e-testing.md)** — WDIO/Appium testing.
+- **[`docs/gitbooks/en/developing/cef.md`](../../docs/gitbooks/en/developing/cef.md)** — historical CEF runtime notes (the shell now uses Wry).
+- **[`docs/gitbooks/en/developing/testing-strategy.md`](../../docs/gitbooks/en/developing/testing-strategy.md)** — testing strategy.
+- **[`docs/gitbooks/en/developing/agent-observability.md`](../../docs/gitbooks/en/developing/agent-observability.md)** — agent observability.
## When to add a file here
diff --git a/.do/app.yaml b/.do/app.yaml
index 01bcfb7c4c..5f091e8f48 100644
--- a/.do/app.yaml
+++ b/.do/app.yaml
@@ -2,7 +2,7 @@
#
# Deploys the headless Rust core (`openhuman-core`) from the repo Dockerfile,
# exposing the JSON-RPC server on the public HTTP port. Used by the "Deploy
-# to DigitalOcean" button (see gitbooks/developing/cloud-deploy.md) and by `doctl apps create`.
+# to DigitalOcean" button (see docs/gitbooks/en/developing/cloud-deploy.md) and by `doctl apps create`.
#
# After deploy:
# - /health is publicly reachable (no auth — used for liveness)
diff --git a/.fly/fly.toml b/.fly/fly.toml
index 620d3b9b46..5fd9991a93 100644
--- a/.fly/fly.toml
+++ b/.fly/fly.toml
@@ -1,6 +1,6 @@
# .fly/fly.toml — openhuman-core on Fly.io
#
-# See gitbooks/features/cloud-deploy.md for the full deployment guide.
+# See docs/gitbooks/en/features/cloud-deploy.md for the full deployment guide.
# See https://fly.io/docs/reference/configuration/ for fly.toml reference.
#
# Quickstart:
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 4f1b24335f..d0696cae1e 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -17,11 +17,11 @@
> If a section does not apply to this change, mark the item as `N/A` with a one-line reason. Do not delete items.
-- [ ] Tests added or updated (happy path + at least one failure / edge case) per [Testing Strategy](../gitbooks/developing/testing-strategy.md#failure-path-requirement)
+- [ ] Tests added or updated (happy path + at least one failure / edge case) per [Testing Strategy](../docs/gitbooks/en/developing/testing-strategy.md#failure-path-requirement)
- [ ] **Diff coverage ≥ 80%** — changed lines (Vitest + cargo-llvm-cov merged via `diff-cover`) meet the gate enforced by [`.github/workflows/ci-fast.yml`](../.github/workflows/ci-fast.yml). Run `pnpm test:coverage` and `pnpm test:rust` locally; PRs below 80% on changed lines will not merge.
- [ ] Coverage matrix updated — added/removed/renamed feature rows in [`docs/TEST-COVERAGE-MATRIX.md`](../docs/TEST-COVERAGE-MATRIX.md) reflect this change (or `N/A: behaviour-only change`)
- [ ] All affected feature IDs from the matrix are listed in the PR description under `## Related`
-- [ ] No new external network dependencies introduced (mock backend used per [Testing Strategy](../gitbooks/developing/testing-strategy.md#mock-policy))
+- [ ] No new external network dependencies introduced (mock backend used per [Testing Strategy](../docs/gitbooks/en/developing/testing-strategy.md#mock-policy))
- [ ] Manual smoke checklist updated if this touches release-cut surfaces ([`docs/RELEASE-MANUAL-SMOKE.md`](../docs/RELEASE-MANUAL-SMOKE.md))
- [ ] Linked issue closed via `Closes #NNN` in the `## Related` section
diff --git a/.github/ci-paths-filter.yml b/.github/ci-paths-filter.yml
index a03ac64458..0361f49d24 100644
--- a/.github/ci-paths-filter.yml
+++ b/.github/ci-paths-filter.yml
@@ -43,10 +43,10 @@ docs:
- 'app/src/App.tsx'
- 'scripts/generate-architecture-docs.mjs'
- 'scripts/__tests__/generate-architecture-docs.test.mjs'
- - 'gitbooks/developing/architecture/frontend.md'
- - 'gitbooks/developing/embed/**'
- - 'gitbooks/developing/embedding.md'
- - 'gitbooks/SUMMARY.md'
+ - 'docs/gitbooks/en/developing/architecture/frontend.md'
+ - 'docs/gitbooks/en/developing/embed/**'
+ - 'docs/gitbooks/en/developing/embedding.md'
+ - 'docs/gitbooks/en/SUMMARY.md'
- 'docs/gitbooks/en/developing/embed/**'
- 'docs/gitbooks/en/developing/embedding.md'
- 'docs/gitbooks/en/SUMMARY.md'
diff --git a/.github/workflows/pr-quality.yml b/.github/workflows/pr-quality.yml
index c3e7cbc8de..e565448001 100644
--- a/.github/workflows/pr-quality.yml
+++ b/.github/workflows/pr-quality.yml
@@ -92,7 +92,7 @@ jobs:
--exclude '^https://www\.producthunt\.com/'
--exclude '^https://discord\.tinyhumans\.ai/?$'
'docs/**/*.md'
- 'gitbooks/**/*.md'
+ 'docs/gitbooks/en/**/*.md'
'README.md'
'INSTALL.md'
'CONTRIBUTING.md'
diff --git a/.github/workflows/release-packages.yml b/.github/workflows/release-packages.yml
index 996cb770cc..9321d0036f 100644
--- a/.github/workflows/release-packages.yml
+++ b/.github/workflows/release-packages.yml
@@ -333,7 +333,7 @@ jobs:
'## Acceptance criteria',
'',
'- [ ] Each official channel has a CI smoke test (install + `openhuman --version`)',
- '- [ ] Install commands appear in `gitbooks/overview/install.md`',
+ '- [ ] Install commands appear in `docs/gitbooks/en/overview/install.md`',
'- [ ] Checksums shipped for all artifacts',
'',
].join('\n');
diff --git a/AGENTS.md b/AGENTS.md
index c63a0275e6..9287f2f563 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -3,10 +3,10 @@
OpenHuman is a React and Tauri v2 desktop assistant with an in-process Rust
core. The core also exposes JSON-RPC and a CLI.
-Architecture: [overview](gitbooks/developing/architecture.md),
-[frontend](gitbooks/developing/architecture/frontend.md),
-[Tauri shell](gitbooks/developing/architecture/tauri-shell.md), and
-[agent harness](gitbooks/developing/architecture/agent-harness.md).
+Architecture: [overview](docs/gitbooks/en/developing/architecture.md),
+[frontend](docs/gitbooks/en/developing/architecture/frontend.md),
+[Tauri shell](docs/gitbooks/en/developing/architecture/tauri-shell.md), and
+[agent harness](docs/gitbooks/en/developing/architecture/agent-harness.md).
## Repository map
@@ -16,7 +16,7 @@ Architecture: [overview](gitbooks/developing/architecture.md),
| `crates/openhuman-app/` | Thin desktop host; excluded from the root workspace, build with `--manifest-path crates/openhuman-app/Cargo.toml`. Depends on `openhuman-rpc` only and boots its in-process core with `openhuman_rpc::host::desktop` |
| `crates/openhuman-core/` | Package `openhuman`: business domains under `src/<domain>/`, the controller contract, dispatch and auth under `src/core/` |
| `crates/openhuman-core/src/<domain>/` | Flat business-domain modules (agent, memory, tools, security, channels, ...) |
-| `crates/openhuman-core/src/storage/` | The process's storage backend on the `tinystoragedrivers` ports: URL resolution (`OPENHUMAN_STORAGE_URL` / `[storage] url`), the install slot, agent scopes (`local` for the operator), and the base the domain stores build on. Features `storage-sqlite`, `storage-file`, `storage-mongodb`; see `gitbooks/developing/architecture/storage.md` |
+| `crates/openhuman-core/src/storage/` | The process's storage backend on the `tinystoragedrivers` ports: URL resolution (`OPENHUMAN_STORAGE_URL` / `[storage] url`), the install slot, agent scopes (`local` for the operator), and the base the domain stores build on. Features `storage-sqlite`, `storage-file`, `storage-mongodb`; see `docs/gitbooks/en/developing/architecture/storage.md` |
| `crates/openhuman-core/src/core/` | CLI, controller contract (`Outcome`, schemas) and in-process dispatch, controller registry, event bus, runtime composition; no business logic and no JSON-RPC server |
| `crates/openhuman-cli/` | The `openhuman-core` binary (`src/main.rs`, `openhuman_rpc::host::cli`), the ops bins (`src/bin/`: `openhuman-fleet`, `test-mcp-stub`), and every root `tests/*.rs` / `examples/*.rs` target. Normal dependency: `openhuman-rpc` only; the tests reach core, embed and tinyhumans through `[dev-dependencies]`. The benchmark bins live in the openhuman-benchmarks repository |
| `crates/openhuman-embed/` | Library facade over the core (depends on core only): `Runtime`/`RuntimeBuilder` with host presets, `embed::process` (tokio runtime, logging, dotenv, master key, Sentry options), and the curated facades hosts use (`config`, `artifacts`, `chat_surface`, `modules`, `identity`). Its doc-hidden `__host` list is for tinyhumans and rpc only |
@@ -24,7 +24,7 @@ Architecture: [overview](gitbooks/developing/architecture.md),
| `crates/openhuman-tinyhumans/` | The TinyHumans layer above embed (depends on embed only): SDK-backed backend transport, a `RuntimeBuilder` that boots connected, and the host-side login/session owner (login-token exchange, `/auth/me`, current-user cache, credential handoff) used by app and TUI |
| `crates/openhuman-tui/` | Standalone terminal frontend; depends on `openhuman-rpc` only and boots with `openhuman_rpc::host::tui` |
| `tests/` | Rust integration and JSON-RPC tests |
-| `gitbooks/` | Public product and contributor documentation |
+| `docs/gitbooks/en/` | Public product and contributor documentation |
| `docs/` | Internal maintainer documentation |
| `vendor/` | Recursive git submodules; root `Cargo.toml` `[patch]` tables point into this tree |
@@ -408,9 +408,9 @@ Additional rules:
## Tool, harness, and runtime boundaries
-Embed public API documentation: [Embedding](gitbooks/developing/embed/README.md),
-[concepts](gitbooks/developing/embed/concepts/README.md), and the source-generated
-[builder setters](gitbooks/developing/embed/builder-setters.md). Snippets come from
+Embed public API documentation: [Embedding](docs/gitbooks/en/developing/embed/README.md),
+[concepts](docs/gitbooks/en/developing/embed/concepts/README.md), and the source-generated
+[builder setters](docs/gitbooks/en/developing/embed/builder-setters.md). Snippets come from
compiled examples; run `pnpm docs:generate` and `pnpm docs:check` after changing them.
@@ -643,7 +643,7 @@ on the next core start. It adds no Cargo gate. A disabled component's module is
never downloaded, mapped or registered (`ModuleState::Disabled`,
`LoadError::Disabled`), its tools are not registered, its RPC namespace answers
`COMPONENT_DISABLED:<name>`, and `about_app` marks its capabilities `disabled`.
-See `gitbooks/developing/components.md`.
+See `docs/gitbooks/en/developing/components.md`.
Memory uses `tinymemory-api` as its contract. `memory::api` is a selective
re-export of the wire surface, not a place to copy or widen the whole crate.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 368fe46f87..d504f78788 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,7 +4,7 @@ Thank you for your interest in contributing to OpenHuman. This guide is the fast
> **New to open source or coding?** Start with [`docs/CONTRIBUTING-BEGINNERS.md`](docs/CONTRIBUTING-BEGINNERS.md) — it walks you through every step from installing tools to opening your first PR.
-For deeper architecture and subsystem references, use the GitBook under [`gitbooks/developing/`](gitbooks/developing/). For coding-agent and repository-specific implementation rules, see [`AGENTS.md`](AGENTS.md) (`CLAUDE.md` is a symlink to the same file).
+For deeper architecture and subsystem references, use the GitBook under [`docs/gitbooks/en/developing/`](docs/gitbooks/en/developing/). For coding-agent and repository-specific implementation rules, see [`AGENTS.md`](AGENTS.md) (`CLAUDE.md` is a symlink to the same file).
## Table of Contents
@@ -24,7 +24,7 @@ This project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDU
## Getting Started
- Read the [README](README.md) for product context.
-- Use [`gitbooks/developing/architecture.md`](gitbooks/developing/architecture.md) for the current system architecture.
+- Use [`docs/gitbooks/en/developing/architecture.md`](docs/gitbooks/en/developing/architecture.md) for the current system architecture.
- Check [open issues](https://github.com/tinyhumansai/openhuman/issues) and [Discussions](https://github.com/tinyhumansai/openhuman/discussions) before starting work.
- Stuck rather than fixing something? [`docs/SUPPORT.md`](docs/SUPPORT.md) routes questions, install trouble, memory behavior, and model problems to the right category; [`docs/community/discussions.md`](docs/community/discussions.md) explains how those threads are triaged.
- For security issues, follow [SECURITY.md](SECURITY.md) and do not file public issues.
@@ -99,7 +99,7 @@ pnpm --version
- **Web-only development** needs Node, pnpm, and the Rust toolchain present in the repo. You can usually ignore desktop-only system packages.
- **Desktop development** uses Tauri with Wry as its webview on every platform (`crates/openhuman-app/Cargo.lock` resolves `tauri-runtime-wry`; there is no CEF crate). Use `pnpm --filter openhuman-app dev:app` on macOS and `pnpm dev:app:win` on native Windows.
-- **Linux desktop builds** require extra system packages beyond Node/Rust. Follow the distro-specific Tauri dependency list before running desktop commands, then use the OpenHuman scripts below. For deeper platform troubleshooting, see [`gitbooks/developing/getting-set-up.md`](gitbooks/developing/getting-set-up.md).
+- **Linux desktop builds** require extra system packages beyond Node/Rust. Follow the distro-specific Tauri dependency list before running desktop commands, then use the OpenHuman scripts below. For deeper platform troubleshooting, see [`docs/gitbooks/en/developing/getting-set-up.md`](docs/gitbooks/en/developing/getting-set-up.md).
- **Windows 10 WSL + classic X11 forwarding** is unsupported for the desktop app. The Tauri desktop flow can hang, render blank windows, or crash before useful app logs are available. Use native Windows development, or Windows 11 WSLg if you need a Linux GUI workflow. OpenHuman logs a startup warning when it detects WSL with `DISPLAY` set but no `WAYLAND_DISPLAY`/WSLg markers.
- **Windows desktop builds** additionally require Visual Studio C++ Build Tools (MSVC v143), CMake, and Ninja. See [Windows-specific setup](#windows-specific-setup) for the full list and install order.
- **macOS desktop builds** require a one-time codesigning cert. After cloning, run `bash scripts/setup-dev-codesign.sh` once to create the local "OpenHuman Dev Signer" self-signed certificate that Tauri uses when bundling dev builds. Without it, `pnpm --filter openhuman-app dev:app` fails at the bundle/sign step with `OpenHuman Dev Signer: no identity found`.
@@ -247,9 +247,9 @@ Useful local paths during development:
Most contributor-visible configuration and state flows are documented in:
-- [`gitbooks/developing/getting-set-up.md`](gitbooks/developing/getting-set-up.md)
-- [`gitbooks/developing/architecture/frontend.md`](gitbooks/developing/architecture/frontend.md)
-- [`gitbooks/developing/architecture/tauri-shell.md`](gitbooks/developing/architecture/tauri-shell.md)
+- [`docs/gitbooks/en/developing/getting-set-up.md`](docs/gitbooks/en/developing/getting-set-up.md)
+- [`docs/gitbooks/en/developing/architecture/frontend.md`](docs/gitbooks/en/developing/architecture/frontend.md)
+- [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](docs/gitbooks/en/developing/architecture/tauri-shell.md)
## Project Layout
@@ -266,7 +266,7 @@ openhuman/
├── examples/ # Embedding examples (explicit [[example]] targets)
├── vendor/ # Recursive git submodules (tinyagents, tinymemory, ...)
├── docs/ # Internal maintainer docs
-├── gitbooks/ # Public product and contributor docs
+├── docs/gitbooks/en/ # Public product and contributor docs
├── scripts/ # Dev, test, CI, and release scripts
└── AGENTS.md # Repo rules for contributors and coding agents (CLAUDE.md symlinks here)
```
@@ -283,7 +283,7 @@ Short version:
- `app/` is the UI and desktop shell.
- `crates/openhuman-core/` is the Rust core and JSON-RPC surface; see the
"Rust domain structure" section of AGENTS.md.
-- `gitbooks/developing/` is the canonical place for deeper subsystem docs.
+- `docs/gitbooks/en/developing/` is the canonical place for deeper subsystem docs.
## Git Workflow
diff --git a/EMBED.md b/EMBED.md
index 0bd71a1bff..197a4423ac 100644
--- a/EMBED.md
+++ b/EMBED.md
@@ -2,54 +2,54 @@
> Embed OpenHuman runtimes and independently configured agents in Rust applications.
-- [Embedding OpenHuman](gitbooks/developing/embed/README.md): `openhuman-embed` runs the OpenHuman core inside your Rust program. Your host owns the user interface, server transport and authentication flow; the core owns agent turns, memory, tools, approvals and execution policy. Calling its typed facades does not require a JSON-RPC server or the desktop shell.
-- [Embedding API reference](gitbooks/developing/embed/api-reference.md): Generate usable local Rust API documentation with `cargo doc -p openhuman-embed --no-deps --open`. Include `--features mcp,skills,channels,storage-sqlite` for the facade gates used by the offline examples, or select the feature set your host actually builds. For all exported optional surfaces use `--all-features`.
-- [Embedding architecture](gitbooks/developing/embed/architecture.md): Embed is the library facade above `openhuman-core`. The TinyHumans layer installs the backend SDK transport and owns product login/session behavior; the RPC layer adds JSON-RPC, server listeners and shipped host boot. A Rust embedder can stay at the facade when it owns those concerns itself.
-- [Concepts](gitbooks/developing/embed/concepts/README.md): Start with Runtime and agents to understand which settings are shared. Then follow the lifecycle of a request through provider selection, tools, approvals and its durable session. The scope tables distinguish runtime composition from the state a host must isolate per agent or profile.
-- [Access and approvals](gitbooks/developing/embed/concepts/access-approvals.md): `Access` groups permission level, origin, standing grants and trusted roots. Choose an origin and tier together: a trusted local host request and an external channel message are different security contexts. `Access::full()` configures both access fields. A sandbox is an additional execution boundary, configured through `AgentDefinitionSpec`.
-- [Agents](gitbooks/developing/embed/concepts/agents.md): Register an `AgentSpec` with `Runtime::agent`. Its ID selects the agent's home, durable session identity and addressed cron/channel work. An `Agent` clone refers to the same instance; it does not copy state or start another core. Runtime-wide credentials remain shared, so two agents are not two authenticated customers.
-- [Channels](gitbooks/developing/embed/concepts/channels.md): `Runtime::channels` creates listeners addressed to a live agent ID. A listener owns its transport task; dropping or stopping it ends that listener. The agent supplies the prompt, provider and tools used for every incoming message instead of handing messages to an operator agent.
-- [Completer](gitbooks/developing/embed/concepts/completer.md): Use `Completer` for one-shot text or structured generation when you do not need an agent, its tool loop or persistent transcript. It takes an explicit route and a `CompletionRequest`; the caller supplies the model and messages for every request.
-- [Cron](gitbooks/developing/embed/concepts/cron.md): The typed `Cron` facade creates named jobs with `JobSpec` and `JobSchedule`. `upsert` preserves a job's identity when the same name is configured again; `runs` exposes execution history. An agent-targeted job resolves the configured agent ID and executes with that agent's provider, prompt, tools and derived context.
-- [Errors](gitbooks/developing/embed/concepts/errors.md): Match the error type at its boundary: `RuntimeError` describes boot/configuration, `AgentError` describes registration/layout, and `CoreError` describes typed facade calls and turns. A missing compiled or selected domain is `CoreError::Unavailable`; it is a capability decision the host can reflect in its UI.
-- [Hooks and seams](gitbooks/developing/embed/concepts/hooks-seams.md): Runtime builders accept host-owned ports for storage, sessions, memory, tools and controller extensions. These are composition seams: the host supplies an implementation of the owning library's contract, while OpenHuman retains access policy, approvals and lifecycle.
-- [MCP](gitbooks/developing/embed/concepts/mcp.md): MCP connects a native agent turn to tools served over an MCP protocol transport. Configure a server on `AgentSpec::mcp`, with its transport, authentication and allowed tool names. Another agent on the same runtime does not inherit that server configuration.
-- [Memory](gitbooks/developing/embed/concepts/memory.md): `Runtime::memory(namespace)` returns a facade bound to that namespace. The caller establishes scope before sending record data; namespace identity is not taken from model arguments or record metadata. Learning and deletion use the selected memory engine contract.
-- [Observability](gitbooks/developing/embed/concepts/observability.md): Subscribe with `Runtime::events` before starting work you want to observe. Each event has a sequence number and runtime identity, with an agent ID and per-call turn ID where applicable. Repeated calls on the same durable session receive different turn IDs; the session ID is not the observation ID.
-- [Profiles and SaaS](gitbooks/developing/embed/concepts/profiles-saas.md): Ordinary runtime agents share an operator's configuration path and credentials. Use `ProfileRuntime` when one server serves different authenticated users who must not share those resources. Provision a profile, install its credential, and retain a `ProfileHandle` while serving that user's requests.
-- [Providers](gitbooks/developing/embed/concepts/providers.md): A runtime provider is the default inference choice for its agents. An agent can override it with an OpenAI-compatible route or a native `ChatModel<()>` through `Provider::custom`. The `providers` facade exposes the request/response contracts so custom adapters do not need to implement an HTTP server.
-- [Runtime defaults](gitbooks/developing/embed/concepts/runtime-defaults.md): The runtime's default provider, access policy and `ModelDefaults` reduce repeated setup. `AgentSpec` can override those defaults for an analyst, a writing agent or another workload without changing its siblings. Temperature and token limits are forwarded to the selected native model request, rather than being merely descriptive builder values.
-- [Runtime](gitbooks/developing/embed/concepts/runtime.md): A `Runtime` boots the in-process core once. It owns the selected domains, background services, module host and runtime defaults. Its agents share that core while using separately derived contexts. Build one runtime and pass an `Arc<Runtime>` to the parts of your application that register agents.
-- [Skills](gitbooks/developing/embed/concepts/skills.md): A skill bundle contains `SKILL.md` plus any referenced resources. `AgentSpec::skills_dir` copies bundles into the agent's `agents/<id>/skills/` tree. Copying is intentional: discovery rejects symlinked bundles, so linking a shared directory does not install it.
-- [Testing](gitbooks/developing/embed/concepts/testing.md): The runnable examples default to loopback fixtures. They assert request bodies, tool results, file effects, transcript scope and event ordering; a successful Rust compilation alone does not prove those behaviors. Live example execution is explicitly opt-in through the documented environment variables.
-- [Tools](gitbooks/developing/embed/concepts/tools.md): An agent's `ToolScopeSpec` chooses built-ins, named tools or `HostOnly`. Host-only mode starts with the host's advertised tools, requires an explicit bare prompt, and does not inherit an orchestrator tool catalog. This is useful when your application already owns read-only data access or tightly scoped actions.
-- [Turns and sessions](gitbooks/developing/embed/concepts/turns-sessions.md): `Agent::run` collects a turn. `Agent::turn` lets you set an explicit session, per-turn options, progress sink and cancellation before sending. Reuse the returned session identity for follow-up messages that should see the same transcript. Two calls on the same durable session remain distinct turn executions and receive distinct observation IDs.
-- [Embedding FAQ](gitbooks/developing/embed/faq.md): An ordinary embed process supports one `Runtime`; a second build returns `AlreadyRunning`. Add agents to the existing runtime. A multi-user host uses `ProfileRuntime` instead and needs a process dedicated to that mode. See runtime and profiles.
-- [Embedding guides](gitbooks/developing/embed/guides/README.md): Choose the guide that matches your host:
-- [CLI chatbot](gitbooks/developing/embed/guides/cli-chatbot.md): Keep one `Runtime` alive for the process and create an `Agent` for the conversation. The executable example starts with a single message, checks the reply, and prints it. A CLI input loop can send subsequent messages through the same agent; choose a stable thread identity when your host exposes separate conversations.
-- [Deploy a server](gitbooks/developing/embed/guides/deploy-server.md): Your HTTP host can keep a runtime alive and invoke its agents directly. The executable example binds a loopback listener, handles one request, and sends back the agent's reply. It exercises the request path without requiring an RPC server dependency in `openhuman-embed`.
-- [Lean and headless hosts](gitbooks/developing/embed/guides/lean-headless.md): `RuntimeBuilder::lean()` selects the agent, memory, and inference families without background services. Runtime module selection controls what is active; Cargo features control what is compiled. A lean preset alone does not shed compiled dependencies.
-- [Test with a mock backend](gitbooks/developing/embed/guides/mock-backend-testing.md): Run `node scripts/run-embed-examples.mjs` from the repository root. The runner builds and executes every example with the union of required features, clears inherited live-example credentials and operator workspace settings, and requires each program's `EXAMPLE_OK` marker after its assertions.
-- [Multiple agents](gitbooks/developing/embed/guides/multi-agent.md): A runtime owns shared services and credentials. Each `AgentSpec` selects its prompt, model route, access policy, and `action_dir`. Internal agent state belongs to its agent home; the action directory is where acting tools operate.
-- [SaaS with multiple tenants](gitbooks/developing/embed/guides/saas-multi-tenant.md): Use `ProfileRuntime` for a process serving multiple users. Provision each profile, install that profile's credential, and open a handle to its workspace. Reusing a thread id in two profiles does not share their conversation history.
-- [Installation](gitbooks/developing/embed/installation.md): `openhuman-embed` is currently an unpublished workspace crate. Use a local path dependency when developing in this repository, or a Git dependency on `https://github.com/tinyhumansai/openhuman` with `package = "openhuman-embed"`. Pin a reviewed Git revision for a deployed application; the nested vendored libraries are part of that revision's build inputs.
-- [Embedding integrations](gitbooks/developing/embed/integrations/README.md): An embedded runtime composes the capabilities its host supplies. Start with the adapter your application needs:
-- [Channels](gitbooks/developing/embed/integrations/channels.md): Enable the `channels` Cargo feature to use channel adapters. Your host configures the channel credential and binds incoming messages to an agent. In the Telegram example, the Bot API endpoint is a loopback stub, so updates and replies exercise the adapter without contacting Telegram.
-- [Composio](gitbooks/developing/embed/integrations/composio.md): Composio calls use the host backend transport. Install that transport before booting a managed runtime; see TinyHumans managed inference. An explicit inference provider route supplies model inference, not the connector transport.
-- [Local and custom models](gitbooks/developing/embed/integrations/local-models.md): For a local server that implements chat completions, use `Provider::openai_compatible` with its API root and model id. The constructor requires a bearer string even when a particular local server ignores it. Set the endpoint explicitly rather than relying on another user's installed configuration. The OpenAI-compatible example controls can point a live example at that local server.
-- [MCP servers](gitbooks/developing/embed/integrations/mcp.md): Enable the `mcp` Cargo feature and declare a server with `AgentSpec::mcp`. `McpServer::http` takes a registered name and endpoint; `allow_tools` narrows the remote tool list. Server configuration and its connections belong to the agent that declared them.
-- [OpenAI-compatible providers and BYOK](gitbooks/developing/embed/integrations/openai-compatible.md): Construct a route with `Provider::openai_compatible(base_url, api_key).model(model_id)`, then set it on the runtime or an individual agent. Pass the API root, such as a provider's `/v1` URL; the adapter appends `/chat/completions`. Supply an explicit model id so the route can register that model for its workload roles.
-- [Storage drivers](gitbooks/developing/embed/integrations/storage-drivers.md): Enable `storage-sqlite` for SQLite or `storage-mongodb` for MongoDB on your Embed dependency. These Cargo gates make the driver available; choosing a URL selects the runtime backend. Set `RuntimeConfig.storage.url`, pass a URL through `RuntimeBuilder::storage`, or set the `url` field in the `[storage]` section of the host's configuration. `OPENHUMAN_STORAGE_URL` is the environment override used by host configuration resolution.
-- [TinyHumans managed inference](gitbooks/developing/embed/integrations/tinyhumans-managed.md): Embed wraps the core; it does not contain a TinyHumans SDK backend client. A managed host must supply a `BackendTransport` through `RuntimeBuilder::backend_transport`, or boot through the SDK-backed builder in `openhuman-tinyhumans`. The connected host layer owns transport and session login. `RuntimeBuilder::backend_url` selects a URL; it does not install a transport.
-- [Web search](gitbooks/developing/embed/integrations/web-search.md): An agent's web-search tools (`web_search_tool`, `web_answer_tool`, `web_contents_tool`) run through the process-wide TinySearch module. Several agents in one runtime can each search with their own provider key: pin it on that agent's config, and it is never written to `config.toml`, the environment, or a log.
-- [Quickstart](gitbooks/developing/embed/quickstart.md): Start from a checkout of the repository and run `cargo run -p openhuman-embed --example run_turn`. The example boots an ephemeral runtime, creates its own local provider/backend fixtures and prints `hello from the stub`. It needs no inference account and does not contact a real backend.
-- [Embedding troubleshooting](gitbooks/developing/embed/troubleshooting.md): Use the typed error and the effective capability report together. A method that was compiled out is a different problem from a configured method with a provider failure. Keep credentials, user prompts and raw provider payloads out of routine diagnostics.
+- [Embedding OpenHuman](docs/gitbooks/en/developing/embed/README.md): `openhuman-embed` runs the OpenHuman core inside your Rust program. Your host owns the user interface, server transport and authentication flow; the core owns agent turns, memory, tools, approvals and execution policy. Calling its typed facades does not require a JSON-RPC server or the desktop shell.
+- [Embedding API reference](docs/gitbooks/en/developing/embed/api-reference.md): Generate usable local Rust API documentation with `cargo doc -p openhuman-embed --no-deps --open`. Include `--features mcp,skills,channels,storage-sqlite` for the facade gates used by the offline examples, or select the feature set your host actually builds. For all exported optional surfaces use `--all-features`.
+- [Embedding architecture](docs/gitbooks/en/developing/embed/architecture.md): Embed is the library facade above `openhuman-core`. The TinyHumans layer installs the backend SDK transport and owns product login/session behavior; the RPC layer adds JSON-RPC, server listeners and shipped host boot. A Rust embedder can stay at the facade when it owns those concerns itself.
+- [Concepts](docs/gitbooks/en/developing/embed/concepts/README.md): Start with Runtime and agents to understand which settings are shared. Then follow the lifecycle of a request through provider selection, tools, approvals and its durable session. The scope tables distinguish runtime composition from the state a host must isolate per agent or profile.
+- [Access and approvals](docs/gitbooks/en/developing/embed/concepts/access-approvals.md): `Access` groups permission level, origin, standing grants and trusted roots. Choose an origin and tier together: a trusted local host request and an external channel message are different security contexts. `Access::full()` configures both access fields. A sandbox is an additional execution boundary, configured through `AgentDefinitionSpec`.
+- [Agents](docs/gitbooks/en/developing/embed/concepts/agents.md): Register an `AgentSpec` with `Runtime::agent`. Its ID selects the agent's home, durable session identity and addressed cron/channel work. An `Agent` clone refers to the same instance; it does not copy state or start another core. Runtime-wide credentials remain shared, so two agents are not two authenticated customers.
+- [Channels](docs/gitbooks/en/developing/embed/concepts/channels.md): `Runtime::channels` creates listeners addressed to a live agent ID. A listener owns its transport task; dropping or stopping it ends that listener. The agent supplies the prompt, provider and tools used for every incoming message instead of handing messages to an operator agent.
+- [Completer](docs/gitbooks/en/developing/embed/concepts/completer.md): Use `Completer` for one-shot text or structured generation when you do not need an agent, its tool loop or persistent transcript. It takes an explicit route and a `CompletionRequest`; the caller supplies the model and messages for every request.
+- [Cron](docs/gitbooks/en/developing/embed/concepts/cron.md): The typed `Cron` facade creates named jobs with `JobSpec` and `JobSchedule`. `upsert` preserves a job's identity when the same name is configured again; `runs` exposes execution history. An agent-targeted job resolves the configured agent ID and executes with that agent's provider, prompt, tools and derived context.
+- [Errors](docs/gitbooks/en/developing/embed/concepts/errors.md): Match the error type at its boundary: `RuntimeError` describes boot/configuration, `AgentError` describes registration/layout, and `CoreError` describes typed facade calls and turns. A missing compiled or selected domain is `CoreError::Unavailable`; it is a capability decision the host can reflect in its UI.
+- [Hooks and seams](docs/gitbooks/en/developing/embed/concepts/hooks-seams.md): Runtime builders accept host-owned ports for storage, sessions, memory, tools and controller extensions. These are composition seams: the host supplies an implementation of the owning library's contract, while OpenHuman retains access policy, approvals and lifecycle.
+- [MCP](docs/gitbooks/en/developing/embed/concepts/mcp.md): MCP connects a native agent turn to tools served over an MCP protocol transport. Configure a server on `AgentSpec::mcp`, with its transport, authentication and allowed tool names. Another agent on the same runtime does not inherit that server configuration.
+- [Memory](docs/gitbooks/en/developing/embed/concepts/memory.md): `Runtime::memory(namespace)` returns a facade bound to that namespace. The caller establishes scope before sending record data; namespace identity is not taken from model arguments or record metadata. Learning and deletion use the selected memory engine contract.
+- [Observability](docs/gitbooks/en/developing/embed/concepts/observability.md): Subscribe with `Runtime::events` before starting work you want to observe. Each event has a sequence number and runtime identity, with an agent ID and per-call turn ID where applicable. Repeated calls on the same durable session receive different turn IDs; the session ID is not the observation ID.
+- [Profiles and SaaS](docs/gitbooks/en/developing/embed/concepts/profiles-saas.md): Ordinary runtime agents share an operator's configuration path and credentials. Use `ProfileRuntime` when one server serves different authenticated users who must not share those resources. Provision a profile, install its credential, and retain a `ProfileHandle` while serving that user's requests.
+- [Providers](docs/gitbooks/en/developing/embed/concepts/providers.md): A runtime provider is the default inference choice for its agents. An agent can override it with an OpenAI-compatible route or a native `ChatModel<()>` through `Provider::custom`. The `providers` facade exposes the request/response contracts so custom adapters do not need to implement an HTTP server.
+- [Runtime defaults](docs/gitbooks/en/developing/embed/concepts/runtime-defaults.md): The runtime's default provider, access policy and `ModelDefaults` reduce repeated setup. `AgentSpec` can override those defaults for an analyst, a writing agent or another workload without changing its siblings. Temperature and token limits are forwarded to the selected native model request, rather than being merely descriptive builder values.
+- [Runtime](docs/gitbooks/en/developing/embed/concepts/runtime.md): A `Runtime` boots the in-process core once. It owns the selected domains, background services, module host and runtime defaults. Its agents share that core while using separately derived contexts. Build one runtime and pass an `Arc<Runtime>` to the parts of your application that register agents.
+- [Skills](docs/gitbooks/en/developing/embed/concepts/skills.md): A skill bundle contains `SKILL.md` plus any referenced resources. `AgentSpec::skills_dir` copies bundles into the agent's `agents/<id>/skills/` tree. Copying is intentional: discovery rejects symlinked bundles, so linking a shared directory does not install it.
+- [Testing](docs/gitbooks/en/developing/embed/concepts/testing.md): The runnable examples default to loopback fixtures. They assert request bodies, tool results, file effects, transcript scope and event ordering; a successful Rust compilation alone does not prove those behaviors. Live example execution is explicitly opt-in through the documented environment variables.
+- [Tools](docs/gitbooks/en/developing/embed/concepts/tools.md): An agent's `ToolScopeSpec` chooses built-ins, named tools or `HostOnly`. Host-only mode starts with the host's advertised tools, requires an explicit bare prompt, and does not inherit an orchestrator tool catalog. This is useful when your application already owns read-only data access or tightly scoped actions.
+- [Turns and sessions](docs/gitbooks/en/developing/embed/concepts/turns-sessions.md): `Agent::run` collects a turn. `Agent::turn` lets you set an explicit session, per-turn options, progress sink and cancellation before sending. Reuse the returned session identity for follow-up messages that should see the same transcript. Two calls on the same durable session remain distinct turn executions and receive distinct observation IDs.
+- [Embedding FAQ](docs/gitbooks/en/developing/embed/faq.md): An ordinary embed process supports one `Runtime`; a second build returns `AlreadyRunning`. Add agents to the existing runtime. A multi-user host uses `ProfileRuntime` instead and needs a process dedicated to that mode. See runtime and profiles.
+- [Embedding guides](docs/gitbooks/en/developing/embed/guides/README.md): Choose the guide that matches your host:
+- [CLI chatbot](docs/gitbooks/en/developing/embed/guides/cli-chatbot.md): Keep one `Runtime` alive for the process and create an `Agent` for the conversation. The executable example starts with a single message, checks the reply, and prints it. A CLI input loop can send subsequent messages through the same agent; choose a stable thread identity when your host exposes separate conversations.
+- [Deploy a server](docs/gitbooks/en/developing/embed/guides/deploy-server.md): Your HTTP host can keep a runtime alive and invoke its agents directly. The executable example binds a loopback listener, handles one request, and sends back the agent's reply. It exercises the request path without requiring an RPC server dependency in `openhuman-embed`.
+- [Lean and headless hosts](docs/gitbooks/en/developing/embed/guides/lean-headless.md): `RuntimeBuilder::lean()` selects the agent, memory, and inference families without background services. Runtime module selection controls what is active; Cargo features control what is compiled. A lean preset alone does not shed compiled dependencies.
+- [Test with a mock backend](docs/gitbooks/en/developing/embed/guides/mock-backend-testing.md): Run `node scripts/run-embed-examples.mjs` from the repository root. The runner builds and executes every example with the union of required features, clears inherited live-example credentials and operator workspace settings, and requires each program's `EXAMPLE_OK` marker after its assertions.
+- [Multiple agents](docs/gitbooks/en/developing/embed/guides/multi-agent.md): A runtime owns shared services and credentials. Each `AgentSpec` selects its prompt, model route, access policy, and `action_dir`. Internal agent state belongs to its agent home; the action directory is where acting tools operate.
+- [SaaS with multiple tenants](docs/gitbooks/en/developing/embed/guides/saas-multi-tenant.md): Use `ProfileRuntime` for a process serving multiple users. Provision each profile, install that profile's credential, and open a handle to its workspace. Reusing a thread id in two profiles does not share their conversation history.
+- [Installation](docs/gitbooks/en/developing/embed/installation.md): `openhuman-embed` is currently an unpublished workspace crate. Use a local path dependency when developing in this repository, or a Git dependency on `https://github.com/tinyhumansai/openhuman` with `package = "openhuman-embed"`. Pin a reviewed Git revision for a deployed application; the nested vendored libraries are part of that revision's build inputs.
+- [Embedding integrations](docs/gitbooks/en/developing/embed/integrations/README.md): An embedded runtime composes the capabilities its host supplies. Start with the adapter your application needs:
+- [Channels](docs/gitbooks/en/developing/embed/integrations/channels.md): Enable the `channels` Cargo feature to use channel adapters. Your host configures the channel credential and binds incoming messages to an agent. In the Telegram example, the Bot API endpoint is a loopback stub, so updates and replies exercise the adapter without contacting Telegram.
+- [Composio](docs/gitbooks/en/developing/embed/integrations/composio.md): Composio calls use the host backend transport. Install that transport before booting a managed runtime; see TinyHumans managed inference. An explicit inference provider route supplies model inference, not the connector transport.
+- [Local and custom models](docs/gitbooks/en/developing/embed/integrations/local-models.md): For a local server that implements chat completions, use `Provider::openai_compatible` with its API root and model id. The constructor requires a bearer string even when a particular local server ignores it. Set the endpoint explicitly rather than relying on another user's installed configuration. The OpenAI-compatible example controls can point a live example at that local server.
+- [MCP servers](docs/gitbooks/en/developing/embed/integrations/mcp.md): Enable the `mcp` Cargo feature and declare a server with `AgentSpec::mcp`. `McpServer::http` takes a registered name and endpoint; `allow_tools` narrows the remote tool list. Server configuration and its connections belong to the agent that declared them.
+- [OpenAI-compatible providers and BYOK](docs/gitbooks/en/developing/embed/integrations/openai-compatible.md): Construct a route with `Provider::openai_compatible(base_url, api_key).model(model_id)`, then set it on the runtime or an individual agent. Pass the API root, such as a provider's `/v1` URL; the adapter appends `/chat/completions`. Supply an explicit model id so the route can register that model for its workload roles.
+- [Storage drivers](docs/gitbooks/en/developing/embed/integrations/storage-drivers.md): Enable `storage-sqlite` for SQLite or `storage-mongodb` for MongoDB on your Embed dependency. These Cargo gates make the driver available; choosing a URL selects the runtime backend. Set `RuntimeConfig.storage.url`, pass a URL through `RuntimeBuilder::storage`, or set the `url` field in the `[storage]` section of the host's configuration. `OPENHUMAN_STORAGE_URL` is the environment override used by host configuration resolution.
+- [TinyHumans managed inference](docs/gitbooks/en/developing/embed/integrations/tinyhumans-managed.md): Embed wraps the core; it does not contain a TinyHumans SDK backend client. A managed host must supply a `BackendTransport` through `RuntimeBuilder::backend_transport`, or boot through the SDK-backed builder in `openhuman-tinyhumans`. The connected host layer owns transport and session login. `RuntimeBuilder::backend_url` selects a URL; it does not install a transport.
+- [Web search](docs/gitbooks/en/developing/embed/integrations/web-search.md): An agent's web-search tools (`web_search_tool`, `web_answer_tool`, `web_contents_tool`) run through the process-wide TinySearch module. Several agents in one runtime can each search with their own provider key: pin it on that agent's config, and it is never written to `config.toml`, the environment, or a log.
+- [Quickstart](docs/gitbooks/en/developing/embed/quickstart.md): Start from a checkout of the repository and run `cargo run -p openhuman-embed --example run_turn`. The example boots an ephemeral runtime, creates its own local provider/backend fixtures and prints `hello from the stub`. It needs no inference account and does not contact a real backend.
+- [Embedding troubleshooting](docs/gitbooks/en/developing/embed/troubleshooting.md): Use the typed error and the effective capability report together. A method that was compiled out is a different problem from a configured method with a provider failure. Keep credentials, user prompts and raw provider payloads out of routine diagnostics.
- [OpenHuman Embed](crates/openhuman-embed/README.md): A typed Rust facade for running the OpenHuman core inside your application: one Runtime per process, with independently configured Agents.
-- [Embedding OpenHuman](gitbooks/developing/embedding.md): The embedding documentation now lives in the Embedding section.
-- [Cookbook](gitbooks/developing/embed/cookbook.md): Executable recipes are indexed from their source headers. Each entry records the declared run mode and any named Embed feature required by the example. Full source includes the surrounding setup and assertions.
-- [Compiled feature matrix](gitbooks/developing/embed/capability-matrix.md): This matrix comes from the default-feature compiled capability-report example. Runtime presets can narrow enabled domains and services; core Cargo features determine which implementations are available. Named Embed features also gate facade exports: enable `mcp` or `skills` explicitly for their public setters even when core defaults compile those implementations. Embed defaults enable the named `channels` feature. See the installation guide for these separate layers.
-- [RuntimeBuilder setters](gitbooks/developing/embed/builder-setters.md): Public consuming methods that return `Self`, extracted from the RuntimeBuilder implementations. Static host and weight presets, inspection methods and build/run methods are excluded.
-- [API index](gitbooks/developing/embed/api-index.md): Generate the complete local Rust API reference with `cargo doc -p openhuman-embed --all-features --no-deps --open`. This crate is currently unpublished; docs.rs is a future publication target. Names below are source-listed exports, including conditional Cargo-gated items; local rustdoc with your selected features describes availability. Canonical facade source.
+- [Embedding OpenHuman](docs/gitbooks/en/developing/embedding.md): The embedding documentation now lives in the Embedding section.
+- [Cookbook](docs/gitbooks/en/developing/embed/cookbook.md): Executable recipes are indexed from their source headers. Each entry records the declared run mode and any named Embed feature required by the example. Full source includes the surrounding setup and assertions.
+- [Compiled feature matrix](docs/gitbooks/en/developing/embed/capability-matrix.md): This matrix comes from the default-feature compiled capability-report example. Runtime presets can narrow enabled domains and services; core Cargo features determine which implementations are available. Named Embed features also gate facade exports: enable `mcp` or `skills` explicitly for their public setters even when core defaults compile those implementations. Embed defaults enable the named `channels` feature. See the installation guide for these separate layers.
+- [RuntimeBuilder setters](docs/gitbooks/en/developing/embed/builder-setters.md): Public consuming methods that return `Self`, extracted from the RuntimeBuilder implementations. Static host and weight presets, inspection methods and build/run methods are excluded.
+- [API index](docs/gitbooks/en/developing/embed/api-index.md): Generate the complete local Rust API reference with `cargo doc -p openhuman-embed --all-features --no-deps --open`. This crate is currently unpublished; docs.rs is a future publication target. Names below are source-listed exports, including conditional Cargo-gated items; local rustdoc with your selected features describes availability. Canonical facade source.
- [Embed examples](crates/openhuman-embed/examples/README.md): Cookbook
-See the generated [API index](gitbooks/developing/embed/api-index.md) for build capabilities.
+See the generated [API index](docs/gitbooks/en/developing/embed/api-index.md) for build capabilities.
diff --git a/README.md b/README.md
index b447103e70..bedcb9ef5d 100644
--- a/README.md
+++ b/README.md
@@ -117,7 +117,7 @@ Most agent harnesses run one heavy process per agent and resend a big prompt on
<h3>Built for developers</h3>
-<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust quickstart</a> · <a href="./gitbooks/developing/embed/README.md">Embedding guide</a> · <a href="./crates/openhuman-embed/examples">Examples</a></p>
+<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust quickstart</a> · <a href="./docs/gitbooks/en/developing/embed/README.md">Embedding guide</a> · <a href="./crates/openhuman-embed/examples">Examples</a></p>
<p>Use it as a Rust library: call an agent like any other function, or run a whole fleet from one small server.</p>
@@ -224,9 +224,9 @@ OpenHuman rethinks the parts that cost the most: how much text the AI has to rea
<p align="center">
<picture>
- <source media="(prefers-color-scheme: dark)" srcset="./gitbooks/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
- <source media="(prefers-color-scheme: light)" srcset="./gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
- <img alt="SWE-bench Verified run swe-x86-1: OpenHuman against six other harnesses on ten panels" src="./gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <source media="(prefers-color-scheme: dark)" srcset="./docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
+ <source media="(prefers-color-scheme: light)" srcset="./docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <img alt="SWE-bench Verified run swe-x86-1: OpenHuman against six other harnesses on ten panels" src="./docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
</picture>
</p>
@@ -288,7 +288,7 @@ let reply = agent.run("Summarize what you can see in this directory.").await?;
println!("{}", reply.reply);
```
-Next: the [Rust quickstart](https://tinyhumans.gitbook.io/openhuman/developing/quickstart), the [embedding guide](./gitbooks/developing/embed/README.md) and the [developer docs](https://tinyhumans.gitbook.io/openhuman/developing).
+Next: the [Rust quickstart](https://tinyhumans.gitbook.io/openhuman/developing/quickstart), the [embedding guide](./docs/gitbooks/en/developing/embed/README.md) and the [developer docs](https://tinyhumans.gitbook.io/openhuman/developing).
---
diff --git a/app/README.md b/app/README.md
index c43c9fdd01..3f829785d9 100644
--- a/app/README.md
+++ b/app/README.md
@@ -8,7 +8,7 @@ This template should help get you started developing with Tauri, React and Types
## Further reading
-- [Frontend architecture](../gitbooks/developing/architecture/frontend.md) for the layout of `src/`.
-- [Tauri shell](../gitbooks/developing/architecture/tauri-shell.md) and [`crates/openhuman-app/`](../crates/openhuman-app/README.md), the desktop host this frontend runs in.
-- [Getting set up](../gitbooks/developing/getting-set-up.md) and [`AGENTS.md`](../AGENTS.md) for commands and conventions.
+- [Frontend architecture](../docs/gitbooks/en/developing/architecture/frontend.md) for the layout of `src/`.
+- [Tauri shell](../docs/gitbooks/en/developing/architecture/tauri-shell.md) and [`crates/openhuman-app/`](../crates/openhuman-app/README.md), the desktop host this frontend runs in.
+- [Getting set up](../docs/gitbooks/en/developing/getting-set-up.md) and [`AGENTS.md`](../AGENTS.md) for commands and conventions.
- [`src/providers/`](./src/providers/README.md), [`src-tauri-web/`](./src-tauri-web/README.md) and [`src-tauri-mobile/icons/`](./src-tauri-mobile/icons/README.md) have their own notes.
diff --git a/app/src-tauri-mobile/icons/README.md b/app/src-tauri-mobile/icons/README.md
index 61fb1a1dd8..1184b23ca0 100644
--- a/app/src-tauri-mobile/icons/README.md
+++ b/app/src-tauri-mobile/icons/README.md
@@ -16,4 +16,4 @@ The `gen/` directory is `.gitignore`d (Tauri regenerates it from
[`tauri.conf.json`](../tauri.conf.json) on every `init`), so the canonical source for icons
must live here, not under `gen/`.
-See also the [iOS companion](../../../gitbooks/features/ios-companion.md) page and [`app/README.md`](../../README.md).
+See also the [iOS companion](../../../docs/gitbooks/en/features/ios-companion.md) page and [`app/README.md`](../../README.md).
diff --git a/app/src-tauri-web/README.md b/app/src-tauri-web/README.md
index 42340f1eb4..7bff25bba7 100644
--- a/app/src-tauri-web/README.md
+++ b/app/src-tauri-web/README.md
@@ -5,7 +5,7 @@ OpenHuman E2E and future web-compatible development.
Scope:
-- No CEF runtime (the desktop shell now runs on Wry, see [Tauri shell](../../gitbooks/developing/architecture/tauri-shell.md))
+- No CEF runtime (the desktop shell now runs on Wry, see [Tauri shell](../../docs/gitbooks/en/developing/architecture/tauri-shell.md))
- No embedded provider webviews
- No native windowing, tray, or deep-link plugins
- Frontend talks to a standalone [`openhuman-core`](../../crates/openhuman-cli/README.md) over HTTP JSON-RPC
@@ -13,7 +13,7 @@ Scope:
Current entrypoints:
- `pnpm build:web:e2e` builds the browser bundle into `app/dist-web`
-- `pnpm test:e2e:web` (see [E2E testing](../../gitbooks/developing/e2e-testing.md)) starts the mock backend ([`scripts/mock-api-server.mjs`](../../scripts/mock-api-server.mjs)), standalone core, and static web
+- `pnpm test:e2e:web` (see [E2E testing](../../docs/gitbooks/en/developing/e2e-testing.md)) starts the mock backend ([`scripts/mock-api-server.mjs`](../../scripts/mock-api-server.mjs)), standalone core, and static web
host, then runs Playwright against the browser build
- `pnpm test:e2e:mega` keeps the CEF/Appium mega-flow on the desktop shell
diff --git a/app/src/App.tsx b/app/src/App.tsx
index 6dc0e61a1e..6decaa4f03 100644
--- a/app/src/App.tsx
+++ b/app/src/App.tsx
@@ -101,7 +101,7 @@ function App() {
* Authoritative top-level provider / gate nesting for the desktop shell,
* outermost first. Keep this list in sync with the JSX returned below;
* `scripts/generate-architecture-docs.mjs` renders it into
- * `gitbooks/developing/architecture/frontend.md` and CI (`pnpm docs:check`)
+ * `docs/gitbooks/en/developing/architecture/frontend.md` and CI (`pnpm docs:check`)
* fails if the doc drifts. Refresh the doc with `pnpm docs:generate`.
* Format per line: `<order>. <Component> — <role>` (role must not contain " — ").
* 1. Sentry.ErrorBoundary — Crash boundary; renders ErrorFallbackScreen
diff --git a/app/src/components/notifications/NotificationCard.tsx b/app/src/components/notifications/NotificationCard.tsx
index dd2e4dd330..f0a1a255a6 100644
--- a/app/src/components/notifications/NotificationCard.tsx
+++ b/app/src/components/notifications/NotificationCard.tsx
@@ -30,7 +30,7 @@ function relativeTime(isoString: string): string {
* Restoring a per-provider tint means adding brand tokens (the same product
* decision the Telegram / Discord / iMessage plates in `skills/skillIcons.tsx`
* are parked on), not reaching back for a stock Tailwind ramp.
- * See `gitbooks/developing/theming.md`.
+ * See `docs/gitbooks/en/developing/theming.md`.
*/
/** Importance badge tone: high / medium / low on coral / amber / sage. */
function scoreBadgeVariant(score: number): 'danger' | 'warning' | 'success' {
diff --git a/app/src/components/settings/panels/EventLogPanel.tsx b/app/src/components/settings/panels/EventLogPanel.tsx
index 1abe42058d..3d36c23dc7 100644
--- a/app/src/components/settings/panels/EventLogPanel.tsx
+++ b/app/src/components/settings/panels/EventLogPanel.tsx
@@ -66,7 +66,7 @@ const DOMAIN_BADGE_KEYS: Record<string, string> = {
* takes the neutral variant already used. Danger is deliberately left
* unassigned: nothing here means "failure", and painting an ordinary domain in
* the danger ramp would make routine events read as errors. The badge prints
- * the domain name either way. See `gitbooks/developing/theming.md`.
+ * the domain name either way. See `docs/gitbooks/en/developing/theming.md`.
*/
const DOMAIN_BADGE_VARIANT: Record<string, BadgeVariant> = {
tool: 'primary',
diff --git a/app/src/components/skills/SkillsExplorerTab.tsx b/app/src/components/skills/SkillsExplorerTab.tsx
index f74592f7e5..33ac02bbda 100644
--- a/app/src/components/skills/SkillsExplorerTab.tsx
+++ b/app/src/components/skills/SkillsExplorerTab.tsx
@@ -107,7 +107,7 @@ function isCatalogEntryInstalled(entry: CatalogEntry, installedKeys: Set<string>
/**
* Source tone table: where a skill comes from (shipped with the app, or
* fetched from a remote catalogue) maps to a `Badge` variant instead of a
- * bespoke tint. See `gitbooks/developing/theming.md`.
+ * bespoke tint. See `docs/gitbooks/en/developing/theming.md`.
*/
const SOURCE_VARIANT: Record<string, BadgeVariant> = {
'built-in': 'success',
diff --git a/app/src/components/skills/skillIcons.tsx b/app/src/components/skills/skillIcons.tsx
index d44d4aad7d..ad852ae158 100644
--- a/app/src/components/skills/skillIcons.tsx
+++ b/app/src/components/skills/skillIcons.tsx
@@ -97,7 +97,7 @@ export function getChannelIcons(
* two behavioural families (`Productivity`, `Social`) and the one that already
* carries a caution tone (`Tools & Automation`). The surplus rows fall back to
* the neutral pair defined by `All` / `Other` rather than reaching for a fifth,
- * unthemeable ramp. See `gitbooks/developing/theming.md` ("Colour as identity").
+ * unthemeable ramp. See `docs/gitbooks/en/developing/theming.md` ("Colour as identity").
*/
const NEUTRAL_CATEGORY_TONE = {
chipClassName: 'bg-surface-subtle text-content-secondary',
diff --git a/app/src/hooks/useAppUpdate.ts b/app/src/hooks/useAppUpdate.ts
index d8d97f4875..253cc6b28d 100644
--- a/app/src/hooks/useAppUpdate.ts
+++ b/app/src/hooks/useAppUpdate.ts
@@ -14,7 +14,7 @@
* "Restart to apply" prompt — never a "click to start downloading" one
*
* Pairs with the Rust side in `crates/openhuman-app/src/lib.rs` (`check_app_update`,
- * `download_app_update`, `install_app_update`). See `gitbooks/overview/auto-update.md`.
+ * `download_app_update`, `install_app_update`). See `docs/gitbooks/en/overview/auto-update.md`.
*/
import { listen, type UnlistenFn } from '@tauri-apps/api/event';
import { useCallback, useEffect, useRef, useState } from 'react';
diff --git a/app/src/providers/README.md b/app/src/providers/README.md
index 672e7462e1..9b4cb288aa 100644
--- a/app/src/providers/README.md
+++ b/app/src/providers/README.md
@@ -31,6 +31,6 @@ Manages the Socket.IO connection to the Rust core, providing the underlying tran
## Further reading
-- [Frontend architecture](../../../gitbooks/developing/architecture/frontend.md), including the provider chain generated from [`App.tsx`](../App.tsx).
-- [Chat](../../../gitbooks/features/chat.md), the feature these providers drive.
+- [Frontend architecture](../../../docs/gitbooks/en/developing/architecture/frontend.md), including the provider chain generated from [`App.tsx`](../App.tsx).
+- [Chat](../../../docs/gitbooks/en/features/chat.md), the feature these providers drive.
- [`app/README.md`](../../README.md).
diff --git a/app/src/styles/tokens.css b/app/src/styles/tokens.css
index cadcebe73e..e347400c08 100644
--- a/app/src/styles/tokens.css
+++ b/app/src/styles/tokens.css
@@ -1,6 +1,6 @@
/*
* Canonical theme tokens — the single source of truth for every themeable
- * colour and font in the app. See gitbooks/developing/theming.md.
+ * colour and font in the app. See docs/gitbooks/en/developing/theming.md.
*
* WHY CHANNEL FORMAT: each colour is stored as a space-separated RGB triple
* (e.g. `255 255 255`) rather than a hex string. `tailwind.config.js` wraps
diff --git a/app/test/e2e/specs/agent-review.spec.ts b/app/test/e2e/specs/agent-review.spec.ts
index 7ab06ee879..b73031addf 100644
--- a/app/test/e2e/specs/agent-review.spec.ts
+++ b/app/test/e2e/specs/agent-review.spec.ts
@@ -10,7 +10,7 @@
* - inspect screenshots + page source at each checkpoint,
* - inspect mock backend request evidence.
*
- * See gitbooks/developing/agent-observability.md for how artifacts are laid out.
+ * See docs/gitbooks/en/developing/agent-observability.md for how artifacts are laid out.
*
* This spec intentionally keeps assertions loose: its primary contract is
* "the flow reaches each checkpoint and captures artifacts", not a strict
diff --git a/crates/README.md b/crates/README.md
index 1e8adb8a59..ae3193f4ff 100644
--- a/crates/README.md
+++ b/crates/README.md
@@ -120,10 +120,10 @@ README for the explicit `[[test]]` entries they need.
- [`crates/openhuman-rpc/README.md`](openhuman-rpc/README.md): the openhuman-rpc crate README.
- [`crates/openhuman-tinyhumans/README.md`](openhuman-tinyhumans/README.md): the openhuman-tinyhumans crate README.
- [`crates/openhuman-tui/README.md`](openhuman-tui/README.md): the openhuman-tui crate README.
-- [`gitbooks/developing/architecture.md`](../gitbooks/developing/architecture.md): architecture overview.
-- [`gitbooks/developing/building-rust-core.md`](../gitbooks/developing/building-rust-core.md): building the Rust core.
-- [`gitbooks/developing/embedding.md`](../gitbooks/developing/embedding.md): embedding the core in another product.
-- [`gitbooks/developing/loadable-modules.md`](../gitbooks/developing/loadable-modules.md): loadable modules.
-- [`gitbooks/developing/architecture/tauri-shell.md`](../gitbooks/developing/architecture/tauri-shell.md): the Tauri shell.
+- [`docs/gitbooks/en/developing/architecture.md`](../docs/gitbooks/en/developing/architecture.md): architecture overview.
+- [`docs/gitbooks/en/developing/building-rust-core.md`](../docs/gitbooks/en/developing/building-rust-core.md): building the Rust core.
+- [`docs/gitbooks/en/developing/embedding.md`](../docs/gitbooks/en/developing/embedding.md): embedding the core in another product.
+- [`docs/gitbooks/en/developing/loadable-modules.md`](../docs/gitbooks/en/developing/loadable-modules.md): loadable modules.
+- [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../docs/gitbooks/en/developing/architecture/tauri-shell.md): the Tauri shell.
- [`AGENTS.md`](../AGENTS.md): project conventions.
- [`scripts/README.md`](../scripts/README.md): scripts.
diff --git a/crates/openhuman-app/README.md b/crates/openhuman-app/README.md
index c14aac889e..355c899689 100644
--- a/crates/openhuman-app/README.md
+++ b/crates/openhuman-app/README.md
@@ -15,7 +15,7 @@ name follows the [`crates/`](../) layout; the library and binary names are shipp
identities.
For the user-facing tour of windows, tray and data flow, see
-[`gitbooks/developing/architecture/tauri-shell.md`](../../gitbooks/developing/architecture/tauri-shell.md).
+[`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../docs/gitbooks/en/developing/architecture/tauri-shell.md).
## How it works
@@ -370,10 +370,10 @@ Desktop E2E specs live under [`app/test/e2e/specs/`](../../app/test/e2e/specs/).
- [`crates/openhuman-app/capabilities/README.md`](capabilities/README.md): the capabilities module README.
- [`crates/openhuman-app/profiling/README.md`](profiling/README.md): the profiling module README.
-- [`gitbooks/developing/architecture/tauri-shell.md`](../../gitbooks/developing/architecture/tauri-shell.md): the Tauri shell.
-- [`gitbooks/developing/architecture.md`](../../gitbooks/developing/architecture.md): architecture overview.
-- [`gitbooks/developing/architecture/frontend.md`](../../gitbooks/developing/architecture/frontend.md): the frontend.
-- [`gitbooks/developing/building-rust-core.md`](../../gitbooks/developing/building-rust-core.md): building the Rust core.
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
-- [`gitbooks/developing/performance.md`](../../gitbooks/developing/performance.md): performance.
+- [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../docs/gitbooks/en/developing/architecture/tauri-shell.md): the Tauri shell.
+- [`docs/gitbooks/en/developing/architecture.md`](../../docs/gitbooks/en/developing/architecture.md): architecture overview.
+- [`docs/gitbooks/en/developing/architecture/frontend.md`](../../docs/gitbooks/en/developing/architecture/frontend.md): the frontend.
+- [`docs/gitbooks/en/developing/building-rust-core.md`](../../docs/gitbooks/en/developing/building-rust-core.md): building the Rust core.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/performance.md`](../../docs/gitbooks/en/developing/performance.md): performance.
- [`crates/openhuman-app/permissions/README.md`](permissions/README.md): the permissions module README.
diff --git a/crates/openhuman-app/capabilities/README.md b/crates/openhuman-app/capabilities/README.md
index 753b929fdc..36a3d45c1f 100644
--- a/crates/openhuman-app/capabilities/README.md
+++ b/crates/openhuman-app/capabilities/README.md
@@ -39,5 +39,5 @@ The `$schema` field points at `../gen/schemas/desktop-schema.json`, which
## Further reading
-- [`gitbooks/developing/architecture/tauri-shell.md`](../../../gitbooks/developing/architecture/tauri-shell.md): the Tauri shell.
+- [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../../docs/gitbooks/en/developing/architecture/tauri-shell.md): the Tauri shell.
- [`crates/openhuman-app/README.md`](../README.md): the openhuman-app crate README.
diff --git a/crates/openhuman-app/permissions/README.md b/crates/openhuman-app/permissions/README.md
index 9158615f25..d336cc6e3b 100644
--- a/crates/openhuman-app/permissions/README.md
+++ b/crates/openhuman-app/permissions/README.md
@@ -74,6 +74,6 @@ directly in the capability.
## Further reading
-- [`gitbooks/developing/architecture/tauri-shell.md`](../../../gitbooks/developing/architecture/tauri-shell.md): the Tauri shell.
-- [`gitbooks/developing/architecture/security.md`](../../../gitbooks/developing/architecture/security.md): security.
+- [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../../docs/gitbooks/en/developing/architecture/tauri-shell.md): the Tauri shell.
+- [`docs/gitbooks/en/developing/architecture/security.md`](../../../docs/gitbooks/en/developing/architecture/security.md): security.
- [`crates/openhuman-app/README.md`](../README.md): the openhuman-app crate README.
diff --git a/crates/openhuman-app/profiling/README.md b/crates/openhuman-app/profiling/README.md
index 5c07080534..092bb1319c 100644
--- a/crates/openhuman-app/profiling/README.md
+++ b/crates/openhuman-app/profiling/README.md
@@ -121,6 +121,6 @@ cargo test --manifest-path crates/openhuman-app/profiling/Cargo.toml
## Further reading
-- [`gitbooks/developing/performance.md`](../../../gitbooks/developing/performance.md): performance.
-- [`gitbooks/developing/architecture/tauri-shell.md`](../../../gitbooks/developing/architecture/tauri-shell.md): the Tauri shell.
+- [`docs/gitbooks/en/developing/performance.md`](../../../docs/gitbooks/en/developing/performance.md): performance.
+- [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../../docs/gitbooks/en/developing/architecture/tauri-shell.md): the Tauri shell.
- [`crates/openhuman-app/README.md`](../README.md): the openhuman-app crate README.
diff --git a/crates/openhuman-app/src/deep_link_registration_check.rs b/crates/openhuman-app/src/deep_link_registration_check.rs
index bb5f2f0e46..438a2eceb1 100644
--- a/crates/openhuman-app/src/deep_link_registration_check.rs
+++ b/crates/openhuman-app/src/deep_link_registration_check.rs
@@ -13,7 +13,7 @@
//! support logs. We do **not** auto-repair the registry — writing the wrong
//! exe path can brick a working install — but the diagnostic surface is now
//! sufficient to point users at the documented manual repair in
-//! `gitbooks/overview/troubleshooting-sign-in.md`.
+//! `docs/gitbooks/en/overview/troubleshooting-sign-in.md`.
//!
//! The string-parsing helpers are cross-platform so the developer host (macOS
//! / Linux) can run their unit tests; the actual registry read sits behind
diff --git a/crates/openhuman-app/src/gateway/README.md b/crates/openhuman-app/src/gateway/README.md
index 3230f0f4c8..be6bf4c25c 100644
--- a/crates/openhuman-app/src/gateway/README.md
+++ b/crates/openhuman-app/src/gateway/README.md
@@ -173,6 +173,6 @@ cargo test --manifest-path crates/openhuman-app/Cargo.toml gateway::
## Further reading
-- [`gitbooks/developing/architecture/tauri-shell.md`](../../../../gitbooks/developing/architecture/tauri-shell.md): the Tauri shell.
+- [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md): the Tauri shell.
- [`crates/openhuman-app/README.md`](../../README.md): the openhuman-app crate README.
- [`crates/openhuman-rpc/README.md`](../../../openhuman-rpc/README.md): the openhuman-rpc crate README.
diff --git a/crates/openhuman-app/src/imessage_scanner/README.md b/crates/openhuman-app/src/imessage_scanner/README.md
index 44b6a7a5c1..2194047ddb 100644
--- a/crates/openhuman-app/src/imessage_scanner/README.md
+++ b/crates/openhuman-app/src/imessage_scanner/README.md
@@ -107,5 +107,5 @@ cargo test --manifest-path crates/openhuman-app/Cargo.toml imessage_scanner::tic
## Further reading
-- [`gitbooks/developing/architecture/tauri-shell.md`](../../../../gitbooks/developing/architecture/tauri-shell.md): the Tauri shell.
+- [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md): the Tauri shell.
- [`crates/openhuman-app/README.md`](../../README.md): the openhuman-app crate README.
diff --git a/crates/openhuman-app/src/lib.rs b/crates/openhuman-app/src/lib.rs
index 2af57d4563..eba0f986fc 100644
--- a/crates/openhuman-app/src/lib.rs
+++ b/crates/openhuman-app/src/lib.rs
@@ -22,7 +22,7 @@
//! This crate is excluded from the root Cargo workspace — build it with
//! `cargo check --manifest-path crates/openhuman-app/Cargo.toml`. See
//! `README.md` in this crate and
-//! [`gitbooks/developing/architecture/tauri-shell.md`](../../../gitbooks/developing/architecture/tauri-shell.md)
+//! [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
//! for the full IPC surface and lifecycle model.
// Desktop targets: Windows, macOS, Linux. iOS + Android live in
@@ -2885,7 +2885,7 @@ pub fn run() {
// Auto-updater for the Tauri shell. Endpoint and minisign pubkey live
// in `tauri.conf.json` under `plugins.updater`. Releases are signed at
// build time with `TAURI_SIGNING_PRIVATE_KEY` (+ `_PASSWORD`); see
- // gitbooks/overview/auto-update.md for the full pipeline.
+ // docs/gitbooks/en/overview/auto-update.md for the full pipeline.
.plugin(tauri_plugin_updater::Builder::new().build())
.manage(dictation_hotkeys::DictationHotkeyState(
std::sync::Mutex::new(Vec::new()),
@@ -2938,7 +2938,7 @@ pub fn run() {
"[deep-link] openhuman:// scheme registration unhealthy — \
OAuth callbacks may never reach the app. \
register_all_error={register_err:?}, hkcu_status={status_log}. \
- See gitbooks/overview/troubleshooting-sign-in.md \
+ See docs/gitbooks/en/overview/troubleshooting-sign-in.md \
(\"Windows: openhuman:// handler not registered\") for the manual repair."
);
}
diff --git a/crates/openhuman-app/src/native_notifications/README.md b/crates/openhuman-app/src/native_notifications/README.md
index 70a43f765f..a3475855d0 100644
--- a/crates/openhuman-app/src/native_notifications/README.md
+++ b/crates/openhuman-app/src/native_notifications/README.md
@@ -83,5 +83,5 @@ The tests compile only on macOS.
## Further reading
-- [`gitbooks/developing/architecture/tauri-shell.md`](../../../../gitbooks/developing/architecture/tauri-shell.md): the Tauri shell.
+- [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md): the Tauri shell.
- [`crates/openhuman-app/README.md`](../../README.md): the openhuman-app crate README.
diff --git a/crates/openhuman-app/src/process_recovery/README.md b/crates/openhuman-app/src/process_recovery/README.md
index 566ddde35d..930ec654a9 100644
--- a/crates/openhuman-app/src/process_recovery/README.md
+++ b/crates/openhuman-app/src/process_recovery/README.md
@@ -76,5 +76,5 @@ cargo test --manifest-path crates/openhuman-app/Cargo.toml process_recovery::
## Further reading
-- [`gitbooks/developing/architecture/tauri-shell.md`](../../../../gitbooks/developing/architecture/tauri-shell.md): the Tauri shell.
+- [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md): the Tauri shell.
- [`crates/openhuman-app/README.md`](../../README.md): the openhuman-app crate README.
diff --git a/crates/openhuman-app/src/session/README.md b/crates/openhuman-app/src/session/README.md
index 9ad48ee814..cb2b9e582d 100644
--- a/crates/openhuman-app/src/session/README.md
+++ b/crates/openhuman-app/src/session/README.md
@@ -94,6 +94,6 @@ cargo test --manifest-path crates/openhuman-app/Cargo.toml session::
## Further reading
-- [`gitbooks/developing/architecture/tauri-shell.md`](../../../../gitbooks/developing/architecture/tauri-shell.md): the Tauri shell.
+- [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md): the Tauri shell.
- [`crates/openhuman-app/README.md`](../../README.md): the openhuman-app crate README.
- [`crates/openhuman-tinyhumans/README.md`](../../../openhuman-tinyhumans/README.md): the openhuman-tinyhumans crate README.
diff --git a/crates/openhuman-cli/README.md b/crates/openhuman-cli/README.md
index 9e87f9bf9d..e364da2be9 100644
--- a/crates/openhuman-cli/README.md
+++ b/crates/openhuman-cli/README.md
@@ -205,9 +205,9 @@ release resolution, and pins that the shared chain still scrubs secrets.
## Further reading
-- [`gitbooks/developing/building-rust-core.md`](../../gitbooks/developing/building-rust-core.md): building the Rust core.
-- [`gitbooks/developing/testing-strategy.md`](../../gitbooks/developing/testing-strategy.md): testing strategy.
-- [`gitbooks/developing/performance.md`](../../gitbooks/developing/performance.md): performance.
+- [`docs/gitbooks/en/developing/building-rust-core.md`](../../docs/gitbooks/en/developing/building-rust-core.md): building the Rust core.
+- [`docs/gitbooks/en/developing/testing-strategy.md`](../../docs/gitbooks/en/developing/testing-strategy.md): testing strategy.
+- [`docs/gitbooks/en/developing/performance.md`](../../docs/gitbooks/en/developing/performance.md): performance.
- [`crates/README.md`](../README.md): crates overview.
- [`crates/openhuman-core/README.md`](../openhuman-core/README.md): the openhuman-core crate README.
- [`tests/README.md`](../../tests/README.md): root tests.
diff --git a/crates/openhuman-cli/src/bin/README.md b/crates/openhuman-cli/src/bin/README.md
index 0402d721ad..386dd13a98 100644
--- a/crates/openhuman-cli/src/bin/README.md
+++ b/crates/openhuman-cli/src/bin/README.md
@@ -117,5 +117,5 @@ cargo test -p openhuman-cli --features bin-tools --bin openhuman-fleet
- [openhuman-benchmarks](https://github.com/tinyhumansai/openhuman-benchmarks): the benchmark and profiling binaries
(`profile/`), their driver scripts and the method behind the published
numbers.
-- [`gitbooks/developing/performance.md`](../../../../gitbooks/developing/performance.md):
+- [`docs/gitbooks/en/developing/performance.md`](../../../../docs/gitbooks/en/developing/performance.md):
the numbers those benchmarks feed.
diff --git a/crates/openhuman-core/README.md b/crates/openhuman-core/README.md
index 3247162a7b..3374eafe56 100644
--- a/crates/openhuman-core/README.md
+++ b/crates/openhuman-core/README.md
@@ -285,16 +285,16 @@ and reaches the mock backend must call `tinyhumans_boot::boot()` from
[`tests/support/tinyhumans_boot.rs`](../../tests/support/tinyhumans_boot.rs) first.
Further reading:
-[`gitbooks/developing/architecture.md`](../../gitbooks/developing/architecture.md),
-[`gitbooks/developing/engines.md`](../../gitbooks/developing/engines.md)
+[`docs/gitbooks/en/developing/architecture.md`](../../docs/gitbooks/en/developing/architecture.md),
+[`docs/gitbooks/en/developing/engines.md`](../../docs/gitbooks/en/developing/engines.md)
(inference providers),
-[`gitbooks/developing/jev.md`](../../gitbooks/developing/jev.md) (the Jev
+[`docs/gitbooks/en/developing/jev.md`](../../docs/gitbooks/en/developing/jev.md) (the Jev
ranker), and
-[`gitbooks/developing/embedding.md`](../../gitbooks/developing/embedding.md)
+[`docs/gitbooks/en/developing/embedding.md`](../../docs/gitbooks/en/developing/embedding.md)
(embedding the core).
## Further reading
-- [Building the Rust core](../../gitbooks/developing/building-rust-core.md)
+- [Building the Rust core](../../docs/gitbooks/en/developing/building-rust-core.md)
- [Crates overview](../README.md)
- [Repository conventions (AGENTS.md)](../../AGENTS.md)
diff --git a/crates/openhuman-core/src/agent/README.md b/crates/openhuman-core/src/agent/README.md
index 62caf3daae..92a5cf8841 100644
--- a/crates/openhuman-core/src/agent/README.md
+++ b/crates/openhuman-core/src/agent/README.md
@@ -440,12 +440,12 @@ Integration coverage is in [`tests/agent_harness_e2e.rs`](../../../../tests/agen
`tests/in_process/agent_*.rs`, aggregated into the `in_process_all` target.
Related docs:
-[agent harness architecture](../../../../gitbooks/developing/architecture/agent-harness.md),
-[agent observability](../../../../gitbooks/developing/agent-observability.md).
+[agent harness architecture](../../../../docs/gitbooks/en/developing/architecture/agent-harness.md),
+[agent observability](../../../../docs/gitbooks/en/developing/agent-observability.md).
## Further reading
- [Parent module README](../../README.md)
-- [Deep architecture reference](../../../../gitbooks/developing/architecture.md)
-- [The orchestrator](../../../../gitbooks/features/orchestration.md)
+- [Deep architecture reference](../../../../docs/gitbooks/en/developing/architecture.md)
+- [The orchestrator](../../../../docs/gitbooks/en/features/orchestration.md)
- [tinyagents](../../../../vendor/tinyagents/README.md)
diff --git a/crates/openhuman-core/src/agent/artifacts/README.md b/crates/openhuman-core/src/agent/artifacts/README.md
index 6d358f69c8..229c6d3a51 100644
--- a/crates/openhuman-core/src/agent/artifacts/README.md
+++ b/crates/openhuman-core/src/agent/artifacts/README.md
@@ -150,5 +150,5 @@ event.
## Further reading
- [Parent module README](../README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Chat](../../../../../gitbooks/features/chat.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Chat](../../../../../docs/gitbooks/en/features/chat.md)
diff --git a/crates/openhuman-core/src/agent/attachments/README.md b/crates/openhuman-core/src/agent/attachments/README.md
index 63200f9c70..af46d5d203 100644
--- a/crates/openhuman-core/src/agent/attachments/README.md
+++ b/crates/openhuman-core/src/agent/attachments/README.md
@@ -125,5 +125,5 @@ fails before inference is constructed.
## Further reading
- [Parent module README](../README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Chat](../../../../../gitbooks/features/chat.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Chat](../../../../../docs/gitbooks/en/features/chat.md)
diff --git a/crates/openhuman-core/src/agent/context/README.md b/crates/openhuman-core/src/agent/context/README.md
index e1b6b9b29d..54ac8a3ff6 100644
--- a/crates/openhuman-core/src/agent/context/README.md
+++ b/crates/openhuman-core/src/agent/context/README.md
@@ -89,5 +89,5 @@ No `store.rs`. State is per-session and in-memory:
## Further reading
- [Parent module README](../README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Smart token compression](../../../../../gitbooks/features/token-compression.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Smart token compression](../../../../../docs/gitbooks/en/features/token-compression.md)
diff --git a/crates/openhuman-core/src/agent/goals/README.md b/crates/openhuman-core/src/agent/goals/README.md
index 6750462791..224e9f97d7 100644
--- a/crates/openhuman-core/src/agent/goals/README.md
+++ b/crates/openhuman-core/src/agent/goals/README.md
@@ -10,5 +10,5 @@ frontend or `openhuman.thread_goals_*` JSON-RPC API.
## Further reading
- [Parent module README](../README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Goals and todos](../../../../../gitbooks/features/goals-and-todos.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Goals and todos](../../../../../docs/gitbooks/en/features/goals-and-todos.md)
diff --git a/crates/openhuman-core/src/agent/harness/README.md b/crates/openhuman-core/src/agent/harness/README.md
index cfce9a0ef9..2fa716142d 100644
--- a/crates/openhuman-core/src/agent/harness/README.md
+++ b/crates/openhuman-core/src/agent/harness/README.md
@@ -126,9 +126,9 @@ turn lifecycle are in `../session_host/`; `run_subagent`,
live under `harness/session/`. That code has moved to `../session_host/`;
this README describes only what remains in `harness/` today.
-Related: [`gitbooks/developing/architecture/agent-harness.md`](../../../../../gitbooks/developing/architecture/agent-harness.md).
+Related: [`docs/gitbooks/en/developing/architecture/agent-harness.md`](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md).
## Further reading
- [Parent module README](../README.md)
-- [The orchestrator](../../../../../gitbooks/features/orchestration.md)
+- [The orchestrator](../../../../../docs/gitbooks/en/features/orchestration.md)
diff --git a/crates/openhuman-core/src/agent/orchestration/README.md b/crates/openhuman-core/src/agent/orchestration/README.md
index 00befa43ad..775fe75879 100644
--- a/crates/openhuman-core/src/agent/orchestration/README.md
+++ b/crates/openhuman-core/src/agent/orchestration/README.md
@@ -233,6 +233,6 @@ what the harness exposes to the child.
## Further reading
- [Parent module README](../README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [The orchestrator](../../../../../gitbooks/features/orchestration.md)
-- [Agent coordination tools](../../../../../gitbooks/features/native-tools/agent-coordination.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [The orchestrator](../../../../../docs/gitbooks/en/features/orchestration.md)
+- [Agent coordination tools](../../../../../docs/gitbooks/en/features/native-tools/agent-coordination.md)
diff --git a/crates/openhuman-core/src/agent/progress_tracing/README.md b/crates/openhuman-core/src/agent/progress_tracing/README.md
index c84b9166f1..64243bd2bd 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/README.md
+++ b/crates/openhuman-core/src/agent/progress_tracing/README.md
@@ -60,6 +60,6 @@ currently still uses the legacy batch proxy.
## Related docs
-- [gitbooks/developing/agent-observability.md](../../../../../gitbooks/developing/agent-observability.md)
+- [docs/gitbooks/en/developing/agent-observability.md](../../../../../docs/gitbooks/en/developing/agent-observability.md)
- [Parent module README](../README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
diff --git a/crates/openhuman-core/src/agent/prompts/README.md b/crates/openhuman-core/src/agent/prompts/README.md
index 54d06dfada..17ff2e6d21 100644
--- a/crates/openhuman-core/src/agent/prompts/README.md
+++ b/crates/openhuman-core/src/agent/prompts/README.md
@@ -156,5 +156,5 @@ user message via `current_datetime_line`).
## Further reading
- [Parent module README](../README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Personalization and self-learning](../../../../../gitbooks/features/personalization.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Personalization and self-learning](../../../../../docs/gitbooks/en/features/personalization.md)
diff --git a/crates/openhuman-core/src/agent/registry/README.md b/crates/openhuman-core/src/agent/registry/README.md
index 4c8d05562d..ae936fe6fa 100644
--- a/crates/openhuman-core/src/agent/registry/README.md
+++ b/crates/openhuman-core/src/agent/registry/README.md
@@ -127,7 +127,7 @@ lockstep with its `generate_presentation` tool.
The orchestrator picks tools at request time through the shared tool-search
ranker (Jev when a decision-model credential is installed, BM25 otherwise);
see [`tinyagents/README.md`](../tinyagents/README.md) and
-[the Jev page](../../../../../gitbooks/developing/jev.md) for how that
+[the Jev page](../../../../../docs/gitbooks/en/developing/jev.md) for how that
ranking works.
## Called by
@@ -158,5 +158,5 @@ and a `prompt_tests.rs` beside almost every archetype's `prompt.rs`.
## Further reading
- [Parent module README](../README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [The orchestrator](../../../../../gitbooks/features/orchestration.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [The orchestrator](../../../../../docs/gitbooks/en/features/orchestration.md)
diff --git a/crates/openhuman-core/src/agent/session_host/README.md b/crates/openhuman-core/src/agent/session_host/README.md
index 89cde44506..f5b70a2fea 100644
--- a/crates/openhuman-core/src/agent/session_host/README.md
+++ b/crates/openhuman-core/src/agent/session_host/README.md
@@ -66,5 +66,5 @@ long conversation's generations without reading the whole chain.
## Further reading
- [Parent module README](../README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Memory architecture](../../../../../gitbooks/developing/architecture/memory.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Memory architecture](../../../../../docs/gitbooks/en/developing/architecture/memory.md)
diff --git a/crates/openhuman-core/src/agent/session_import/README.md b/crates/openhuman-core/src/agent/session_import/README.md
index 6cef48412b..3549830085 100644
--- a/crates/openhuman-core/src/agent/session_import/README.md
+++ b/crates/openhuman-core/src/agent/session_import/README.md
@@ -27,4 +27,4 @@ existing `config.toml` files still load; they have no effect.
## Further reading
- [Parent module README](../README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
diff --git a/crates/openhuman-core/src/agent/subagent_host/README.md b/crates/openhuman-core/src/agent/subagent_host/README.md
index afd410adf6..6adb8b6b6e 100644
--- a/crates/openhuman-core/src/agent/subagent_host/README.md
+++ b/crates/openhuman-core/src/agent/subagent_host/README.md
@@ -45,5 +45,5 @@ survive that boundary on its own.
## Further reading
- [Parent module README](../README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [The orchestrator](../../../../../gitbooks/features/orchestration.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [The orchestrator](../../../../../docs/gitbooks/en/features/orchestration.md)
diff --git a/crates/openhuman-core/src/agent/tinyagents/README.md b/crates/openhuman-core/src/agent/tinyagents/README.md
index ed9c58f586..dc6319f749 100644
--- a/crates/openhuman-core/src/agent/tinyagents/README.md
+++ b/crates/openhuman-core/src/agent/tinyagents/README.md
@@ -65,7 +65,7 @@ that installed ranker together with `agent.tool_search`
process-wide, like the backend transport, because the credential a
decision-model ranker needs belongs to the process's signed-in user rather
than to any one agent config. See
-[the Jev page](../../../../../gitbooks/developing/jev.md) for the ranking
+[the Jev page](../../../../../docs/gitbooks/en/developing/jev.md) for the ranking
mechanism and its measured accuracy against plain BM25.
## Public surface
@@ -131,7 +131,7 @@ through the typed parent run.
- The taint/scope/redaction/approval/budget guarantees the crate deliberately does not know about are enforced in `host/` and `middleware*.rs`. Widening a permission or dropping a scope filter to make an adapter signature fit would silently disable a guarantee the rest of the system assumes.
- `journal.rs` is best-effort: store opening and every write swallow errors behind a `[journal]` log line rather than failing a turn. `reaper.rs` logs its sweep under `[agent] startup run sweep`.
- `defer_turn_completed_to_caller` (a `run_turn_via_tinyagents_shared` parameter, issue #4457) exists because the chat/session path emits its own `TurnCompleted` after streaming a post-run checkpoint; callers without that step (channel/CLI) pass `false` and rely on this seam's emit.
-- [gitbooks/developing/architecture/agent-harness.md](../../../../../gitbooks/developing/architecture/agent-harness.md) is the narrative overview of the turn lifecycle and where this seam sits in it.
+- [docs/gitbooks/en/developing/architecture/agent-harness.md](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md) is the narrative overview of the turn lifecycle and where this seam sits in it.
## Further reading
diff --git a/crates/openhuman-core/src/agent/todos/README.md b/crates/openhuman-core/src/agent/todos/README.md
index 4cfbdd5bcd..62ac699356 100644
--- a/crates/openhuman-core/src/agent/todos/README.md
+++ b/crates/openhuman-core/src/agent/todos/README.md
@@ -15,5 +15,5 @@ events; there is no `openhuman.todos_*` JSON-RPC API.
## Further reading
- [Parent module README](../README.md)
-- [Goals and todos](../../../../../gitbooks/features/goals-and-todos.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
+- [Goals and todos](../../../../../docs/gitbooks/en/features/goals-and-todos.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
diff --git a/crates/openhuman-core/src/agent/tools/README.md b/crates/openhuman-core/src/agent/tools/README.md
index 738d8a121c..498571347f 100644
--- a/crates/openhuman-core/src/agent/tools/README.md
+++ b/crates/openhuman-core/src/agent/tools/README.md
@@ -60,5 +60,5 @@ instead of registering them as disabled.
## Further reading
- [Parent module README](../README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Native tools](../../../../../gitbooks/features/native-tools/README.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Native tools](../../../../../docs/gitbooks/en/features/native-tools/README.md)
diff --git a/crates/openhuman-core/src/agent/triage/README.md b/crates/openhuman-core/src/agent/triage/README.md
index fb2e59fa4f..ae616fec84 100644
--- a/crates/openhuman-core/src/agent/triage/README.md
+++ b/crates/openhuman-core/src/agent/triage/README.md
@@ -111,8 +111,8 @@ Re-exported from [`mod.rs`](./mod.rs):
- [`crates/openhuman-core/src/cron/scheduler_gate/README.md`](../../cron/scheduler_gate/README.md): the LLM-permit
gate the local arm waits on.
- [Parent module README](../README.md)
-- [Triggers](../../../../../gitbooks/features/integrations/triggers.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
+- [Triggers](../../../../../docs/gitbooks/en/features/integrations/triggers.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
## Tests
diff --git a/crates/openhuman-core/src/backend/README.md b/crates/openhuman-core/src/backend/README.md
index f8f1785c7e..2c8646b8f2 100644
--- a/crates/openhuman-core/src/backend/README.md
+++ b/crates/openhuman-core/src/backend/README.md
@@ -253,7 +253,7 @@ Run with `cargo test -p openhuman backend::` or `pnpm debug rust backend::`.
## Further reading
- [Parent module README](../../README.md)
-- [One TinyHumans API key](../../../../gitbooks/developing/tinyhumans-api-key.md)
-- [Deep architecture reference](../../../../gitbooks/developing/architecture.md)
+- [One TinyHumans API key](../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md)
+- [Deep architecture reference](../../../../docs/gitbooks/en/developing/architecture.md)
- [openhuman-tinyhumans crate](../../../openhuman-tinyhumans/README.md)
- [tinyhumans-sdk](../../../../vendor/tinyhumans-sdk/README.md)
diff --git a/crates/openhuman-core/src/backend/transport/README.md b/crates/openhuman-core/src/backend/transport/README.md
index b2213daef7..ab35561be9 100644
--- a/crates/openhuman-core/src/backend/transport/README.md
+++ b/crates/openhuman-core/src/backend/transport/README.md
@@ -76,6 +76,6 @@ for the real transport and how it maps SDK errors onto
## Further reading
- [Parent module README](../README.md)
-- [One TinyHumans API key](../../../../../gitbooks/developing/tinyhumans-api-key.md)
+- [One TinyHumans API key](../../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md)
- [openhuman-tinyhumans crate](../../../../openhuman-tinyhumans/README.md)
- [tinyhumans-sdk](../../../../../vendor/tinyhumans-sdk/README.md)
diff --git a/crates/openhuman-core/src/channels/controllers/README.md b/crates/openhuman-core/src/channels/controllers/README.md
index f2b7215cb4..4c1d45d22d 100644
--- a/crates/openhuman-core/src/channels/controllers/README.md
+++ b/crates/openhuman-core/src/channels/controllers/README.md
@@ -35,4 +35,4 @@ belong to TinyChannels.
- [Operation tests](./ops_tests.rs)
- [Schema tests](./schemas_tests.rs)
- [Channels overview](../README.md)
-- [Messaging channels](../../../../../gitbooks/features/channels.md)
+- [Messaging channels](../../../../../docs/gitbooks/en/features/channels.md)
diff --git a/crates/openhuman-core/src/channels/providers/README.md b/crates/openhuman-core/src/channels/providers/README.md
index 92f3342fab..94321009ca 100644
--- a/crates/openhuman-core/src/channels/providers/README.md
+++ b/crates/openhuman-core/src/channels/providers/README.md
@@ -25,5 +25,5 @@ Implement provider transport, contract declarations and registration in the cano
## Further reading
- [Parent module README](../README.md)
-- [Messaging channels](../../../../../gitbooks/features/channels.md)
+- [Messaging channels](../../../../../docs/gitbooks/en/features/channels.md)
- [tinychannels](../../../../../vendor/tinychannels/README.md)
diff --git a/crates/openhuman-core/src/commands/README.md b/crates/openhuman-core/src/commands/README.md
index cdb720c23d..21fa03552b 100644
--- a/crates/openhuman-core/src/commands/README.md
+++ b/crates/openhuman-core/src/commands/README.md
@@ -119,5 +119,5 @@ Tests sit beside each module ([`ops_tests.rs`](./ops_tests.rs), [`schemas_tests.
## Further reading
- [Parent module README](../../README.md)
-- [Deep architecture reference](../../../../gitbooks/developing/architecture.md)
-- [Chat](../../../../gitbooks/features/chat.md)
+- [Deep architecture reference](../../../../docs/gitbooks/en/developing/architecture.md)
+- [Chat](../../../../docs/gitbooks/en/features/chat.md)
diff --git a/crates/openhuman-core/src/config/README.md b/crates/openhuman-core/src/config/README.md
index 25f67a5aec..e7dd1b4a60 100644
--- a/crates/openhuman-core/src/config/README.md
+++ b/crates/openhuman-core/src/config/README.md
@@ -248,5 +248,5 @@ pnpm debug rust config::
## Further reading
- [Parent module README](../../README.md)
-- [Settings](../../../../gitbooks/features/settings.md)
-- [Deep architecture reference](../../../../gitbooks/developing/architecture.md)
+- [Settings](../../../../docs/gitbooks/en/features/settings.md)
+- [Deep architecture reference](../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/config/migrations/README.md b/crates/openhuman-core/src/config/migrations/README.md
index 1f43c9a35c..145db95055 100644
--- a/crates/openhuman-core/src/config/migrations/README.md
+++ b/crates/openhuman-core/src/config/migrations/README.md
@@ -91,5 +91,5 @@ Does not own a `store.rs`. Its effects are written through other layers:
## Further reading
- [Parent module README](../README.md)
-- [Settings](../../../../../gitbooks/features/settings.md)
-- [Deep architecture reference](../../../../../gitbooks/developing/architecture.md)
+- [Settings](../../../../../docs/gitbooks/en/features/settings.md)
+- [Deep architecture reference](../../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/config/ops/README.md b/crates/openhuman-core/src/config/ops/README.md
index 546673555d..1cd4cf966e 100644
--- a/crates/openhuman-core/src/config/ops/README.md
+++ b/crates/openhuman-core/src/config/ops/README.md
@@ -110,5 +110,5 @@ builds.
## Further reading
- [Parent module README](../README.md)
-- [Settings](../../../../../gitbooks/features/settings.md)
-- [Deep architecture reference](../../../../../gitbooks/developing/architecture.md)
+- [Settings](../../../../../docs/gitbooks/en/features/settings.md)
+- [Deep architecture reference](../../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/config/schema/README.md b/crates/openhuman-core/src/config/schema/README.md
index e03d3c47a1..1812df7c32 100644
--- a/crates/openhuman-core/src/config/schema/README.md
+++ b/crates/openhuman-core/src/config/schema/README.md
@@ -190,8 +190,8 @@ Per-section `*_tests.rs` files, plus [`load_tests.rs`](./load_tests.rs) (split i
schema-version upgrades run during load.
- [../../security/README.md](../../security/README.md): enforces the
`action_dir` / `workspace_dir` boundary this module only describes.
-- [Settings](../../../../../gitbooks/features/settings.md)
-- [Deep architecture reference](../../../../../gitbooks/developing/architecture.md)
+- [Settings](../../../../../docs/gitbooks/en/features/settings.md)
+- [Deep architecture reference](../../../../../docs/gitbooks/en/developing/architecture.md)
## Config sources
diff --git a/crates/openhuman-core/src/config/workspace/README.md b/crates/openhuman-core/src/config/workspace/README.md
index 207ac9d1bb..d9988b2c9a 100644
--- a/crates/openhuman-core/src/config/workspace/README.md
+++ b/crates/openhuman-core/src/config/workspace/README.md
@@ -79,5 +79,5 @@ The editable surface is restricted to the `BOOTSTRAP_FILES` allowlist (`SOUL.md`
## Further reading
- [Parent module README](../README.md)
-- [Settings](../../../../../gitbooks/features/settings.md)
-- [Deep architecture reference](../../../../../gitbooks/developing/architecture.md)
+- [Settings](../../../../../docs/gitbooks/en/features/settings.md)
+- [Deep architecture reference](../../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/core/README.md b/crates/openhuman-core/src/core/README.md
index 897f7ff8b3..adf1fec0a0 100644
--- a/crates/openhuman-core/src/core/README.md
+++ b/crates/openhuman-core/src/core/README.md
@@ -438,8 +438,8 @@ pnpm debug rust core::
- [runtime/README.md](runtime/README.md)
- [../security/README.md](../security/README.md)
-- [Architecture overview](../../../../gitbooks/developing/architecture.md)
+- [Architecture overview](../../../../docs/gitbooks/en/developing/architecture.md)
- [Parent module README](../../README.md)
-- [Building the Rust core](../../../../gitbooks/developing/building-rust-core.md)
-- [Embedding OpenHuman](../../../../gitbooks/developing/embedding.md)
+- [Building the Rust core](../../../../docs/gitbooks/en/developing/building-rust-core.md)
+- [Embedding OpenHuman](../../../../docs/gitbooks/en/developing/embedding.md)
- [openhuman-rpc crate](../../../openhuman-rpc/README.md)
diff --git a/crates/openhuman-core/src/core/runtime/README.md b/crates/openhuman-core/src/core/runtime/README.md
index 9a3a0cfbdd..59b8bda8cb 100644
--- a/crates/openhuman-core/src/core/runtime/README.md
+++ b/crates/openhuman-core/src/core/runtime/README.md
@@ -247,5 +247,5 @@ host an agent turn must set:
- [../README.md](../README.md): the rest of `core/`, covering dispatch,
registry, event bus, transport, and CLI.
-- [Embedding OpenHuman](../../../../../gitbooks/developing/embedding.md)
-- [Deep architecture reference](../../../../../gitbooks/developing/architecture.md)
+- [Embedding OpenHuman](../../../../../docs/gitbooks/en/developing/embedding.md)
+- [Deep architecture reference](../../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/cron/README.md b/crates/openhuman-core/src/cron/README.md
index becc4c7a09..91fdc432f3 100644
--- a/crates/openhuman-core/src/cron/README.md
+++ b/crates/openhuman-core/src/cron/README.md
@@ -439,8 +439,8 @@ earlier are refused too.
## Further reading
- [Parent module README](../../README.md)
-- [Cron and scheduling](../../../../gitbooks/features/native-tools/cron.md)
-- [Workflows](../../../../gitbooks/features/workflows.md)
+- [Cron and scheduling](../../../../docs/gitbooks/en/features/native-tools/cron.md)
+- [Workflows](../../../../docs/gitbooks/en/features/workflows.md)
## Relation to `[components].flows`
diff --git a/crates/openhuman-core/src/cron/scheduler_gate/README.md b/crates/openhuman-core/src/cron/scheduler_gate/README.md
index fe7687623a..71c02f6798 100644
--- a/crates/openhuman-core/src/cron/scheduler_gate/README.md
+++ b/crates/openhuman-core/src/cron/scheduler_gate/README.md
@@ -77,4 +77,4 @@ Consumed in-process across the codebase (discoverable via `grep scheduler_gate`)
## Further reading
- [Parent module README](../README.md)
-- [Cron and scheduling](../../../../../gitbooks/features/native-tools/cron.md)
+- [Cron and scheduling](../../../../../docs/gitbooks/en/features/native-tools/cron.md)
diff --git a/crates/openhuman-core/src/cron/tools/README.md b/crates/openhuman-core/src/cron/tools/README.md
index 28938bed24..5533a59d29 100644
--- a/crates/openhuman-core/src/cron/tools/README.md
+++ b/crates/openhuman-core/src/cron/tools/README.md
@@ -81,7 +81,7 @@ or immediately execute a stored command or agent prompt on the host.
- `crates/openhuman-core/src/tools/impl/meta/collapse.rs` (module path
`tinytools::collapse`): the generic
action-collapsing helper `collapsed.rs` builds on.
-- [Cron and scheduling](../../../../../gitbooks/features/native-tools/cron.md)
+- [Cron and scheduling](../../../../../docs/gitbooks/en/features/native-tools/cron.md)
## Tests
diff --git a/crates/openhuman-core/src/desktop/README.md b/crates/openhuman-core/src/desktop/README.md
index 74a4361b59..ccf903c86c 100644
--- a/crates/openhuman-core/src/desktop/README.md
+++ b/crates/openhuman-core/src/desktop/README.md
@@ -155,6 +155,6 @@ pnpm debug rust desktop::
## Further reading
- [Parent module README](../../README.md)
-- [Tauri shell](../../../../gitbooks/developing/architecture/tauri-shell.md)
-- [Frontend](../../../../gitbooks/developing/architecture/frontend.md)
+- [Tauri shell](../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
+- [Frontend](../../../../docs/gitbooks/en/developing/architecture/frontend.md)
- [openhuman-app crate](../../../openhuman-app/README.md)
diff --git a/crates/openhuman-core/src/desktop/app_state/README.md b/crates/openhuman-core/src/desktop/app_state/README.md
index de461e3b33..2f5e5a0e16 100644
--- a/crates/openhuman-core/src/desktop/app_state/README.md
+++ b/crates/openhuman-core/src/desktop/app_state/README.md
@@ -53,5 +53,5 @@ The signed-in identity for prompts and Sentry is `security::credentials::identit
## Further reading
- [Parent module README](../README.md)
-- [Tauri shell](../../../../../gitbooks/developing/architecture/tauri-shell.md)
-- [Frontend](../../../../../gitbooks/developing/architecture/frontend.md)
+- [Tauri shell](../../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
+- [Frontend](../../../../../docs/gitbooks/en/developing/architecture/frontend.md)
diff --git a/crates/openhuman-core/src/desktop/dashboard/README.md b/crates/openhuman-core/src/desktop/dashboard/README.md
index 69edf74f66..9c51ad3873 100644
--- a/crates/openhuman-core/src/desktop/dashboard/README.md
+++ b/crates/openhuman-core/src/desktop/dashboard/README.md
@@ -60,5 +60,5 @@ None. The module reads from in-memory `Config`; it stores no state.
## Further reading
- [Parent module README](../README.md)
-- [Frontend](../../../../../gitbooks/developing/architecture/frontend.md)
-- [Billing, cost and usage](../../../../../gitbooks/features/billing-and-usage.md)
+- [Frontend](../../../../../docs/gitbooks/en/developing/architecture/frontend.md)
+- [Billing, cost and usage](../../../../../docs/gitbooks/en/features/billing-and-usage.md)
diff --git a/crates/openhuman-core/src/desktop/notifications/README.md b/crates/openhuman-core/src/desktop/notifications/README.md
index 688a5b55ec..a9e4c1e359 100644
--- a/crates/openhuman-core/src/desktop/notifications/README.md
+++ b/crates/openhuman-core/src/desktop/notifications/README.md
@@ -131,5 +131,5 @@ port has no `GROUP BY`. With no backend configured (the desktop default)
## Further reading
- [Parent module README](../README.md)
-- [Notifications and activity](../../../../../gitbooks/features/notifications-and-activity.md)
-- [Tauri shell](../../../../../gitbooks/developing/architecture/tauri-shell.md)
+- [Notifications and activity](../../../../../docs/gitbooks/en/features/notifications-and-activity.md)
+- [Tauri shell](../../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
diff --git a/crates/openhuman-core/src/desktop/overlay/README.md b/crates/openhuman-core/src/desktop/overlay/README.md
index 2af5883d4d..f570843718 100644
--- a/crates/openhuman-core/src/desktop/overlay/README.md
+++ b/crates/openhuman-core/src/desktop/overlay/README.md
@@ -52,5 +52,5 @@ None. State is purely an in-memory broadcast channel; events not consumed when p
## Further reading
- [Parent module README](../README.md)
-- [Tauri shell](../../../../../gitbooks/developing/architecture/tauri-shell.md)
-- [The mascot](../../../../../gitbooks/features/mascot/README.md)
+- [Tauri shell](../../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
+- [The mascot](../../../../../docs/gitbooks/en/features/mascot/README.md)
diff --git a/crates/openhuman-core/src/desktop/provider_surfaces/README.md b/crates/openhuman-core/src/desktop/provider_surfaces/README.md
index 9087fba395..952b363fa2 100644
--- a/crates/openhuman-core/src/desktop/provider_surfaces/README.md
+++ b/crates/openhuman-core/src/desktop/provider_surfaces/README.md
@@ -75,5 +75,5 @@ In-memory only. State lives in a process-global `RESPOND_QUEUE` (`static OnceLoc
## Further reading
- [Parent module README](../README.md)
-- [Tauri shell](../../../../../gitbooks/developing/architecture/tauri-shell.md)
-- [Connections](../../../../../gitbooks/features/connections.md)
+- [Tauri shell](../../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
+- [Connections](../../../../../docs/gitbooks/en/features/connections.md)
diff --git a/crates/openhuman-core/src/flows/README.md b/crates/openhuman-core/src/flows/README.md
index eaa6797aa3..6a9aaa97df 100644
--- a/crates/openhuman-core/src/flows/README.md
+++ b/crates/openhuman-core/src/flows/README.md
@@ -374,8 +374,8 @@ cargo test -p openhuman flows::
pnpm debug rust flows
```
-Related docs: [gitbooks/features/workflows.md](../../../../gitbooks/features/workflows.md)
-(user-facing feature), [gitbooks/developing/architecture/flows-on-tinyagents.md](../../../../gitbooks/developing/architecture/flows-on-tinyagents.md)
+Related docs: [docs/gitbooks/en/features/workflows.md](../../../../docs/gitbooks/en/features/workflows.md)
+(user-facing feature), [docs/gitbooks/en/developing/architecture/flows-on-tinyagents.md](../../../../docs/gitbooks/en/developing/architecture/flows-on-tinyagents.md)
(run pipeline and security model; it still describes lowering onto
`tinyagents`, while the vendored crate now carries its own runtime under
[`vendor/tinyflows/crates/tinyflows/src/graph/`](../../../../vendor/tinyflows/crates/tinyflows/src/graph/)), and
diff --git a/crates/openhuman-core/src/flows/tinyflows/README.md b/crates/openhuman-core/src/flows/tinyflows/README.md
index 13f8a72a48..c5ad4acdbd 100644
--- a/crates/openhuman-core/src/flows/tinyflows/README.md
+++ b/crates/openhuman-core/src/flows/tinyflows/README.md
@@ -7,7 +7,7 @@ can have (calling an LLM, running an agent, making an HTTP request, running
code, calling a tool, reading/writing state, resolving a sub-workflow,
recalling/writing memory) is a trait the engine declares and this module
implements. See
-[`gitbooks/developing/architecture/flows-on-tinyagents.md`](../../../../../gitbooks/developing/architecture/flows-on-tinyagents.md)
+[`docs/gitbooks/en/developing/architecture/flows-on-tinyagents.md`](../../../../../docs/gitbooks/en/developing/architecture/flows-on-tinyagents.md)
for the engine's own model (trigger model, run state shape, the two-gate
security model); this README covers only the host seam.
@@ -81,7 +81,7 @@ security model); this README covers only the host seam.
## Security model
The contract is spelled out in
-[flows-on-tinyagents.md § The security model: two gates](../../../../../gitbooks/developing/architecture/flows-on-tinyagents.md#the-security-model-two-gates);
+[flows-on-tinyagents.md § The security model: two gates](../../../../../docs/gitbooks/en/developing/architecture/flows-on-tinyagents.md#the-security-model-two-gates);
this module holds the outer gate. `tier.rs` consults the user's autonomy
tier for each acting node's `CommandClass` and forces an `ApprovalGate`
round-trip on `Prompt`, even when the saved flow's own `require_approval` is
@@ -111,5 +111,5 @@ above.
## Further reading
- [Parent module README](../README.md)
-- [Workflows](../../../../../gitbooks/features/workflows.md)
+- [Workflows](../../../../../docs/gitbooks/en/features/workflows.md)
- [tinyflows](../../../../../vendor/tinyflows/README.md)
diff --git a/crates/openhuman-core/src/hooks/README.md b/crates/openhuman-core/src/hooks/README.md
index 79b6cb5328..81d8d649be 100644
--- a/crates/openhuman-core/src/hooks/README.md
+++ b/crates/openhuman-core/src/hooks/README.md
@@ -218,7 +218,7 @@ even for observing events, since a detached dispatch would report nothing.
to `agent/hooks.rs` and [`agent/tinyagents/middleware/embedder_hooks.rs`](../agent/tinyagents/middleware/embedder_hooks.rs).
- Approval and the autonomy policy belong to `security/`. A hook's `allow`
only lets a call continue to them.
-- Product-facing docs for hook authors live in [`gitbooks/developing/hooks.md`](../../../../gitbooks/developing/hooks.md).
+- Product-facing docs for hook authors live in [`docs/gitbooks/en/developing/hooks.md`](../../../../docs/gitbooks/en/developing/hooks.md).
## Gotchas
@@ -253,8 +253,8 @@ the engine in `tinyagents-runtime`. Run the host tests with
## Related docs
-- [gitbooks/developing/hooks.md](../../../../gitbooks/developing/hooks.md): the `hooks.json` guide for hook authors.
-- [gitbooks/developing/architecture/security.md](../../../../gitbooks/developing/architecture/security.md): the approval gate and autonomy policy that still apply after a hook allows.
+- [docs/gitbooks/en/developing/hooks.md](../../../../docs/gitbooks/en/developing/hooks.md): the `hooks.json` guide for hook authors.
+- [docs/gitbooks/en/developing/architecture/security.md](../../../../docs/gitbooks/en/developing/architecture/security.md): the approval gate and autonomy policy that still apply after a hook allows.
- [Parent module README](../../README.md)
-- [Agent harness architecture](../../../../gitbooks/developing/architecture/agent-harness.md)
+- [Agent harness architecture](../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
- [tinyagents](../../../../vendor/tinyagents/README.md)
diff --git a/crates/openhuman-core/src/inference/README.md b/crates/openhuman-core/src/inference/README.md
index 5ec2add5e2..dd08a24c93 100644
--- a/crates/openhuman-core/src/inference/README.md
+++ b/crates/openhuman-core/src/inference/README.md
@@ -325,6 +325,6 @@ shared config take `inference_test_guard()` / `inference_test_guard_async()` fro
## Further reading
- [Parent module README](../../README.md)
-- [Automatic model routing](../../../../gitbooks/features/model-routing/README.md)
-- [Local models and bring your own key](../../../../gitbooks/features/model-routing/local-and-byok-models.md)
-- [Pluggable engines](../../../../gitbooks/developing/engines.md)
+- [Automatic model routing](../../../../docs/gitbooks/en/features/model-routing/README.md)
+- [Local models and bring your own key](../../../../docs/gitbooks/en/features/model-routing/local-and-byok-models.md)
+- [Pluggable engines](../../../../docs/gitbooks/en/developing/engines.md)
diff --git a/crates/openhuman-core/src/inference/embedding_host/README.md b/crates/openhuman-core/src/inference/embedding_host/README.md
index ae94de35bb..facbf824a3 100644
--- a/crates/openhuman-core/src/inference/embedding_host/README.md
+++ b/crates/openhuman-core/src/inference/embedding_host/README.md
@@ -3,7 +3,7 @@
Turns text into vectors for semantic memory search, and lets the provider
that does it be swapped by config rather than by code change. This is the
embeddings half of OpenHuman's pluggable-engine story (see
-[gitbooks/developing/engines.md](../../../../../gitbooks/developing/engines.md)):
+[docs/gitbooks/en/developing/engines.md](../../../../../docs/gitbooks/en/developing/engines.md)):
the same pattern used for chat model providers in [`../provider`](../provider/README.md),
applied to embeddings.
@@ -57,4 +57,4 @@ the wider `inference` domain.
## Further reading
-- [Local AI](../../../../../gitbooks/features/model-routing/local-ai.md)
+- [Local AI](../../../../../docs/gitbooks/en/features/model-routing/local-ai.md)
diff --git a/crates/openhuman-core/src/inference/host_runtime/README.md b/crates/openhuman-core/src/inference/host_runtime/README.md
index 33bea7ff5e..fa3e808dbc 100644
--- a/crates/openhuman-core/src/inference/host_runtime/README.md
+++ b/crates/openhuman-core/src/inference/host_runtime/README.md
@@ -22,5 +22,5 @@ back into this host module.
## Further reading
- [Parent module README](../README.md)
-- [Automatic model routing](../../../../../gitbooks/features/model-routing/README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
+- [Automatic model routing](../../../../../docs/gitbooks/en/features/model-routing/README.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
diff --git a/crates/openhuman-core/src/inference/provider/README.md b/crates/openhuman-core/src/inference/provider/README.md
index a87aec3cd0..56f57a67c3 100644
--- a/crates/openhuman-core/src/inference/provider/README.md
+++ b/crates/openhuman-core/src/inference/provider/README.md
@@ -3,7 +3,7 @@
Native TinyAgents `ChatModel` construction plus cloud/local inference policy,
auth, error taxonomy, and RPC helpers for every chat-model transport OpenHuman
supports. This is the chat-model half of OpenHuman's pluggable-engine story
-(see [gitbooks/developing/engines.md](../../../../../gitbooks/developing/engines.md)):
+(see [docs/gitbooks/en/developing/engines.md](../../../../../docs/gitbooks/en/developing/engines.md)):
the model a turn runs on is chosen by config, not by code change. Was
previously `providers/` (pre-consolidation single-crate layout); see
[`../README.md`](../README.md) for how this fits into the wider `inference` domain.
@@ -20,7 +20,7 @@ previously `providers/` (pre-consolidation single-crate layout); see
and applies the BYOK sentinel, Privacy-Mode `LocalOnly`
(`enforce_local_only_inference`), and managed-session (`verify_session_active`)
gates before building a model. See
- [gitbooks/features/model-routing/local-and-byok-models.md](../../../../../gitbooks/features/model-routing/local-and-byok-models.md)
+ [docs/gitbooks/en/features/model-routing/local-and-byok-models.md](../../../../../docs/gitbooks/en/features/model-routing/local-and-byok-models.md)
for the user-facing side of local and BYOK routing.
- **Models**: `OpenHumanBackendModel` + `PROVIDER_LABEL`
([`openhuman_backend_model.rs`](./openhuman_backend_model.rs)); OpenAI-compatible and Anthropic builders live
@@ -39,7 +39,7 @@ previously `providers/` (pre-consolidation single-crate layout); see
| Anthropic Messages API (prompt caching) | `tinyinference_llm::providers::anthropic` | `<slug>:<model>` whose endpoint is the first-party Messages API and native tool calling is on |
| Codex OAuth / Responses API | [`openai_codex.rs`](./openai_codex.rs) host OAuth selection plus `tinyinference_llm::providers::openai::codex` metadata | the `openai` cloud slug once Codex OAuth tokens exist |
| Claude Agent SDK subprocess | `tinyagents_harness::providers::claude_agent_sdk` | `claude_agent_sdk` / `claude_agent_sdk:<model>` |
-| Claude Code CLI subprocess | `tinyagents_harness::providers::claude_code` (see the [Claude Code provider guide](../../../../../gitbooks/developing/providers/claude-code.md)) | `claude-code:<model>` |
+| Claude Code CLI subprocess | `tinyagents_harness::providers::claude_code` (see the [Claude Code provider guide](../../../../../docs/gitbooks/en/developing/providers/claude-code.md)) | `claude-code:<model>` |
## Calls into
@@ -89,7 +89,7 @@ consumers: the agent harness ([`agent/session_host/builder/factory.rs`](../../ag
(`list_configured_models`), `provider_factory` (`ProviderRuntimeOptions`,
`list_providers`).
Preserves the original `pub use ops::*` contract split out of a single `ops.rs`.
-- Claude Code CLI provider: `tinyagents_harness::providers::claude_code` in [`vendor/tinyagents`](../../../../../vendor/tinyagents/); see the [Claude Code provider guide](../../../../../gitbooks/developing/providers/claude-code.md).
+- Claude Code CLI provider: `tinyagents_harness::providers::claude_code` in [`vendor/tinyagents`](../../../../../vendor/tinyagents/); see the [Claude Code provider guide](../../../../../docs/gitbooks/en/developing/providers/claude-code.md).
## Tests
@@ -119,4 +119,4 @@ session requirement for that agent.
## Further reading
-- [Automatic model routing](../../../../../gitbooks/features/model-routing/README.md)
+- [Automatic model routing](../../../../../docs/gitbooks/en/features/model-routing/README.md)
diff --git a/crates/openhuman-core/src/inference/tokenjuice/README.md b/crates/openhuman-core/src/inference/tokenjuice/README.md
index 0b6a68f0f5..b09ea3e2f1 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/README.md
+++ b/crates/openhuman-core/src/inference/tokenjuice/README.md
@@ -6,10 +6,10 @@ queries and HTML extraction execute inside that module. This directory owns
configuration, model callbacks, artifact authorization and savings attribution.
Token compression is one of the ways OpenHuman keeps a turn cheap and fast
-(see [gitbooks/developing/performance.md](../../../../../gitbooks/developing/performance.md)):
+(see [docs/gitbooks/en/developing/performance.md](../../../../../docs/gitbooks/en/developing/performance.md)):
compressing tool output before it reaches the model shrinks the prompt
without the model ever seeing less information than it needs. See
-[gitbooks/features/token-compression.md](../../../../../gitbooks/features/token-compression.md)
+[docs/gitbooks/en/features/token-compression.md](../../../../../docs/gitbooks/en/features/token-compression.md)
for the user-facing feature page.
OpenHuman-owned files:
diff --git a/crates/openhuman-core/src/integrations/README.md b/crates/openhuman-core/src/integrations/README.md
index b2a54b32d4..028b2aff26 100644
--- a/crates/openhuman-core/src/integrations/README.md
+++ b/crates/openhuman-core/src/integrations/README.md
@@ -297,6 +297,6 @@ pnpm debug rust integrations
## Further reading
- [Parent module README](../../README.md)
-- [Third-party integrations](../../../../gitbooks/features/integrations/README.md)
-- [Integration tools](../../../../gitbooks/features/native-tools/integrations.md)
-- [Connections](../../../../gitbooks/features/connections.md)
+- [Third-party integrations](../../../../docs/gitbooks/en/features/integrations/README.md)
+- [Integration tools](../../../../docs/gitbooks/en/features/native-tools/integrations.md)
+- [Connections](../../../../docs/gitbooks/en/features/connections.md)
diff --git a/crates/openhuman-core/src/integrations/client/README.md b/crates/openhuman-core/src/integrations/client/README.md
index c2617bda7c..1138f6fc11 100644
--- a/crates/openhuman-core/src/integrations/client/README.md
+++ b/crates/openhuman-core/src/integrations/client/README.md
@@ -47,5 +47,5 @@ this function.
## Further reading
-- [Third-party integrations](../../../../../gitbooks/features/integrations/README.md)
-- [Connections](../../../../../gitbooks/features/connections.md)
+- [Third-party integrations](../../../../../docs/gitbooks/en/features/integrations/README.md)
+- [Connections](../../../../../docs/gitbooks/en/features/connections.md)
diff --git a/crates/openhuman-core/src/integrations/composio/README.md b/crates/openhuman-core/src/integrations/composio/README.md
index 450f4fe234..6d593d484a 100644
--- a/crates/openhuman-core/src/integrations/composio/README.md
+++ b/crates/openhuman-core/src/integrations/composio/README.md
@@ -198,7 +198,7 @@ Published from `ops/` via `crate::core::bus::BUS.publish` (`crate::core::events:
## Further reading
- [Parent module README](../README.md)
-- [Third-party integrations](../../../../../gitbooks/features/integrations/README.md)
+- [Third-party integrations](../../../../../docs/gitbooks/en/features/integrations/README.md)
- [tinyconnectors](../../../../../vendor/tinyconnectors/README.md)
Connector argument preparation, calendar defaults, task-window filtering and
diff --git a/crates/openhuman-core/src/integrations/file_storage/README.md b/crates/openhuman-core/src/integrations/file_storage/README.md
index d05ff19073..3c6c47b592 100644
--- a/crates/openhuman-core/src/integrations/file_storage/README.md
+++ b/crates/openhuman-core/src/integrations/file_storage/README.md
@@ -112,5 +112,5 @@ upload, 302-to-presigned download, link, visibility, delete, envelope errors).
## Further reading
-- [Third-party integrations](../../../../../gitbooks/features/integrations/README.md)
-- [Connections](../../../../../gitbooks/features/connections.md)
+- [Third-party integrations](../../../../../docs/gitbooks/en/features/integrations/README.md)
+- [Connections](../../../../../docs/gitbooks/en/features/connections.md)
diff --git a/crates/openhuman-core/src/integrations/task_sources/README.md b/crates/openhuman-core/src/integrations/task_sources/README.md
index 6719e28c76..3244e958a3 100644
--- a/crates/openhuman-core/src/integrations/task_sources/README.md
+++ b/crates/openhuman-core/src/integrations/task_sources/README.md
@@ -169,5 +169,5 @@ SQL cascade). With no backend configured (the desktop default)
## Further reading
- [Parent module README](../README.md)
-- [Triggers](../../../../../gitbooks/features/integrations/triggers.md)
-- [Goals and todos](../../../../../gitbooks/features/goals-and-todos.md)
+- [Triggers](../../../../../docs/gitbooks/en/features/integrations/triggers.md)
+- [Goals and todos](../../../../../docs/gitbooks/en/features/goals-and-todos.md)
diff --git a/crates/openhuman-core/src/mcp/README.md b/crates/openhuman-core/src/mcp/README.md
index 5ebc4923d7..cd3869698e 100644
--- a/crates/openhuman-core/src/mcp/README.md
+++ b/crates/openhuman-core/src/mcp/README.md
@@ -91,6 +91,6 @@ the focused host tests with `cargo test -p openhuman --features modules,mcp
mcp::`, and check that the normal graph does not include the implementation
with `scripts/assert-shed.sh default tinymcp`.
-Further reading: [MCP registry](../../../../gitbooks/developing/architecture/mcp-registry.md),
-[MCP server](../../../../gitbooks/developing/mcp-server.md), and
+Further reading: [MCP registry](../../../../docs/gitbooks/en/developing/architecture/mcp-registry.md),
+[MCP server](../../../../docs/gitbooks/en/developing/mcp-server.md), and
[`tinymcp`](../../../../vendor/tinymcp/README.md).
diff --git a/crates/openhuman-core/src/mcp/audit/README.md b/crates/openhuman-core/src/mcp/audit/README.md
index cd90251396..d6d8315388 100644
--- a/crates/openhuman-core/src/mcp/audit/README.md
+++ b/crates/openhuman-core/src/mcp/audit/README.md
@@ -68,5 +68,5 @@ appears never to have happened, rather than erroring.
## Further reading
- [Parent module README](../README.md)
-- [MCP registry](../../../../../gitbooks/developing/architecture/mcp-registry.md)
-- [Security architecture](../../../../../gitbooks/developing/architecture/security.md)
+- [MCP registry](../../../../../docs/gitbooks/en/developing/architecture/mcp-registry.md)
+- [Security architecture](../../../../../docs/gitbooks/en/developing/architecture/security.md)
diff --git a/crates/openhuman-core/src/mcp/server/README.md b/crates/openhuman-core/src/mcp/server/README.md
index 9ac63a14b5..f4e6c1aa36 100644
--- a/crates/openhuman-core/src/mcp/server/README.md
+++ b/crates/openhuman-core/src/mcp/server/README.md
@@ -126,5 +126,5 @@ No `store.rs`. The only durable side effect is the **MCP write-audit log**, writ
## Further reading
- [Parent module README](../README.md)
-- [MCP server](../../../../../gitbooks/developing/mcp-server.md)
-- [MCP servers and skills](../../../../../gitbooks/features/integrations/mcp-and-skills.md)
+- [MCP server](../../../../../docs/gitbooks/en/developing/mcp-server.md)
+- [MCP servers and skills](../../../../../docs/gitbooks/en/features/integrations/mcp-and-skills.md)
diff --git a/crates/openhuman-core/src/media/README.md b/crates/openhuman-core/src/media/README.md
index 47f0b66ef1..6fdac8db1d 100644
--- a/crates/openhuman-core/src/media/README.md
+++ b/crates/openhuman-core/src/media/README.md
@@ -130,10 +130,10 @@ cargo test -p openhuman media::
```
User-facing docs:
-[`gitbooks/features/native-tools/media-generation.md`](../../../../gitbooks/features/native-tools/media-generation.md).
+[`docs/gitbooks/en/features/native-tools/media-generation.md`](../../../../docs/gitbooks/en/features/native-tools/media-generation.md).
## Further reading
-- [Image and video generation](../../../../gitbooks/features/native-tools/media-generation.md)
-- [Image tools](../../../../gitbooks/features/native-tools/image-tools.md)
-- [Native tools overview](../../../../gitbooks/features/native-tools/README.md)
+- [Image and video generation](../../../../docs/gitbooks/en/features/native-tools/media-generation.md)
+- [Image tools](../../../../docs/gitbooks/en/features/native-tools/image-tools.md)
+- [Native tools overview](../../../../docs/gitbooks/en/features/native-tools/README.md)
diff --git a/crates/openhuman-core/src/memory/README.md b/crates/openhuman-core/src/memory/README.md
index 9466fdaf7d..46badeb78c 100644
--- a/crates/openhuman-core/src/memory/README.md
+++ b/crates/openhuman-core/src/memory/README.md
@@ -435,9 +435,9 @@ The UI flow is `app/test/playwright/specs/memory-v2.spec.ts`.
## Further reading
-- [Memory (product)](../../../../gitbooks/features/memory.md)
-- [Memory architecture](../../../../gitbooks/developing/architecture/memory.md)
-- [Memory tools](../../../../gitbooks/features/native-tools/memory-tools.md)
+- [Memory (product)](../../../../docs/gitbooks/en/features/memory.md)
+- [Memory architecture](../../../../docs/gitbooks/en/developing/architecture/memory.md)
+- [Memory tools](../../../../docs/gitbooks/en/features/native-tools/memory-tools.md)
- [tinymemory submodule](../../../../vendor/tinymemory/README.md)
## `[components] memory`
diff --git a/crates/openhuman-core/src/modules/README.md b/crates/openhuman-core/src/modules/README.md
index 63a0336bd8..277c8f1246 100644
--- a/crates/openhuman-core/src/modules/README.md
+++ b/crates/openhuman-core/src/modules/README.md
@@ -264,7 +264,7 @@ that configuration, never in an ordinary method call or an RPC reply.
a record whose component is off with `LoadError::Disabled` before any claim,
download or `dlopen`; `modules.list` reports `ModuleState::Disabled`; boot skips
the module and `search_path::load_enabled` leaves its search-path artifact
-unopened. See [components](../../../../gitbooks/developing/components.md).
+unopened. See [components](../../../../docs/gitbooks/en/developing/components.md).
### Boot
@@ -477,15 +477,15 @@ need a real module load a local build through `[[modules.overrides]]` or
`OPENHUMAN_MODULE_SOURCE`;
`scripts/test-rust-with-mock.sh` and CI build the pinned submodules.
-See also `gitbooks/developing/performance.md` for how on-demand modules keep a
+See also `docs/gitbooks/en/developing/performance.md` for how on-demand modules keep a
minimal build small.
## Further reading
- [Module sources and `[components]` (AGENTS.md)](../../../../AGENTS.md)
-- [Loadable modules](../../../../gitbooks/developing/loadable-modules.md)
+- [Loadable modules](../../../../docs/gitbooks/en/developing/loadable-modules.md)
- [tinybus submodule](../../../../vendor/tinybus/README.md)
-- [Architecture overview](../../../../gitbooks/developing/architecture.md)
+- [Architecture overview](../../../../docs/gitbooks/en/developing/architecture.md)
The connector host consumes verified release v0.14.0 (contract 1.13). The
argument/default/filter/classification and trigger-archive adapters call bus
diff --git a/crates/openhuman-core/src/modules/registry/README.md b/crates/openhuman-core/src/modules/registry/README.md
index 25758ce130..826a4ce963 100644
--- a/crates/openhuman-core/src/modules/registry/README.md
+++ b/crates/openhuman-core/src/modules/registry/README.md
@@ -69,6 +69,6 @@ dependency admission checks in [`../host.rs`](../host.rs) run.
## Further reading
- [Parent module (`modules`)](../README.md)
-- [Loadable modules](../../../../../gitbooks/developing/loadable-modules.md)
+- [Loadable modules](../../../../../docs/gitbooks/en/developing/loadable-modules.md)
- [tinybus submodule](../../../../../vendor/tinybus/README.md)
-- [Architecture overview](../../../../../gitbooks/developing/architecture.md)
+- [Architecture overview](../../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/platform/README.md b/crates/openhuman-core/src/platform/README.md
index 89a8f33f4b..d14a20773c 100644
--- a/crates/openhuman-core/src/platform/README.md
+++ b/crates/openhuman-core/src/platform/README.md
@@ -144,6 +144,6 @@ pnpm debug rust platform::
## Further reading
-- [Platform and availability](../../../../gitbooks/features/platform.md)
-- [Tauri shell architecture](../../../../gitbooks/developing/architecture/tauri-shell.md)
-- [Architecture overview](../../../../gitbooks/developing/architecture.md)
+- [Platform and availability](../../../../docs/gitbooks/en/features/platform.md)
+- [Tauri shell architecture](../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
+- [Architecture overview](../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/platform/about_app/README.md b/crates/openhuman-core/src/platform/about_app/README.md
index 97bc3d6dd7..0042e9dbf8 100644
--- a/crates/openhuman-core/src/platform/about_app/README.md
+++ b/crates/openhuman-core/src/platform/about_app/README.md
@@ -81,6 +81,6 @@ No dependencies on other `openhuman` domains: capability metadata for other doma
## Further reading
- [Parent module (`platform`)](../README.md)
-- [Platform and availability](../../../../../gitbooks/features/platform.md)
-- [Tauri shell architecture](../../../../../gitbooks/developing/architecture/tauri-shell.md)
-- [Architecture overview](../../../../../gitbooks/developing/architecture.md)
+- [Platform and availability](../../../../../docs/gitbooks/en/features/platform.md)
+- [Tauri shell architecture](../../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
+- [Architecture overview](../../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/platform/connectivity/README.md b/crates/openhuman-core/src/platform/connectivity/README.md
index a60a3fe7e6..7fcaf96b18 100644
--- a/crates/openhuman-core/src/platform/connectivity/README.md
+++ b/crates/openhuman-core/src/platform/connectivity/README.md
@@ -67,6 +67,6 @@ None: the module holds no state. The diag snapshot reads only the environment, t
## Further reading
- [Parent module (`platform`)](../README.md)
-- [Platform and availability](../../../../../gitbooks/features/platform.md)
-- [Tauri shell architecture](../../../../../gitbooks/developing/architecture/tauri-shell.md)
-- [Architecture overview](../../../../../gitbooks/developing/architecture.md)
+- [Platform and availability](../../../../../docs/gitbooks/en/features/platform.md)
+- [Tauri shell architecture](../../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
+- [Architecture overview](../../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/platform/cost/README.md b/crates/openhuman-core/src/platform/cost/README.md
index d1ea70f7c7..9c5c1d1e5c 100644
--- a/crates/openhuman-core/src/platform/cost/README.md
+++ b/crates/openhuman-core/src/platform/cost/README.md
@@ -135,5 +135,5 @@ Before every model call, the agent's budget gate (`OpenHumanBudgetGate::acquire`
## Further reading
- [Parent module (`platform`)](../README.md)
-- [Billing and usage](../../../../../gitbooks/features/billing-and-usage.md)
-- [Platform and availability](../../../../../gitbooks/features/platform.md)
+- [Billing and usage](../../../../../docs/gitbooks/en/features/billing-and-usage.md)
+- [Platform and availability](../../../../../docs/gitbooks/en/features/platform.md)
diff --git a/crates/openhuman-core/src/platform/doctor/README.md b/crates/openhuman-core/src/platform/doctor/README.md
index aa2a5a7e62..16b04a48e0 100644
--- a/crates/openhuman-core/src/platform/doctor/README.md
+++ b/crates/openhuman-core/src/platform/doctor/README.md
@@ -91,5 +91,5 @@ None of its own (no `store.rs`). It only **reads** existing state owned by other
## Further reading
- [Parent module (`platform`)](../README.md)
-- [Platform and availability](../../../../../gitbooks/features/platform.md)
-- [Recover a failed installation](../../../../../gitbooks/guides/recover-failed-installation.md)
+- [Platform and availability](../../../../../docs/gitbooks/en/features/platform.md)
+- [Recover a failed installation](../../../../../docs/gitbooks/en/guides/recover-failed-installation.md)
diff --git a/crates/openhuman-core/src/platform/health/README.md b/crates/openhuman-core/src/platform/health/README.md
index 6eb625f4cd..c780730639 100644
--- a/crates/openhuman-core/src/platform/health/README.md
+++ b/crates/openhuman-core/src/platform/health/README.md
@@ -92,6 +92,6 @@ None on disk. State lives in a process-global `OnceLock<HealthRegistry>` (lazy-i
## Further reading
- [Parent module (`platform`)](../README.md)
-- [Platform and availability](../../../../../gitbooks/features/platform.md)
-- [Tauri shell architecture](../../../../../gitbooks/developing/architecture/tauri-shell.md)
-- [Architecture overview](../../../../../gitbooks/developing/architecture.md)
+- [Platform and availability](../../../../../docs/gitbooks/en/features/platform.md)
+- [Tauri shell architecture](../../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
+- [Architecture overview](../../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/platform/proc_metrics/README.md b/crates/openhuman-core/src/platform/proc_metrics/README.md
index e4f7202e68..2596fd1166 100644
--- a/crates/openhuman-core/src/platform/proc_metrics/README.md
+++ b/crates/openhuman-core/src/platform/proc_metrics/README.md
@@ -57,6 +57,6 @@ are skipped with a stderr note rather than aborting the sample.
## Further reading
- [Parent module (`platform`)](../README.md)
-- [Platform and availability](../../../../../gitbooks/features/platform.md)
-- [Tauri shell architecture](../../../../../gitbooks/developing/architecture/tauri-shell.md)
-- [Architecture overview](../../../../../gitbooks/developing/architecture.md)
+- [Platform and availability](../../../../../docs/gitbooks/en/features/platform.md)
+- [Tauri shell architecture](../../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
+- [Architecture overview](../../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/platform/service/README.md b/crates/openhuman-core/src/platform/service/README.md
index 54469b2b05..277ed89467 100644
--- a/crates/openhuman-core/src/platform/service/README.md
+++ b/crates/openhuman-core/src/platform/service/README.md
@@ -115,6 +115,6 @@ Both subscribers are registered idempotently from `crates/openhuman-core/src/cor
## Further reading
- [Parent module (`platform`)](../README.md)
-- [Platform and availability](../../../../../gitbooks/features/platform.md)
-- [Tauri shell architecture](../../../../../gitbooks/developing/architecture/tauri-shell.md)
-- [Architecture overview](../../../../../gitbooks/developing/architecture.md)
+- [Platform and availability](../../../../../docs/gitbooks/en/features/platform.md)
+- [Tauri shell architecture](../../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
+- [Architecture overview](../../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/platform/socket/README.md b/crates/openhuman-core/src/platform/socket/README.md
index 46add65b08..7cdcbbcbb7 100644
--- a/crates/openhuman-core/src/platform/socket/README.md
+++ b/crates/openhuman-core/src/platform/socket/README.md
@@ -107,5 +107,5 @@ None of its own. State (`status`, `socket_id`, `error`, attached `WebhookRouter`
## Further reading
- [Parent module (`platform`)](../README.md)
-- [Architecture overview](../../../../../gitbooks/developing/architecture.md)
-- [Platform and availability](../../../../../gitbooks/features/platform.md)
+- [Architecture overview](../../../../../docs/gitbooks/en/developing/architecture.md)
+- [Platform and availability](../../../../../docs/gitbooks/en/features/platform.md)
diff --git a/crates/openhuman-core/src/platform/startup/README.md b/crates/openhuman-core/src/platform/startup/README.md
index 517446b356..0dac81bf04 100644
--- a/crates/openhuman-core/src/platform/startup/README.md
+++ b/crates/openhuman-core/src/platform/startup/README.md
@@ -55,6 +55,6 @@ No own state/store. It triggers migrations that mutate on-disk workspace artifac
## Further reading
- [Parent module (`platform`)](../README.md)
-- [Platform and availability](../../../../../gitbooks/features/platform.md)
-- [Tauri shell architecture](../../../../../gitbooks/developing/architecture/tauri-shell.md)
-- [Architecture overview](../../../../../gitbooks/developing/architecture.md)
+- [Platform and availability](../../../../../docs/gitbooks/en/features/platform.md)
+- [Tauri shell architecture](../../../../../docs/gitbooks/en/developing/architecture/tauri-shell.md)
+- [Architecture overview](../../../../../docs/gitbooks/en/developing/architecture.md)
diff --git a/crates/openhuman-core/src/platform/update/README.md b/crates/openhuman-core/src/platform/update/README.md
index e6ef996123..f2456e3848 100644
--- a/crates/openhuman-core/src/platform/update/README.md
+++ b/crates/openhuman-core/src/platform/update/README.md
@@ -82,6 +82,6 @@ None. No `store.rs`: staged binaries are written to the filesystem (current-exe
## Further reading
- [Parent module (`platform`)](../README.md)
-- [Auto-update](../../../../../gitbooks/overview/auto-update.md)
-- [Release policy](../../../../../gitbooks/developing/release-policy.md)
-- [Platform and availability](../../../../../gitbooks/features/platform.md)
+- [Auto-update](../../../../../docs/gitbooks/en/overview/auto-update.md)
+- [Release policy](../../../../../docs/gitbooks/en/developing/release-policy.md)
+- [Platform and availability](../../../../../docs/gitbooks/en/features/platform.md)
diff --git a/crates/openhuman-core/src/profiles/README.md b/crates/openhuman-core/src/profiles/README.md
index d071580174..622619480f 100644
--- a/crates/openhuman-core/src/profiles/README.md
+++ b/crates/openhuman-core/src/profiles/README.md
@@ -16,7 +16,7 @@ Two hosts drive it:
- `openhuman-core run --mode saas --saas-config <file>`: the JSON-RPC server
behind a trusted gateway (`openhuman-rpc`'s `saas_gateway`). See
- [SaaS profiles](../../../../gitbooks/developing/saas-profiles.md) for
+ [SaaS profiles](../../../../docs/gitbooks/en/developing/saas-profiles.md) for
deploying it.
- `openhuman_embed::ProfileRuntime`: the same host in-process, without the
gateway (`crates/openhuman-embed/src/profiles.rs`).
diff --git a/crates/openhuman-core/src/sandbox/README.md b/crates/openhuman-core/src/sandbox/README.md
index 9163a4f081..749b495d56 100644
--- a/crates/openhuman-core/src/sandbox/README.md
+++ b/crates/openhuman-core/src/sandbox/README.md
@@ -229,6 +229,6 @@ fixture. Run with
## Further reading
-- [Privacy and security](../../../../gitbooks/features/privacy-and-security.md)
-- [Security architecture](../../../../gitbooks/developing/architecture/security.md)
+- [Privacy and security](../../../../docs/gitbooks/en/features/privacy-and-security.md)
+- [Security architecture](../../../../docs/gitbooks/en/developing/architecture/security.md)
- [tinybox submodule](../../../../vendor/tinybox/README.md)
diff --git a/crates/openhuman-core/src/search/README.md b/crates/openhuman-core/src/search/README.md
index 0c8375290e..1e000be04b 100644
--- a/crates/openhuman-core/src/search/README.md
+++ b/crates/openhuman-core/src/search/README.md
@@ -173,7 +173,7 @@ read and written through `config/ops/search.rs`.
- Resumed threads keep their recorded search role tools even when no provider
is usable now. That rehydration is in `agent/session_host/recorded_tools.rs`.
- The user-facing description is in
- [`gitbooks/features/native-tools/web-search.md`](../../../../gitbooks/features/native-tools/web-search.md).
+ [`docs/gitbooks/en/features/native-tools/web-search.md`](../../../../docs/gitbooks/en/features/native-tools/web-search.md).
## Gotchas
@@ -206,6 +206,6 @@ pnpm debug rust search::
## Further reading
-- [Web search](../../../../gitbooks/features/native-tools/web-search.md)
+- [Web search](../../../../docs/gitbooks/en/features/native-tools/web-search.md)
- [tinysearch submodule](../../../../vendor/tinysearch/README.md)
-- [Native tools overview](../../../../gitbooks/features/native-tools/README.md)
+- [Native tools overview](../../../../docs/gitbooks/en/features/native-tools/README.md)
diff --git a/crates/openhuman-core/src/security/README.md b/crates/openhuman-core/src/security/README.md
index 3c78a92f9a..693ddf7fb2 100644
--- a/crates/openhuman-core/src/security/README.md
+++ b/crates/openhuman-core/src/security/README.md
@@ -281,7 +281,7 @@ Each file has a sibling `<module>_tests.rs`; the policy suites live in
## Further reading
-- [Security architecture](../../../../gitbooks/developing/architecture/security.md)
-- [Privacy and security](../../../../gitbooks/features/privacy-and-security.md)
-- [Approval gate](../../../../gitbooks/features/approval-gate.md)
-- [OS keyring and secret storage](../../../../gitbooks/features/os-keyring-and-secret-storage.md)
+- [Security architecture](../../../../docs/gitbooks/en/developing/architecture/security.md)
+- [Privacy and security](../../../../docs/gitbooks/en/features/privacy-and-security.md)
+- [Approval gate](../../../../docs/gitbooks/en/features/approval-gate.md)
+- [OS keyring and secret storage](../../../../docs/gitbooks/en/features/os-keyring-and-secret-storage.md)
diff --git a/crates/openhuman-core/src/security/approval/README.md b/crates/openhuman-core/src/security/approval/README.md
index 099d54e258..d9a534e5b5 100644
--- a/crates/openhuman-core/src/security/approval/README.md
+++ b/crates/openhuman-core/src/security/approval/README.md
@@ -127,5 +127,5 @@ stored as JSON strings. With no backend configured (the desktop default)
## Further reading
- [Parent module (`security`)](../README.md)
-- [Approval gate](../../../../../gitbooks/features/approval-gate.md)
-- [Security architecture](../../../../../gitbooks/developing/architecture/security.md)
+- [Approval gate](../../../../../docs/gitbooks/en/features/approval-gate.md)
+- [Security architecture](../../../../../docs/gitbooks/en/developing/architecture/security.md)
diff --git a/crates/openhuman-core/src/security/credentials/README.md b/crates/openhuman-core/src/security/credentials/README.md
index 1375f7815d..34517ec988 100644
--- a/crates/openhuman-core/src/security/credentials/README.md
+++ b/crates/openhuman-core/src/security/credentials/README.md
@@ -128,8 +128,8 @@ Many domains consume `AuthService` / session helpers / Composio-direct key, incl
## Further reading
- [Parent module (`security`)](../README.md)
-- [OS keyring and secret storage](../../../../../gitbooks/features/os-keyring-and-secret-storage.md)
-- [Security architecture](../../../../../gitbooks/developing/architecture/security.md)
+- [OS keyring and secret storage](../../../../../docs/gitbooks/en/features/os-keyring-and-secret-storage.md)
+- [Security architecture](../../../../../docs/gitbooks/en/developing/architecture/security.md)
`channel_credential_provider` owns the persisted `channel:<id>:<mode>` namespace.
Managed login and channel setup use it through the host facade so existing
diff --git a/crates/openhuman-core/src/security/devices/README.md b/crates/openhuman-core/src/security/devices/README.md
index 44905decdc..ce4b9ab944 100644
--- a/crates/openhuman-core/src/security/devices/README.md
+++ b/crates/openhuman-core/src/security/devices/README.md
@@ -125,7 +125,7 @@ revives a device another process revoked. With no backend configured (the deskto
## Further reading
- [Parent module (`security`)](../README.md)
-- [Security architecture](../../../../../gitbooks/developing/architecture/security.md)
-- [Privacy and security](../../../../../gitbooks/features/privacy-and-security.md)
-- [Approval gate](../../../../../gitbooks/features/approval-gate.md)
-- [OS keyring and secret storage](../../../../../gitbooks/features/os-keyring-and-secret-storage.md)
+- [Security architecture](../../../../../docs/gitbooks/en/developing/architecture/security.md)
+- [Privacy and security](../../../../../docs/gitbooks/en/features/privacy-and-security.md)
+- [Approval gate](../../../../../docs/gitbooks/en/features/approval-gate.md)
+- [OS keyring and secret storage](../../../../../docs/gitbooks/en/features/os-keyring-and-secret-storage.md)
diff --git a/crates/openhuman-core/src/security/egress/README.md b/crates/openhuman-core/src/security/egress/README.md
index 5c7fa541d4..8bffc79720 100644
--- a/crates/openhuman-core/src/security/egress/README.md
+++ b/crates/openhuman-core/src/security/egress/README.md
@@ -80,6 +80,6 @@ Both `enforce_egress` and `local_only_tool_block` read the live mode via
## Further reading
- [Parent module (`security`)](../README.md)
-- [Privacy mode](../../../../../gitbooks/features/privacy-mode.md)
-- [Privacy and security](../../../../../gitbooks/features/privacy-and-security.md)
-- [Security architecture](../../../../../gitbooks/developing/architecture/security.md)
+- [Privacy mode](../../../../../docs/gitbooks/en/features/privacy-mode.md)
+- [Privacy and security](../../../../../docs/gitbooks/en/features/privacy-and-security.md)
+- [Security architecture](../../../../../docs/gitbooks/en/developing/architecture/security.md)
diff --git a/crates/openhuman-core/src/security/encryption/README.md b/crates/openhuman-core/src/security/encryption/README.md
index ce1bf6f33b..0e40c75682 100644
--- a/crates/openhuman-core/src/security/encryption/README.md
+++ b/crates/openhuman-core/src/security/encryption/README.md
@@ -32,7 +32,7 @@ AES-256-GCM at-rest crypto for AI memory storage and the encrypt/decrypt RPC sur
## Further reading
- [Parent module (`security`)](../README.md)
-- [Security architecture](../../../../../gitbooks/developing/architecture/security.md)
-- [Privacy and security](../../../../../gitbooks/features/privacy-and-security.md)
-- [Approval gate](../../../../../gitbooks/features/approval-gate.md)
-- [OS keyring and secret storage](../../../../../gitbooks/features/os-keyring-and-secret-storage.md)
+- [Security architecture](../../../../../docs/gitbooks/en/developing/architecture/security.md)
+- [Privacy and security](../../../../../docs/gitbooks/en/features/privacy-and-security.md)
+- [Approval gate](../../../../../docs/gitbooks/en/features/approval-gate.md)
+- [OS keyring and secret storage](../../../../../docs/gitbooks/en/features/os-keyring-and-secret-storage.md)
diff --git a/crates/openhuman-core/src/security/keyring_consent/README.md b/crates/openhuman-core/src/security/keyring_consent/README.md
index c023689f41..49c84b0615 100644
--- a/crates/openhuman-core/src/security/keyring_consent/README.md
+++ b/crates/openhuman-core/src/security/keyring_consent/README.md
@@ -105,5 +105,5 @@ matches on `secret_storage::backend_name()`'s identifiers (`"os"`,
## Further reading
- [Parent module (`security`)](../README.md)
-- [OS keyring and secret storage](../../../../../gitbooks/features/os-keyring-and-secret-storage.md)
-- [Security architecture](../../../../../gitbooks/developing/architecture/security.md)
+- [OS keyring and secret storage](../../../../../docs/gitbooks/en/features/os-keyring-and-secret-storage.md)
+- [Security architecture](../../../../../docs/gitbooks/en/developing/architecture/security.md)
diff --git a/crates/openhuman-core/src/security/policy/README.md b/crates/openhuman-core/src/security/policy/README.md
index cee13e4ca9..777874b5e8 100644
--- a/crates/openhuman-core/src/security/policy/README.md
+++ b/crates/openhuman-core/src/security/policy/README.md
@@ -134,7 +134,7 @@ Each of these must not be weakened to make a feature work:
## Further reading
- [Parent module (`security`)](../README.md)
-- [Security architecture](../../../../../gitbooks/developing/architecture/security.md)
-- [Privacy and security](../../../../../gitbooks/features/privacy-and-security.md)
-- [Approval gate](../../../../../gitbooks/features/approval-gate.md)
-- [OS keyring and secret storage](../../../../../gitbooks/features/os-keyring-and-secret-storage.md)
+- [Security architecture](../../../../../docs/gitbooks/en/developing/architecture/security.md)
+- [Privacy and security](../../../../../docs/gitbooks/en/features/privacy-and-security.md)
+- [Approval gate](../../../../../docs/gitbooks/en/features/approval-gate.md)
+- [OS keyring and secret storage](../../../../../docs/gitbooks/en/features/os-keyring-and-secret-storage.md)
diff --git a/crates/openhuman-core/src/security/prompt_injection/README.md b/crates/openhuman-core/src/security/prompt_injection/README.md
index e470cfcc80..fe72b897a5 100644
--- a/crates/openhuman-core/src/security/prompt_injection/README.md
+++ b/crates/openhuman-core/src/security/prompt_injection/README.md
@@ -75,7 +75,7 @@ Consumers call `enforce_prompt_input` and treat any non-`Allow` action as a reje
## Further reading
- [Parent module (`security`)](../README.md)
-- [Security architecture](../../../../../gitbooks/developing/architecture/security.md)
-- [Privacy and security](../../../../../gitbooks/features/privacy-and-security.md)
-- [Approval gate](../../../../../gitbooks/features/approval-gate.md)
-- [OS keyring and secret storage](../../../../../gitbooks/features/os-keyring-and-secret-storage.md)
+- [Security architecture](../../../../../docs/gitbooks/en/developing/architecture/security.md)
+- [Privacy and security](../../../../../docs/gitbooks/en/features/privacy-and-security.md)
+- [Approval gate](../../../../../docs/gitbooks/en/features/approval-gate.md)
+- [OS keyring and secret storage](../../../../../docs/gitbooks/en/features/os-keyring-and-secret-storage.md)
diff --git a/crates/openhuman-core/src/security/secret_storage/README.md b/crates/openhuman-core/src/security/secret_storage/README.md
index eab2288d46..74ff01e8f6 100644
--- a/crates/openhuman-core/src/security/secret_storage/README.md
+++ b/crates/openhuman-core/src/security/secret_storage/README.md
@@ -124,5 +124,5 @@ Discovered consumers (`crate::security::secret_storage::*`):
## Further reading
- [Parent module (`security`)](../README.md)
-- [OS keyring and secret storage](../../../../../gitbooks/features/os-keyring-and-secret-storage.md)
-- [Security architecture](../../../../../gitbooks/developing/architecture/security.md)
+- [OS keyring and secret storage](../../../../../docs/gitbooks/en/features/os-keyring-and-secret-storage.md)
+- [Security architecture](../../../../../docs/gitbooks/en/developing/architecture/security.md)
diff --git a/crates/openhuman-core/src/skills/README.md b/crates/openhuman-core/src/skills/README.md
index 3b128606f3..6d9770239e 100644
--- a/crates/openhuman-core/src/skills/README.md
+++ b/crates/openhuman-core/src/skills/README.md
@@ -255,6 +255,6 @@ disabled build with `cargo check --no-default-features`.
## Further reading
-- [MCP servers and skills](../../../../gitbooks/features/integrations/mcp-and-skills.md)
+- [MCP servers and skills](../../../../docs/gitbooks/en/features/integrations/mcp-and-skills.md)
- [tinyskills submodule](../../../../vendor/tinyskills/README.md)
-- [Agent harness architecture](../../../../gitbooks/developing/architecture/agent-harness.md)
+- [Agent harness architecture](../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
diff --git a/crates/openhuman-core/src/skills/catalog/README.md b/crates/openhuman-core/src/skills/catalog/README.md
index 4a14a4743b..c3c6ae77be 100644
--- a/crates/openhuman-core/src/skills/catalog/README.md
+++ b/crates/openhuman-core/src/skills/catalog/README.md
@@ -169,6 +169,6 @@ Security notes:
## Further reading
- [Parent module (`skills`)](../README.md)
-- [MCP servers and skills](../../../../../gitbooks/features/integrations/mcp-and-skills.md)
+- [MCP servers and skills](../../../../../docs/gitbooks/en/features/integrations/mcp-and-skills.md)
- [tinyskills submodule](../../../../../vendor/tinyskills/README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
diff --git a/crates/openhuman-core/src/skills/runtime/README.md b/crates/openhuman-core/src/skills/runtime/README.md
index f864d487f0..fd724ca4ea 100644
--- a/crates/openhuman-core/src/skills/runtime/README.md
+++ b/crates/openhuman-core/src/skills/runtime/README.md
@@ -67,6 +67,6 @@ openhuman-core skill_runtime recent_runs --limit 10
## Further reading
- [Parent module (`skills`)](../README.md)
-- [MCP servers and skills](../../../../../gitbooks/features/integrations/mcp-and-skills.md)
+- [MCP servers and skills](../../../../../docs/gitbooks/en/features/integrations/mcp-and-skills.md)
- [tinyskills submodule](../../../../../vendor/tinyskills/README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
diff --git a/crates/openhuman-core/src/skills/webhooks/README.md b/crates/openhuman-core/src/skills/webhooks/README.md
index 2a41815041..8d3510223a 100644
--- a/crates/openhuman-core/src/skills/webhooks/README.md
+++ b/crates/openhuman-core/src/skills/webhooks/README.md
@@ -93,7 +93,7 @@ Note that nothing in the production startup path currently constructs a `Webhook
## Notes / gotchas
-- Direct skill dispatch is not implemented: a `skill`-kind tunnel returns `501`. Real handling exists only for `echo` and `agent` kinds (the QuickJS skill runtime was removed; see `gitbooks/developing/architecture.md`).
+- Direct skill dispatch is not implemented: a `skill`-kind tunnel returns `501`. Real handling exists only for `echo` and `agent` kinds (the QuickJS skill runtime was removed; see `docs/gitbooks/en/developing/architecture.md`).
- `route()` deliberately resolves only `target_kind == "skill"` registrations; echo/agent registrations are matched via `registration()` in the bus, not `route()`.
- Agent tunnels respond `202` immediately and complete asynchronously: the spawned task emits the final `webhook:response` itself to avoid blocking the broadcast dispatch task during LLM calls.
- `register_agent` stores `agent_id` for observability and rebind validation only; per the docstring the triage evaluator selects the target agent dynamically regardless of the pinned value.
@@ -104,6 +104,6 @@ Note that nothing in the production startup path currently constructs a `Webhook
## Further reading
- [Parent module (`skills`)](../README.md)
-- [MCP servers and skills](../../../../../gitbooks/features/integrations/mcp-and-skills.md)
+- [MCP servers and skills](../../../../../docs/gitbooks/en/features/integrations/mcp-and-skills.md)
- [tinyskills submodule](../../../../../vendor/tinyskills/README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
diff --git a/crates/openhuman-core/src/test_support/README.md b/crates/openhuman-core/src/test_support/README.md
index 3e55c48fbe..7de1800430 100644
--- a/crates/openhuman-core/src/test_support/README.md
+++ b/crates/openhuman-core/src/test_support/README.md
@@ -166,5 +166,5 @@ of `scripts/ci/self-hosted/lanes-plan.mjs`
## Further reading
-- [Testing strategy](../../../../gitbooks/developing/testing-strategy.md)
+- [Testing strategy](../../../../docs/gitbooks/en/developing/testing-strategy.md)
- [Integration test layout](../../../../tests/README.md)
diff --git a/crates/openhuman-core/src/threads/README.md b/crates/openhuman-core/src/threads/README.md
index d3d6e3a27d..083c981583 100644
--- a/crates/openhuman-core/src/threads/README.md
+++ b/crates/openhuman-core/src/threads/README.md
@@ -239,6 +239,6 @@ Run them with `cargo test -p openhuman threads::` or
## Further reading
-- [Chat](../../../../gitbooks/features/chat.md)
-- [Agent harness architecture](../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Frontend architecture](../../../../gitbooks/developing/architecture/frontend.md)
+- [Chat](../../../../docs/gitbooks/en/features/chat.md)
+- [Agent harness architecture](../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Frontend architecture](../../../../docs/gitbooks/en/developing/architecture/frontend.md)
diff --git a/crates/openhuman-core/src/threads/store/README.md b/crates/openhuman-core/src/threads/store/README.md
index 0ba2cf6c28..eb46fc7002 100644
--- a/crates/openhuman-core/src/threads/store/README.md
+++ b/crates/openhuman-core/src/threads/store/README.md
@@ -46,6 +46,6 @@ live in `vendor/tinyagents/crates/tinyagents-session/src/threads/`.
## Further reading
- [Parent module (`threads`)](../README.md)
-- [Chat](../../../../../gitbooks/features/chat.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Frontend architecture](../../../../../gitbooks/developing/architecture/frontend.md)
+- [Chat](../../../../../docs/gitbooks/en/features/chat.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Frontend architecture](../../../../../docs/gitbooks/en/developing/architecture/frontend.md)
diff --git a/crates/openhuman-core/src/tools/README.md b/crates/openhuman-core/src/tools/README.md
index b508e7871a..2b0e61ef99 100644
--- a/crates/openhuman-core/src/tools/README.md
+++ b/crates/openhuman-core/src/tools/README.md
@@ -224,7 +224,7 @@ else is agent-only.
stays behind `OPENHUMAN_BROWSER_ALLOW_ALL`.
- Search is configured per provider and per role in `[search]`; disabling all
providers removes the search tools. User-facing setup is in
- [`gitbooks/features/native-tools/web-search.md`](../../../../gitbooks/features/native-tools/web-search.md).
+ [`docs/gitbooks/en/features/native-tools/web-search.md`](../../../../docs/gitbooks/en/features/native-tools/web-search.md).
## Tests
@@ -235,7 +235,7 @@ execution and serde). Every other module has a sibling `*_tests.rs`. Run with
## Further reading
-- [Native tools overview](../../../../gitbooks/features/native-tools/README.md)
-- [Agent harness architecture](../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Approval gate](../../../../gitbooks/features/approval-gate.md)
+- [Native tools overview](../../../../docs/gitbooks/en/features/native-tools/README.md)
+- [Agent harness architecture](../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Approval gate](../../../../docs/gitbooks/en/features/approval-gate.md)
- [tinyagents submodule](../../../../vendor/tinyagents/README.md)
diff --git a/crates/openhuman-core/src/tools/impl/README.md b/crates/openhuman-core/src/tools/impl/README.md
index aee3e3faac..4d591f0598 100644
--- a/crates/openhuman-core/src/tools/impl/README.md
+++ b/crates/openhuman-core/src/tools/impl/README.md
@@ -48,7 +48,7 @@ tested but no production assembly site constructs it today.
## Further reading
- [Parent module (`tools`)](../README.md)
-- [Native tools overview](../../../../../gitbooks/features/native-tools/README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Approval gate](../../../../../gitbooks/features/approval-gate.md)
+- [Native tools overview](../../../../../docs/gitbooks/en/features/native-tools/README.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Approval gate](../../../../../docs/gitbooks/en/features/approval-gate.md)
- [tinyagents submodule](../../../../../vendor/tinyagents/README.md)
diff --git a/crates/openhuman-core/src/tools/registry/README.md b/crates/openhuman-core/src/tools/registry/README.md
index 31aea885e9..0620e136b3 100644
--- a/crates/openhuman-core/src/tools/registry/README.md
+++ b/crates/openhuman-core/src/tools/registry/README.md
@@ -77,7 +77,7 @@ No owned persistence. `diagnostics()` reads the MCP write-audit log through `cra
## Further reading
- [Parent module (`tools`)](../README.md)
-- [Native tools overview](../../../../../gitbooks/features/native-tools/README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Approval gate](../../../../../gitbooks/features/approval-gate.md)
+- [Native tools overview](../../../../../docs/gitbooks/en/features/native-tools/README.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Approval gate](../../../../../docs/gitbooks/en/features/approval-gate.md)
- [tinyagents submodule](../../../../../vendor/tinyagents/README.md)
diff --git a/crates/openhuman-core/src/tools/toolpacks/README.md b/crates/openhuman-core/src/tools/toolpacks/README.md
index 42bf5bc46f..dea67a1e20 100644
--- a/crates/openhuman-core/src/tools/toolpacks/README.md
+++ b/crates/openhuman-core/src/tools/toolpacks/README.md
@@ -175,7 +175,7 @@ rebinding); [`groups_tests.rs`](./groups_tests.rs) (`GroupMode` defaults and nar
## Further reading
- [Parent module (`tools`)](../README.md)
-- [Native tools overview](../../../../../gitbooks/features/native-tools/README.md)
-- [Agent harness architecture](../../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Approval gate](../../../../../gitbooks/features/approval-gate.md)
+- [Native tools overview](../../../../../docs/gitbooks/en/features/native-tools/README.md)
+- [Agent harness architecture](../../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Approval gate](../../../../../docs/gitbooks/en/features/approval-gate.md)
- [tinyagents submodule](../../../../../vendor/tinyagents/README.md)
diff --git a/crates/openhuman-core/src/util/README.md b/crates/openhuman-core/src/util/README.md
index 2af0cf3c6e..42329ce16d 100644
--- a/crates/openhuman-core/src/util/README.md
+++ b/crates/openhuman-core/src/util/README.md
@@ -154,5 +154,5 @@ Tests sit beside each file ([`text_tests.rs`](./text_tests.rs), [`retry_tests.rs
## Further reading
-- [Architecture overview](../../../../gitbooks/developing/architecture.md)
-- [Testing strategy](../../../../gitbooks/developing/testing-strategy.md)
+- [Architecture overview](../../../../docs/gitbooks/en/developing/architecture.md)
+- [Testing strategy](../../../../docs/gitbooks/en/developing/testing-strategy.md)
diff --git a/crates/openhuman-core/src/util/tls/README.md b/crates/openhuman-core/src/util/tls/README.md
index d591b55e4d..16b68f78de 100644
--- a/crates/openhuman-core/src/util/tls/README.md
+++ b/crates/openhuman-core/src/util/tls/README.md
@@ -50,5 +50,5 @@ Declared via `pub mod tls;` in `crates/openhuman-core/src/util/mod.rs`; not re-e
## Further reading
- [Parent module (`util`)](../README.md)
-- [Architecture overview](../../../../../gitbooks/developing/architecture.md)
-- [Testing strategy](../../../../../gitbooks/developing/testing-strategy.md)
+- [Architecture overview](../../../../../docs/gitbooks/en/developing/architecture.md)
+- [Testing strategy](../../../../../docs/gitbooks/en/developing/testing-strategy.md)
diff --git a/crates/openhuman-core/src/voice/README.md b/crates/openhuman-core/src/voice/README.md
index f31f4adf43..253a4c6712 100644
--- a/crates/openhuman-core/src/voice/README.md
+++ b/crates/openhuman-core/src/voice/README.md
@@ -406,6 +406,6 @@ Tests sit beside their modules as `<module>_tests.rs` (for example
## Further reading
-- [Voice tools](../../../../gitbooks/features/native-tools/voice.md)
+- [Voice tools](../../../../docs/gitbooks/en/features/native-tools/voice.md)
- [tinyvoice submodule](../../../../vendor/tinyvoice/README.md)
-- [Chat](../../../../gitbooks/features/chat.md)
+- [Chat](../../../../docs/gitbooks/en/features/chat.md)
diff --git a/crates/openhuman-core/src/voice/server/README.md b/crates/openhuman-core/src/voice/server/README.md
index ad765ec1c7..26845ca6bf 100644
--- a/crates/openhuman-core/src/voice/server/README.md
+++ b/crates/openhuman-core/src/voice/server/README.md
@@ -43,6 +43,6 @@ agent-tool surface for voice generally lives in `voice/schemas/` and
## Further reading
- [Parent module (`voice`)](../README.md)
-- [Voice tools](../../../../../gitbooks/features/native-tools/voice.md)
+- [Voice tools](../../../../../docs/gitbooks/en/features/native-tools/voice.md)
- [tinyvoice submodule](../../../../../vendor/tinyvoice/README.md)
-- [Chat](../../../../../gitbooks/features/chat.md)
+- [Chat](../../../../../docs/gitbooks/en/features/chat.md)
diff --git a/crates/openhuman-core/src/web3/README.md b/crates/openhuman-core/src/web3/README.md
index 7bf566bebf..76746cf30f 100644
--- a/crates/openhuman-core/src/web3/README.md
+++ b/crates/openhuman-core/src/web3/README.md
@@ -118,6 +118,6 @@ node scripts/ci/check-module-boundaries.mjs
## Further reading
-- [Wallet](../../../../gitbooks/features/wallet.md)
+- [Wallet](../../../../docs/gitbooks/en/features/wallet.md)
- [TinyWallet](../../../../vendor/tinywallet/README.md)
-- [Loadable modules](../../../../gitbooks/developing/loadable-modules.md)
+- [Loadable modules](../../../../docs/gitbooks/en/developing/loadable-modules.md)
diff --git a/crates/openhuman-core/src/web3/wallet/README.md b/crates/openhuman-core/src/web3/wallet/README.md
index a56c9363b7..cd9029f552 100644
--- a/crates/openhuman-core/src/web3/wallet/README.md
+++ b/crates/openhuman-core/src/web3/wallet/README.md
@@ -79,6 +79,6 @@ onboarding persistence, host approval, adapter behavior, and controller/tool
compatibility.
- [Parent Web3 module](../README.md)
-- [Wallet product guide](../../../../../gitbooks/features/wallet.md)
+- [Wallet product guide](../../../../../docs/gitbooks/en/features/wallet.md)
- [TinyWallet source](../../../../../vendor/tinywallet/README.md)
-- [Loadable modules](../../../../../gitbooks/developing/loadable-modules.md)
+- [Loadable modules](../../../../../docs/gitbooks/en/developing/loadable-modules.md)
diff --git a/crates/openhuman-core/src/web3/x402/README.md b/crates/openhuman-core/src/web3/x402/README.md
index 6ef86ef2f3..bc52ba38f3 100644
--- a/crates/openhuman-core/src/web3/x402/README.md
+++ b/crates/openhuman-core/src/web3/x402/README.md
@@ -60,4 +60,4 @@ not host-side accounting or protocol interpretation.
- [Parent Web3 module](../README.md)
- [Wallet host adapter](../wallet/README.md)
- [TinyWallet source](../../../../../vendor/tinywallet/README.md)
-- [Loadable modules](../../../../../gitbooks/developing/loadable-modules.md)
+- [Loadable modules](../../../../../docs/gitbooks/en/developing/loadable-modules.md)
diff --git a/crates/openhuman-core/src/web_chat/README.md b/crates/openhuman-core/src/web_chat/README.md
index deb6aba4da..797143423c 100644
--- a/crates/openhuman-core/src/web_chat/README.md
+++ b/crates/openhuman-core/src/web_chat/README.md
@@ -342,6 +342,6 @@ pnpm debug rust web_chat
## Further reading
-- [Chat](../../../../gitbooks/features/chat.md)
-- [Agent harness architecture](../../../../gitbooks/developing/architecture/agent-harness.md)
-- [Frontend architecture](../../../../gitbooks/developing/architecture/frontend.md)
+- [Chat](../../../../docs/gitbooks/en/features/chat.md)
+- [Agent harness architecture](../../../../docs/gitbooks/en/developing/architecture/agent-harness.md)
+- [Frontend architecture](../../../../docs/gitbooks/en/developing/architecture/frontend.md)
diff --git a/crates/openhuman-embed/README.md b/crates/openhuman-embed/README.md
index f7bb593777..1fe3e87ff8 100644
--- a/crates/openhuman-embed/README.md
+++ b/crates/openhuman-embed/README.md
@@ -2,9 +2,9 @@
A typed Rust facade for running the OpenHuman core inside your application: one Runtime per process, with independently configured Agents.
-Read the [embedding documentation](https://github.com/tinyhumansai/openhuman/blob/main/gitbooks/developing/embed/README.md), [installation](https://github.com/tinyhumansai/openhuman/blob/main/gitbooks/developing/embed/installation.md), and [quickstart](https://github.com/tinyhumansai/openhuman/blob/main/gitbooks/developing/embed/quickstart.md).
+Read the [embedding documentation](https://github.com/tinyhumansai/openhuman/blob/main/docs/gitbooks/en/developing/embed/README.md), [installation](https://github.com/tinyhumansai/openhuman/blob/main/docs/gitbooks/en/developing/embed/installation.md), and [quickstart](https://github.com/tinyhumansai/openhuman/blob/main/docs/gitbooks/en/developing/embed/quickstart.md).
-The [cookbook](https://github.com/tinyhumansai/openhuman/blob/main/gitbooks/developing/embed/cookbook.md) is generated from executable examples. Generate complete local API docs with `cargo doc -p openhuman-embed --all-features --no-deps --open`; this workspace crate is currently unpublished.
+The [cookbook](https://github.com/tinyhumansai/openhuman/blob/main/docs/gitbooks/en/developing/embed/cookbook.md) is generated from executable examples. Generate complete local API docs with `cargo doc -p openhuman-embed --all-features --no-deps --open`; this workspace crate is currently unpublished.
Hosts supply transport, credentials and application resources. Runtime settings establish shared defaults; agents narrow provider, access, prompt and tool behavior. Use ProfileRuntime when users require separate credentials and workspaces.
diff --git a/crates/openhuman-embed/examples/README.md b/crates/openhuman-embed/examples/README.md
index 0d5fe0819b..32967b925d 100644
--- a/crates/openhuman-embed/examples/README.md
+++ b/crates/openhuman-embed/examples/README.md
@@ -2,7 +2,7 @@
<!-- Generated by scripts/generate-embed-docs.mjs; do not edit. -->
-[Cookbook](../../../gitbooks/developing/embed/cookbook.md)
+[Cookbook](../../../docs/gitbooks/en/developing/embed/cookbook.md)
- [Polling and callback approvals with cancellation](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/approvals.rs): Allow and deny real parked writes, then cancel an in-flight callback without losing its pending request. (offline with loopback stubs; no live path.)
- [Stable capability metadata before and after boot](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/capability_report.rs): Stable capability metadata before and after boot. (offline with loopback stubs; no live path.)
diff --git a/crates/openhuman-embed/src/agent/README.md b/crates/openhuman-embed/src/agent/README.md
index 566ae748d3..92a732efda 100644
--- a/crates/openhuman-embed/src/agent/README.md
+++ b/crates/openhuman-embed/src/agent/README.md
@@ -5,7 +5,7 @@ An agent is one fully described, independently configured participant on a
build step that turns it into a live `Agent`, and the handle the host keeps.
`Runtime::agent` is the only caller of the build step; hosts call `Agent::run`
and `Agent::turn`. See
-[`gitbooks/developing/embedding.md`](../../../../gitbooks/developing/embedding.md)
+[`docs/gitbooks/en/developing/embedding.md`](../../../../docs/gitbooks/en/developing/embedding.md)
for how agents fit into the two-step library API.
## How it works
@@ -191,6 +191,6 @@ cargo test -p openhuman-embed --features inference,mcp,skills --test attached_to
## Further reading
-- [`gitbooks/developing/embedding.md`](../../../../gitbooks/developing/embedding.md): embedding the core in another product.
-- [`gitbooks/developing/architecture/agent-harness.md`](../../../../gitbooks/developing/architecture/agent-harness.md): the agent harness.
+- [`docs/gitbooks/en/developing/embedding.md`](../../../../docs/gitbooks/en/developing/embedding.md): embedding the core in another product.
+- [`docs/gitbooks/en/developing/architecture/agent-harness.md`](../../../../docs/gitbooks/en/developing/architecture/agent-harness.md): the agent harness.
- [`crates/openhuman-embed/README.md`](../../README.md): the openhuman-embed crate README.
diff --git a/crates/openhuman-embed/src/harness/README.md b/crates/openhuman-embed/src/harness/README.md
index b0a29309ad..218c277255 100644
--- a/crates/openhuman-embed/src/harness/README.md
+++ b/crates/openhuman-embed/src/harness/README.md
@@ -6,7 +6,7 @@ inputs. This folder also defines the input types that `Runtime` and
`AgentSpec` share with it: `Access`, `Provider`, `Workspace` and `McpServer`.
Reach for `Runtime` and `AgentSpec` directly once a host needs more than one
agent. See
-[`gitbooks/developing/embedding.md`](../../../../gitbooks/developing/embedding.md)
+[`docs/gitbooks/en/developing/embedding.md`](../../../../docs/gitbooks/en/developing/embedding.md)
for the walkthrough.
## How it works
@@ -121,7 +121,7 @@ A harness identifies as `HostKind::Library` by default, so a `Provider` is
enough for inference: the library host brings its own endpoint and
credentials, without an OpenHuman app login. Managed TinyHumans inference
needs the runtime's API key instead (`RuntimeBuilder::api_key`; see
-[`gitbooks/developing/tinyhumans-api-key.md`](../../../../gitbooks/developing/tinyhumans-api-key.md)).
+[`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md)).
The core can still make non-inference backend calls; `backend_url` points
them at the embedding product's backend, and `session` installs a backend
identity when one is required.
@@ -177,6 +177,6 @@ cargo test -p openhuman-embed --features inference,mcp,skills --test harness_emb
## Further reading
-- [`gitbooks/developing/embedding.md`](../../../../gitbooks/developing/embedding.md): embedding the core in another product.
-- [`gitbooks/developing/architecture/agent-harness.md`](../../../../gitbooks/developing/architecture/agent-harness.md): the agent harness.
+- [`docs/gitbooks/en/developing/embedding.md`](../../../../docs/gitbooks/en/developing/embedding.md): embedding the core in another product.
+- [`docs/gitbooks/en/developing/architecture/agent-harness.md`](../../../../docs/gitbooks/en/developing/architecture/agent-harness.md): the agent harness.
- [`crates/openhuman-embed/README.md`](../../README.md): the openhuman-embed crate README.
diff --git a/crates/openhuman-embed/src/runtime/README.md b/crates/openhuman-embed/src/runtime/README.md
index c60ea5d8dd..1237232b13 100644
--- a/crates/openhuman-embed/src/runtime/README.md
+++ b/crates/openhuman-embed/src/runtime/README.md
@@ -5,9 +5,9 @@ process, then put any number of independently configured agents on it with
`Runtime::agent`. This folder owns the builder that boots the embedded core,
the `Runtime` handle, and the guard that tears the core down when the last
handle goes away. See
-[`gitbooks/developing/embedding.md`](../../../../gitbooks/developing/embedding.md)
+[`docs/gitbooks/en/developing/embedding.md`](../../../../docs/gitbooks/en/developing/embedding.md)
for the walkthrough and
-[`gitbooks/developing/performance.md`](../../../../gitbooks/developing/performance.md)
+[`docs/gitbooks/en/developing/performance.md`](../../../../docs/gitbooks/en/developing/performance.md)
for what many agents on one runtime cost in memory.
## How it works
@@ -112,7 +112,7 @@ crate README's "Still process-owned" list names what agents share, and its
- No backend transport is installed here. `openhuman-tinyhumans`'s
`RuntimeBuilder` ([`crates/openhuman-tinyhumans/src/runtime.rs`](../../../openhuman-tinyhumans/src/runtime.rs)) wraps this
builder and installs the SDK transport on `build()`; see
- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../gitbooks/developing/tinyhumans-api-key.md).
+ [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md).
- The session store port (`SessionStoreProvider`) is defined by
[`vendor/tinyagents`](../../../../vendor/tinyagents/) and the core's `agent::session_store`; the classic
on-disk provider lives in `openhuman-rpc`'s `session_store`.
@@ -145,6 +145,6 @@ cargo test -p openhuman-embed --features inference,mcp,skills runtime::
## Further reading
-- [`gitbooks/developing/embedding.md`](../../../../gitbooks/developing/embedding.md): embedding the core in another product.
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/embedding.md`](../../../../docs/gitbooks/en/developing/embedding.md): embedding the core in another product.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
- [`crates/openhuman-embed/README.md`](../../README.md): the openhuman-embed crate README.
diff --git a/crates/openhuman-embed/tests/README.md b/crates/openhuman-embed/tests/README.md
index f3d4a0bea1..5a9b5639c5 100644
--- a/crates/openhuman-embed/tests/README.md
+++ b/crates/openhuman-embed/tests/README.md
@@ -74,6 +74,6 @@ existing one, and reuse [`common/`](common/) for mocks.
## Further reading
-- [`gitbooks/developing/embedding.md`](../../../gitbooks/developing/embedding.md): embedding the core in another product.
-- [`gitbooks/developing/testing-strategy.md`](../../../gitbooks/developing/testing-strategy.md): testing strategy.
+- [`docs/gitbooks/en/developing/embedding.md`](../../../docs/gitbooks/en/developing/embedding.md): embedding the core in another product.
+- [`docs/gitbooks/en/developing/testing-strategy.md`](../../../docs/gitbooks/en/developing/testing-strategy.md): testing strategy.
- [`crates/openhuman-embed/README.md`](../README.md): the openhuman-embed crate README.
diff --git a/crates/openhuman-rpc/README.md b/crates/openhuman-rpc/README.md
index b1384f1359..b44ec3f121 100644
--- a/crates/openhuman-rpc/README.md
+++ b/crates/openhuman-rpc/README.md
@@ -231,8 +231,8 @@ pnpm debug rust openhuman_rpc
## Further reading
-- [`gitbooks/developing/architecture.md`](../../gitbooks/developing/architecture.md): architecture overview.
-- [`gitbooks/developing/architecture/tauri-shell.md`](../../gitbooks/developing/architecture/tauri-shell.md): the Tauri shell.
-- [`gitbooks/developing/embedding.md`](../../gitbooks/developing/embedding.md): embedding the core in another product.
-- [`gitbooks/developing/testing-strategy.md`](../../gitbooks/developing/testing-strategy.md): testing strategy.
+- [`docs/gitbooks/en/developing/architecture.md`](../../docs/gitbooks/en/developing/architecture.md): architecture overview.
+- [`docs/gitbooks/en/developing/architecture/tauri-shell.md`](../../docs/gitbooks/en/developing/architecture/tauri-shell.md): the Tauri shell.
+- [`docs/gitbooks/en/developing/embedding.md`](../../docs/gitbooks/en/developing/embedding.md): embedding the core in another product.
+- [`docs/gitbooks/en/developing/testing-strategy.md`](../../docs/gitbooks/en/developing/testing-strategy.md): testing strategy.
- [`crates/README.md`](../README.md): crates overview.
diff --git a/crates/openhuman-rpc/src/http_host/README.md b/crates/openhuman-rpc/src/http_host/README.md
index c91f5941ca..f23f074f68 100644
--- a/crates/openhuman-rpc/src/http_host/README.md
+++ b/crates/openhuman-rpc/src/http_host/README.md
@@ -143,5 +143,5 @@ cargo test -p openhuman-rpc http_host
## Further reading
-- [`gitbooks/developing/architecture.md`](../../../../gitbooks/developing/architecture.md): architecture overview.
+- [`docs/gitbooks/en/developing/architecture.md`](../../../../docs/gitbooks/en/developing/architecture.md): architecture overview.
- [`crates/openhuman-rpc/README.md`](../../README.md): the openhuman-rpc crate README.
diff --git a/crates/openhuman-rpc/src/server/README.md b/crates/openhuman-rpc/src/server/README.md
index a0cfce250f..9b9754c5ae 100644
--- a/crates/openhuman-rpc/src/server/README.md
+++ b/crates/openhuman-rpc/src/server/README.md
@@ -272,6 +272,6 @@ cargo test -p openhuman-rpc --features crash-reporting server::
## Further reading
-- [`gitbooks/developing/architecture.md`](../../../../gitbooks/developing/architecture.md): architecture overview.
-- [`gitbooks/developing/architecture/security.md`](../../../../gitbooks/developing/architecture/security.md): security.
+- [`docs/gitbooks/en/developing/architecture.md`](../../../../docs/gitbooks/en/developing/architecture.md): architecture overview.
+- [`docs/gitbooks/en/developing/architecture/security.md`](../../../../docs/gitbooks/en/developing/architecture/security.md): security.
- [`crates/openhuman-rpc/README.md`](../../README.md): the openhuman-rpc crate README.
diff --git a/crates/openhuman-tinyhumans/README.md b/crates/openhuman-tinyhumans/README.md
index 7d82447bcf..d728e87f41 100644
--- a/crates/openhuman-tinyhumans/README.md
+++ b/crates/openhuman-tinyhumans/README.md
@@ -121,7 +121,7 @@ let runtime = RuntimeBuilder::new()
.await?;
```
-See [`gitbooks/developing/tinyhumans-api-key.md`](../../gitbooks/developing/tinyhumans-api-key.md)
+See [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../docs/gitbooks/en/developing/tinyhumans-api-key.md)
for what one TinyHumans API key unlocks across inference, search, embeddings,
media, integrations, voice and Jev.
@@ -275,9 +275,9 @@ pnpm debug rust openhuman_tinyhumans
## Further reading
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
-- [`gitbooks/developing/architecture.md`](../../gitbooks/developing/architecture.md): architecture overview.
-- [`gitbooks/developing/embedding.md`](../../gitbooks/developing/embedding.md): embedding the core in another product.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/architecture.md`](../../docs/gitbooks/en/developing/architecture.md): architecture overview.
+- [`docs/gitbooks/en/developing/embedding.md`](../../docs/gitbooks/en/developing/embedding.md): embedding the core in another product.
- [`crates/README.md`](../README.md): crates overview.
- [`vendor/tinyhumans-sdk/README.md`](../../vendor/tinyhumans-sdk/README.md): tinyhumans-sdk.
- [`src/hosted/announcements/`](src/hosted/announcements/README.md): the `announcements` module README.
diff --git a/crates/openhuman-tinyhumans/src/backend/README.md b/crates/openhuman-tinyhumans/src/backend/README.md
index 391692a6fb..fb48deb373 100644
--- a/crates/openhuman-tinyhumans/src/backend/README.md
+++ b/crates/openhuman-tinyhumans/src/backend/README.md
@@ -153,6 +153,6 @@ cargo test -p openhuman-tinyhumans backend::
## Further reading
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
- [`crates/openhuman-tinyhumans/README.md`](../../README.md): the openhuman-tinyhumans crate README.
- [`vendor/tinyhumans-sdk/README.md`](../../../../vendor/tinyhumans-sdk/README.md): tinyhumans-sdk.
diff --git a/crates/openhuman-tinyhumans/src/hosted/README.md b/crates/openhuman-tinyhumans/src/hosted/README.md
index c91c6654f2..3cc30e495c 100644
--- a/crates/openhuman-tinyhumans/src/hosted/README.md
+++ b/crates/openhuman-tinyhumans/src/hosted/README.md
@@ -181,4 +181,4 @@ cargo test -p openhuman-tinyhumans hosted::
- [`crates/openhuman-tinyhumans/src/hosted/referral/README.md`](referral/README.md): the referral module README.
- [`crates/openhuman-tinyhumans/src/hosted/team/README.md`](team/README.md): the team module README.
- [`crates/openhuman-tinyhumans/src/hosted/webhooks/README.md`](webhooks/README.md): the webhooks module README.
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
diff --git a/crates/openhuman-tinyhumans/src/hosted/announcements/README.md b/crates/openhuman-tinyhumans/src/hosted/announcements/README.md
index 6e0bb9a1ff..f6e6025730 100644
--- a/crates/openhuman-tinyhumans/src/hosted/announcements/README.md
+++ b/crates/openhuman-tinyhumans/src/hosted/announcements/README.md
@@ -60,6 +60,6 @@ as a unit, so this controller and its siblings do not register there.
## Further reading
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
- [`crates/openhuman-tinyhumans/src/hosted/README.md`](../README.md): hosted proxies.
- [`vendor/tinyhumans-sdk/README.md`](../../../../../vendor/tinyhumans-sdk/README.md): tinyhumans-sdk.
diff --git a/crates/openhuman-tinyhumans/src/hosted/billing/README.md b/crates/openhuman-tinyhumans/src/hosted/billing/README.md
index 653c61924f..f229e0c1c4 100644
--- a/crates/openhuman-tinyhumans/src/hosted/billing/README.md
+++ b/crates/openhuman-tinyhumans/src/hosted/billing/README.md
@@ -89,6 +89,6 @@ None of its own; stateless adapter. The only state it reads is the backend crede
## Further reading
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
- [`crates/openhuman-tinyhumans/src/hosted/README.md`](../README.md): hosted proxies.
- [`vendor/tinyhumans-sdk/README.md`](../../../../../vendor/tinyhumans-sdk/README.md): tinyhumans-sdk.
diff --git a/crates/openhuman-tinyhumans/src/hosted/channel_link/README.md b/crates/openhuman-tinyhumans/src/hosted/channel_link/README.md
index c7b7e2d9fb..02c3be20dd 100644
--- a/crates/openhuman-tinyhumans/src/hosted/channel_link/README.md
+++ b/crates/openhuman-tinyhumans/src/hosted/channel_link/README.md
@@ -20,6 +20,6 @@ to answer `BACKEND_UNAVAILABLE:`, since nothing in the core dispatches them any
## Further reading
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
- [`crates/openhuman-tinyhumans/src/hosted/README.md`](../README.md): hosted proxies.
- [`vendor/tinyhumans-sdk/README.md`](../../../../../vendor/tinyhumans-sdk/README.md): tinyhumans-sdk.
diff --git a/crates/openhuman-tinyhumans/src/hosted/oauth/README.md b/crates/openhuman-tinyhumans/src/hosted/oauth/README.md
index 2147198398..8b29dedfdf 100644
--- a/crates/openhuman-tinyhumans/src/hosted/oauth/README.md
+++ b/crates/openhuman-tinyhumans/src/hosted/oauth/README.md
@@ -24,6 +24,6 @@ without `openhuman_tinyhumans::install`.
## Further reading
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
- [`crates/openhuman-tinyhumans/src/hosted/README.md`](../README.md): hosted proxies.
- [`vendor/tinyhumans-sdk/README.md`](../../../../../vendor/tinyhumans-sdk/README.md): tinyhumans-sdk.
diff --git a/crates/openhuman-tinyhumans/src/hosted/referral/README.md b/crates/openhuman-tinyhumans/src/hosted/referral/README.md
index ee113d7c04..62b9746aec 100644
--- a/crates/openhuman-tinyhumans/src/hosted/referral/README.md
+++ b/crates/openhuman-tinyhumans/src/hosted/referral/README.md
@@ -67,6 +67,6 @@ None of its own. The domain is stateless: it reads the backend credential throug
## Further reading
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
- [`crates/openhuman-tinyhumans/src/hosted/README.md`](../README.md): hosted proxies.
- [`vendor/tinyhumans-sdk/README.md`](../../../../../vendor/tinyhumans-sdk/README.md): tinyhumans-sdk.
diff --git a/crates/openhuman-tinyhumans/src/hosted/team/README.md b/crates/openhuman-tinyhumans/src/hosted/team/README.md
index cd26afd0f5..f3cf680136 100644
--- a/crates/openhuman-tinyhumans/src/hosted/team/README.md
+++ b/crates/openhuman-tinyhumans/src/hosted/team/README.md
@@ -90,6 +90,6 @@ None local. State lives in the hosted backend. The only stored value it reads is
## Further reading
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
- [`crates/openhuman-tinyhumans/src/hosted/README.md`](../README.md): hosted proxies.
- [`vendor/tinyhumans-sdk/README.md`](../../../../../vendor/tinyhumans-sdk/README.md): tinyhumans-sdk.
diff --git a/crates/openhuman-tinyhumans/src/hosted/webhooks/README.md b/crates/openhuman-tinyhumans/src/hosted/webhooks/README.md
index 90bfd97e45..224e76643c 100644
--- a/crates/openhuman-tinyhumans/src/hosted/webhooks/README.md
+++ b/crates/openhuman-tinyhumans/src/hosted/webhooks/README.md
@@ -25,6 +25,6 @@ Credentials, error mapping and the no-account short-circuit come from
## Further reading
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
- [`crates/openhuman-tinyhumans/src/hosted/README.md`](../README.md): hosted proxies.
- [`vendor/tinyhumans-sdk/README.md`](../../../../../vendor/tinyhumans-sdk/README.md): tinyhumans-sdk.
diff --git a/crates/openhuman-tinyhumans/src/jev/README.md b/crates/openhuman-tinyhumans/src/jev/README.md
index 46c40c3abd..70e4f13a98 100644
--- a/crates/openhuman-tinyhumans/src/jev/README.md
+++ b/crates/openhuman-tinyhumans/src/jev/README.md
@@ -7,7 +7,7 @@ This module provides `TinyHumansJevRanker`: an embedding retriever cuts the
catalogue to a shortlist, and one Jev `Choice` evaluation picks from it. The
module compiles only with the crate's `jev` feature (on by default).
-See [`gitbooks/developing/jev.md`](../../../../gitbooks/developing/jev.md) for
+See [`docs/gitbooks/en/developing/jev.md`](../../../../docs/gitbooks/en/developing/jev.md) for
what Jev is, the benchmark numbers, and how it compares to plain BM25.
## How it works
@@ -136,6 +136,6 @@ cargo test -p openhuman-tinyhumans jev::
## Further reading
-- [`gitbooks/developing/jev.md`](../../../../gitbooks/developing/jev.md): Jev.
-- [`gitbooks/developing/performance.md`](../../../../gitbooks/developing/performance.md): performance.
+- [`docs/gitbooks/en/developing/jev.md`](../../../../docs/gitbooks/en/developing/jev.md): Jev.
+- [`docs/gitbooks/en/developing/performance.md`](../../../../docs/gitbooks/en/developing/performance.md): performance.
- [`crates/openhuman-tinyhumans/README.md`](../../README.md): the openhuman-tinyhumans crate README.
diff --git a/crates/openhuman-tinyhumans/src/session/README.md b/crates/openhuman-tinyhumans/src/session/README.md
index 3cecf5094d..81f26e4919 100644
--- a/crates/openhuman-tinyhumans/src/session/README.md
+++ b/crates/openhuman-tinyhumans/src/session/README.md
@@ -151,7 +151,7 @@ attribution headers from `ClientHeaders` (`x-sdk-name`, plus
[`crates/openhuman-core/src/security/credentials/`](../../../openhuman-core/src/security/credentials/).
- Library and headless hosts that authenticate with an API key do not need
this module; see
- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../gitbooks/developing/tinyhumans-api-key.md).
+ [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md).
Embedders use `openhuman_embed::Auth`.
## Gotchas
@@ -174,6 +174,6 @@ cargo test -p openhuman-tinyhumans session::
## Further reading
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
-- [`gitbooks/developing/architecture/security.md`](../../../../gitbooks/developing/architecture/security.md): security.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/architecture/security.md`](../../../../docs/gitbooks/en/developing/architecture/security.md): security.
- [`crates/openhuman-tinyhumans/README.md`](../../README.md): the openhuman-tinyhumans crate README.
diff --git a/crates/openhuman-tinyhumans/src/transport/README.md b/crates/openhuman-tinyhumans/src/transport/README.md
index d7fa79d1b4..1ee7a8a0c0 100644
--- a/crates/openhuman-tinyhumans/src/transport/README.md
+++ b/crates/openhuman-tinyhumans/src/transport/README.md
@@ -124,7 +124,7 @@ cargo test -p openhuman-tinyhumans transport::
## Further reading
-- [`gitbooks/developing/tinyhumans-api-key.md`](../../../../gitbooks/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
-- [`gitbooks/developing/architecture.md`](../../../../gitbooks/developing/architecture.md): architecture overview.
+- [`docs/gitbooks/en/developing/tinyhumans-api-key.md`](../../../../docs/gitbooks/en/developing/tinyhumans-api-key.md): running on a TinyHumans API key.
+- [`docs/gitbooks/en/developing/architecture.md`](../../../../docs/gitbooks/en/developing/architecture.md): architecture overview.
- [`crates/openhuman-tinyhumans/README.md`](../../README.md): the openhuman-tinyhumans crate README.
- [`vendor/tinyhumans-sdk/README.md`](../../../../vendor/tinyhumans-sdk/README.md): tinyhumans-sdk.
diff --git a/docs/CONTRIBUTING-BEGINNERS.md b/docs/CONTRIBUTING-BEGINNERS.md
index 5e04fbed5d..6e4427b245 100644
--- a/docs/CONTRIBUTING-BEGINNERS.md
+++ b/docs/CONTRIBUTING-BEGINNERS.md
@@ -341,7 +341,7 @@ For your first contribution, `pnpm dev` is all you need.
| -------------------- | ------------------------------------ | ----------------- |
| UI components | `app/src/` | React, TypeScript |
| Styles / design | `app/src/styles/`, `app/src/index.css` | CSS, Tailwind v4 |
-| Documentation | `*.md` files, `gitbooks/` | Writing |
+| Documentation | `*.md` files, `docs/gitbooks/en/` | Writing |
| Bug fixes (frontend) | `app/src/` | React, TypeScript |
**Avoid for now**: anything under `crates/` (Rust core and Tauri shell) until you're comfortable with the codebase.
@@ -487,6 +487,6 @@ The desktop build requires the full Rust toolchain and vendored Tauri setup. For
- Join the [Discord](https://guild.tinyhumans.ai/) and ask in the contributors channel
- Comment on the issue you're working on
-- Check [`gitbooks/developing/getting-set-up.md`](../gitbooks/developing/getting-set-up.md) for deeper setup docs
+- Check [`docs/gitbooks/en/developing/getting-set-up.md`](../docs/gitbooks/en/developing/getting-set-up.md) for deeper setup docs
Thank you for contributing to OpenHuman!
diff --git a/docs/README.ar.md b/docs/README.ar.md
index e863d00d9c..3a78773fad 100644
--- a/docs/README.ar.md
+++ b/docs/README.ar.md
@@ -143,7 +143,7 @@ irm https://raw.githubusercontent.com/tinyhumansai/openhuman/main/scripts/instal
<h3>مصمم للمطورين</h3>
-<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">البدء السريع مع Rust</a> · <a href="../gitbooks/developing/embed/README.md">دليل التضمين</a> · <a href="../crates/openhuman-embed/examples">أمثلة</a></p>
+<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">البدء السريع مع Rust</a> · <a href="../docs/gitbooks/en/developing/embed/README.md">دليل التضمين</a> · <a href="../crates/openhuman-embed/examples">أمثلة</a></p>
<p>استخدمه كمكتبة Rust: استدعِ وكيلاً كأي دالة أخرى، أو شغّل أسطولاً كاملاً من خادم صغير واحد.</p>
@@ -266,9 +266,9 @@ irm https://raw.githubusercontent.com/tinyhumansai/openhuman/main/scripts/instal
<p align="center">
<picture>
- <source media="(prefers-color-scheme: dark)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
- <source media="(prefers-color-scheme: light)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
- <img alt="SWE-bench Verified run swe-x86-1: OpenHuman against six other harnesses on ten panels" src="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <source media="(prefers-color-scheme: dark)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
+ <source media="(prefers-color-scheme: light)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <img alt="SWE-bench Verified run swe-x86-1: OpenHuman against six other harnesses on ten panels" src="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
</picture>
</p>
@@ -342,7 +342,7 @@ println!("{}", reply.reply);
<div dir="rtl" lang="ar">
-بعد ذلك: [البدء السريع مع Rust](https://tinyhumans.gitbook.io/openhuman/developing/quickstart)، و[دليل التضمين](../gitbooks/developing/embed/README.md)، و[مستندات المطورين](https://tinyhumans.gitbook.io/openhuman/developing).
+بعد ذلك: [البدء السريع مع Rust](https://tinyhumans.gitbook.io/openhuman/developing/quickstart)، و[دليل التضمين](../docs/gitbooks/en/developing/embed/README.md)، و[مستندات المطورين](https://tinyhumans.gitbook.io/openhuman/developing).
---
diff --git a/docs/README.de.md b/docs/README.de.md
index b8651314c9..64c040bfb6 100644
--- a/docs/README.de.md
+++ b/docs/README.de.md
@@ -117,7 +117,7 @@ Die meisten Agent-Harnesses starten pro Agent einen schweren Prozess und senden
<h3>Für Entwickler gebaut</h3>
-<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust-Schnellstart</a> · <a href="../gitbooks/developing/embed/README.md">Einbettungsanleitung</a> · <a href="../crates/openhuman-embed/examples">Beispiele</a></p>
+<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust-Schnellstart</a> · <a href="../docs/gitbooks/en/developing/embed/README.md">Einbettungsanleitung</a> · <a href="../crates/openhuman-embed/examples">Beispiele</a></p>
<p>Nutze es als Rust-Bibliothek: Rufe einen Agenten wie jede andere Funktion auf oder betreibe eine ganze Flotte auf einem kleinen Server.</p>
@@ -224,9 +224,9 @@ OpenHuman denkt die teuersten Teile neu: wie viel Text die KI lesen muss, wie si
<p align="center">
<picture>
- <source media="(prefers-color-scheme: dark)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
- <source media="(prefers-color-scheme: light)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
- <img alt="SWE-bench-Verified-Lauf swe-x86-1: OpenHuman gegen sechs andere Harnesses in zehn Diagrammen" src="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <source media="(prefers-color-scheme: dark)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
+ <source media="(prefers-color-scheme: light)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <img alt="SWE-bench-Verified-Lauf swe-x86-1: OpenHuman gegen sechs andere Harnesses in zehn Diagrammen" src="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
</picture>
</p>
@@ -288,7 +288,7 @@ let reply = agent.run("Summarize what you can see in this directory.").await?;
println!("{}", reply.reply);
```
-Als Nächstes: der [Rust-Schnellstart](https://tinyhumans.gitbook.io/openhuman/developing/quickstart), die [Einbettungsanleitung](../gitbooks/developing/embed/README.md) und die [Entwicklerdokumentation](https://tinyhumans.gitbook.io/openhuman/developing).
+Als Nächstes: der [Rust-Schnellstart](https://tinyhumans.gitbook.io/openhuman/developing/quickstart), die [Einbettungsanleitung](../docs/gitbooks/en/developing/embed/README.md) und die [Entwicklerdokumentation](https://tinyhumans.gitbook.io/openhuman/developing).
---
diff --git a/docs/README.ja-JP.md b/docs/README.ja-JP.md
index 4b4c967815..dce886a70f 100644
--- a/docs/README.ja-JP.md
+++ b/docs/README.ja-JP.md
@@ -117,7 +117,7 @@ macOS と Linux のスクリプトが何を行うかを事前に確認するに
<h3>開発者のために</h3>
-<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust クイックスタート</a> · <a href="../gitbooks/developing/embed/README.md">組み込みガイド</a> · <a href="../crates/openhuman-embed/examples">サンプル</a></p>
+<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust クイックスタート</a> · <a href="../docs/gitbooks/en/developing/embed/README.md">組み込みガイド</a> · <a href="../crates/openhuman-embed/examples">サンプル</a></p>
<p>Rust ライブラリとして使えます。エージェントを普通の関数のように呼び出すことも、小さなサーバー1台でエージェント群をまるごと動かすこともできます。</p>
@@ -224,9 +224,9 @@ OpenHuman は、最もコストのかかる部分を見直しました。AI が
<p align="center">
<picture>
- <source media="(prefers-color-scheme: dark)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
- <source media="(prefers-color-scheme: light)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
- <img alt="SWE-bench Verified の実行 swe-x86-1: OpenHuman と他の6つのハーネスを10のパネルで比較" src="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <source media="(prefers-color-scheme: dark)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
+ <source media="(prefers-color-scheme: light)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <img alt="SWE-bench Verified の実行 swe-x86-1: OpenHuman と他の6つのハーネスを10のパネルで比較" src="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
</picture>
</p>
@@ -288,7 +288,7 @@ let reply = agent.run("Summarize what you can see in this directory.").await?;
println!("{}", reply.reply);
```
-次は、[Rust クイックスタート](https://tinyhumans.gitbook.io/openhuman/developing/quickstart)、[組み込みガイド](../gitbooks/developing/embed/README.md)、[開発者向けドキュメント](https://tinyhumans.gitbook.io/openhuman/developing)をご覧ください。
+次は、[Rust クイックスタート](https://tinyhumans.gitbook.io/openhuman/developing/quickstart)、[組み込みガイド](../docs/gitbooks/en/developing/embed/README.md)、[開発者向けドキュメント](https://tinyhumans.gitbook.io/openhuman/developing)をご覧ください。
---
diff --git a/docs/README.ko.md b/docs/README.ko.md
index d5968859e9..2a3f13e696 100644
--- a/docs/README.ko.md
+++ b/docs/README.ko.md
@@ -117,7 +117,7 @@ macOS와 Linux 스크립트가 무엇을 하는지 미리 보려면 명령 끝
<h3>개발자를 위해 만들었습니다</h3>
-<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust 퀵스타트</a> · <a href="../gitbooks/developing/embed/README.md">임베딩 가이드</a> · <a href="../crates/openhuman-embed/examples">예제</a></p>
+<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust 퀵스타트</a> · <a href="../docs/gitbooks/en/developing/embed/README.md">임베딩 가이드</a> · <a href="../crates/openhuman-embed/examples">예제</a></p>
<p>Rust 라이브러리로 사용하세요. 다른 함수처럼 에이전트를 호출하거나, 작은 서버 하나에서 수많은 에이전트를 실행할 수 있습니다.</p>
@@ -224,9 +224,9 @@ OpenHuman은 비용이 가장 많이 드는 부분을 다시 생각했습니다.
<p align="center">
<picture>
- <source media="(prefers-color-scheme: dark)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
- <source media="(prefers-color-scheme: light)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
- <img alt="SWE-bench Verified 실행 swe-x86-1: OpenHuman과 다른 하네스 6개를 패널 10개로 비교" src="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <source media="(prefers-color-scheme: dark)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
+ <source media="(prefers-color-scheme: light)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <img alt="SWE-bench Verified 실행 swe-x86-1: OpenHuman과 다른 하네스 6개를 패널 10개로 비교" src="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
</picture>
</p>
@@ -288,7 +288,7 @@ let reply = agent.run("Summarize what you can see in this directory.").await?;
println!("{}", reply.reply);
```
-다음으로는 [Rust 퀵스타트](https://tinyhumans.gitbook.io/openhuman/developing/quickstart), [임베딩 가이드](../gitbooks/developing/embed/README.md), [개발자 문서](https://tinyhumans.gitbook.io/openhuman/developing)를 보세요.
+다음으로는 [Rust 퀵스타트](https://tinyhumans.gitbook.io/openhuman/developing/quickstart), [임베딩 가이드](../docs/gitbooks/en/developing/embed/README.md), [개발자 문서](https://tinyhumans.gitbook.io/openhuman/developing)를 보세요.
---
diff --git a/docs/README.md b/docs/README.md
index 5272397fa9..df67ba9265 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,7 +1,7 @@
# docs/
Internal maintainer documentation. Public and contributor docs live in
-`gitbooks/` (navigation in `gitbooks/SUMMARY.md`); agent and contributor rules
+`docs/gitbooks/en/` (navigation in `docs/gitbooks/en/SUMMARY.md`); agent and contributor rules
live in `AGENTS.md` (`CLAUDE.md` is a symlink to it); per-domain design notes
sit beside the code as `crates/openhuman-core/src/<domain>/README.md`.
diff --git a/docs/README.tr.md b/docs/README.tr.md
index 2035d86674..f9418bc1b8 100644
--- a/docs/README.tr.md
+++ b/docs/README.tr.md
@@ -117,7 +117,7 @@ macOS ve Linux betiğinin ne yapacağını önceden görmek için komutun sonuna
<h3>Geliştiriciler için tasarlandı</h3>
-<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust hızlı başlangıç</a> · <a href="../gitbooks/developing/embed/README.md">Gömme rehberi</a> · <a href="../crates/openhuman-embed/examples">Örnekler</a></p>
+<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust hızlı başlangıç</a> · <a href="../docs/gitbooks/en/developing/embed/README.md">Gömme rehberi</a> · <a href="../crates/openhuman-embed/examples">Örnekler</a></p>
<p>Bir Rust kütüphanesi olarak kullanın: bir ajanı herhangi bir işlev gibi çağırın ya da tüm bir filoyu tek bir küçük sunucudan çalıştırın.</p>
@@ -224,9 +224,9 @@ OpenHuman en pahalıya mal olan kısımları yeniden düşünür: yapay zekanın
<p align="center">
<picture>
- <source media="(prefers-color-scheme: dark)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
- <source media="(prefers-color-scheme: light)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
- <img alt="SWE-bench Verified run swe-x86-1: OpenHuman against six other harnesses on ten panels" src="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <source media="(prefers-color-scheme: dark)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
+ <source media="(prefers-color-scheme: light)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <img alt="SWE-bench Verified run swe-x86-1: OpenHuman against six other harnesses on ten panels" src="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
</picture>
</p>
@@ -288,7 +288,7 @@ let reply = agent.run("Summarize what you can see in this directory.").await?;
println!("{}", reply.reply);
```
-Sırada: [Rust hızlı başlangıç](https://tinyhumans.gitbook.io/openhuman/developing/quickstart), [gömme rehberi](../gitbooks/developing/embed/README.md) ve [geliştirici dokümanları](https://tinyhumans.gitbook.io/openhuman/developing).
+Sırada: [Rust hızlı başlangıç](https://tinyhumans.gitbook.io/openhuman/developing/quickstart), [gömme rehberi](../docs/gitbooks/en/developing/embed/README.md) ve [geliştirici dokümanları](https://tinyhumans.gitbook.io/openhuman/developing).
---
diff --git a/docs/README.ur-pk.md b/docs/README.ur-pk.md
index 77aebacf1a..a7883bb5c5 100644
--- a/docs/README.ur-pk.md
+++ b/docs/README.ur-pk.md
@@ -139,7 +139,7 @@ macOS اور Linux کی اسکرپٹ کیا کرے گی، یہ پہلے دیکھ
<h3>ڈیولپرز کے لیے بنایا گیا</h3>
-<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust کوئیک اسٹارٹ</a> · <a href="../gitbooks/developing/embed/README.md">ایمبیڈنگ گائیڈ</a> · <a href="../crates/openhuman-embed/examples">مثالیں</a></p>
+<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust کوئیک اسٹارٹ</a> · <a href="../docs/gitbooks/en/developing/embed/README.md">ایمبیڈنگ گائیڈ</a> · <a href="../crates/openhuman-embed/examples">مثالیں</a></p>
<p>اسے Rust لائبریری کے طور پر استعمال کریں: ایجنٹ کو کسی بھی عام فنکشن کی طرح کال کریں، یا ایک چھوٹے سرور سے پورا بیڑا چلائیں۔</p>
@@ -257,9 +257,9 @@ OpenHuman ان حصوں کو نئے سرے سے سوچتا ہے جن پر سب
<p align="center">
<picture>
- <source media="(prefers-color-scheme: dark)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
- <source media="(prefers-color-scheme: light)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
- <img alt="SWE-bench Verified رن swe-x86-1: OpenHuman بمقابلہ چھ دوسرے ہارنیس، دس پینلز میں" src="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <source media="(prefers-color-scheme: dark)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
+ <source media="(prefers-color-scheme: light)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <img alt="SWE-bench Verified رن swe-x86-1: OpenHuman بمقابلہ چھ دوسرے ہارنیس، دس پینلز میں" src="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
</picture>
</p>
@@ -333,7 +333,7 @@ println!("{}", reply.reply);
<div dir="rtl" lang="ur">
-اگلا قدم: [Rust کوئیک اسٹارٹ](https://tinyhumans.gitbook.io/openhuman/developing/quickstart)، [ایمبیڈنگ گائیڈ](../gitbooks/developing/embed/README.md) اور [ڈیولپر دستاویزات](https://tinyhumans.gitbook.io/openhuman/developing)۔
+اگلا قدم: [Rust کوئیک اسٹارٹ](https://tinyhumans.gitbook.io/openhuman/developing/quickstart)، [ایمبیڈنگ گائیڈ](../docs/gitbooks/en/developing/embed/README.md) اور [ڈیولپر دستاویزات](https://tinyhumans.gitbook.io/openhuman/developing)۔
---
diff --git a/docs/README.zh-CN.md b/docs/README.zh-CN.md
index abe9d176a4..657cbdc101 100644
--- a/docs/README.zh-CN.md
+++ b/docs/README.zh-CN.md
@@ -117,7 +117,7 @@ irm https://raw.githubusercontent.com/tinyhumansai/openhuman/main/scripts/instal
<h3>为开发者而建</h3>
-<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust 快速入门</a> · <a href="../gitbooks/developing/embed/README.md">嵌入指南</a> · <a href="../crates/openhuman-embed/examples">示例</a></p>
+<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/quickstart">Rust 快速入门</a> · <a href="../docs/gitbooks/en/developing/embed/README.md">嵌入指南</a> · <a href="../crates/openhuman-embed/examples">示例</a></p>
<p>把它当作 Rust 库来用:像调用普通函数一样调用智能体,或者在一台小服务器上运行整个集群。</p>
@@ -224,9 +224,9 @@ OpenHuman 重新设计了开销最大的几个环节:AI 要读多少文字、
<p align="center">
<picture>
- <source media="(prefers-color-scheme: dark)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
- <source media="(prefers-color-scheme: light)" srcset="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
- <img alt="SWE-bench Verified 运行 swe-x86-1:OpenHuman 与其他六个框架在十个面板上的对比" src="../gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <source media="(prefers-color-scheme: dark)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1-dark.png" />
+ <source media="(prefers-color-scheme: light)" srcset="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
+ <img alt="SWE-bench Verified 运行 swe-x86-1:OpenHuman 与其他六个框架在十个面板上的对比" src="../docs/gitbooks/en/.gitbook/assets/benchmarks/swe-x86-1.png" />
</picture>
</p>
@@ -288,7 +288,7 @@ let reply = agent.run("Summarize what you can see in this directory.").await?;
println!("{}", reply.reply);
```
-接下来看:[Rust 快速入门](https://tinyhumans.gitbook.io/openhuman/developing/quickstart)、[嵌入指南](../gitbooks/developing/embed/README.md)和[开发者文档](https://tinyhumans.gitbook.io/openhuman/developing)。
+接下来看:[Rust 快速入门](https://tinyhumans.gitbook.io/openhuman/developing/quickstart)、[嵌入指南](../docs/gitbooks/en/developing/embed/README.md)和[开发者文档](https://tinyhumans.gitbook.io/openhuman/developing)。
---
diff --git a/docs/RELEASE-MANUAL-SMOKE.md b/docs/RELEASE-MANUAL-SMOKE.md
index 32c428f04d..753747e921 100644
--- a/docs/RELEASE-MANUAL-SMOKE.md
+++ b/docs/RELEASE-MANUAL-SMOKE.md
@@ -1,6 +1,6 @@
# Release Manual Smoke Checklist
-Run this checklist on every release-cut. Sign-off lives as a GitHub commit comment on the `v<version>-staging` tagged commit that QA validated (paste the checklist with checked items + the sign-off block at the bottom). Before approving the production run, the `Release-Approval` reviewer checks the sign-off exists **and** that the run targets that validated commit (staging SHA passed as `commit_sha`, or separated from the target only by `[skip ci]` version-bump commits). Owns OS-level surfaces that drivers cannot assert — everything else is automated under WDIO, Vitest, or Rust integration tests (see [Testing Strategy](../gitbooks/developing/testing-strategy.md)).
+Run this checklist on every release-cut. Sign-off lives as a GitHub commit comment on the `v<version>-staging` tagged commit that QA validated (paste the checklist with checked items + the sign-off block at the bottom). Before approving the production run, the `Release-Approval` reviewer checks the sign-off exists **and** that the run targets that validated commit (staging SHA passed as `commit_sha`, or separated from the target only by `[skip ci]` version-bump commits). Owns OS-level surfaces that drivers cannot assert — everything else is automated under WDIO, Vitest, or Rust integration tests (see [Testing Strategy](../docs/gitbooks/en/developing/testing-strategy.md)).
This is the **only** acceptable substitute for a `🚫` row in [`TEST-COVERAGE-MATRIX.md`](./TEST-COVERAGE-MATRIX.md). If a feature has neither automated coverage nor an entry on this checklist, treat it as untested and open a coverage gap.
@@ -140,7 +140,7 @@ Use a disposable staging account/workspace and synthetic facts. Keep inference r
### Current stable line
-- [ ] **OAuth gate respects `VITE_MINIMUM_SUPPORTED_APP_VERSION`** (per [Release Policy](../gitbooks/developing/release-policy.md)) — Set the variable to a value above this build's version, build, attempt OAuth from the older binary. Expected: gate blocks the deep link; opens `VITE_LATEST_APP_DOWNLOAD_URL`.
+- [ ] **OAuth gate respects `VITE_MINIMUM_SUPPORTED_APP_VERSION`** (per [Release Policy](../docs/gitbooks/en/developing/release-policy.md)) — Set the variable to a value above this build's version, build, attempt OAuth from the older binary. Expected: gate blocks the deep link; opens `VITE_LATEST_APP_DOWNLOAD_URL`.
- [ ] **Gmail connect succeeds on a fresh install from `releases/latest`** — Per release-policy step 4. Expected: token exchange completes, inbox lists in-app.
---
diff --git a/docs/gitbooks/en/developing/README.md b/docs/gitbooks/en/developing/README.md
index 7be02b16d7..0db6cb51f7 100644
--- a/docs/gitbooks/en/developing/README.md
+++ b/docs/gitbooks/en/developing/README.md
@@ -23,7 +23,7 @@ Everything above that floor is modular. Cargo feature gates decide what compiles
| ----------- | ------------- |
| `app/` | The pnpm workspace `openhuman-app`: the Vite and React frontend ([`app/src/`](https://github.com/tinyhumansai/openhuman/tree/main/app/src)) and the Tauri desktop host ([`crates/openhuman-app/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-app)). |
| `crates/` | Rust crates ([overview](https://github.com/tinyhumansai/openhuman/blob/main/crates/README.md)). Six are workspace members. `openhuman-core` (package `openhuman`) is the core library, with domains under `src/<domain>/` and the controller contract and in-process dispatch under `src/core/`. It has no binary and no JSON-RPC server. `openhuman-rpc` is JSON-RPC 2.0 over the core: envelopes, HTTP client and server. `openhuman-embed` is the typed library facade. `openhuman-tinyhumans` is the only crate that may depend on `tinyhumans-sdk`, and holds the backend transport, hosted RPC proxies and host-side session owner. Every host installs it first. `openhuman-cli` is the `openhuman-core` binary plus every root `tests/` and `examples/` target. `openhuman-tui` is the terminal frontend. The Tauri host, `openhuman-app`, is excluded from the root workspace and builds from its own manifest. |
-| `gitbooks/` | This site, the public docs ([source](https://github.com/tinyhumansai/openhuman/tree/main/gitbooks)). |
+| `docs/gitbooks/en/` | This site, the public docs ([source](https://github.com/tinyhumansai/openhuman/tree/main/gitbooks)). |
| `docs/` | Internal maintainer docs: test-coverage matrix, release smoke checklist, library benchmarking and minimal-recipe notes, translated READMEs and `community/` ([`docs/`](https://github.com/tinyhumansai/openhuman/tree/main/docs)). |
[`AGENTS.md`](https://github.com/tinyhumansai/openhuman/blob/main/AGENTS.md) at the repo root is the source of truth for AI agents working on the codebase. [`CLAUDE.md`](https://github.com/tinyhumansai/openhuman/blob/main/CLAUDE.md) points to it. The same rules apply to humans.
diff --git a/docs/gitbooks/en/developing/architecture.md b/docs/gitbooks/en/developing/architecture.md
index 74c665a1cd..2e6fa2bf26 100644
--- a/docs/gitbooks/en/developing/architecture.md
+++ b/docs/gitbooks/en/developing/architecture.md
@@ -29,7 +29,7 @@ OpenHuman ships for desktop only: Windows, macOS and Linux. Web is not a support
| `crates/openhuman-tui/` | Standalone ratatui terminal frontend. Boots the core in-process via `openhuman_rpc::host::tui` (every domain, no background services), no HTTP. |
| `Cargo.toml` (root) | Virtual workspace for `openhuman-core`, `openhuman-embed`, `openhuman-rpc`, `openhuman-tinyhumans`, `openhuman-cli`, and `openhuman-tui` (`cargo build -p openhuman-cli --bin openhuman-core` builds the standalone CLI/server); `vendor/`, `worktrees/`, `crates/openhuman-app`, `app/src-tauri-mobile`, and `packages/tauri-plugin-ptt` are excluded. Holds the `[patch]` tables for vendored crates. There is no sidecar: the desktop bundle links the core in-process. |
| `crates/openhuman-core/src/skills/` | Skill metadata and run orchestration (`ops_create`, `ops_discover`, `ops_install`, `ops_parse`, `catalog/`, `registry`, `runtime/`, `schemas/`, `types`, `bundled/`, `webhooks/`). Skills contribute metadata and tool descriptors that are injected into agent prompts. Tool execution flows through native Rust handlers and the shell tool for host commands such as Node.js and Python. |
-| `gitbooks/` | This book (public product and contributor documentation). |
+| `docs/gitbooks/en/` | This book (public product and contributor documentation). |
| `docs/` | Internal maintainer documentation (test-coverage matrix, release smoke checklist, library benchmarking notes). |
| `vendor/` | Recursive git submodules for the `tiny*` crate family (`tinyagents`, `tinyflows`, `tinychannels`, `tinyjuice`, `tinymemory`, `tinymcp`, `tinybus`, `tinybox`, `tinycomputer`, `tinydocs`, `tinysearch`, `tinyskills`, `tinyvoice`, `tinywallet`, `tinyhosts`, `tinyconnectors`, `tinyhumans-sdk`). |
diff --git a/docs/gitbooks/en/developing/embed/api-index.json b/docs/gitbooks/en/developing/embed/api-index.json
index 588cd10c7f..9d47453ca2 100644
--- a/docs/gitbooks/en/developing/embed/api-index.json
+++ b/docs/gitbooks/en/developing/embed/api-index.json
@@ -544,53 +544,53 @@
"weight": "custom"
},
"pages": [
- "gitbooks/developing/embed/README.md",
- "gitbooks/developing/embed/api-reference.md",
- "gitbooks/developing/embed/architecture.md",
- "gitbooks/developing/embed/concepts/README.md",
- "gitbooks/developing/embed/concepts/access-approvals.md",
- "gitbooks/developing/embed/concepts/agents.md",
- "gitbooks/developing/embed/concepts/channels.md",
- "gitbooks/developing/embed/concepts/completer.md",
- "gitbooks/developing/embed/concepts/cron.md",
- "gitbooks/developing/embed/concepts/errors.md",
- "gitbooks/developing/embed/concepts/hooks-seams.md",
- "gitbooks/developing/embed/concepts/mcp.md",
- "gitbooks/developing/embed/concepts/memory.md",
- "gitbooks/developing/embed/concepts/observability.md",
- "gitbooks/developing/embed/concepts/profiles-saas.md",
- "gitbooks/developing/embed/concepts/providers.md",
- "gitbooks/developing/embed/concepts/runtime-defaults.md",
- "gitbooks/developing/embed/concepts/runtime.md",
- "gitbooks/developing/embed/concepts/skills.md",
- "gitbooks/developing/embed/concepts/testing.md",
- "gitbooks/developing/embed/concepts/tools.md",
- "gitbooks/developing/embed/concepts/turns-sessions.md",
- "gitbooks/developing/embed/faq.md",
- "gitbooks/developing/embed/guides/README.md",
- "gitbooks/developing/embed/guides/cli-chatbot.md",
- "gitbooks/developing/embed/guides/deploy-server.md",
- "gitbooks/developing/embed/guides/lean-headless.md",
- "gitbooks/developing/embed/guides/mock-backend-testing.md",
- "gitbooks/developing/embed/guides/multi-agent.md",
- "gitbooks/developing/embed/guides/saas-multi-tenant.md",
- "gitbooks/developing/embed/installation.md",
- "gitbooks/developing/embed/integrations/README.md",
- "gitbooks/developing/embed/integrations/channels.md",
- "gitbooks/developing/embed/integrations/composio.md",
- "gitbooks/developing/embed/integrations/local-models.md",
- "gitbooks/developing/embed/integrations/mcp.md",
- "gitbooks/developing/embed/integrations/openai-compatible.md",
- "gitbooks/developing/embed/integrations/storage-drivers.md",
- "gitbooks/developing/embed/integrations/tinyhumans-managed.md",
- "gitbooks/developing/embed/integrations/web-search.md",
- "gitbooks/developing/embed/quickstart.md",
- "gitbooks/developing/embed/troubleshooting.md",
+ "docs/gitbooks/en/developing/embed/README.md",
+ "docs/gitbooks/en/developing/embed/api-reference.md",
+ "docs/gitbooks/en/developing/embed/architecture.md",
+ "docs/gitbooks/en/developing/embed/concepts/README.md",
+ "docs/gitbooks/en/developing/embed/concepts/access-approvals.md",
+ "docs/gitbooks/en/developing/embed/concepts/agents.md",
+ "docs/gitbooks/en/developing/embed/concepts/channels.md",
+ "docs/gitbooks/en/developing/embed/concepts/completer.md",
+ "docs/gitbooks/en/developing/embed/concepts/cron.md",
+ "docs/gitbooks/en/developing/embed/concepts/errors.md",
+ "docs/gitbooks/en/developing/embed/concepts/hooks-seams.md",
+ "docs/gitbooks/en/developing/embed/concepts/mcp.md",
+ "docs/gitbooks/en/developing/embed/concepts/memory.md",
+ "docs/gitbooks/en/developing/embed/concepts/observability.md",
+ "docs/gitbooks/en/developing/embed/concepts/profiles-saas.md",
+ "docs/gitbooks/en/developing/embed/concepts/providers.md",
+ "docs/gitbooks/en/developing/embed/concepts/runtime-defaults.md",
+ "docs/gitbooks/en/developing/embed/concepts/runtime.md",
+ "docs/gitbooks/en/developing/embed/concepts/skills.md",
+ "docs/gitbooks/en/developing/embed/concepts/testing.md",
+ "docs/gitbooks/en/developing/embed/concepts/tools.md",
+ "docs/gitbooks/en/developing/embed/concepts/turns-sessions.md",
+ "docs/gitbooks/en/developing/embed/faq.md",
+ "docs/gitbooks/en/developing/embed/guides/README.md",
+ "docs/gitbooks/en/developing/embed/guides/cli-chatbot.md",
+ "docs/gitbooks/en/developing/embed/guides/deploy-server.md",
+ "docs/gitbooks/en/developing/embed/guides/lean-headless.md",
+ "docs/gitbooks/en/developing/embed/guides/mock-backend-testing.md",
+ "docs/gitbooks/en/developing/embed/guides/multi-agent.md",
+ "docs/gitbooks/en/developing/embed/guides/saas-multi-tenant.md",
+ "docs/gitbooks/en/developing/embed/installation.md",
+ "docs/gitbooks/en/developing/embed/integrations/README.md",
+ "docs/gitbooks/en/developing/embed/integrations/channels.md",
+ "docs/gitbooks/en/developing/embed/integrations/composio.md",
+ "docs/gitbooks/en/developing/embed/integrations/local-models.md",
+ "docs/gitbooks/en/developing/embed/integrations/mcp.md",
+ "docs/gitbooks/en/developing/embed/integrations/openai-compatible.md",
+ "docs/gitbooks/en/developing/embed/integrations/storage-drivers.md",
+ "docs/gitbooks/en/developing/embed/integrations/tinyhumans-managed.md",
+ "docs/gitbooks/en/developing/embed/integrations/web-search.md",
+ "docs/gitbooks/en/developing/embed/quickstart.md",
+ "docs/gitbooks/en/developing/embed/troubleshooting.md",
"crates/openhuman-embed/README.md",
- "gitbooks/developing/embedding.md",
- "gitbooks/developing/embed/cookbook.md",
- "gitbooks/developing/embed/capability-matrix.md",
- "gitbooks/developing/embed/builder-setters.md",
- "gitbooks/developing/embed/api-index.md"
+ "docs/gitbooks/en/developing/embedding.md",
+ "docs/gitbooks/en/developing/embed/cookbook.md",
+ "docs/gitbooks/en/developing/embed/capability-matrix.md",
+ "docs/gitbooks/en/developing/embed/builder-setters.md",
+ "docs/gitbooks/en/developing/embed/api-index.md"
]
}
diff --git a/docs/plans/README.md b/docs/plans/README.md
index f17af11e3d..116abed67c 100644
--- a/docs/plans/README.md
+++ b/docs/plans/README.md
@@ -6,7 +6,7 @@ implement is [`../specs/agent-runtime-upstream-boundary.md`](../specs/agent-runt
A plan here exists because the work spans OpenHuman and one or more vendored
submodules and cannot be owned accurately by a single source directory. Durable
-architecture belongs in [`gitbooks/developing/architecture/`](../../gitbooks/developing/architecture/README.md) and in the
+architecture belongs in [`docs/gitbooks/en/developing/architecture/`](../../docs/gitbooks/en/developing/architecture/README.md) and in the
beside-code `crates/openhuman-core/src/<domain>/README.md` (see [`crates/README.md`](../../crates/README.md)), not here.
## Status, verified 2026-10-07
@@ -22,7 +22,7 @@ because several of those lines no longer hold.
| [`migrate-agent-orchestration-to-tinyagents.md`](./migrate-agent-orchestration-to-tinyagents.md) | **Landed except O6.** `tinyagents-orchestration/src/` holds `subagent/`, `teams/` and `workflow/`; there is no `parallel/`. |
| [`migrate-agent-runtime-to-tinyagents.md`](./migrate-agent-runtime-to-tinyagents.md) | **Live.** Tasks 4, 10 and 11 are outstanding: 25 `task_local!` declarations remain in the core, and `agent/tinyagents/harness_assembly.rs` and `agent/tinyagents/turn_runner.rs` both still exist with live callers. |
| [`migrate-agent-runtime-waves.md`](./migrate-agent-runtime-waves.md) | **Live.** Gate 4 is unmet: [`scripts/ci/agent-runtime-boundary-baseline.json`](../../scripts/ci/agent-runtime-boundary-baseline.json) is still checked in, with 213 baselined violations, and the gate requires it deleted. |
-| [`jev-tool-search-baseline.md`](./jev-tool-search-baseline.md) | **Not a plan.** A dated measurement report (2026-09-22) for `tool_search` ranking. It is linked from the root [`README.md`](../../README.md), [`crates/openhuman-tinyhumans/src/jev/README.md`](../../crates/openhuman-tinyhumans/src/jev/README.md) and [`gitbooks/developing/jev.md`](../../gitbooks/developing/jev.md), so its path is a contract; leave it where it is. |
+| [`jev-tool-search-baseline.md`](./jev-tool-search-baseline.md) | **Not a plan.** A dated measurement report (2026-09-22) for `tool_search` ranking. It is linked from the root [`README.md`](../../README.md), [`crates/openhuman-tinyhumans/src/jev/README.md`](../../crates/openhuman-tinyhumans/src/jev/README.md) and [`docs/gitbooks/en/developing/jev.md`](../../docs/gitbooks/en/developing/jev.md), so its path is a contract; leave it where it is. |
Delete the four landed plans, and the spec with them, once Task 4, Tasks 10 and
11, Gate 4 and O6 are closed. Until then they are the record of what was moved
@@ -51,6 +51,6 @@ python3 -c "import json;print(len(json.load(open('scripts/ci/agent-runtime-bound
## Further reading
-- [Agent harness](../../gitbooks/developing/architecture/agent-harness.md) and the [`agent` domain](../../crates/openhuman-core/src/agent/README.md).
+- [Agent harness](../../docs/gitbooks/en/developing/architecture/agent-harness.md) and the [`agent` domain](../../crates/openhuman-core/src/agent/README.md).
- [`vendor/tinyagents/`](../../vendor/tinyagents) and its repo, [tinyhumansai/tinyagents](https://github.com/tinyhumansai/tinyagents).
- [`AGENTS.md`](../../AGENTS.md) for the submodule ownership rules these plans follow.
diff --git a/gitbooks/.gitbook/assets/benchmarks/swe-x86-1-dark.png b/gitbooks/.gitbook/assets/benchmarks/swe-x86-1-dark.png
deleted file mode 100644
index 7e12cb720c..0000000000
Binary files a/gitbooks/.gitbook/assets/benchmarks/swe-x86-1-dark.png and /dev/null differ
diff --git a/gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png b/gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png
deleted file mode 100644
index 5668907d73..0000000000
Binary files a/gitbooks/.gitbook/assets/benchmarks/swe-x86-1.png and /dev/null differ
diff --git a/gitbooks/.gitbook/assets/demo.png b/gitbooks/.gitbook/assets/demo.png
deleted file mode 100644
index ea63fb287a..0000000000
Binary files a/gitbooks/.gitbook/assets/demo.png and /dev/null differ
diff --git a/gitbooks/.gitbook/assets/image.png b/gitbooks/.gitbook/assets/image.png
deleted file mode 100644
index fb25afeb78..0000000000
Binary files a/gitbooks/.gitbook/assets/image.png and /dev/null differ
diff --git a/gitbooks/.gitbook/assets/orchestration.png b/gitbooks/.gitbook/assets/orchestration.png
deleted file mode 100644
index 93a9131dd3..0000000000
Binary files a/gitbooks/.gitbook/assets/orchestration.png and /dev/null differ
diff --git a/gitbooks/.gitbook/assets/workflows.png b/gitbooks/.gitbook/assets/workflows.png
deleted file mode 100644
index e83e42ae16..0000000000
Binary files a/gitbooks/.gitbook/assets/workflows.png and /dev/null differ
diff --git a/gitbooks/README.md b/gitbooks/README.md
deleted file mode 100644
index 4b16f884c3..0000000000
--- a/gitbooks/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
----
-description: >-
- An open-source AI assistant for your desktop with a persistent memory of your
- life, agent fleets and workflows, and a Rust core small enough to embed.
-icon: diamond
----
-
-# Welcome to OpenHuman
-
-<figure><img src=".gitbook/assets/demo.png" alt=""><figcaption></figcaption></figure>
-
-OpenHuman is an open-source AI assistant for your desktop. It is built to be three things most assistants are not. It is a brain, with a persistent, local, readable memory of your world. It is an orchestrator, with durable agent graphs, visual workflows, sub-agent fleets and [end-to-end encrypted agent-to-agent sessions](features/orchestration.md). And it is a deep researcher, sweeping your data and the web before you finish asking.
-
-It runs on a Rust core inside a Tauri desktop shell and is licensed under GNU GPL3. The source is at [github.com/tinyhumansai/openhuman](https://github.com/tinyhumansai/openhuman).
-
-Most language models are stateless. You send a prompt, get a reply, and the context is gone. Even assistants with "memory" keep a few bullet points, which is a sticky note and not understanding. OpenHuman takes a different approach.
-
-## What you get
-
-- [**Memory you can inspect.**](features/memory.md) Documents (folders, files, links, GitHub, RSS, connected apps), conversations and learnings go into a memory engine, either hosted by TinyHumans or your own CortexDB. The agent answers from it with citations, and a short brief about you opens every new chat. You can see and delete everything stored.
-- [**Third-party integrations.**](features/integrations/README.md) One-click OAuth into Gmail, GitHub, Slack, Notion, Stripe, Calendar, Drive, Linear, Jira and more, across 119 managed toolkits. You do not wire API keys by hand.
-- **An agent built for big data.** [Token compression](features/token-compression.md) shrinks verbose tool output before it reaches the model, so sweeping through six months of email costs single-digit dollars. [Automatic model routing](features/model-routing/README.md) sends each task to the right model under one subscription and one TinyHumans API key. Optional [local AI through Ollama or LM Studio](features/model-routing/local-ai.md) keeps supported work on your device. Every model, embedding, memory and web-search engine is swappable through config.
-- **Fast, cheap decisions.** Before an agent spends a full model call choosing between dozens of tools, a small classifier called Jev scores the options in about 150 milliseconds. It shortlists tools, decides whether any tool is needed, and drives routine browser steps. The expensive model runs only when a task needs it.
-- [**Batteries included.**](features/native-tools/README.md) The default toolbelt has [web search](features/native-tools/web-search.md), a [web scraper](features/native-tools/web-scraper.md), a [coder toolset](features/native-tools/coder.md) (filesystem, git, lint, test, grep), [browser and computer control](features/native-tools/browser-and-computer.md), [cron and scheduling](features/native-tools/cron.md), [memory tools](features/native-tools/memory-tools.md), [agent coordination](features/native-tools/agent-coordination.md) for sub-agents, and [native voice](features/native-tools/voice.md) with speech in, speech out and a live voice agent you can interrupt.
-- [**Workflows.**](features/workflows.md) Describe an automation in chat. The agent proposes a workflow graph, you review it on a canvas and save it. Flows run on schedules or app events, pause at approval gates, resume where they stopped, and keep a step-by-step run history.
-- [**A harness that finishes the job.**](developing/architecture/agent-harness.md) Every turn is checkpointed, so sub-agents pause for your input and resume instead of dying. A circuit breaker stops loops of identical calls and hands back a root-cause summary. Tool failures show up as actionable cards, and every run has a replayable journal with per-call token and cost accounting.
-- **Light enough to run in-process.** The Rust core runs inside the desktop app rather than as background services. We measured 500 agents alive in one process at about 1.77 MiB of marginal memory each. The same core ships as a library ([`crates/openhuman-embed`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-embed), with a [one-key setup](developing/tinyhumans-api-key.md)), so another product can boot a runtime and add agents in a few lines of Rust. See [Performance](developing/performance.md), the public [benchmarks repo](https://github.com/tinyhumansai/openhuman-benchmarks), [Pluggable engines](developing/engines.md) and [Embedding OpenHuman](developing/embedding.md).
-- [**Privacy Mode.**](features/privacy-mode.md) One switch, enforced in the Rust core. Local-only mode blocks every cloud model call and allows only on-device runtimes (Ollama, LM Studio, MLX, or a local OpenAI-compatible server).
-- **Simple and UI-first.** Short onboarding takes you from install to a working agent in a few clicks, with no terminal needed. The agent has [a face](features/mascot/README.md): a desktop mascot that speaks, reacts to its surroundings, remembers you across weeks and keeps thinking in the background.
-
-Together, these make OpenHuman more than a chatbot. It takes in large amounts of personal data at low cost, keeps an evolving understanding of your world, and acts on your behalf.
-
-{% hint style="warning" %}
-OpenHuman is not AGI. It is a step in that direction, with better memory, orchestration and tooling.
-{% endhint %}
-
-## For developers
-
-Start with [Getting set up](developing/getting-set-up.md), then [Building the Rust core](developing/building-rust-core.md) and the [Architecture](developing/architecture/README.md) overview. To use the core from your own Rust product, read [Embedding OpenHuman](developing/embedding.md) and [One TinyHumans API key](developing/tinyhumans-api-key.md). [Loadable modules](developing/loadable-modules.md) covers the native module system, and [Performance and footprint](developing/performance.md) has the numbers. The benchmark rig and results are public at [tinyhumansai/openhuman-benchmarks](https://github.com/tinyhumansai/openhuman-benchmarks).
diff --git a/gitbooks/SUMMARY.md b/gitbooks/SUMMARY.md
deleted file mode 100644
index 540a00a839..0000000000
--- a/gitbooks/SUMMARY.md
+++ /dev/null
@@ -1,155 +0,0 @@
-# Table of contents
-
-## Overview
-
-- [Welcome to OpenHuman](README.md)
-- [Getting Started](overview/getting-started.md)
-- [Roadmap](overview/roadmap.md)
-- [Auto-update](overview/auto-update.md)
-- [Troubleshooting Sign-In](overview/troubleshooting-sign-in.md)
-
-## Guides
-
-- [Guides](guides/README.md)
- - [Create my personal AI assistant](guides/personal-assistant.md)
- - [Use OpenHuman with a local model](guides/local-model.md)
- - [Use multiple local LLM servers](guides/multiple-local-llm-servers.md)
- - [Keep sensitive data private](guides/privacy-sensitive-data.md)
- - [Recover from a failed installation](guides/recover-failed-installation.md)
- - [Move OpenHuman to a new PC](guides/move-to-new-pc.md)
- - [Organize my project folders](guides/organize-project-folders.md)
- - [Create a doctor-specific assistant](guides/doctor-assistant.md)
- - [Create a safe companion for a child](guides/child-safe-companion.md)
-
-## Features
-
-- [Chat](features/chat.md)
-- [Memory](features/memory.md)
-- [Connections](features/connections.md)
-- [Settings](features/settings.md)
-- [The Mascot](features/mascot/README.md)
-- [Third-party Integrations](features/integrations/README.md)
- - [Triggers](features/integrations/triggers.md)
- - [MCP Servers & Skills](features/integrations/mcp-and-skills.md)
-- [The Orchestrator](features/orchestration.md)
-- [Workflows](features/workflows.md)
-- [Messaging Channels](features/channels.md)
-- [Goals & Todos](features/goals-and-todos.md)
-- [Personalization & Self-Learning](features/personalization.md)
-- [Themes & Theme Studio](features/theming.md)
-- [Smart Token Compression](features/token-compression.md)
-- [Automatic Model Routing](features/model-routing/README.md)
- - [Local models & bring your own key](features/model-routing/local-and-byok-models.md)
- - [Local AI (optional)](features/model-routing/local-ai.md)
-- [Native Tools](features/native-tools/README.md)
- - [Web Search](features/native-tools/web-search.md)
- - [Web Scraper](features/native-tools/web-scraper.md)
- - [Coder](features/native-tools/coder.md)
- - [Documents](features/native-tools/documents.md)
- - [Image Tools](features/native-tools/image-tools.md)
- - [Image & Video Generation](features/native-tools/media-generation.md)
- - [Browser & Computer Control](features/native-tools/browser-and-computer.md)
- - [Cron & Scheduling](features/native-tools/cron.md)
- - [Voice](features/native-tools/voice.md)
- - [Memory Tools](features/native-tools/memory-tools.md)
- - [Third-party Integrations](features/native-tools/integrations.md)
- - [Agent Coordination](features/native-tools/agent-coordination.md)
- - [System & Utilities](features/native-tools/system-and-utilities.md)
-- [Notifications & Activity](features/notifications-and-activity.md)
-- [Wallet](features/wallet.md)
-- [Hosting](features/hosting.md)
-- [Billing, Cost & Usage](features/billing-and-usage.md)
-- [iOS Companion](features/ios-companion.md)
-- [Approval Gate](features/approval-gate.md)
-- [Privacy & Security](features/privacy-and-security.md)
- - [Privacy Mode](features/privacy-mode.md)
- - [OS Keyring & Secret Storage](features/os-keyring-and-secret-storage.md)
-- [Platform & Availability](features/platform.md)
-- [Cloud Deploy](features/cloud-deploy.md)
-
-## Developing
-
-- [Overview](developing/README.md)
-- [Rust Quickstart](developing/quickstart.md)
-- [Getting Set Up](developing/getting-set-up.md)
-- [Architecture](developing/architecture/README.md)
- - [Deep Architecture Reference](developing/architecture.md)
- - [Agent Harness](developing/architecture/agent-harness.md)
- - [Flows on TinyAgents](developing/architecture/flows-on-tinyagents.md)
- - [Memory](developing/architecture/memory.md)
- - [Storage](developing/architecture/storage.md)
- - [Process state in shared cores](developing/architecture/process-state.md)
- - [MCP Registry](developing/architecture/mcp-registry.md)
- - [Security](developing/architecture/security.md)
- - [Frontend](developing/architecture/frontend.md)
- - [Tauri Shell](developing/architecture/tauri-shell.md)
-- [Building the Rust Core](developing/building-rust-core.md)
-- [Loadable modules](developing/loadable-modules.md)
-- [Performance and footprint](developing/performance.md)
-- [Pluggable engines](developing/engines.md)
-- [Components](developing/components.md)
-- [Jev](developing/jev.md)
-- [Embedding](developing/embed/README.md)
- - [Installation](developing/embed/installation.md)
- - [Quickstart](developing/embed/quickstart.md)
- - [Embedding architecture](developing/embed/architecture.md)
- - [Concepts](developing/embed/concepts/README.md)
- - [Runtime](developing/embed/concepts/runtime.md)
- - [Runtime defaults](developing/embed/concepts/runtime-defaults.md)
- - [Agents](developing/embed/concepts/agents.md)
- - [Access and approvals](developing/embed/concepts/access-approvals.md)
- - [Providers](developing/embed/concepts/providers.md)
- - [Turns and sessions](developing/embed/concepts/turns-sessions.md)
- - [Tools](developing/embed/concepts/tools.md)
- - [MCP](developing/embed/concepts/mcp.md)
- - [Skills](developing/embed/concepts/skills.md)
- - [Memory](developing/embed/concepts/memory.md)
- - [Cron](developing/embed/concepts/cron.md)
- - [Channels](developing/embed/concepts/channels.md)
- - [Profiles and SaaS](developing/embed/concepts/profiles-saas.md)
- - [Completer](developing/embed/concepts/completer.md)
- - [Hooks and seams](developing/embed/concepts/hooks-seams.md)
- - [Observability](developing/embed/concepts/observability.md)
- - [Testing](developing/embed/concepts/testing.md)
- - [Errors](developing/embed/concepts/errors.md)
- - [Embedding guides](developing/embed/guides/README.md)
- - [CLI chatbot](developing/embed/guides/cli-chatbot.md)
- - [Multiple agents](developing/embed/guides/multi-agent.md)
- - [SaaS with multiple tenants](developing/embed/guides/saas-multi-tenant.md)
- - [Deploy a server](developing/embed/guides/deploy-server.md)
- - [Lean and headless hosts](developing/embed/guides/lean-headless.md)
- - [Test with a mock backend](developing/embed/guides/mock-backend-testing.md)
- - [Embedding integrations](developing/embed/integrations/README.md)
- - [OpenAI-compatible providers and BYOK](developing/embed/integrations/openai-compatible.md)
- - [TinyHumans managed inference](developing/embed/integrations/tinyhumans-managed.md)
- - [Local and custom models](developing/embed/integrations/local-models.md)
- - [MCP servers](developing/embed/integrations/mcp.md)
- - [Composio](developing/embed/integrations/composio.md)
- - [Web search](developing/embed/integrations/web-search.md)
- - [Storage drivers](developing/embed/integrations/storage-drivers.md)
- - [Channels](developing/embed/integrations/channels.md)
- - [Cookbook](developing/embed/cookbook.md)
- - [Embedding API reference](developing/embed/api-reference.md)
- - [API index](developing/embed/api-index.md)
- - [RuntimeBuilder setters](developing/embed/builder-setters.md)
- - [Compiled feature matrix](developing/embed/capability-matrix.md)
- - [Embedding FAQ](developing/embed/faq.md)
- - [Embedding troubleshooting](developing/embed/troubleshooting.md)
-- [SaaS profiles](developing/saas-profiles.md)
-- [One TinyHumans API key](developing/tinyhumans-api-key.md)
-- [Hooks](developing/hooks.md)
-- [MCP Server](developing/mcp-server.md)
-- [Claude Code CLI provider](developing/providers/claude-code.md)
-- [TinyComputer browser on Linux and Docker](developing/tinycomputer-docker.md)
-- [Theming (Token System)](developing/theming.md)
-- [Testing Strategy](developing/testing-strategy.md)
-- [E2E Testing](developing/e2e-testing.md)
-- [Agent Observability](developing/agent-observability.md)
-- [Release Policy](developing/release-policy.md)
-- [AgentBox marketplace deployment (historical)](developing/agentbox-deployment.md)
-- [Chromium Embedded Framework (historical)](developing/cef.md)
-
-## Legal
-
-- [Terms & Conditions](legal/terms-of-use.md)
-- [Privacy Policy](legal/privacy-policy.md)
diff --git a/gitbooks/developing/README.md b/gitbooks/developing/README.md
deleted file mode 100644
index 7be02b16d7..0000000000
--- a/gitbooks/developing/README.md
+++ /dev/null
@@ -1,92 +0,0 @@
----
-description: Build, run, test and ship OpenHuman from source.
-icon: code-branch
----
-
-# Overview
-
-OpenHuman is open source under GPLv3 at [github.com/tinyhumansai/openhuman](https://github.com/tinyhumansai/openhuman). This section is for contributors and anyone running OpenHuman from source.
-
-If you just want to use the app, start with [Getting started](../overview/getting-started.md). If you want to read the architecture, build a feature or land a PR, you are in the right place.
-
----
-
-## Why the harness is light
-
-The core is a Rust library, not a set of services talking over sockets. Agents run in-process, so a turn costs a function call instead of a process boundary or an RPC hop. We measured 500 agents alive at once in one process at roughly 1.77 MiB of marginal memory each. A cold agent turn takes about 100 ms, and a stripped build with only the domains you need can be as small as 51 MiB. [Performance](performance.md) has the numbers and how we got them. The rig that produces them is public at [tinyhumansai/openhuman-benchmarks](https://github.com/tinyhumansai/openhuman-benchmarks).
-
-Everything above that floor is modular. Cargo feature gates decide what compiles in, loadable native modules carry the heavier engines, and config chooses the engines themselves: model providers, embeddings, memory and search. [Pluggable engines](engines.md), [Loadable modules](loadable-modules.md) and [Jev](jev.md) cover that.
-
-## Where things live
-
-| Path | What is there |
-| ----------- | ------------- |
-| `app/` | The pnpm workspace `openhuman-app`: the Vite and React frontend ([`app/src/`](https://github.com/tinyhumansai/openhuman/tree/main/app/src)) and the Tauri desktop host ([`crates/openhuman-app/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-app)). |
-| `crates/` | Rust crates ([overview](https://github.com/tinyhumansai/openhuman/blob/main/crates/README.md)). Six are workspace members. `openhuman-core` (package `openhuman`) is the core library, with domains under `src/<domain>/` and the controller contract and in-process dispatch under `src/core/`. It has no binary and no JSON-RPC server. `openhuman-rpc` is JSON-RPC 2.0 over the core: envelopes, HTTP client and server. `openhuman-embed` is the typed library facade. `openhuman-tinyhumans` is the only crate that may depend on `tinyhumans-sdk`, and holds the backend transport, hosted RPC proxies and host-side session owner. Every host installs it first. `openhuman-cli` is the `openhuman-core` binary plus every root `tests/` and `examples/` target. `openhuman-tui` is the terminal frontend. The Tauri host, `openhuman-app`, is excluded from the root workspace and builds from its own manifest. |
-| `gitbooks/` | This site, the public docs ([source](https://github.com/tinyhumansai/openhuman/tree/main/gitbooks)). |
-| `docs/` | Internal maintainer docs: test-coverage matrix, release smoke checklist, library benchmarking and minimal-recipe notes, translated READMEs and `community/` ([`docs/`](https://github.com/tinyhumansai/openhuman/tree/main/docs)). |
-
-[`AGENTS.md`](https://github.com/tinyhumansai/openhuman/blob/main/AGENTS.md) at the repo root is the source of truth for AI agents working on the codebase. [`CLAUDE.md`](https://github.com/tinyhumansai/openhuman/blob/main/CLAUDE.md) points to it. The same rules apply to humans.
-
----
-
-## Start here
-
-If this is your first time in the repo:
-
-1. [Getting set up](getting-set-up.md): toolchain, dependencies, the Tauri CLI and everything `pnpm dev` needs.
-2. [Building the Rust core](building-rust-core.md): setup for the Rust workspace only, with the pinned toolchain, OS packages and exact `cargo` commands.
-3. [Architecture](architecture.md) and its [overview](architecture/README.md): how the desktop app, the in-process Rust core, the JSON-RPC bridge and the dual sockets fit together. Read this before non-trivial changes.
-4. [Frontend](architecture/frontend.md) and [Tauri shell](architecture/tauri-shell.md): the React app and the desktop host that wraps it.
-5. [MCP server](mcp-server.md): the opt-in stdio MCP mode that exposes OpenHuman search, memory and sub-agent tools to local clients.
-
----
-
-## The core in depth
-
-- [Performance](performance.md): memory per agent, cold-start timing, binary size and how the benchmarks run. The raw rigs and results are in the public [openhuman-benchmarks](https://github.com/tinyhumansai/openhuman-benchmarks) repo.
-- [Pluggable engines](engines.md): how config chooses the LLM, embeddings, memory and web search layers, and what is available for each.
-- [Jev](jev.md): the fast probability model behind tool selection and routine browser decisions.
-- [Embedding OpenHuman](embedding.md) (see also [`crates/openhuman-embed`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-embed)): using `openhuman-embed` to run the core, and any number of agents on it, inside another Rust product. The [Rust quickstart](quickstart.md) walks through it.
-- [SaaS profiles](saas-profiles.md): running the core as a multi-user service behind a gateway, one profile per user, on one node or a cluster with leased profiles.
-- [One TinyHumans API key](tinyhumans-api-key.md): what a single key unlocks, including managed inference, embeddings, web search, media, integrations, voice and Jev.
-
----
-
-## Testing
-
-OpenHuman has three test layers. Know which one your change belongs in. The Rust integration targets are described in [`tests/README.md`](https://github.com/tinyhumansai/openhuman/blob/main/tests/README.md) and the helper scripts in [`scripts/README.md`](https://github.com/tinyhumansai/openhuman/blob/main/scripts/README.md).
-
-- [Testing strategy](testing-strategy.md): when to write Vitest, cargo or WDIO tests.
-- [E2E testing](e2e-testing.md): WDIO and Appium specs, the Linux and macOS setups, and how to run a single spec locally.
-- [Agent observability](agent-observability.md): the artifact capture that makes E2E and agent runs debuggable after the fact.
-
-PRs must reach at least 80% coverage on changed lines. Add tests for new behavior, not just the happy path.
-
----
-
-## Shipping
-
-- [Release policy](release-policy.md): versioning, release cadence, OAuth and installer rules.
-- [Cloud deploy](../features/cloud-deploy.md): deployment when a change crosses the desktop boundary.
-
----
-
-## Going deeper
-
-- [Agent harness](architecture/agent-harness.md): the tinyagents turn loop (checkpointing, circuit breakers, sub-agent handback, journals and replay) and how to extend the tool surface.
-- [Workflows](../features/workflows.md): the tinyflows-backed `flows` domain, with triggers, trust origins, approval-gated runs and the `flows_*` RPC surface.
-- [Loadable modules](loadable-modules.md): native `cdylib` modules the core loads at runtime, and how they are admitted.
-- [Hooks](hooks.md): scripts you own that run before a tool executes, after a file edit or when a turn finishes.
-- [Chromium Embedded Framework](cef.md): design notes from the CEF era. The shell now runs on stock Tauri (Wry).
-
----
-
-## Contributing
-
-- Open issues and PRs at [tinyhumansai/openhuman](https://github.com/tinyhumansai/openhuman). The [`vendor/`](https://github.com/tinyhumansai/openhuman/tree/main/vendor) submodules (tinyagents, tinymemory and others) have their own repos under [tinyhumansai](https://github.com/tinyhumansai).
-- PRs target `main`. Push to your fork, not upstream.
-- Follow [`CONTRIBUTING.md`](https://github.com/tinyhumansai/openhuman/blob/main/CONTRIBUTING.md) and the issue and PR templates.
-- Keep changes focused. A bug fix does not need surrounding cleanup.
-
-Building toward AGI does not have to mean shipping a kernel. Bug fixes, docs, integrations and tests all move the bar.
diff --git a/gitbooks/developing/agent-observability.md b/gitbooks/developing/agent-observability.md
deleted file mode 100644
index 5cc7e850c6..0000000000
--- a/gitbooks/developing/agent-observability.md
+++ /dev/null
@@ -1,134 +0,0 @@
----
-description: >-
- How to see what the app and the agent did: E2E artifacts, the inference
- capture proxy, and Langfuse traces.
-icon: eye
----
-
-# Agent observability
-
-This page covers three ways to see what OpenHuman did. E2E artifacts let a coding agent (Codex, Claude Code, Cursor) inspect the desktop app through the WDIO harness (see [E2E testing](e2e-testing.md)). The capture proxy shows what the core sent to inference. Langfuse traces cover real agent runs.
-
-The E2E layer is narrow on purpose. It covers one onboarding and privacy flow and saves screenshots, page-source dumps and mock backend request logs to disk.
-
-## Quick start
-
-```bash
-bash app/scripts/e2e-agent-review.sh
-```
-
-Artifacts land under:
-
-```text
-app/test/e2e/artifacts/<ISO-timestamp>-agent-review/
- 01-welcome.png
- 01-welcome.source.xml
- 02-post-welcome.png
- 02-post-welcome.source.xml
- 03-post-onboarding.png
- 03-post-onboarding.source.xml
- 04-privacy-panel.png
- 04-privacy-panel.source.xml
- mock-requests-after-welcome.json
- mock-requests-after-onboarding.json
- mock-requests-after-privacy.json
- failure-<test>.png # only on failure
- failure-<test>.source.xml # only on failure
- meta.json # run metadata + checkpoint index
-```
-
-The script prints the resolved artifact directory at the end.
-
-## Pieces
-
-| Piece | Path | Role |
-| ---------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
-| Helper | `app/test/e2e/helpers/artifacts.ts` | Run dir, `captureCheckpoint`, `captureFailureArtifacts`, `saveMockRequestLog` |
-| WDIO hook | `app/test/wdio.conf.ts` (`afterTest`) | Always dumps screenshot + source on any failing test |
-| Canonical spec | `app/test/e2e/specs/agent-review.spec.ts` | Welcome, onboarding, then the privacy panel, with named checkpoints |
-| Wrapper script | `app/scripts/e2e-agent-review.sh` | Build + run + print artifact dir |
-| Stable selectors | `data-testid` on `OnboardingNextButton`, `Onboarding` overlay + skip button, `WelcomeStep`, `PrivacyPanel` | Agent-reliable navigation anchors |
-
-## Environment overrides
-
-| Variable | Effect |
-| -------------------- | ------------------------------------------------------------------------------------------- |
-| `E2E_ARTIFACT_DIR` | Force a specific run dir (skips auto-timestamped name) |
-| `E2E_ARTIFACT_ROOT` | Parent dir for auto-generated run dirs (default: `app/test/e2e/artifacts`) |
-| `E2E_ARTIFACT_LABEL` | Label used in the auto-generated run dir name (default: `run`; wrapper sets `agent-review`) |
-
-## Using the helper from new specs
-
-```ts
-import { captureCheckpoint, saveMockRequestLog } from "../helpers/artifacts";
-import { getRequestLog } from "../mock-server";
-
-await captureCheckpoint("after-connect-click");
-saveMockRequestLog("after-connect-click", getRequestLog());
-```
-
-`captureCheckpoint` numbers captures so the run dir reads chronologically.
-`captureFailureArtifacts` is wired into `wdio.conf.ts` and fires
-automatically on any failing test. Specs should not call it directly.
-
-## Inference on the wire: the capture proxy
-
-Logs tell you a turn was slow. They do not tell you what the harness sent or
-which endpoint answered. `scripts/debug/capture-first-inference.mjs`
-(`pnpm debug capture`) is a loopback proxy between the core and its inference
-backend that records both sides:
-
-```bash
-CAPTURE_ALL=1 pnpm debug capture # listens on 127.0.0.1:18765
-# then, in another shell, point a core at it:
-BACKEND_URL=http://127.0.0.1:18765 ./target/debug/openhuman-core run --port 7799
-# or set api_url = "http://127.0.0.1:18765" in the user's config.toml
-```
-
-Every inference request body is written, numbered, under
-`target/debug-logs/inference-sequence/` (the exact system prompt, tool
-schemas and `prompt_cache_key` the harness assembled), and every response
-yields one summary line and one JSONL record in
-`target/debug-logs/inference-capture.jsonl`:
-
-```text
-[capture] #000 200 model=z-ai/glm-5.3-flash msgs=2 tools=19 served_by=StreamLake ttfb=7.38s total=8.43s prompt=12344 cached=12288 cache_key=tap-25675927a3f2160d
-```
-
-`CAPTURE_UPSTREAM=https://openrouter.ai` captures a direct BYOK OpenRouter
-route instead of the hosted backend. Non-2xx response bodies are saved next to
-the request dumps so an HTML 503 from an ingress is not lost behind a generic
-"model error".
-
-Across the turns of one thread, check three things. `cache_key` must stay
-identical, because it is the harness's stable-prefix fingerprint and
-OpenRouter's sticky-routing key. `served_by` should not change. `cached`
-should approach `prompt` from the second call on. A drift in any of them has
-been a real bug.
-
-The proxy binds loopback only. It refuses a plaintext non-loopback upstream
-unless you override that, because it forwards the bearer token verbatim.
-`--help` lists every `CAPTURE_*` option.
-
-## Production agent traces
-
-Everything above is about local artifacts. For a real agent run, the
-core can export trace spans to Langfuse instead: when
-`observability.share_usage_data` is on (the default), a completed run's spans
-go to the OpenHuman backend's Langfuse ingestion proxy over the same session
-bearer every other backend call uses, and the backend forwards them to
-Langfuse with the project keys injected server-side. Clients never hold
-Langfuse credentials directly. Prompt and reply text ride along only while
-`observability.agent_tracing.capture_content` is also on; turning it off keeps
-metadata (names, timings, token and cost figures) but drops content. See
-`crates/openhuman-core/src/agent/progress_tracing/langfuse.rs` and
-`crates/openhuman-core/src/config/schema/observability.rs`.
-
-## Out of scope for the E2E layer
-
-- Visual baselines and image diffs across every component state.
-- Screenshot capture on every click (too noisy).
-- Live integrations (Gmail, Notion, Telegram); mock server only.
-- A new test framework or reporter.
-
-Add more flows only after this loop proves itself.
diff --git a/gitbooks/developing/agentbox-deployment.md b/gitbooks/developing/agentbox-deployment.md
deleted file mode 100644
index 7f79fafc84..0000000000
--- a/gitbooks/developing/agentbox-deployment.md
+++ /dev/null
@@ -1,88 +0,0 @@
----
-description: >-
- The removed AgentBox container surface, kept for anyone debugging an older
- build.
-icon: box-archive
----
-
-# AgentBox deployment (removed)
-
-OpenHuman once shipped a container surface for the GMI Cloud AgentBox marketplace. It is gone from `openhuman-core`. A regression test, `agentbox_run_and_jobs_paths_are_no_longer_public` in `crates/openhuman-rpc/src/server/auth_tests.rs`, checks that `/run` and `/jobs/{job_id}` no longer exist.
-
-`OPENHUMAN_AGENTBOX_MODE` has no reader left in `crates/openhuman-core/src`. The Dockerfile and `.env.example` still mention it, and those mentions are stale. If you need to run OpenHuman on AgentBox today, ask the team that owns the GMI Cloud deployment where that surface lives now.
-
-The rest of this page describes how the old surface worked. Read it only if you are debugging an older build that still has it.
-
-## Container contract
-
-With `OPENHUMAN_AGENTBOX_MODE=1`, the core HTTP server exposed three routes:
-
-- `POST /run` accepts work and returns `202 { "job_id": "<uuid>" }`. The body is `{ "payload": { "message": "<string>", "thread_id": "<optional string>" } }`.
-- `GET /jobs/{job_id}` returns `{ "status": "pending|running|completed|failed", "result": ..., "error": ... }`.
-- `GET /health` is a liveness check.
-
-`/run` and `/jobs/*` were unauthenticated at the container boundary. AgentBox's edge handled auth before traffic reached the container.
-
-## Registering in the AgentBox console
-
-The console has a four-step wizard.
-
-1. **Basic info.** Name it `OpenHuman` and add a description.
-2. **Infrastructure.** Pick the Docker image source, compute tier and region. Turn on the "GMI MaaS" toggle so the platform injects `GMI_MAAS_BASE_URL` and `GMI_MAAS_API_KEY` at runtime.
-3. **Env variables.** Set these:
- - `OPENHUMAN_AGENTBOX_MODE=1`
- - `OPENHUMAN_AGENTBOX_JOB_TIMEOUT_SECS` (optional, default 600)
- - `GMI_MODELS`, the marketplace-approved model id, for example `deepseek-ai/DeepSeek-V4-Pro`
- - `OPENHUMAN_WORKSPACE`, a writable container path such as `/home/openhuman/.openhuman`
- - `RUST_LOG=info` (use `debug` for the first deploy)
-4. **Review and register.** Confirm, then test from the console panel.
-
-The platform API key is shown once, on the registration confirmation screen. Save it to your secrets manager right away. The console cannot show it again.
-
-## Pushing the image
-
-Build from `main` with the existing `Dockerfile` and push to your registry:
-
-```bash
-docker build -t <registry>/openhuman-core:<tag> .
-docker push <registry>/openhuman-core:<tag>
-```
-
-The first deploy takes 10 to 25 minutes to reach `running`. Later deploys are faster.
-
-## Long-running requests
-
-AgentBox treats requests over 2 minutes as long-running, so OpenHuman used polling. The agent ran inside a worker task, capped by `OPENHUMAN_AGENTBOX_JOB_TIMEOUT_SECS` (10 minutes by default). There was no streaming.
-
-A polling client should:
-
-1. Send `POST /run` and keep the `job_id`.
-2. Call `GET /jobs/{job_id}` every 1 to 3 seconds.
-3. Stop when `status` is `completed` or `failed`.
-
-Finished jobs were kept for one hour, then garbage-collected. A long pause between polling and reading can return `404`.
-
-## Local smoke test
-
-```bash
-OPENHUMAN_AGENTBOX_MODE=1 \
-GMI_MAAS_BASE_URL=https://api.gmi-serving.com \
-GMI_MAAS_API_KEY=sk-... \
-GMI_MODELS=deepseek-ai/DeepSeek-V4-Pro \
-./target/debug/openhuman-core serve &
-
-curl -X POST http://127.0.0.1:7788/run \
- -H 'content-type: application/json' \
- -d '{"payload":{"message":"hello"}}'
-
-# Then poll the returned job_id:
-curl http://127.0.0.1:7788/jobs/<job_id>
-```
-
-## Troubleshooting
-
-- `404 job not found` after a successful submit: the one-hour retention window passed, or the container restarted. The job store was in memory only.
-- `status: "failed"` with `error: "agentbox: agent runtime bridge not wired"`: you are on a build from before the runtime bridge landed. Rebuild from a current `main`.
-- `status: "failed"` with `error: "job timeout after Ns"`: the agent ran past `OPENHUMAN_AGENTBOX_JOB_TIMEOUT_SECS`. Raise it on the next deploy.
-- `[agentbox::gmi] not registering GMI MaaS provider: missing/blank: GMI_MAAS_API_KEY`: the platform did not inject the key. Check the MaaS toggle in step 2 of the wizard.
-- `[agentbox::gmi] current-thread runtime detected, skipping provider registration`: the core booted in a single-threaded tokio runtime. Use the standard `serve` subcommand, which starts a multi-thread runtime.
diff --git a/gitbooks/developing/architecture.md b/gitbooks/developing/architecture.md
deleted file mode 100644
index 74c665a1cd..0000000000
--- a/gitbooks/developing/architecture.md
+++ /dev/null
@@ -1,382 +0,0 @@
----
-description: >-
- The full architecture reference for the OpenHuman codebase: repo layout,
- runtime, sockets, skills, memory, security and the iOS client.
-icon: code-branch
----
-
-# Architecture
-
-OpenHuman is a personal AI assistant built on Rust. It has a persistent memory, stored in CortexDB (hosted by TinyHumans or your own), and an agent harness that can act across your connected services.
-
-OpenHuman is a Rust core that runs agent turns, keeps a pluggable memory engine, and runs tools against memory, channels, integrations and (for users who opt in) a wallet. A single React and Rust (Tauri) codebase wraps it. Node.js and Python commands use the host toolchain on `PATH`. The stack also includes persistent Rust-native WebSocket infrastructure to the backend, a native Rust tool-dispatch path, and a Model Context Protocol (MCP) server for external clients.
-
-OpenHuman ships for desktop only: Windows, macOS and Linux. Web is not a supported target. Android and iOS exist as experimental clients with their own build and publish workflows (`android-compile.yml`, `ios-appstore.yml`). They are not part of the shipped desktop host and are not product-ready.
-
----
-
-## Repository layout (monorepo)
-
-| Path | Contents |
-| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `app/` | pnpm workspace `openhuman-app`: Vite/React UI (`app/src/`), Vitest and WDIO tests. The Tauri shell itself is the Rust crate `crates/openhuman-app/` (below). |
-| `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. The hosted backend is reached through the `backend::transport::BackendTransport` port, except hosted memory, which `vendor/tinymemory`'s own HTTP client calls (see `memory/engine.rs`). Flat domain modules directly under `src/` (`agent`, `backend`, `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-tinyhumans/` | The TinyHumans layer above embed: `SdkBackendTransport` (the only crate that depends on the vendored `tinyhumans-sdk`), `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. |
-| `Cargo.toml` (root) | Virtual workspace for `openhuman-core`, `openhuman-embed`, `openhuman-rpc`, `openhuman-tinyhumans`, `openhuman-cli`, and `openhuman-tui` (`cargo build -p openhuman-cli --bin openhuman-core` builds the standalone CLI/server); `vendor/`, `worktrees/`, `crates/openhuman-app`, `app/src-tauri-mobile`, and `packages/tauri-plugin-ptt` are excluded. Holds the `[patch]` tables for vendored crates. There is no sidecar: the desktop bundle links the core in-process. |
-| `crates/openhuman-core/src/skills/` | Skill metadata and run orchestration (`ops_create`, `ops_discover`, `ops_install`, `ops_parse`, `catalog/`, `registry`, `runtime/`, `schemas/`, `types`, `bundled/`, `webhooks/`). Skills contribute metadata and tool descriptors that are injected into agent prompts. Tool execution flows through native Rust handlers and the shell tool for host commands such as Node.js and Python. |
-| `gitbooks/` | This book (public product and contributor documentation). |
-| `docs/` | Internal maintainer documentation (test-coverage matrix, release smoke checklist, library benchmarking notes). |
-| `vendor/` | Recursive git submodules for the `tiny*` crate family (`tinyagents`, `tinyflows`, `tinychannels`, `tinyjuice`, `tinymemory`, `tinymcp`, `tinybus`, `tinybox`, `tinycomputer`, `tinydocs`, `tinysearch`, `tinyskills`, `tinyvoice`, `tinywallet`, `tinyhosts`, `tinyconnectors`, `tinyhumans-sdk`). |
-
-The desktop app's webview loads the UI from `app/`. RPC, agents and skills run in the `openhuman_core` core, hosted in-process as a tokio task by the Tauri shell (`crates/openhuman-app/src/core_process.rs`, `openhuman_rpc::host::desktop`) and reachable over loopback HTTP. The renderer's `coreRpcClient` `fetch()`es `http://127.0.0.1:<port>/rpc` directly. The `relay_http_rpc` Tauri command (backed by `openhuman_rpc::post_json_rpc`) is only the fallback for non-loopback plain-`http://` runtimes that the webview would block as mixed content. The standalone `openhuman-core serve` binary is the CLI/debug path.
-
-### Crate layering
-
-The Rust crates form a strict chain. Each crate's normal dependencies name only
-the layer directly below it, and the three hosts name `openhuman-rpc` alone:
-
-```text
- openhuman-app openhuman-cli openhuman-tui
- (desktop shell) (openhuman-core) (terminal UI)
- \ | /
- +-------------------+-------------------+
- |
- v
- openhuman-rpc host::{desktop, cli, tui},
- | JSON-RPC server + client,
- | session store
- v
- openhuman-tinyhumans SDK transport, hosted
- | proxies, session owner
- v
- openhuman-embed Runtime/RuntimeBuilder,
- | process helpers, facades
- v
- openhuman-core domains, registry, ports
-```
-
-- **Hosts boot through `openhuman_rpc::host`.** `host::desktop` is the shell's
- embedded server, `host::cli` the `openhuman-core` binary (and the shell's
- `core` / `mcp` subcommands), `host::tui` the terminal UI's runtime. Each one
- connects the TinyHumans layer and builds an embed `Runtime`; there is one per
- process.
-- **Hosts reach the core only through the curated facade** rpc re-exports
- (`openhuman_rpc::embed`, `openhuman_rpc::tinyhumans`). The layers above embed
- use embed's doc-hidden `__host` list for the server and transport internals;
- hosts never do.
-- **Enforced in CI.** `scripts/ci/check-crate-chain.mjs` (part of
- `pnpm rust:layout`) fails on any other normal-dependency edge and on a host
- `src/` naming `__host`, `core_host` or `openhuman_core::`.
- `scripts/ci/check-feature-forwarding.mjs` checks that every gate travels the
- same chain. Dev-dependencies are exempt, so the root tests still reach into
- the core.
-
----
-
-## Platform reach
-
-Supported today: desktop on Windows, macOS and Linux, with native installers.
-
-Not supported yet: Android, iOS and a standalone web client. They may exist as experimental targets in the repo, but they are not product-ready.
-
-```text
- OpenHuman (shipping)
- |
- Desktop
- / | \
- Windows macOS Linux
- x64 x64 x64
- ARM64 ARM64 ARM64
-```
-
-Tauri v2 compiles the Rust core into native binaries per platform, embedding the React frontend as a lightweight WebView. Desktop builds produce `.dmg`, `.msi`, `.AppImage` and `.deb` installers. Mobile and web stay out of scope until they are documented as supported.
-
----
-
-## High-level architecture
-
-```text
-+------------------------------------------------------------------+
-| React Frontend |
-| Redux Toolkit | coreRpcClient (fetch) | Socket.IO client | UI |
-+------------------------------------------------------------------+
- | HTTP JSON-RPC (loopback) | Socket.IO (loopback)
- | Tauri IPC (windows, hotkeys, relay_http_rpc fallback)
-+------------------------------------------------------------------+
-| Rust Core (openhuman_core) |
-| |
-| +------------------+ +------------------+ +-----------------+ |
-| | Agent harness | | Socket Manager | | Memory (v2) | |
-| | (tinyagents) | | (client to | | + encryption | |
-| | + tool dispatch | | backend, WS) | | at rest | |
-| +------------------+ +------------------+ +-----------------+ |
-| |
-| +------------------+ +------------------+ +-----------------+ |
-| | Skill metadata | | Cron Scheduler | | Session & Auth | |
-| | & tool registry | | (`cron` domain) | | Management | |
-| +------------------+ +------------------+ +-----------------+ |
-| |
-| +------------------+ +------------------+ +-----------------+ |
-| | Channel | | SQLite Storage | | OS Keychain | |
-| | integrations | | (rusqlite) | | Integration | |
-| +------------------+ +------------------+ +-----------------+ |
-+------------------------------------------------------------------+
- |
- +-----------+-----------+
- | |
- TinyHumans backend External APIs
- (Socket.IO + REST) (Telegram, etc.)
-```
-
-The frontend talks to the Rust core in two ways. Tauri IPC carries shell commands (windows, hotkeys, and the `relay_http_rpc` HTTP relay used only for non-loopback plain-`http://` runtimes). HTTP JSON-RPC over loopback carries business logic and tools. The core also serves a Socket.IO bridge for live events such as chat streaming and notifications.
-
-The core owns the outbound persistent connection to the TinyHumans backend, the memory engine binding (memory items are stored in CortexDB, not on the device) and tool execution. Agent turns run through the `tinyagents` harness. Tools dispatch through native Rust handlers and the shell tool, which runs host commands such as Node.js and Python under the `security/` sandbox policy. Skills do not execute in-process. The `crates/openhuman-core/src/skills/` domain contributes metadata and tool descriptors that get injected into agent prompts. External MCP clients (Claude Desktop, Cursor, Zed) reach the same tool surface over a separate stdio MCP server. See [MCP server](mcp-server.md).
-
----
-
-## Performance
-
-OpenHuman uses Tauri and Rust instead of Electron for performance and security. See [Performance](performance.md) for measured numbers (agents per process, cold start, binary size). The table below is qualitative.
-
-| Metric | OpenHuman (Tauri + Rust) | Typical Electron App |
-| ------------------------- | -------------------------------------------------------------------------- | ---------------------------------------- |
-| Binary size | Feature-dependent (native Wry webview; no bundled Chromium) | ~150 MB+ |
-| Memory per tool execution | Native Rust (no per-tool VM); host Node.js and Python are available through shell | ~150 MB+ (Chromium renderer per process) |
-| Cold startup | Sub-500ms | 2-5 seconds |
-| Garbage collection pauses | None (Rust ownership model) | V8 GC pauses |
-| Memory safety | Compile-time guaranteed | Runtime exceptions |
-| TLS implementation | rustls (no OpenSSL dependency) | Chromium's BoringSSL |
-
-People run OpenHuman next to other heavy apps such as browsers, IDEs and chat clients. A native binary with a fast start stays out of the way instead of competing for CPU and memory. With no GC pauses, background work such as memory writes and socket events does not stall.
-
-The Tokio async runtime drives all I/O: WebSocket connections, HTTP requests, file operations and inter-skill communication, all as non-blocking tasks on a thread pool. Thousands of concurrent operations (skill executions, cron jobs, socket events) share a small fixed set of OS threads.
-
----
-
-## Real-time socket infrastructure
-
-OpenHuman uses two socket clients: a Rust-native WebSocket client on desktop and a JavaScript Socket.io client on web. The Rust client survives app backgrounding, works independently of the webview, and handles TLS through rustls.
-
-```text
-Desktop Mode: Web Mode:
-
-+-------------+ +-------------+
-| React UI | | React UI |
-+------+------+ +------+------+
- | Tauri IPC | Direct
-+------+------+ +------+------+
-| Rust Socket | | JS Socket |
-| Manager | | .io Client |
-+------+------+ +------+------+
- | tokio-tungstenite | Socket.io
- | + rustls TLS | (websocket/polling)
-+------+------+ +------+------+
-| Backend | | Backend |
-+-------------+ +-------------+
-```
-
-The Rust socket manager implements Engine.IO v4 and Socket.IO v4 framing over a raw WebSocket. On handshake it connects, waits for the Engine.IO OPEN frame (which carries `sid`, `pingInterval`, `pingTimeout`), then sends the Socket.IO CONNECT with JWT auth and waits for the ACK. To keep the link alive, it answers each Engine.IO PING with a PONG. It treats the connection as dead after `pingInterval + pingTimeout + 5s` (50 seconds with the defaults). Reconnection backs off exponentially from 1 second to a 30-second cap. The delay resets to 1 second when an established connection is lost, and keeps growing if a connection was never established. Because the client is plain Rust `reqwest` rather than a browser fetch, it also sidesteps CORS.
-
-The socket connection is shared across the process rather than opened per skill or per tool, so events are routed to the right handler over async message channels instead of paying a new connection each time.
-
----
-
-## Skills
-
-Skills are `SKILL.md` packages (metadata, instructions, and optional bundled scripts and resources) that extend the agent with reusable workflows.
-
-Three domains share the work:
-
-| Domain | Role |
-| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `crates/openhuman-core/src/skills/` | Skill metadata: create/discover/install/parse `SKILL.md` and inject descriptors into agent prompts (`ops_create`, `ops_discover`, `ops_install`, `ops_parse`, `registry`, `tools`). |
-| `crates/openhuman-core/src/skills/catalog/` | Registry of installed skills. |
-| `crates/openhuman-core/src/skills/runtime/` | Execution of installed `SKILL.md` workflows: starts/cancels runs, reads run metadata/logs, resolves language runtimes. The orchestrator runs an installed skill itself through `run_workflow`. |
-
-Skill discovery uses `SKILL.md` plus optional bundled resources:
-
-| Field | Purpose |
-| ----------------- | ------------------------------ |
-| `name` | Human-readable display name |
-| `description` | Trigger/selection summary |
-| `metadata.id` | Stable skill slug when present |
-| `allowed-tools` | Tool allowlist guidance |
-| bundled resources | scripts, references, assets |
-
-Script-backed skills run through the shell tool and use the host `node` and `python3` executables on `PATH`. Execution is gated by the `security/` sandbox policy like any other tool.
-
-Recurring work belongs to the `cron` domain (with `scheduler_gate`), not to skills. There is no per-skill cron handler.
-
----
-
-## AI and tool protocol (MCP)
-
-OpenHuman implements the Model Context Protocol on both sides of the connection. As a client, the core browses registries, connects servers declared in `mcp.json`, and offers their tools through the native tool registry; see [MCP registry](architecture/mcp-registry.md). As a server, `openhuman-core mcp` exposes OpenHuman's curated tools over stdio or Streamable HTTP; see [MCP server](mcp-server.md).
-
-MCP protocol, transport, registry, and server-session behavior run inside the TinyMCP TinyBus module. OpenHuman links the `tinymcp-bus` contract and keeps product configuration, credentials, proxy policy, approvals, prompt-injection admission, and typed host callbacks. Its configured module client keeps object paths private and retains lifecycle receipts across cancellation or lost replies. For HTTP DELETE, the host drains and joins an in-flight callback only after the module accepts the close; a rejected DELETE leaves the session available. This keeps product policy in the host while protocol state and transport behavior remain module-owned.
-
-## Memory
-
-Memory is three operations (recall, fetch, store) over a pluggable engine. The engine is either `tinyhumans` (hosted CortexDB behind the backend's `/memory/*` routes, which needs a session or TinyHumans API key) or `cortexdb` (your own endpoint and key). With neither, memory is off. Items live in CortexDB. Only bookkeeping (job queue, sync/import state) is written under `<workspace>/memory/`. The contract and engines live in `vendor/tinymemory`, which is three crates: `tinymemory-api` (the contract, no I/O), `tinymemory-tools` (the agent surface and lifecycle over any engine) and `tinymemory-integrations` (everything that touches the outside world, one Cargo feature per module). OpenHuman's `crates/openhuman-core/src/memory/` keeps the host side: engine binding, ops, the single `memory` agent tool, conversation buffering, document sources, the consent-gated v1 import and the exit flush. A per-turn memory pack supplies context to each turn. See [Memory](architecture/memory.md), [Pluggable engines](engines.md) and the [memory spec](https://github.com/tinyhumansai/openhuman/blob/main/docs/specs/memory-v2.md).
-
-Conversation state is separate from memory: each thread's transcript is a JSONL file keyed by thread and agent id (the thread store is `tinyagents_session::threads` in `vendor/tinyagents`, wrapped by `threads::store`), and compaction seals a generation rather than deleting it. The full history stays recoverable even though a resumed session reads only the latest generation.
-
----
-
-## Storage
-
-Durable state sits on the ports of `tinystoragedrivers` (documents, streams, blobs, search, secrets), vendored through `vendor/tinyagents/vendor/tinystoragedrivers`. One URL picks the backend for the process: `OPENHUMAN_STORAGE_URL`, else `[storage] url`, else nothing, which keeps the classic per-domain files on desktop. The drivers are Cargo features (`storage-sqlite`, `storage-file`, `storage-mongodb`; `memory` is always there), and a URL for a driver the build lacks fails at boot. Records live in a scope: the tenant's profile when work runs for one, else the acting agent's id, else `local` for the operator in single-user mode. In SaaS mode a call with no profile is refused. The host side is `crates/openhuman-core/src/storage/`. See [Storage](architecture/storage.md).
-
-## Security architecture
-
-```text
-+-------------------------------------------------------------------+
-| Security Layers |
-| |
-| +------------------+ +------------------+ +------------------+ |
-| | OS Keychain | | Secrets at rest | | Tool sandbox | |
-| | (macOS/Win/Lin) | | ChaCha20-Poly | | (platform jail | |
-| | for credentials | | 1305 (`enc2:`) | | or Docker) | |
-| +------------------+ +------------------+ +------------------+ |
-| |
-| +------------------+ +------------------+ +------------------+ |
-| | Single-Use | | rustls TLS | | No localStorage | |
-| | Login Tokens | | for all network | | for sensitive | |
-| | (5-min TTL) | | connections | | data | |
-| +------------------+ +------------------+ +------------------+ |
-+-------------------------------------------------------------------+
-```
-
-Credentials go through the OS keychain via the `keyring` crate (macOS Keychain, Windows Credential Manager, Linux Secret Service), on desktop only. Executable tools run through `SecurityPolicy` (`crates/openhuman-core/src/security/policy/`: `types.rs`, `path_checks.rs`, `command_checks.rs`, `enforcement.rs`) and a host-appropriate sandbox backend selected at runtime. One consequence deserves a plain statement. When the `Local` backend is selected on a host with no usable OS jail, `sandbox/ops.rs` logs `[sandbox:local] OS backend unavailable, using noop` and spawns through the no-op backend, so the command runs unconfined. Landlock covers Linux and Seatbelt covers macOS; the Windows AppContainer backend exists upstream but is not compiled, so Windows is the case that hits this path. Use the Docker backend where confinement has to hold. The backends live in `crates/openhuman-core/src/sandbox/`, which picks between none, the OS jail (Landlock on Linux, Seatbelt on macOS) and Docker, over the `tinybox` crates. Web-to-desktop auth handoff uses single-use login tokens with a 5-minute TTL, exchanged via the Rust HTTP client so it bypasses browser CORS. All WebSocket and HTTP connections use rustls, with no dependency on the platform's OpenSSL. Sensitive state lives in Redux (in memory) and the OS keychain (persistent); nothing sensitive goes into localStorage. User prompts are normalized, scored, and enforced server-side (`allow | review | block`) before model or tool execution; see `crates/openhuman-core/src/security/prompt_injection/`.
-
----
-
-## End-to-end data flow
-
-One request, from user action to external service and back:
-
-```text
-User types a command in the chat UI
- |
- v
-Frontend sends the turn to the core over HTTP JSON-RPC
- |
- v
-Agent harness (tinyagents) runs the turn, sees the tool catalog
- |
- v
-Model decides to call a tool (e.g., send a Telegram message)
- |
- v
-Tool Registry routes to the registered handler
- |
- v
-Handler executes: native Rust, or a shell command using the host toolchain
- |
- v
-Handler runs through `SecurityPolicy` and the active sandbox backend
- |
- v
-External call: reqwest over rustls, a channel driver, SQLite, OS keychain, etc.
- |
- v
-External service responds
- |
- v
-Result flows back through the harness to the frontend over Socket.IO or the RPC response
- |
- v
-User sees the result in the chat interface
-```
-
-Every layer is async and non-blocking. The Rust core runs concurrent tool executions, cron triggers and socket events on a fixed Tokio thread pool.
-
----
-
-## Vendored crate family
-
-Core subsystems run on `tiny*` crates, vendored as git submodules under `vendor/` (`tinyagents`, `tinyflows`, `tinychannels`, `tinyjuice`, `tinymemory` and others) so crate changes can be tested in-tree before they are published. The main ownership boundaries are:
-
-- The agent engine is `tinyagents`. Every agent turn runs through its harness via the seam in `crates/openhuman-core/src/agent/tinyagents/`. See [Agent harness](architecture/agent-harness.md).
-- Memory is `tinymemory`. The contract, CortexDB engine, sources, safety scrubbing, context compiler and v1 importer are crate-owned (`vendor/tinymemory`). OpenHuman keeps the host side under `crates/openhuman-core/src/memory/` (see [Memory](architecture/memory.md)). The chat thread store is `tinyagents_session::threads`.
-- Inference uses the crate-native `ModelRouter` and `OpenAiModel` for host workload-tier model routing and cloud provider slugs.
-
----
-
-## Technology stack
-
-| Layer | Technology | Why |
-| -------------- | ---------------------------------- | --------------------------------------------------------- |
-| Frontend | React 19, TypeScript 5.8 | Modern component model, type safety |
-| State | Redux Toolkit + Persist | Predictable state with offline persistence |
-| Build | Vite 7 | Sub-second HMR, optimized production builds |
-| Styling | Tailwind CSS | Utility-first, consistent design system |
-| Framework | Tauri v2 | Native cross-platform with minimal overhead |
-| Language | Rust (2021 edition) | Memory safety, zero-cost abstractions |
-| Async | Tokio | High-performance async I/O runtime |
-| JS Runtime | Node.js | Managed V8 runtime for tool helpers and skill-adjacent JS |
-| Database | SQLite (rusqlite) | Embedded, zero-config, per-domain stores |
-| WebSocket | tokio-tungstenite + rustls | Persistent connections with native TLS |
-| HTTP | reqwest | Async HTTP with rustls + native-TLS support |
-| Encryption | chacha20poly1305 (secret store), aes-gcm + argon2 (`security/encryption/`) | Config-field secrets use ChaCha20-Poly1305 under a keychain-backed master key (`enc2:` prefix); the separate user-facing encryption facility uses AES-256-GCM with Argon2id |
-| Scheduling | cron crate + `cron` domain | Standard cron expressions, `scheduler_gate`-gated |
-| Telegram | `tinychannels` Bot API driver | Transport in vendored `tinychannels`; host keeps bus/approval glue |
-| Realtime | Socket.io (client) | Bidirectional event-based communication |
-| AI | MCP (JSON-RPC 2.0) | Standardized tool protocol for LLM integration |
-| Search | OpenAI embeddings + SQLite FTS5 | Hybrid semantic + keyword search |
-
----
-
-## iOS client (experimental)
-
-The iOS client is a Tauri v2 app that shares the React and TypeScript UI codebase. It ships no Rust core on the device. All AI, RPC and domain logic stay on the desktop core, and the iOS app is a thin transport client.
-
-### Transport architecture
-
-```text
-iOS App (React + Tauri iOS shell)
- |
- TransportManager (app/src/services/transport/TransportManager.ts)
- |-- LanHttpTransport direct HTTP to desktop core (same LAN)
- |-- TunnelTransport socket.io relay; E2E encrypted
- |-- CloudHttpTransport fallback via cloud backend API
-```
-
-Transport is selected by `ConnectionProfile` stored in secure storage. On pairing, the iOS app stores `{channelId, sessionToken, corePubkey, devicePrivkey}` after the client-side `tunnel:connect` succeeds.
-
-### Pairing flow
-
-1. Desktop: `devices_create_pairing` RPC -> backend ACKs `tunnel:register` with `{channelId, pairingToken, pairingExpiresAt}`.
-2. Desktop shows QR: `openhuman://pair?cid=<>&pt=<>&cpk=<>&rpc=<>&exp=<>`.
-3. iOS scans QR, generates X25519 keypair, connects to backend (`tunnel:connect`, `role:client`, `pairingToken`).
-4. Backend consumes `pairingToken` (single-use) and returns iOS `sessionToken`.
-5. X25519 key agreement over `tunnel:frame` -> XChaCha20-Poly1305 symmetric key.
-6. Desktop emits `DomainEvent::DevicePaired`; device appears in the Devices panel.
-
-### Key paths
-
-| Path | Purpose |
-| --------------------------------- | ------------------------------------------------------- |
-| `crates/openhuman-core/src/security/devices/` | Rust devices domain (pairing, store, crypto, event bus) |
-| `app/src/services/transport/` | TS transport strategies + manager |
-| `app/src/lib/tunnel/` | TS tunnel crypto (X25519 + XChaCha20-Poly1305) |
-| `app/src/pages/ios/` | iOS-specific screens (PairScreen, MascotScreen) |
-| `packages/tauri-plugin-ptt/` | Swift PTT plugin (AVAudioEngine + SFSpeechRecognizer) |
-| `app/src-tauri-mobile/Info.plist` | Privacy strings for the iOS Info.plist |
-
-### Security
-
-- The tunnel backend is a blind forwarder and never sees plaintext payloads.
-- `pairingToken` is single-use, has a TTL and is hashed at rest on the backend.
-- `sessionToken` is per client peer and can be revoked from the desktop Devices panel. The desktop core does not receive a session token during register.
-- Speech recognition runs on-device (Apple Speech framework); audio never leaves the device.
-- The iOS symmetric session key is held in memory, so a restart pairs again instead of resuming.
-
-### Backend dependency
-
-The `tunnel:register` / `tunnel:connect` / `tunnel:frame` Socket.IO protocol is served by the TinyHumans backend. Pairing depends on it. See [iOS companion](../features/ios-companion.md) for the user-facing state of this client.
diff --git a/gitbooks/developing/architecture/README.md b/gitbooks/developing/architecture/README.md
deleted file mode 100644
index d172c32a8e..0000000000
--- a/gitbooks/developing/architecture/README.md
+++ /dev/null
@@ -1,118 +0,0 @@
----
-description: >-
- The high-level shape of OpenHuman: the desktop shell, the Rust core and the
- frontend, plus how data flows between them.
-icon: code-branch
----
-
-# Architecture
-
-OpenHuman is open source under GNU GPL3. This page gives the high-level shape of the system. The full developer reference is [Architecture](../architecture.md).
-
-## The shape
-
-OpenHuman is a React and Tauri v2 desktop app. A Rust core does the heavy lifting, in the same process rather than as a separate service.
-
-```text
-┌──────────────────────────────────────────────────────────────────┐
-│ Tauri shell (crates/openhuman-app/) │
-│ • windowing, OS integration, embedded core lifecycle (tokio task)│
-│ • global hotkeys, PTT/dictation overlays, deep links │
-└──────────────────────────────────────────────────────────────────┘
- │ JSON-RPC (loopback HTTP) ↕
-┌──────────────────────────────────────────────────────────────────┐
-│ Rust core (crates/openhuman-core/, in-process, no binary) │
-│ • Memory v2 (engine binding, recall/fetch/store, turn lifecycle) │
-│ • Integration adapters + memory source sync │
-│ • Provider router (model routing) │
-│ • TokenJuice compression │
-│ • Native tools (search, fetch, fs, git, …) │
-│ • Voice (STT in, TTS out, live voice agent) │
-└──────────────────────────────────────────────────────────────────┘
- │
-┌──────────────────────────────────────────────────────────────────┐
-│ React frontend (app/src/) │
-│ • Screens, navigation │
-│ • Talks to core over `coreRpcClient` │
-│ • No business logic, presentation only │
-└──────────────────────────────────────────────────────────────────┘
-```
-
-Where logic lives:
-
-- The Rust core holds all business logic: memory, integrations, model routing, tools and voice. It is authoritative.
-- The Tauri shell handles windowing, process lifecycle and IPC. Features do not live there.
-- The React frontend draws the UI and orchestrates it. It calls the core over JSON-RPC: `coreRpcClient` sends `fetch()` requests straight to `http://127.0.0.1:<port>/rpc`. Only non-loopback plain-`http://` runtimes go through the shell's `relay_http_rpc` command.
-
-Running the core in-process, instead of behind a socket, is also why many agents are cheap to run at once. There is no per-agent OS process and no per-agent socket. See [Performance](../performance.md) for the measurements and [Embedding OpenHuman](../embedding.md) for using the same core as a library outside the desktop app.
-
-## Crates
-
-- [`crates/openhuman-app/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-app) - the Tauri v2 desktop host; excluded from the root workspace, built from its own manifest.
-- [`crates/openhuman-core/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core) - Cargo package `openhuman`: business domains, the controller contract and in-process dispatch, `CoreBuilder`/`CoreRuntime`. It is a library: no binary, no JSON-RPC server, and no dependency on `tinyhumans-sdk`.
-- [`crates/openhuman-embed/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-embed) - typed library facade (`openhuman_embed::Runtime` / `Agent`, with `Harness` as a one-agent shorthand) for embedding the core in another product.
-- [`crates/openhuman-rpc/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-rpc) - JSON-RPC 2.0 over the core: the envelopes, the browser-origin allowlist, the HTTP client used by the app and TUI, and the whole server (axum router, auth middleware, Socket.IO, `/dev/connect`, the listener bind). The contract types themselves (`Outcome`, `ControllerSchema`, `StructuredRpcError`) live in the core.
-- [`crates/openhuman-tinyhumans/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-tinyhumans) - the TinyHumans layer: the SDK-backed backend transport, the hosted RPC proxy domains, a `RuntimeBuilder` that boots connected, and the host-side login and session owner. The only crate allowed to depend on `tinyhumans-sdk`, and the first thing every host installs.
-- [`crates/openhuman-cli/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-cli) - the `openhuman-core` binary, the developer and benchmark bins, and every root `tests/` and `examples/` target.
-- [`crates/openhuman-tui/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-tui) - standalone terminal frontend that boots the core in-process.
-
-The full table is under "Repository layout" in [Architecture](../architecture.md). Per-crate notes are in [`crates/README.md`](https://github.com/tinyhumansai/openhuman/blob/main/crates/README.md).
-
-## Data flow
-
-1. Connect. You sign in to an [integration](../../features/integrations/README.md) with OAuth. The backend stores the token, and the core never sees it in plaintext.
-2. Sync. A [memory source](../../features/memory.md) (folder, file, link, GitHub, RSS or a connected Composio toolkit) syncs on demand and on its own schedule.
-3. Read. `tinymemory-sources` turns the source into documents, with an SSRF guard on links.
-4. Scrub. Every engine the host binds is wrapped in `memory::guard::ScrubbingEngine`. It uses the `safety` feature of `tinymemory-integrations` to strip secrets and personal identifiers before a write leaves the process. The wrap happens where the engine is resolved, so it covers the tool, the RPC surface, source sync, backfill and import. A caller that holds a `BoundEngine` and reaches past it is not covered, so resolution is the only supported way to get one.
-5. Store. The item goes to the selected engine, either hosted TinyHumans or your CortexDB. Conversation turns are logged as they happen. Learnings are stored when the agent or you add one.
-6. Recall and fetch. The agent's `memory` tool asks the engine a question and gets an answer with citations, or runs a raw hybrid search.
-7. Pack. Before every turn, a token-budgeted memory pack is recalled. It goes into that turn's model request only, never into the transcript.
-8. Forget. You remove items by id from the Memory page or the tool.
-9. Compress. Tool output and large source data go through [TokenJuice](../../features/token-compression.md) before they enter the LLM context.
-10. Route. The [router](../../features/model-routing/README.md) picks the provider and model for the task hint. It is one of several [pluggable engines](../engines.md) the core chooses at runtime.
-
-## Privacy boundary
-
-Stays on your machine:
-
-- Workspace config and persona files
-- Audio capture buffers and any local model state
-
-Goes through the OpenHuman backend (under one subscription, and one TinyHumans API key for embedders):
-
-- LLM calls (model providers)
-- The web search proxy
-- Integration OAuth and tool proxying
-- TTS streaming
-
-See [Privacy and security](../../features/privacy-and-security.md) for the full picture, and [One TinyHumans API key](../tinyhumans-api-key.md) for what that single key covers.
-
-## Open source
-
-The code is at [github.com/tinyhumansai/openhuman](https://github.com/tinyhumansai/openhuman) under GNU GPL3. Issues and pull requests are welcome. The project is in early beta. Contributors should start with [Architecture](../architecture.md).
-
-## Further reading
-
-- [Agent harness](agent-harness.md), [Memory](memory.md) and [Security](security.md) for the deep dives.
-- [Frontend](frontend.md) and [Tauri shell](tauri-shell.md) for the two outer layers.
-- [Loadable modules](../loadable-modules.md) and [Pluggable engines](../engines.md) for what plugs into the core.
-- [`AGENTS.md`](https://github.com/tinyhumansai/openhuman/blob/main/AGENTS.md) for the repo-wide rules, including which `vendor/` submodule owns what.
-
-## Loadable component dependency boundary
-
-Hosts execute loadable component behavior through compiled TinyBus modules and
-link only the components' minimal `*-bus` vocabulary. Contract crates contain
-serialized types, errors, identifiers, versions, schemas and tool declarations;
-providers, parsers, cryptography, storage, native resources and execution
-algorithms belong inside modules. OpenHuman retains policy, credentials,
-approvals, cancellation and product orchestration. Stateful resources cross
-the bus as opaque handles with explicit cleanup operations.
-
-This boundary is still being migrated. The
-[module boundary inventory](../../../docs/module-boundary-inventory.md) names
-existing exceptions and required upstream work. `pnpm rust:module-boundaries`
-checks host normal/build dependency graphs and independently resolved contract
-graphs. Its transitional pass does not certify completion;
-`pnpm rust:module-boundaries:complete` requires an empty exception list and no
-pending contracts. Host adapters switch after compatible module artifacts are
-released and pinned, preserving lazy loading and cached resolution.
diff --git a/gitbooks/developing/architecture/agent-harness.md b/gitbooks/developing/architecture/agent-harness.md
deleted file mode 100644
index 61c8c23023..0000000000
--- a/gitbooks/developing/architecture/agent-harness.md
+++ /dev/null
@@ -1,718 +0,0 @@
----
-description: >-
- How an agent turn runs: the tool-call loop, sub-agent dispatch,
- archetypes, triage, hooks, and the cost and budget machinery around them.
-icon: layer-group
----
-
-# Agent harness
-
-`crates/openhuman-core/src/agent/` is the host side of an agent turn: the
-tool-call loop and its dialects, sub-agent dispatch and archetypes, sessions
-and resume, triage, hooks, interrupts and cost accounting, all wrapped around
-the TinyAgents harness rather than reimplementing it.
-
-## Embedding OpenHuman as a library
-
-`openhuman_embed` exposes a two-step API. `Runtime::builder()` boots one
-in-process core per process, background services, registered domain
-families, backend URL and the TinyHumans API key, and `Runtime::agent(spec)`
-instantiates any number of agents on it. Each `AgentSpec` fully describes
-one agent: provider endpoint and model, access tier, `action_dir`, MCP
-servers, its own in-process tools, skill bundles, system prompt, tool scope,
-sandbox mode, allowlists, and a narrowed `DomainSet` / `ToolGroups`. A runtime identifies as
-`HostKind::Library`: inference does not depend on OpenHuman app login,
-including inference-readiness checks for workflow agent nodes.
-
-### An embedder's own tools
-
-`AgentSpec::tools` takes the host's own `Box<dyn Tool>` objects, which reach
-the model as real tools, their own schema on the wire, called by their own
-name. Before it existed the only road was `AgentSpec::mcp`, and the model paid
-for the indirection: a discovery call to learn what a server offers, and an
-`mcp_call_tool` envelope whose inner `arguments` object no provider can
-validate or constrain decoding against.
-
-It takes a factory, not a belt. `Agent` is `Clone` and `Box<dyn Tool>` is
-not, and the session behind a spec is rebuilt from `Config` on every turn, so
-nothing holding a `dyn Tool` could survive in between. The closure therefore
-runs once per turn, which also means a host whose tools belong to something
-shorter-lived than the agent (one episode, one room, one assignment) can
-return a different belt each time instead of registering a second agent.
-
-Implement `Tool` through `openhuman_embed::Tool`, not by depending on
-`tinytools` directly: a second path to that crate produces incompatible Rust
-types, and a tool built against it cannot be handed to a session at all.
-
-One caveat on a varying belt. The prompt's tool catalogue is rendered from the
-same belt in the same build, so the two stay consistent on any turn that
-composes a prompt, but a resumed session reuses its persisted system
-messages, so a belt that moves under a long-lived thread is described by the
-prompt that thread opened with. Vary a belt only on turns that run on a
-session of their own.
-
-Per-agent isolation is a context, not a second core. `Runtime::agent` clones
-the runtime's base `Config`, applies the spec, and derives a child
-`CoreContext` (`CoreContext::derive_with`) carrying that config, the agent's
-domain set, tool groups and skill-root policy. Every turn is dispatched under
-that context (`CoreRuntime::run_in` → `agent_chat_for` with an explicit
-`AgentDefinition`), so the config loader, the domain gate,
-the tool-group filter and skill discovery all read the agent's own settings.
-Transcripts are keyed by agent id and a turn resumes only its own thread.
-
-Layout under a runtime-owned root: `<root>/config.toml` and the credential
-store; `<root>/workspace/` with the session database, `session_raw/`
-transcripts and each agent's `agents/<id>/skills/`; and
-`<root>/agents/<id>/action/` as each agent's default working root (a sibling
-of the workspace, never inside it).
-
-`Harness` is the one-agent shorthand: a runtime plus one agent named
-`harness`. Build one runtime and issue concurrent `run` or `turn(...).send()`
-calls on its agents; do not build one core per agent. Each call owns a
-distinct session unless a prior session id is supplied.
-
-Authentication in library mode is the TinyHumans API key
-(`RuntimeBuilder::api_key`), stored as an `api-key` auth profile beside the
-runtime's `config.toml`. Managed inference sends it as a bearer to the
-OpenAI-compatible endpoint; backend REST calls send `x-api-key`; there is no
-session JWT and nothing to expire. Agents that name their own `Provider`
-(BYOK) never touch it. The key covers every hosted feature, subject to its
-backend scopes: inference, embeddings, voice, search, media, Composio and the
-other integrations, channels and the socket. Only the session-bound `/auth/*`
-flows (OAuth connect, channel link tokens) still take
-`HarnessBuilder::session`.
-
-`Workspace::Inherit` together with `Provider::inherit()` and no API key is
-deliberately not library-routed inference. It borrows the installed
-OpenHuman configuration and therefore keeps the installed application's
-session checks. Supply an explicit provider or an API key when embedding
-without app login.
-
-Some settings remain runtime-wide for every agent (the live autonomy policy's
-`auto_approve*`, the approval gate switch, the sub-agent catalogue, the
-config sub-agents re-read); the crate README lists them under "Still
-runtime-wide".
-
-Every agent turn runs through the published [`tinyagents`](https://crates.io/crates/tinyagents) harness. There are three entry points: `Agent::turn`, the channel and CLI bus path, and `run_subagent`. All of them go through the adapter seam in [`crates/openhuman-core/src/agent/tinyagents/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/agent/tinyagents) (`run_turn_via_tinyagents_shared`). Context trimming is `MessageTrimMiddleware`, and cancellation is the tinyagents steering channel. Policy stop hooks (budget, thread-goal and iteration caps) fire through a `StopHookMiddleware` ([`tinyagents/stop_hooks.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/agent/tinyagents/stop_hooks.rs)) that pauses the run on the first stop vote. The channel route forwards live `AgentProgress` like the chat route. The shared `TurnProgress` seam lives in `agent/session_host/tool_progress.rs`.
-
-Multi-agent orchestration runs on the tinyagents graph layer, through `graph::parallel::map_reduce`, the `spawn_parallel_graph` scaffold and the shared `graph::orchestration` `TaskStore` lifecycle primitives re-exported from [`orchestration/mod.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/agent/orchestration/mod.rs):
-
-- [`orchestration/delegation.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/agent/orchestration/delegation.rs) is a `plan → execute ⇄ review → finalize` `CompiledGraph`. It has conditional routing, `RecursionPolicy`, a durable `FileCheckpointer`, a `CancellationToken` and a `GraphTracingSink`.
-- The workflow phase engine fans each phase's agents out on the graph (`with_max_concurrency`). The durable `WorkflowRun` ledger stays the source of truth for resume.
-- `spawn_parallel_agents` runs its fan-out through `spawn_parallel_graph` and `graph::parallel::map_reduce`.
-- The agent-teams member runtime is a conditional-routing graph (`execute → complete | fail → done`, [`agent_teams/runtime.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs)).
-- The detached-sub-agent registry is backed by a typed `TaskStore` lifecycle ledger (Pending, Running, then Completed, Failed or Cancelled).
-
-## TinyAgents crate: features and compatibility
-
-OpenHuman depends on the split TinyAgents 2.1 crate family by path into the vendored git submodule `vendor/tinyagents`, `tinyagents-harness` (features `sqlite`, `multimodal`, `builtin-tools`), `tinyagents-definition`, `tinyagents-graph` (`sqlite`), `tinyagents-registry`, `tinyagents-session`, `tinyagents-runtime`, `tinyagents-orchestration` and the optional `tinyagents-live`, plus `tinyinference` from `vendor/tinyagents/vendor/tinyinference`, so SDK changes can be tested in-tree before they go upstream (see [`crates/openhuman-core/Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/Cargo.toml)). The reasons, so future upgrades do not regress it:
-
-- Native TinyAgents model interface, OpenHuman-owned product policy. Every live route is an `Arc<dyn ChatModel<()>>`: TinyAgents OpenAI-compatible clients cover wire-equivalent managed, local, and BYOK routes, while host `ChatModel` implementations cover Claude SDK/Code and Codex-specific transports. OpenHuman still owns credential resolution, OAuth, access gates, endpoint selection, egress disclosure, billing metadata, and error classification.
-- `sqlite` feature enabled with one native sqlite chain. OpenHuman's root and Tauri Cargo worlds pin `rusqlite = "=0.40.2"` (`bundled`); the pinned Rust 1.96 toolchain provides the `cfg_select!` macro its build script needs. Both worlds resolve to a single `libsqlite3-sys` chain. Durable graph checkpoints run through TinyAgents' own `SqliteCheckpointer` (see [`orchestration/delegation.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/agent/orchestration/delegation.rs)).
-- WhatsApp Web storage bridge. `whatsapp-rust`'s Diesel-backed `sqlite-storage` feature links sqlite separately from rusqlite 0.40, so the optional `whatsapp-web` feature (forwarded to `tinychannels/whatsapp-web`) builds against `wacore::store::InMemoryBackend` and logs that sessions are not durable. Web sessions stay non-persistent until a rusqlite-backed durable WhatsApp store exists.
-- No scripting runtime. There is no `repl` or Rhai scripting feature and no `rhai_workflows` tool. Rhai still appears as a dependency of `tinyflows` for its own JSON-query stack, unrelated to the agent harness.
-- Ownership map: model construction → `inference::provider::create_chat_model*`; durable graph checkpoints → TinyAgents' `SqliteCheckpointer`; generic detached executor state → `DetachedTaskRegistry`; controller-facing durability → OpenHuman SQL/JSON run ledgers (`running_subagents`, `workflow_runs`, `agent_teams`, `command_center`). The generic harness/graph/middleware/event primitives are used as-is.
-
-The agent harness is the runtime that turns a user message (or a webhook fire, or a cron tick) into a complete, tool-using LLM interaction. It owns the tool-call loop, sub-agent dispatch, the trigger-triage pipeline, and the hook surface around them. It does not own provider HTTP transport, tool implementations, prompt-section assembly or memory storage. Those are separate domains the harness composes.
-
-This page walks through what happens in one turn, then zooms in on each of the moving parts.
-
-## The shape of a turn
-
-Every turn goes through the same lifecycle, whether the user just typed a message, a Telegram webhook fired or a 9am cron ticked:
-
-```text
-┌─ inbound ─────────────────────────────────────────────────────────┐
-│ user message · channel inbound · webhook · cron · composio event │
-└──────────────────────────┬────────────────────────────────────────┘
- │
- ▼ (external triggers only)
- ┌──────────────────────┐
- │ trigger triage │ classify → drop / notify /
- │ (small local LLM) │ spawn reactor / spawn orchestrator
- └──────────┬───────────┘
- │
- ▼
- ┌──────────────────────────────┐
- │ Agent::turn() │
- │ 1. resume transcript │
- │ 2. build system prompt* │
- │ 3. recall memory pack │
- │ 4. enter tool-call loop ────┼──► provider call
- │ 5. dispatch tool calls ────┼──► tool exec / sub-agent spawn
- │ 6. context guard / compact │
- │ 7. stop-hook check │
- │ 8. final assistant text │
- └──────────┬───────────────────┘
- │ async, after the user sees the reply
- ▼
- ┌─────────────────┐
- │ post-turn │ cost log · conversation
- │ hooks │ buffering for memory
- └─────────────────┘
-
-* the system prompt is built only on the first turn. Later
- turns reuse the rendered prompt verbatim so the inference
- backend's KV-cache prefix stays valid.
-```
-
-The rest of this page is the same diagram, expanded.
-
-## Sessions and `Agent::turn`
-
-A session is the live conversation an `Agent` instance is running. The `Agent` struct owns:
-
-- The conversation history (system + user + assistant + tool messages).
-- The provider client to call (model resolved by the [model router](../../features/model-routing/README.md)).
-- The tool registry visible to the model.
-- The `memory` tool (when a memory engine is on), through which the model recalls, fetches, learns and forgets on demand.
-- Per-turn budgets: max tool iterations, max payload size, max USD cost.
-- Local action budget: a rolling hourly cap for side-effecting tool actions, read from `config.autonomy.max_actions_per_hour`.
-
-`Agent::turn(user_message)` is the hot path. In one turn it:
-
-1. Resumes the session transcript if this is a fresh process, re-loading the exact provider messages from disk so the inference backend's KV-cache prefix still hits.
-2. Builds the system prompt (only on the first turn). This pulls in identity, soul, profile, memory, connected integrations, available tools, safety preamble, assembled by the prompt section builder.
-3. Recalls a memory pack. TinyMemory's agent lifecycle logs the user turn and recalls a token-budgeted pack (learnings and beliefs, brain documents, this agent's history, other agents' turns), wrapped in `<memory-context>` and added to that turn's model requests ephemerally; it is never persisted in the transcript, so the prompt cache is unaffected. The model can still call the `memory` tool for a cited answer (see [Memory architecture](memory.md)).
-4. Enters the tool-call loop (next section).
-5. Spawns post-turn hooks in the background: the user gets their answer before cost logging and conversation logging finish.
-
-The system prompt is not rebuilt on subsequent turns. Even cosmetic byte changes invalidate the KV-cache prefix and force a full re-prefill, so dynamic per-turn context (tool results, memory recall answers) is appended as user-visible message content rather than spliced into the system prompt.
-
-#### The cacheable prefix is wider than the system prompt
-
-Freezing the prompt is only one third of the contract, and the other two are easier to break because nothing about them looks like caching:
-
-- The tool block counts, and it comes _first_. Every prefix cache in production renders the tool catalogue ahead of the conversation, a chat template has to put it somewhere the model reads before the first user turn. OpenAI's automatic cache, Anthropic's `cache_control` (tools → system → messages), DeepSeek's context cache and any vLLM/SGLang radix cache all work this way. So a `tools` array that changes between turns invalidates the frozen system prompt too, and the JSON key order of the request body (which puts `messages` before `tools`) says nothing about it. The mid-session Composio reconcile is still correct, a tool surface that lies about what the model can call is worse than a cold prefill, but it must fire only on a real capability change and be byte-stable otherwise. `connected_set_hash` sorts before hashing so a reordered backend response never reaches a rebuild, and `collect_orchestrator_tools` sorts the connected-toolkit enum for the same reason.
-- History must be append-only. Turn N's serialization has to survive verbatim as the opening of turn N+1. `pair_tool_cycles` drops half-finished tool cycles at serialization time, so its verdict for an entry must depend only on that entry and its immediate neighbour, never on anything appended later, or an earlier message's presence flips retroactively and the prefix moves under the cache. Context compaction is the one deliberate exception; it rewrites the middle and pays for a re-prefill.
-
-A resumed session's replayed prefix is folded into `Agent::history` rather than spliced into one request, so the request, the following turn and the persisted transcript all read the same sequence. Splicing it cost the conversation twice: the next turn went out without it, and the transcript written afterwards (serialized from `history`) held only the new turn, which the *next* resume then read back, truncating the thread a little further on every restart.
-
-#### A stable prefix only pays out when the wire says so
-
-Keeping the bytes stable is necessary, not sufficient: the provider still has to be *told* to cache, and two providers need telling explicitly.
-
-- Anthropic caches nothing without `cache_control` markers, and its OpenAI-compatible endpoint cannot carry them, Anthropic documents prompt caching as unsupported on that path and reports `prompt_tokens_details` as always empty. A `cloud_providers` entry with `auth_style = "anthropic"` is therefore built as the crate's native Messages adapter (`tinyinference_llm::providers::anthropic`), which places markers on the last tool, the last system block, and the final message so a growing tool loop reuses the previous iteration's cache rather than only the system prompt. The one exception is text mode (`native_tools = false`, prompt-guided tools), which only the Chat Completions adapter implements and which keeps the compat client, and so keeps paying full price.
-- OpenRouter forwards markers to Anthropic and Gemini but adds none itself; hosted OpenAI rejects unknown content-part fields. The OpenRouter slug (and any endpoint on `openrouter.ai`) enables `OpenAiModel::with_explicit_cache_control`, which marks the last system and last user message; every other Chat Completions endpoint stays unmarked.
-- The routing hint is separate from the markers. The harness derives a `prompt_cache_key` from the declared stable prefix and puts it in `provider_options`, so every turn of a thread, and every sub-agent sharing its system prompt and tool set, routes to the same cache shard on providers that shard (OpenAI's `prompt_cache_key`). Adapters that have no such concept drop it. The managed backend receives it as a top-level body field alongside `thread_id`.
-
-All three hang off `RunPolicy::cache.protect_prompt_prefix`, which the host sets unconditionally, and off the cacheable prefix the tinyagents loop declares on every request from the session's frozen system prefix (system prompt tiers, then the tool catalogue); the host has no middleware of its own for this. Until tinyagents began stamping that effective policy onto the outgoing request, both readers consulted `request.cache_policy` alone, always `None` here, so the flag was diagnostic only and no marker or key ever reached the wire. The `[cache]` debug line on every model call now reports whether a key was injected and how many cacheable segments were declared; `cache_read_tokens` on the usage that comes back is the number that proves it worked.
-
-Measure this rather than reasoning about it. `CAPTURE_ALL=1 node scripts/debug/capture-first-inference.mjs` records a whole session's requests, `scripts/debug/run-multi-turn-capture.mjs` drives a multi-turn thread through the production RPC, and `scripts/debug/audit-inference-prefix.mjs` reports the first divergence and attributes it. A single-turn capture cannot see any of these, the question is never what turn 1 costs, it is whether turn 2 can reuse it.
-
-### AGENTS.md project instructions
-
-Alongside identity/soul/profile/memory, the system prompt pulls in AGENTS.md instruction files, OpenHuman's analog of Claude Code's `CLAUDE.md` / Codex's `AGENTS.md`. Two layers are loaded once, at system-prompt build time (never re-read per turn, so the frozen-prefix / KV-cache contract holds):
-
-- Global, `<workspace_dir>/AGENTS.md`, the user's OpenHuman workspace (where `SOUL.md` / `USER.md` live). Applies to every run.
-- Project, `<action_dir>/AGENTS.md`, the folder the agent is operating in. For sub-agent runs with a git-worktree override (`SubagentRunOptions.worktree_action_dir`), that override dir is the project layer instead.
-
-The global layer renders first, the project layer second (project instructions layered after, taking precedence on conflict), under a `## Project instructions (AGENTS.md)` heading. When the two dirs resolve to the same path the file is loaded once (deduped). Missing / unreadable / empty files are silently skipped, and each layer is capped at `BOOTSTRAP_MAX_CHARS` (~20 000 chars) with a `[... truncated]` marker so a large file can't crowd the prompt.
-
-The loader is `agent::prompts::agents_md` (pure functions returning pre-loaded strings, bounded at read time so a pathological multi-MB file can't exhaust memory before the render-time cap); the strings are threaded onto `PromptContext` (`agents_md_global` / `agents_md_local`) and rendered by `AgentsInstructionsSection`, which sits after the user-files section and before the tool catalogue in the default and sub-agent builders. The primary / orchestrator agent and the other built-in dynamic agents (`PromptSource::Dynamic`) assemble their own body via `render_*` helpers, so the same `AgentsInstructionsSection` is injected centrally by `SystemPromptBuilder::from_dynamic`, appended after the agent's own body, before the central grounding contract, rather than by each `agents/<id>/prompt.rs` builder. The feature is gated by `agent.agents_md_enabled` (default on); when off, no AGENTS.md content is loaded or injected.
-
-## The tool-call loop
-
-Inside `Agent::turn`, the tool-call loop is the inner engine. It is the published tinyagents crate's `AgentHarness` loop, assembled per turn by `run_turn_via_tinyagents_shared` ([`crates/openhuman-core/src/agent/tinyagents/mod.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/agent/tinyagents/mod.rs)). It runs up to the turn's iteration cap, resolved in `session_host/builder/iteration_cap.rs`: an explicit `[agent] max_tool_iterations_override` (or `OPENHUMAN_AGENT_MAX_TOOL_ITERATIONS`) wins, then the agent definition's cap (the orchestrator's is 200), then `max_tool_iterations` (default 10) for a turn with no definition. The model is told how many calls remain at 50% and 80% of the budget, and `inference_agent_chat` reports a capped turn with `hit_cap: true` and its `checkpoint` text:
-
-```text
-loop {
- 1. context guard - if history is too big, microcompact / autocompact
- 2. stop-hook check - budget caps, max-iterations, custom kill switches
- 3. provider call - send messages + tool specs, stream the response
- 4. parse response - split assistant text from tool calls
- 5. if no tool calls - return final text
- 6. execute tool calls - dispatch each one (next section)
- 7. summarize oversize - route huge tool outputs through the summarizer agent
- 8. append results - push tool results into history, loop again
-}
-```
-
-Every iteration emits a real-time `AgentProgress` event so the UI can render token-by-token streaming, "calling tool X" status, and per-iteration cost updates.
-
-One engine, three entry points. The loop lives in TinyAgents. OpenHuman's
-chat host, channel/CLI route and sub-agent host each supply product policy at
-the adapter seam; spawned sub-agents enter through
-`agent/subagent_host`, which drives the neutral
-`tinyagents_orchestration::subagent::SubagentDriver` rather than an OpenHuman
-runner. The host owns provider/model choice, tool and security narrowing,
-workspace/artifact handling, progress and durable product projection. The
-neutral driver owns lifecycle ordering, task-key coalescing and the exclusive
-pause-or-terminal persistence decision. There is no `harness/subagent_runner` path, and it must not return as a facade or
-compatibility export.
-
-### Tool dispatch and tool-call dialects
-
-`agent.tool_dispatcher` (overridable for one launch with `OPENHUMAN_TOOL_DISPATCHER`) picks how tools are spoken to the model. `auto` (the default) uses native tool calling, structured tool specs through the `ChatModel` adapter and structured calls back, whenever the provider profile supports it, and falls back to JSON-in-tag for prompt-guided providers such as local Ollama. `python` and `typescript` are opt-in: they render the catalogue as code signatures and read code-style calls back, but mis-parse on some models. The session composes its prompt for the chosen dialect and pins the same dialect on the turn harness, so a text dialect keeps its schemas off the wire and the harness recovers calls with the matching grammar.
-
-Canonical `tinytools_agent::dialect::ToolDialect` implementations provide transcript-compatible parsing and rendering directly; OpenHuman converts durable/provider records only at those I/O boundaries:
-
-- Native (`native`), structured tool-call fields.
-- XML (`xml`), `<tool_call>{...}</tool_call>` tags in assistant text, with full JSON schemas in the prompt.
-- P-Format (`pformat`), compact positional `<tool_call>name[0|a|1|b]</tool_call>` with `name[0|<a>|1|<b>]` signatures in the prompt; opt-in.
-- Code (`python` / `typescript`), the catalogue is a list of function signatures (`def read_file(path: str, limit: int = None) -> str` or `function read_file(path: string, limit?: number): string;`) and the model writes a function call inside the tag: `read_file(path="src/main.rs", limit=20)` or `read_file({path: "src/main.rs", limit: 20})`. Compact like P-Format but a syntax small code-trained models already write; `python` is the default.
-
-Every text dialect shares one parser: a `<tool_call>` body is tried as P-Format, then as a code call, then as JSON, so a model that mixes forms is still understood. Persisted session histories can contain suffixes in any of these shapes, so the session shell keeps the dispatcher around to parse and replay them faithfully when a transcript is resumed.
-
-### Tool rules: allow, deny, hide, approve
-
-You can restrict which tools an agent sees and calls with pattern rules. The
-rule language is `tinytools::ToolRules`, and the tinyagents loop enforces it
-through `RunPolicy::tool_rules`. One rule set decides all three surfaces: the
-tool schemas on the request, `tool_search` and the deferred catalogue, and
-every call, nested calls included. A tool a rule removes therefore cannot be
-found through search or called by a guessed name.
-
-Rules come from three places and stack as layers. Every layer must admit a
-tool:
-
-1. **`[tool_rules]` in `config.toml`.** The operator's layer, applied to every
- agent, sub-agents included.
-2. **Agent definitions.**
- - `disallowed_tools` and `tool_rules` in the definition TOML.
- - `tool_rules` on the agent registry entry, which `agent.registry`
- patches can set.
- - `AgentDefinitionSpec::tool_rules` for an embedder.
-3. **Sub-agents.** A child inherits the operator's layers but not its parent
- agent's own restrictions, because an orchestrator usually disallows
- exactly the tools it delegates. It then adds its own definition's layer.
-
-```toml
-[[tool_rules.rules]]
-id = "only-github-mcp"
-effect = "deny" # allow | deny | hide | require_approval | auto_approve
-match = { name = "mcp_*" } # name / family / tags globs, category, exposure,
-except = { family = "github" } # permission bounds, side_effects, arg
-reason = "Only the GitHub MCP server is approved."
-
-[[tool_rules.rules]]
-effect = "deny"
-match = { name = "shell" }
-when = { channel = "telegram" } # context: channel, agent
-```
-
-How rules behave:
-
-- **Precedence.** `deny` wins inside a layer. `hide` keeps a tool callable but
- unlisted. `require_approval` defers a call exactly like a tool that declares
- `approval_required`; `auto_approve` waives that declaration.
-- **Patterns.** Globs support `*` and `?` and ignore ASCII case, so `gmail_*`
- matches `GMAIL_SEND_EMAIL`. Name lists on a definition (`disallowed_tools`)
- use the same grammar through `tools::rules::glob_list_matches`. That
- function is now the only implementation of the matcher.
-- **Refusals.** A refused call is answered with the rule's id, layer and
- reason.
-
-Code: `crates/openhuman-core/src/tools/rules/`. Each session composes its layers
-once (`session_rule_set`); each turn evaluates them in its own context
-(`OpenHumanRunContext::tool_rules`).
-
-### Context management mid-loop
-
-Long tool-calling chains can blow past the context window. Two layers handle that:
-
-- Tool-result budget: every tool result is checked against a per-call byte budget, enforced as tinyagents tool middleware. Anything over is hard-truncated with an explanatory marker so the model knows it didn't see the full output.
-- Microcompact / autocompact: when total history is creeping toward the context window, tinyagents middleware (message trimming + the compression hooks installed in `tinyagents/middleware.rs` and `tinyagents/harness_context_ladder.rs`) compacts older turns into summaries before the next provider call. The compacted history keeps the system prompt and the most recent turns intact (KV-cache stability) and rewrites the middle.
-
-### Oversized tool results: the summarizer detour
-
-Some tool calls return enormous payloads: a Composio action dumping 200 KB of JSON, a web scrape returning 50 KB of markdown, a `file_read` over a multi-thousand-line log. Hard-truncating mid-payload drops whatever happens to land past the cut.
-
-When a tool result exceeds the summarizer's threshold (`summarizer_payload_threshold_tokens`, default 4 000), the compiled TinyJuice module decides whether to summarize it before it enters the parent's history. The module owns the extraction prompt, summary cache and per-thread failure breaker, and stores the original in its CCR store so `juice_retrieve` can recover it. The host owns the model call because it knows the model and turn context. `ToolOutputMiddleware` binds a unary child of the current turn through `PayloadSummarizer::prepare`, registers the capped model on a one-off harness (`tinyagents/payload_summarizer.rs`), and the module calls back through the typed `tinyjuice-bus` `MlHost.Generate` contract. Only the orchestrator carries a summary model, and it always sees `juice_retrieve`, even with the compaction router off, because a summary's footer names it. A result that qualified for a summary and did not get one is labelled as unsummarized, whether the module or the host failed, so the model does not re-run the tool for one. Summary reuse and the breaker are scoped to the thread, or to the run when there is no thread. Hard truncation remains the downstream backstop when summarization fails, or when the payload is so large that an LLM call on it makes no economic sense.
-
-Compression, CCR storage and recovery, content queries, HTML extraction, and the static tool declarations and wire DTOs belong to TinyJuice and `tinyjuice-bus`. OpenHuman's tools are adapters: they pass typed requests to the module and keep filesystem authorization on the host side. A handle query runs against the module's CCR store; an artifact query sends authorized content, never a path, to the same module operation. The host has no parallel CCR store or local algorithm fallback. If the module is unavailable, required queries and extraction report that operation as unavailable; optional tool-output compaction keeps its documented pass-through behavior. A resumed thread also keeps its recorded Juice declarations and schemas even when current settings no longer create new handles; current policy and module availability still govern execution.
-
-Caller focus. A tool can opt in to an optional `summary_focus` argument by adding `tokenjuice::focus::summary_focus_property()` to its schema; `web_fetch` and `web_search_tool` do. The model uses it to say what it needs from the result, for example "the rate limits". `before_tool` removes the argument from the call before validation, so the tool never sees it. Only a tool whose schema carries that exact property loses it; any other tool with a parameter of the same name keeps it. It reaches TinyJuice with the result, where it steers the summary, keys its cache, and ranks text for the deterministic compressors. A tool that caps its own output, such as `web_fetch`, is normally left to cap-and-spill. When the caller gives a focus, it is summarized as well, because paging the raw page cannot answer a question.
-
-### Filesystem offload: `outputs/` and `workspace/`
-
-Compression alone does not survive a long-horizon run. Summaries still accumulate step after step, and no amount of compressing restores the fidelity that was thrown away. So for minutes-to-hours tasks the harness moves large results out of context and onto disk, and hands the next step a path.
-
-Two directories under the agent's existing `action_dir` at runtime (the implementation lives in `crates/openhuman-core/src/agent/harness/artifact_offload/`):
-
-| Directory | Holds |
-| ----------------------- | -------------------------------------------------------------------------- |
-| `action_dir/outputs/` | Deliverables. Meant to outlive the step that made them, handed on by path. |
-| `action_dir/workspace/` | Scratch. Intermediate files a worker needs but does not hand back. |
-
-Note `action_dir/workspace/` is a scratch folder inside the agent's action root. It is not the core's internal `workspace_dir`, which agent writes may never reach.
-
-Two halves enforce the convention:
-
-- Prompt. A sub-agent that actually holds `file_write` gets a Long-horizon Artifact Offload contract in its system prompt: results past roughly 2 000 tokens go to a file under `outputs/`, and the reply is that relative path plus a short abstract. The gate is deliberate, a prompt may only name tools the agent can really call, or the model emits calls that fail. Skill-filtered specialists get no contract text, and a dedicated guard asserts their prompts never mention a filesystem tool. They stay covered by the harness half below, which needs no cooperation from the model. The `planner` prompt spells out what the convention means for its own work; the planner is told to reference artifact paths across DAG nodes rather than pasting payloads forward.
-- Harness. `offload_oversized_result` runs on every sub-agent outcome, so an oversized result is offloaded even when the worker inlined it anyway. It fires before the definition's `max_result_chars` cap, so the full body lands on disk instead of being cut.
-
-What the parent receives is a pointer, not a payload:
-
-```text
-[artifact] kind=output path=outputs/presentation_agent/sub-1234-result.md bytes=52318
-read_with: file_read {"path":"outputs/presentation_agent/sub-1234-result.md"}
-note: The full result was written to the action workspace instead of being inlined. …
-
-[abstract]
-HEADLINE FINDING …
-```
-
-`SubagentRunOutcome.artifact_paths` carries the same paths structurally, parsed out of the `[artifact]` pointers in the output, so the handoff carries paths whether the harness offloaded the result or the worker wrote the file itself. Any path the parent takes delivery of is recoverable with an ordinary `file_read` long after the child's context is gone.
-
-The summarizer is the fallback, not the first resort. Offload catches the common case; the summarizer detour and the `tool_result_budget_bytes` truncation above still handle everything it does not, including every failure mode here. A refused or failed offload is deliberately soft: the caller keeps its inline payload and falls through to those backstops.
-
-Path hardening is fail-closed. `resolve_artifact_path` rejects absolute paths, `..` traversal, and anything that escapes its convention root after lexical normalization. When a `SecurityPolicy` is available it also refuses anything under `workspace_dir`, both by blanket containment and via `is_workspace_internal_path`. Offload targets resolve under `action_dir`, never `workspace_dir`, including the case where someone configures `action_dir` inside the workspace root, where every offload is refused rather than quietly writing to internal state.
-
-Writes log `[artifact] wrote worker artifact under action_dir`; each path a handoff carries logs `[artifact] handoff carried an artifact path to the parent`, on both the producing and the consuming side, so a run journal shows both ends of every pointer.
-
-### TokenJuice: content-aware tool-output compaction
-
-Before a fresh tool result enters history (and ahead of the byte-budget backstop), it passes through the TokenJuice content router inside the compiled TinyJuice module, with OpenHuman adapters in `crates/openhuman-core/src/inference/tokenjuice/`. Inspired by Headroom, the router _detects the content kind_ (JSON, code, log, search, diff, HTML, plain text) from the bytes and/or a hint derived from the tool name and arguments, then dispatches to a specialised compressor:
-
-- JSON → SmartCrusher: array-of-objects → table (each key once), preserving rows that carry errors or numeric outliers.
-- Code → tree-sitter (Rust/TS/JS/Python) signature keeper that collapses function bodies; brace-depth heuristic fallback.
-- Log → the 100-rule engine for _command_ output (git/cargo/npm/…), signal-based keep-failures otherwise.
-- Search → relevance-ranked top-K matches per file with a `+N more` tally.
-- Diff → keep changed hunks, collapse unchanged context, summarise lockfile hunks.
-- HTML → strip markup to readable text.
-- Plain text → deterministic TextCrusher.
-
-Every lossy compression offloads the original to the CCR (Compress-Cache-Retrieve) store behind a `⟦tj:<hash>⟧` marker, so compaction is effectively lossless: the agent calls `juice_retrieve` (token + optional byte/line range) to fetch the full original on demand. The same engine is exposed as a universal `compress_content(content, hint, opts)` for any large payload (file reads, web fetches), and as read-only `tokenjuice.*` debug RPCs. Compaction is on by default (`context.compaction_enabled`; `OPENHUMAN_COMPACTION=0` opts out). A large result is stored and replaced by a stats line, a 500-character head and a handle that the read-only `juice_find` / `juice_extract` / `juice_summarize` tools query (`tokenjuice.repl_handle_enabled`), so the LLM summary stage is skipped for results that get a handle. Configured via the `[tokenjuice]` block / `OPENHUMAN_TOKENJUICE_*` env. Agent definitions can override tool-result compression with `tokenjuice_compression = "auto" | "full" | "light" | "off"`; `auto` resolves coding-model agents (`[model] hint = "coding"`) to `light`, which disables CCR-backed lossy compression so coding agents keep raw build/test/diff/search text unless a reduction is truly lossless. Other agents default to `full`. Plain-text compression uses the deterministic TextCrusher.
-
-### Missing capabilities
-
-There is no self-healing archetype. A missing host command is reported back to the user rather than polyfilled.
-
-## Sub-agents: the orchestrator pattern
-
-OpenHuman is multi-agent. The agent the user is chatting with is the Master Agent (stable internal id: `orchestrator`), a capable default agent that answers and completes ordinary work directly, including the inspect → edit → verify coding loop. It spawns specialist sub-agents when parallelism, deeper reasoning, or a specialised capability materially helps.
-
-### Why multi-agent
-
-A single agent that knows everything also has a system prompt the size of a small book. Splitting work across specialists means:
-
-- Each sub-agent gets a narrow system prompt with only the sections it needs (identity / memory / safety preamble can be stripped).
-- Each sub-agent gets a filtered tool registry: the image agent doesn't need filesystem tools, the task manager doesn't need the Composio catalog.
-- Sub-agent histories never leak back to the parent: the parent sees one compact tool result, not the inner conversation.
-- Cheaper models can do the leaf work. The orchestrator is on a strong reasoning model; a research sub-agent might be on a faster, cheaper one.
-
-### The built-in archetypes
-
-Each archetype lives under `agents/<name>/` with an `agent.toml` (metadata, tool scope, model hint) and a prompt. The orchestrator's chat delegates are the ones in its `[subagents]` allowlist:
-
-| Archetype | When the orchestrator picks it |
-| ---------------------- | ---------------------------------------------------------------------------------------------- |
-| `orchestrator` | The Master Agent: top-level, direct-capable default. Never spawned by another orchestrator. |
-| `task_manager_agent` | Adding, previewing, fetching, updating or removing task sources, workflow bundles, artifacts. |
-| `vision_agent` | Anything that depends on the content of an image (describe, OCR, UI elements). |
-| `image_agent` | Generating or editing an image. |
-| `video_agent` | Generating a video or animating an image. |
-| `presentation_agent` | Building a slide deck with grounding and citations (feature `documents`). |
-| `skill_setup` | Finding, installing and managing skills from registries (`setup_skills`). |
-| `workflow_builder` | Authoring or editing a saved workflow (`build_workflow`); returns a proposal, never saves. |
-| `flow_discovery` | Suggesting workflows worth setting up (`discover_workflows`). |
-
-Other built-ins are never chat delegates:
-
-| Archetype | Who runs it |
-| -------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
-| `planner`, `critic` | Only the `parallel_research_cross_check` workflow-run template (decompose and research = `planner`, cross_check = `critic`). |
-| `summarizer` | The harness, to compress oversized tool results; also the synthesize phase of that workflow-run template. |
-| `trigger_triage` / `trigger_reactor` | Classifying an incoming external event, and the lightweight reaction to one. |
-| `morning_briefing` | Cron: the daily digest, on a named read-only tool belt. |
-
-The orchestrator itself handles coding, crypto, settings, scheduling, product docs and MCP servers through inline skills: `use_skill` loads a tool pack's guide and schemas (`coding`, `web3`, `system`, `scheduling`, `docs`, `mcp`), and the same tools are `Deferred` so `tool_search` finds any single one. Running an installed skill is the orchestrator's own `run_workflow`. See [`tools/toolpacks/README.md`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/tools/toolpacks/README.md).
-
-Custom archetypes ship as TOML files under `$OPENHUMAN_WORKSPACE/agents/*.toml` (or `~/.openhuman/agents/*.toml` for user-global specialists). Custom definitions override built-ins on id collision.
-
-### Running a reusable sub-agent
-
-When the orchestrator calls `spawn_subagent`, the default contract is durable and asynchronous. The tool builds a deterministic compatibility selector from the parent session/thread, agent id, model override, sandbox mode, action root, and normalized task key/title. It then checks `orchestration::subagent_sessions` before spawning:
-
-- If a compatible worker is already running, the instruction is injected through its `RunQueue` and the parent gets a quick `subagent_session_id` / `task_id` reference.
-- If a compatible worker is idle or paused with reusable history, the harness starts a new transient run for the same durable `subagent_session_id` and passes the saved child history through `SubagentRunOptions.initial_history`, with the new instruction appended as a user-visible follow-up.
-- If the shape is incompatible, the worker was closed, `fresh: true` was passed, or no session exists, the harness creates a new durable session and worker thread.
-
-The child run is prepared and executed by the OpenHuman host through the
-neutral TinyAgents lifecycle:
-
-1. Receives parent cancellation and workspace from its typed run context; remaining legacy provider, sandbox, and transcript inputs stay scoped until their explicit migration lands.
-2. Resolves the sub-agent's model: inline `model` override first, then config-level pins (`[orchestrator].model`, `[teams.*].lead_model`, `[teams.*].agent_model`), then the archetype hint or inherited parent model.
-3. Filters the parent's tool registry per the definition's `tools`, `disallowed_tools`, and `skill_filter`. In `fork` mode, the parent's full registry is inherited verbatim.
-4. Builds a narrow system prompt, omitting the sections the definition asks to strip.
-5. Passes the prepared child to `tinyagents-orchestration` for lifecycle
- ordering and exactly one pause-or-terminal persistence action.
-6. Persists the child history and worker thread pointer under the durable
- `subagent_session_id` so later turns can resume or inspect it. Pause
- continuation also retains its complete TinyAgents task key.
-
-`wait_subagent` and `steer_subagent` accept either the durable `subagent_session_id` or the transient `task_id`; durable ids are preferred across turns. `list_subagents` shows reusable children for the current parent thread, and `close_subagent` marks a worker non-reusable and cancels it if it is still running. Inline blocking is explicit via `blocking: true`.
-
-The synthesized archetype delegations (`delegate_*`, `build_workflow`, and the other `delegate_name` tools) follow the same contract: they route through the durable async path by default, returning an `[async_subagent_ref]` (with `subagent_session_id` + `task_id`) immediately, and the finished result is inserted into the parent chat as a new system turn via `background_completions`/`background_delivery`. The queue behind that is the harness `tinyagents_tasks::CompletionRouter` over a per-workspace `JsonlCompletionStore` (`.openhuman/background_completions.jsonl`, keyed by chat thread): it dedupes by task id, holds the tombstones for results the parent collected inline or that a Stop/delete cancelled, counts delivery attempts and hands back the records that gave up. A record stays leased until the delivery turn lands (`mark_delivered`), so a result that finished but was never delivered is redelivered after a restart. The host keeps the `<background_agent_*>` wording (a `CompletionFormatter`), the 3s idle debounce, the system turn and its web_chat events, and the writer that persists a given-up result into the thread. The delivery turn persists its own closing message, `sender: "agent"`, id `agent:<run_id>`, `extraMetadata.requestId = run_id`, before it emits `chat_done` as `client_id: "system"`; the frontend reuses that id, so its usual `chat_done` append collapses onto the same row (the conversation store is idempotent for these deterministic `agent:`-prefixed ids; every other id is UUID-fresh and keeps the constant-time append path) instead of persisting the delivered result a second time. Interactive turns follow the same contract: `web_chat::presentation::deliver_response` stores the reply under `agent:<request_id>` before publishing `chat_done`, so an answer the core produced exists on disk whether or not a client is there to receive the announcement, a dropped socket or a reloaded webview costs a repaint, not the reply. The exception is a segmented delivery, where the client owns one row per segment and the core stores none; the frontend keeps generated ids there for exactly that reason. They fall back to inline blocking automatically when there is no parent agent turn or no chat thread to deliver into (cron/CLI), or when `blocking: true` is passed. Cross-turn continuity comes from three pieces: the per-turn `[active_subagents]` roster merges the live in-memory registry with the durable `subagent_sessions` store (so a cold-booted orchestrator still sees earlier workers); `continue_subagent` falls back from pause checkpoints to the durable store, resuming an idle worker with its persisted history; and a `workflow_proposal` payload found in a finished child's history is persisted as a parent-thread message (`extraMetadata.scope = "workflow_proposal"`) that the frontend rehydrates into the proposal card on thread load.
-
-### Spawn hierarchy and tiers
-
-Not every agent is allowed to spawn every other agent. The harness models a three-tier hierarchy that mirrors the cost / latency / depth-of-thought split between models:
-
-```text
-Primary (direct-capable, Master Agent on `coding` hint)
- │
- ├─► Worker ◄─── fast path: one delegation, leaf does the work
- │
- └─► Reasoning (slow, deep-thinking, e.g. planner on `reasoning` hint)
- │
- └─► Worker ◄─── deep path: reasoning decomposes, workers execute
-```
-
-Each `AgentDefinition` carries an `agent_tier` field (`chat` / `reasoning` / `worker`, default `worker`). The contract:
-
-| Tier | May spawn | Must NOT spawn | Typical members |
-| ----------- | --------------------- | ------------------------------- | ------------------------------------------------------------------------------- |
-| `chat` | `reasoning`, `worker` | another `chat` | `orchestrator` |
-| `reasoning` | `worker` | another `reasoning`, any `chat` | `planner` (today the canonical one) |
-| `worker` | nothing[^1] | anything | critic, image_agent, task_manager_agent, … |
-
-[^1]: Skill-wildcard entries (`{ skills = "*" }`) are exempt because they name no agent: they expand to the connected Composio actions as `Deferred` tools the agent reaches through `tool_search`, not to a spawn.
-
-Why the rules.
-
-- _Chat → chat is meaningless._ The chat tier exists for snappy UX. A chat agent spawning another chat agent just doubles TTFT and burns tokens without buying any new capability.
-- _Reasoning → reasoning blows up depth._ The reasoning tier is expensive. Chains of reasoning agents tend to re-decompose the same problem and create runaway hierarchies.
-- _Worker → anything mixes execution and orchestration._ Workers are leaves so the parent always sees one compact result, not a transcript of nested delegations.
-
-Enforcement. Two layers:
-
-1. Loader-time (static). [`agents::loader::validate_tier_hierarchy`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/agent/registry/agents/loader.rs) runs over the merged registry (built-ins + workspace TOMLs) and refuses to boot a registry that lists a same-tier or worker-with-subagents entry. Built-in archetypes are checked at compile-test time; user-shipped TOMLs are checked at workspace load.
-2. Runtime depth gate (dynamic). Independent of tier, the sub-agent runner caps total spawn chain depth at `MAX_SPAWN_DEPTH = 3` via a task-local counter incremented across `run_subagent`, surfaced as a `SpawnDepthExceeded` agent error. This makes a user-shipped TOML that drops the tier annotation still unable to recurse past three hops.
-
-> Status: the loader-time tier check, `agent_tier` field, and runtime depth-counter task-local are live. Depth is bounded by both the static loader contract and the runtime `MAX_SPAWN_DEPTH = 3` guard.
-
-### Toolkit-specific specialists
-
-For Composio toolkits with hundreds of actions (GitHub alone has 500+), loading every action into the sub-agent's tool set balloons prompt size. The harness ranks the toolkit's actions against the parent-refined task prompt with a cheap CPU-only filter (verb detection, token overlap, verb-alignment boost) and only loads the top-ranked subset into the sub-agent. No model call, pure heuristic, fast and explainable.
-
-## Triage: handling external triggers
-
-When a webhook fires, a cron ticks, or a Composio event arrives, the system can't just hand it straight to the orchestrator. Most triggers are noise; some warrant a notification; only a few deserve a full agent turn. The trigger-triage pipeline is the gate.
-
-```text
-TriggerEnvelope ──► run_triage ──► TriageDecision ──► apply_decision
- │ │
- │ ├─► drop (noise)
- │ ├─► notify only
- │ ├─► spawn trigger_reactor
- │ └─► spawn orchestrator
- │
- └── small local LLM (with cloud-LLM retry fallback)
-```
-
-The evaluator is intentionally cheap: a small local model where available, falling back to a remote model on retry. The decision is cached so identical triggers don't re-classify. Only triggers that escalate to "spawn orchestrator" go through the full `Agent::turn` machinery.
-
-## Hooks: observability and policy levers
-
-Two hook surfaces wrap the loop, on opposite ends:
-
-### Stop hooks (mid-turn)
-
-Stop hooks fire between iterations of the tool-call loop. They're the policy lever for budget caps, rate limits, and custom kill switches. Built-in hooks:
-
-- Budget stop hook: caps cumulative turn cost in USD using the per-iteration cost accumulator.
-- Max-iterations stop hook: caps iteration count from outside the agent's persistent config.
-- Action budget policy: `SecurityPolicy` enforces `config.autonomy.max_actions_per_hour` for side-effecting tool operations. Users can tune it in Settings, Advanced, Agent autonomy, or operators can override it with `OPENHUMAN_MAX_ACTIONS_PER_HOUR`.
-
-A hook returning `Stop` aborts the loop with a clear reason the caller can surface to the user. Stop hooks are distinct from interrupts (next section): they're policy-driven, not user-driven.
-
-### Post-turn hooks
-
-Post-turn hooks fire after the turn completes, in the background. They get a `TurnContext` snapshot, user message, assistant response, every tool call with arguments and outcome, total wall-clock, iteration count, session ID. Built-in consumers:
-
-- Cost log: final per-turn cost line.
-- Conversation logging: the `memory` lifecycle logs the reply after the turn, with one-line tool results (never arguments); there is no batching or idle flush. See [Memory architecture](memory.md).
-
-Long-term facts are written explicitly: the agent calls the `memory` tool's `learn` action. There is no automatic archivist.
-
-Hooks run via `tokio::spawn`, so the user gets their answer before any of them finish.
-
-## Interrupts: graceful cancellation
-
-Cancellation is the tinyagents steering channel. When the user hits Ctrl+C or sends `/stop`, the runner forwards the request into the harness's steering/cancellation seam, which stops the loop at safe points: before each tool execution, before each sub-agent spawn and before each provider call:
-
-- Every running sub-agent shares the cancellation scope and bails at its next checkpoint.
-- In-flight provider streams are dropped.
-- Buffered conversation turns are still stored (idle flush, or the exit flush on quit).
-
-Interrupts are user-driven; stop hooks are policy-driven. Both enter the same harness pause/stop plumbing, but from different sides.
-
-## Cost accounting
-
-Every provider response carries a `UsageInfo` block, input tokens, output tokens, cached input tokens, and an authoritative `charged_amount_usd` populated by the OpenHuman backend. `TurnCost` sums those across every provider call inside one turn so the harness can:
-
-- Emit per-iteration cost telemetry over the progress channel.
-- Feed the budget stop hook so a runaway turn cuts itself off mid-loop.
-- Log accurate end-of-turn cost lines.
-
-When the backend doesn't surface a charged amount (older builds, providers that don't bill through it), a small per-tier rate table provides a token-rate floor estimate. Direct cost from the backend always wins when available.
-
-## Web channel events and RPCs (assistant-ui elements pass)
-
-The assistant-ui-elements integration added a batch of additive `WebChannelEvent`s and RPCs so the frontend can render tool args/timing, plan/goal/queue state, and turn lifecycle without polling. `EVENTS_VERSION` (`core/bus.rs`) is `1.4.0`; every new field is optional/defaulted so an older subscriber keeps parsing what a newer publisher emits.
-
-New/extended socket events (bridged from `DomainEvent` onto `WebChannelEvent` by `web_chat::event_bus` and `openhuman_rpc::server::socketio`):
-
-- `ts` (epoch ms) is stamped on every event by `publish_web_channel_event` when the producer left it unset, so the frontend can order/measure latency without guessing at receive time.
-- `chat_done.timing`: `{ first_token_ms, first_tool_ms, total_ms, tokens_per_second }`, threaded from the progress bridge's per-turn `TurnTiming` through `ProgressBridgeHandle::timing_snapshot()`. `tokens_per_second` is derived from `output_tokens / (total_ms / 1000)` when both are known and `total_ms > 0`.
-- `chat_done.usage.context_tokens`: input plus output tokens from the root agent's final model call. It feeds the context-window gauge and excludes earlier calls and sub-agents; `input_tokens` and `output_tokens` remain summed turn spend.
-- `chat_cancelled`: `{ thread_id, client_id, request_id, cancel_reason: "user_stop" | "superseded", superseded_by }`. Emitted alongside (not instead of) the existing `chat_error{error_type:"cancelled"}`, on both the unscoped/scoped stop path and the superseded-by-a-newer-request path, and on the parallel-turn cooperative-cancel path (which previously published no terminal event at all).
-- `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`.
-- `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).
-
-New RPCs:
-
-- `agent.set_run_mode { thread_id, mode }` / `agent.get_run_mode { thread_id }`, read/flip a thread's Plan/Build `RunModeHandle`. `channel.web_chat` also accepts an optional `run_mode: "plan" | "build"` param (mirroring the socket `chat:start` payload) so a turn can start with the thread already in the requested mode instead of racing a separate RPC call; unrecognized values are logged and ignored.
-- `threads.goal_get` / `threads.todos_get`: read a thread's current goal/todo state directly .
-- `threads.token_usage { thread_id }`: returns persisted thread spend totals plus `last_turn_context_tokens`, the root agent's final-call input plus output used by the context-window gauge. Older turns without per-call usage fall back to their summed input plus output.
-- `threads.edit_message { thread_id, message_id, content, client_id? }` / `threads.regenerate { thread_id, message_id?, client_id? }`, both return `{ request_id }`. They cancel the thread's in-flight turn, fork the session transcript at a cut point via `TranscriptLocator::truncate_into_next_generation` (the sealed generation the fork was cut from is never touched, same "compaction never erases" guarantee), truncate the conversation-store message log and the turn-state snapshots for every dropped turn, then restart the turn with the edited content (`edit_message`) or the original prompt (`regenerate`). See `threads::ops::edit`'s module doc for the full UI-message-id -> transcript-cut-point mapping.
-- `channel.web_queue_remove { client_id, thread_id, item_id }`, remove one specific queued item from a thread's run queue.
-- `agent.context_breakdown { agent_id?, thread_id? }`, a UI-friendly view over the agent's rendered prompt size (system/tools/history split) for the composer's context-usage indicator.
-- `commands.list`: merges built-in commands with `skills.list` and `flows.list` into one slash-command catalog.
-
-`plan_exit` (the tool that flips a thread from Plan back to Build) only flips the mode when there is no plan review still parked on that thread (`agent::plan_review::gate::PlanReviewGate::parked_review_for_thread`), a review resolves before `request_plan_review` returns control to the agent, so this only matters for a mis-timed/concurrent `plan_exit` call racing a still-pending review, which must not unlock every tool before the user has actually approved anything.
-
-## Explicit run context and host capabilities
-
-`OpenHumanRunContext` is the live carrier at the shared chat, channel, and
-sub-agent turn seam. Roots snapshot their currently scoped origin, progress,
-stop hooks, dispatch state, thread, route slot, and workspace grant, then own
-or explicitly receive one cancellation token before passing the context to the
-runner; a recursive sub-agent forks it with
-`child()`, preserving shared cancellation/policy handles while isolating route
-observation and usage accounting. The shared runner creates
-`RunContext<OpenHumanRunContext>` through `into_tinyagents`, and the OpenHuman
-assembly and middleware registry consume that typed context directly. Route,
-and thread scopes still surround the drive only for legacy tool/model APIs
-outside the typed harness boundary. Recursive fan-out receives cancellation and
-workspace from its typed parent `RunContext` through `ToolDispatch`; it never
-reads ambient cancellation state.
-
-`OpenHumanHostBundleFactory` is the B1 host composition point. It constructs
-the context, definition, security, model, memory, budget, progress,
-tool-outcome and experience adapters from the same session/runtime inputs.
-OpenHuman retains all policy decisions; TinyAgents receives only the resulting
-canonical run context today. Wiring the complete host-capability bundle into
-every invocation remains a later cutover step.
-
-## Self-healing recap
-
-A few small adaptive systems sit on top of the main loop:
-
-- Tool-output summary circuit-breaker: three consecutive summary failures in a thread make TinyJuice stop asking for summaries in that thread, so results fall back to compaction and truncation.
-- Triage local-vs-remote retry: local LLM first; remote fallback on parse failure.
-- Unknown-tool and malformed-argument recovery: middleware rewrites an invalid model tool call into a recoverable result instead of aborting the run.
-
-None of these change the loop's shape, they just make the common failure modes recoverable without the user having to intervene.
-
-## Where to look in the code
-
-The harness shell lives under `crates/openhuman-core/src/agent/`, with the tinyagents adapter seam in `crates/openhuman-core/src/agent/tinyagents/` and archetype definitions in `crates/openhuman-core/src/agent/registry/`. The README in `crates/openhuman-core/src/agent/` enumerates the public surface; the most load-bearing files (paths relative to `crates/openhuman-core/src/agent/` unless prefixed) are:
-
-| File / dir | What lives there |
-| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
-| `session_host/runtime_session.rs` | `Agent::turn`: the lifecycle described above; routes into the tinyagents runner via `tinyagents/turn_runner.rs`. |
-| `tinyagents/mod.rs` | `run_turn_via_tinyagents_shared`: the shared tinyagents harness assembly (the live loop). |
-| `tinyagents/middleware.rs` | The named OpenHuman middleware stack (approval/security, tool policy, recovery, budgets, circuit breaker). |
-| `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. |
-| `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`. |
-| `message_convert.rs` | Concrete durable/provider conversion around canonical tool-call dialect APIs. |
-| `triage/` | External-trigger classification + escalation. |
-| `registry/agents/` | Built-in archetypes: one subdirectory per agent. |
-| `hooks.rs` / `stop_hooks.rs` | Post-turn and mid-turn hook surfaces. |
-| `cost.rs` | Per-turn USD/token accounting. |
-| `progress.rs` | Real-time progress events to the UI. |
-
-## Agent engine and orchestration on tinyagents
-
-Every agent turn uses TinyAgents. Chat and channel/CLI callers invoke the
-session/turn host, while a sub-agent call enters `agent/subagent_host` and its
-direct `tinyagents-orchestration::subagent` lifecycle. There is no
-`harness/subagent_runner` compatibility path. The surrounding OpenHuman seam:
-
-| File (`crates/openhuman-core/src/agent/tinyagents/`) | Role |
-| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `mod.rs` | The runner (`run_turn_via_tinyagents_shared`): installs the native `ChatModel`, host tool adapters, and middleware on an `AgentHarness`; runs one turn; caps output through `MaxTokensModel` (`agent/tinyagents/model.rs`); mirrors progress; forwards steering; and pauses gracefully at the model-call cap. |
-| `mod.rs` / `model.rs` / `tools.rs` / `convert.rs` | `RunPolicy` / `ChatModel` / `Tool` / message adapters (incl. unknown-tool policy and out-of-band reasoning forwarding). |
-| `observability.rs` | Harness `AgentEvent` → `AgentProgress` + cost; `GraphTracingSink` for graph events. |
-| `orchestration.rs` | Re-exported `graph::orchestration` task-store types; map-reduce fanout uses the TinyAgents SDK surface directly. |
-| `delegation.rs` | The durable `plan → execute ⇄ review → finalize` delegation graph (production worker wired in `orchestration::delegation`), checkpointed via TinyAgents' own `SqliteCheckpointer`. |
-
-Orchestration on graphs (`crates/openhuman-core/src/agent/orchestration/`):
-
-- Workflow phase DAG (`workflow_runs/engine.rs`) runs on a `dispatch ⇄ run_phase → done` conditional-routing graph; each phase fans its agents out via `graph::parallel::map_reduce`. The durable `workflow_runs` row stays the source of truth (controllers + resume read it).
-- Team member runtime (`agent_teams/runtime.rs`, `run_member_graph`) is a conditional-routing graph (`execute → complete|fail → done`).
-- Multi-stage delegation (`orchestration::delegation` + the `delegate` tool) runs `delegation.rs`, checkpointed to the session DB.
-- Detached sub-agents (`running_subagents.rs`) use TinyAgents `DetachedTaskRegistry` for ownership-aware snapshots, wait/timeout, steering lookup, cooperative cancellation, hard abort, and terminal cleanup. OpenHuman retains durable task-store projection, product/session metadata, RPC and delivery semantics, and the `RunQueue` compatibility fallback.
-
-Deliberately kept off the crate's primitives (these are design decisions, not gaps):
-
-- Sub-agent host policy (`subagent_host/`) stays OpenHuman-owned: definition
- resolution, archetype tool filtering, provider resolution, narrow prompt
- building, memory context, worker-thread mirror, handoff configuration and
- product checkpoint/session projection. It implements the TinyAgents
- planner/executor/persistence traits directly. The neutral driver, not a
- host-local runner, owns lifecycle sequencing and task-key coalescing.
-- Durable run ledgers (`workflow_runs`, `agent_teams`, `command_center`, `subagent_sessions`) stay on openhuman SQLite/JSON until their controller projections and restart semantics are mapped onto TinyAgents task/status/journal records. The `agent_teams` race-safe SQL compare-and-swap task claim remains OpenHuman-owned.
-
-> TinyAgents ships harness store/cache/session primitives (`harness::store` with JSONL append stores, `harness::cache`, `harness::subagent`, lineage-aware status), graph task stores, the detached runtime registry, and conformance contracts. The session shell and product-specific sub-agent build/delivery pipeline remain OpenHuman-owned.
-
-## Reliability: breakers, handback and classified failures
-
-Three cooperating mechanisms keep runs from wandering or dying silently:
-
-No-progress circuit breaker (`RepeatedToolFailureMiddleware`, `crates/openhuman-core/src/agent/tinyagents/middleware.rs`) is a thin driver over the crate's `NoProgressTracker`. It fingerprints each tool call's arguments and feeds outcomes into an escalation ladder: `Continue` → `Nudge` (a structured "no progress since step X" corrective injected via `SteeringCommand::InjectMessage`, which is safe inside interactive turns) → `Halt` (record a root-cause summary into the `HaltSummarySlot`, pause via the steering handle). Identical arguments retried count toward the trip (threshold 3 consecutive identical failures); _recoverable_ failures (timeouts, connection resets, rate limits, 5xx) get an extended headroom ladder instead of the fixed crate thresholds.
-
-Sub-agent handback (`subagent_host/`): a sub-agent run resolves to one of
-three statuses:
-
-- `Completed`: clean final response.
-- `AwaitingUser { question, options }`: the child called
- `ask_user_clarification`; the host projects its full checkpoint (history,
- question, options and overrides) under the complete TinyAgents task key
- `(root_run_id, parent_run_id, thread_id, task_id)`. Resume recovers that
- original key rather than deriving a new one from the fresh parent turn.
-- `Incomplete { reason }`: the child was halted by the breaker or hit its model-call cap. The delegating parent relays the blocker instead of treating a halted child as a finished answer or re-spinning the identical delegation.
-
-A breaker halt at the top level is likewise never a silent finish, and the breaker's root-cause summary is not shown to the user as is either: it is worded for a model ("Report this back instead of retrying"). `hit_cap` / `breaker_halt` are surfaced on the turn result, and the chat turn closes the halted run the same way it closes a tool turn that ended without final text (`session_host/driver/grounded_close.rs`):
-
-1. A tools-disabled wrap-up call whose instruction restates the turn's tool records, each failure's own message included, with the breaker summary passed as a stop note to explain rather than repeat.
-2. A separate check call that sees only the request, the records and the candidate reply. It rejects a reply that only narrates intent, contradicts a record, or leaves out the failure that explains an unfinished request.
-3. A deterministic fallback for an empty, tool-calling, rejected or unverified reply (a check that failed or gave no verdict). It quotes each tool result and the stop note.
-
-Accepted text is streamed only after the check, so a rejected reply never renders.
-
-Classified tool failures (`tinytools::status`, vendored under `vendor/tinyagents/vendor/tinytools`): every failed tool call is classified into a transport-agnostic `ClassifiedFailure { class, category, cause_plain, next_action, recoverable }`. Classes cover `MissingPermission`, `MissingApp`, `ServiceUnavailable`, `BadCredentials`, `BlockedByPolicy`, `ModelConnection`, `Timeout`, `Denied`, `ApprovalExpired`; categories map 1:1 to UI states: _recoverable_ (safe auto-retry), _blocked by policy_ (change settings), _needs user confirmation_ (sign in / install / grant), _user declined_ (never auto-retried). The classification rides `AgentProgress::ToolCallCompleted.failure` (including for sub-agent calls) into the chat timeline.
-
-## Journals, replay and migration shadows
-
-Every run appends to a durable event journal (`tinyagents/journal.rs`): a `StoreEventJournal` over a JSONL append store at `{workspace}/tinyagents_store/journal`, composed as `FanOutSink` (live bridge + journal) → `RedactingSink` (credential masking before persistence), with restart-stable event ids (`{run_id}-evt-{offset}`). Even an unobserved background turn is reconstructable after the fact. Three read-only RPCs expose it: `agent_run_events` (paged, late-attach replay by `run_id`/`offset`/`limit`), `agent_run_status` (latest harness status), and `agent_runs_active` (active runs, filterable by thread or root run).
-
-The remaining store cutover runs on shadow scaffolding. Product behavior is unchanged and divergences are logged:
-
-- Sessions live in the storage backend (`DriverSessionStores`); the file-era dual-write and shadow read are gone, and `config.session_dual_write` / `session_shadow_reads` no longer have any effect.
-
-Goals and todos are crate-backed outright, with no shadow: thread goals live in the crate `graph.goals` KV store (`agent/goals/store.rs`), and the session todo list lives in the in-process crate `graph.todos` store (`agent/todos/ops.rs`); see [Goals and todos](../../features/goals-and-todos.md).
-
-## Workload routes and the burst tier
-
-`tinyagents/routes.rs` is the declarative TinyAgents `ModelRouter` for the OpenHuman workload roles `chat`, `reasoning`, `agentic`, `coding`, `burst`, `summarization`, and `vision`, keyed by their `hint:*` aliases. It owns fallback chains and capability gates; `inference::provider::factory` resolves each selected role to its configured native `ChatModel`, on the managed backend, the pinned default model (`openrouter/deepseek/deepseek-v4-flash` unless changed under Settings → Routing → Default model); there are no per-role tier endpoints. The `burst` role serves low-context, high-fanout workers.
-
-## See also
-
-- [Architecture overview](README.md): where the harness sits in the bigger picture.
-- [Memory](../../features/memory.md) and [Memory architecture](memory.md): the `memory` tool, the per-turn memory lifecycle and conversation logging.
-- [Automatic model routing](../../features/model-routing/README.md): how `model: "hint:reasoning"` resolves to a concrete provider+model.
-- [Native tools: agent coordination](../../features/native-tools/agent-coordination.md): the user-facing surface for `spawn_subagent`, `delegate_*`, `todo`.
diff --git a/gitbooks/developing/architecture/flows-on-tinyagents.md b/gitbooks/developing/architecture/flows-on-tinyagents.md
deleted file mode 100644
index fe4da4e83f..0000000000
--- a/gitbooks/developing/architecture/flows-on-tinyagents.md
+++ /dev/null
@@ -1,351 +0,0 @@
----
-description: >-
- How a saved flow runs: the WorkflowGraph lowered onto tinyagents, the run
- state, the capability seam, agent nodes as nested graphs, the two-layer
- security model and the one-trigger model.
-icon: diagram-project
----
-
-# Flows on TinyAgents
-
-The flows domain ([`crates/openhuman-core/src/flows/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/flows)) runs
-saved automations: the workflows a user builds in the canvas or the copilot
-builds for them. It does not contain a workflow engine. The vendored, host-agnostic [`tinyflows`](https://github.com/tinyhumansai/tinyflows) crate runs every flow. It lowers each workflow onto the same [`tinyagents`](https://crates.io/crates/tinyagents) state-graph engine that the [agent harness](agent-harness.md) runs on. A saved flow is therefore a tinyagents graph, and each of its `agent` nodes is itself a tinyagents graph, a graph within a graph.
-
-This page is the flows counterpart to [Agent harness](agent-harness.md). That page explains how one agent turn runs. This one explains how one flow runs, and how the two runtimes compose.
-
-## Two crates, one engine
-
-| Crate | Role | Where |
-| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `tinyflows` | Host-agnostic workflow model + validate + compile + run. Never hard-codes a vendor; every outside-world effect goes through a capability trait. | [`vendor/tinyflows/`](https://github.com/tinyhumansai/tinyflows) |
-| `tinyagents` | The published state-graph + agent-loop harness both runtimes lower onto. | crate; OpenHuman seam in [`crates/openhuman-core/src/agent/tinyagents/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/agent/tinyagents) |
-| `openhuman::flows` | The host: CRUD/run/resume RPCs, SQLite store, triggers, the builder/scout agents. | [`crates/openhuman-core/src/flows/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/flows) |
-| `openhuman::flows::tinyflows` | The capability seam: adapters implementing the `tinyflows` traits over real OpenHuman services. | [`crates/openhuman-core/src/flows/tinyflows/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/flows/tinyflows) |
-
-`tinyflows` is published to crates.io and is deliberately persistence-free and
-vendor-free (see its [`CLAUDE.md`](https://github.com/tinyhumansai/tinyflows/blob/main/CLAUDE.md)); OpenHuman
-is the first downstream host. It injects everything real through the seam.
-
-## The run pipeline
-
-A flow is a [`WorkflowGraph`](https://github.com/tinyhumansai/tinyflows/tree/main/crates/tinyflows/src/model), a directed
-graph of typed nodes joined by edges, as JSON on the wire. Running it is a
-fixed four-stage pipeline
-([`vendor/tinyflows/crates/tinyflows/src/lib.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/lib.rs),
-[`compiler.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/compiler.rs),
-[`engine.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/engine.rs)):
-
-```mermaid
-flowchart LR
- subgraph host["openhuman::flows (host)"]
- store[(SQLite<br/>flow store)] --> graph[WorkflowGraph<br/>JSON]
- end
- graph --> validate["validate<br/>(structural)"]
- validate --> compile["compiler::compile<br/>(lower onto tinyagents)"]
- compile --> gb["tinyagents<br/>GraphBuilder"]
- gb --> run["engine::run_with_checkpointer<br/>(drive to completion)"]
- run --> outcome["RunOutcome<br/>{ output, pending_approvals, cancelled }"]
- seam["openhuman::flows::tinyflows<br/>capability seam"] -. host-injected .-> run
-```
-
-1. validate ([`validate.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/validate.rs)) -
- structural checks over the raw graph: unique node ids, that every referenced
- node exists, and exactly one trigger node (0 → `MissingTrigger`, >1 →
- `MultipleTriggers`). The whole model rests on this single-trigger invariant (see [Trigger model](#the-trigger-model)).
-2. compile ([`compiler.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/compiler.rs)): runs
- validation, then lowers the validated graph onto a fresh `tinyagents` state
- graph. Every tinyflows node becomes a tinyagents graph node, and every
- tinyflows edge becomes a graph edge, with conditional/parallel routing and a
- merge barrier expressed on the tinyagents graph layer. The graph is rebuilt
- per run so compilation stays independent of any host state.
-3. run ([`engine.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/engine.rs)): the host
- calls `engine::run_with_checkpointer_journaled_observed`
- ([`flows/ops.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/ops.rs), `flows_run`), which
- drives the compiled graph to completion, folding each node's output into the
- run state and pausing at approval gates.
-4. outcome: a `RunOutcome { output, pending_approvals, cancelled }`; the host
- persists live steps through the `FlowRunObserver` and exports the durable
- graph observations to Langfuse
- ([`tinyflows/langfuse_export.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/tinyflows/langfuse_export.rs)).
-
-Because the engine keys persisted state by a caller-supplied `thread_id`,
-durable human-in-the-loop resume is `engine::resume_with_checkpointer` over the same
-`tinyagents::graph::SqliteCheckpointer` the agent harness uses: opened once per
-host at `<workspace_dir>/flows/checkpoints.db`
-([`caps/ops.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/tinyflows/caps/ops.rs), `open_flow_checkpointer`).
-
-## Run state: one JSON map, a merge reducer, and the `{json,text,raw}` envelope
-
-The entire run's working memory is a single `serde_json::Value` laid out as
-([`vendor/tinyflows/crates/tinyflows/src/engine.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/engine.rs)):
-
-```json
-{
- "run": {
- "trigger": {
- /* the trigger payload seeded at start */
- }
- },
- "nodes": {
- "planner": {
- "items": [
- /* … */
- ]
- },
- "drafter": {
- "items": [
- /* … */
- ]
- }
- }
-}
-```
-
-As the graph executes, a merge reducer folds each node's item output into
-`nodes.<id>`. Because merging is additive rather than last-writer-wins, a
-fan-in node can see every predecessor's output at once, and the parallel branches of a fan-out
-(`split_out`) node merge back at the barrier without
-clobbering one another. The tinyagents graph layer uses the same reducer pattern
-for its own `map_reduce` fan-out (see [Agent harness](agent-harness.md)).
-
-Every capability node (agent, tool_call, http_request and code) emits its
-output wrapped in a stable `{ json, text, raw }` envelope. Downstream nodes
-never see the raw completion shape. They bind against the envelope:
-
-- `=item.json.<field>` is the structured object, when the producer emitted JSON.
-- `=item.text` is the prose form.
-- `=item.raw` is the untouched producer output.
-
-### The `=`-expression scope
-
-Node config is resolved through jq/jaq `=`-expressions
-([`vendor/tinyflows/crates/tinyflows/src/expr.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/expr.rs)) against a
-per-node scope with four bindings:
-
-| Binding | What it holds |
-| ------- | --------------------------------------------------------------------------------------- |
-| `item` | the first input item's `json` (the direct predecessor's output) |
-| `items` | every input item's `json`, in edge order |
-| `run` | run metadata and the trigger payload (`run.trigger`) |
-| `nodes` | every completed node's output, keyed by id: `{ "<id>": { "item": …, "items": [ … ] } }` |
-
-So a node three hops downstream can reach back to a specific ancestor by id, for example
-`"=nodes.planner.item.json.plan"`. That is how the demo workflow passes
-the planner's structured plan into the drafter's prompt. The `"=item.text"` form is
-the shorthand for the immediate predecessor. Missing segments resolve to `null`
-rather than erroring, and a malformed jq program yields `null` rather than
-panicking: node wiring never crashes the run.
-
-## The capability seam
-
-`tinyflows` touches nothing real on its own. LLM calls, tools, HTTP,
-code, persistence and sub-workflow lookup are each a capability trait that the host
-implements ([`vendor/tinyflows/crates/tinyflows/src/caps/mod.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/caps/mod.rs)).
-`openhuman::flows::tinyflows::caps` supplies one adapter per trait, assembled into a
-`Capabilities` bundle per run by `build_capabilities`
-([`caps/`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/tinyflows/caps/mod.rs)):
-
-| tinyflows trait | Node(s) it backs | OpenHuman adapter | Wraps |
-| ------------------ | ------------------------------- | ---------------------------------- | ------------------------------------------------ |
-| `LlmProvider` | `agent` (bare), `output_parser` | `OpenHumanLlm` | `inference/provider` (`create_chat_provider`) |
-| `AgentRunner` | `agent` (with `agent_ref`) | `OpenHumanAgentRunner` | the agent registry + harness `Agent` |
-| `ToolInvoker` | `tool_call` | `OpenHumanTools` | Composio + native `oh:` tools |
-| `HttpClient` | `http_request` | `OpenHumanHttp` | `HttpRequestTool` (allowlist + DNS-rebind guard) |
-| `CodeRunner` | `code` | `OpenHumanCode` | the sandbox (`execute_in_sandbox`) |
-| `StateStore` | resumable/stateful runs | `FlowState` (`FlowStateDocuments`) | namespaced documents in the catalog |
-| `WorkflowResolver` | `sub_workflow` by id | `OpenHumanWorkflowResolver` | the saved-flow store (`load_flow_graph`) |
-| `MemoryProvider` | `memory` | `OpenHumanMemory` | the memory store (`tinyflows/memory_adapter.rs`) |
-
-`AgentRunner` is optional in the crate (`Capabilities::agent` is
-`Option`): a host without an agent registry leaves it `None` and `agent` nodes
-fall back to a bare `LlmProvider` completion. OpenHuman always wires it, so
-`agent` nodes get the real agent runtime described next. Of the remaining
-optional slots, `tasks` takes the crate's own `TokioTaskRunner`, while `shell`
-and `approvals` are left `None`: there is no host shell adapter yet, and
-approvals reuse the engine's pause-and-`flows_resume` fallback.
-
-## Agent nodes: a graph within the graph
-
-A flow `agent` node names a registered agent kind through a trusted
-`agent_ref` in its config (a custom specialist, …).
-`OpenHumanAgentRunner::run_agent` resolves that ref and routes on what it finds:
-
-- A harness `AgentDefinition` exists: build a full harness `Agent`
- (`Agent::from_config_for_agent`) and run the node's request through
- `run_single`. That is the same entry the builder, scout and cron
- jobs use, and internally it drives `run_turn_via_tinyagents_shared`
- ([`crates/openhuman-core/src/agent/tinyagents/mod.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/agent/tinyagents/mod.rs)) -
- the tinyagents `AgentHarness` tool-call loop. The definition's ToolScope,
- `sandbox_mode`, and `max_iterations` govern the inner turn.
-- Only a custom `AgentRegistryEntry` exists (no full definition): use the
- persona-shaping fallback. the entry's `system_prompt` (and model, when the node
- didn't pin one) is prepended and the request runs through
- `OpenHumanLlm::complete`, a single completion with no private tool loop. This
- keeps custom registry agents working.
-
-The result is nesting: the flow is a tinyagents graph whose `agent` nodes each run a nested tinyagents graph (one agent turn).
-
-```mermaid
-flowchart TB
- subgraph flow["Flow = tinyagents graph (compiled WorkflowGraph)"]
- t[trigger] --> a["agent node<br/>agent_ref = planner"]
- a --> tc[tool_call node]
- tc --> tr[transform node]
- end
- a -.->|"run_agent → Agent::from_config_for_agent → run_single"| inner
- subgraph inner["Agent turn = nested tinyagents graph (AgentHarness)"]
- p[provider call] --> parse[parse tool calls]
- parse --> tools[dispatch tools]
- tools --> compact[context guard]
- compact --> p
- parse --> done[final text]
- end
- done -.->|"{ json, text, raw } envelope"| tc
-```
-
-Either path returns a JSON value; the `agent` node folds it into the
-`{ json, text, raw }` envelope (with an `output_parser` sub-port applying the
-node's declared schema), so a downstream node's binding is identical whether the
-node ran a full agent turn or a bare completion.
-
-`agent_ref` is resolved from trusted node config only, never from model
-output, so a prompt-injected upstream completion cannot pick an arbitrary agent
-kind. The builder's dry-run exercises this path too:
-`dry_run_workflow` compiles a draft and runs it against `tinyflows`' mock
-capabilities wired with a `MockAgentRunner`
-([`vendor/tinyflows/crates/tinyflows/src/caps/mock.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/caps/mock.rs)),
-so a draft whose `agent` nodes carry an `agent_ref` is self-tested end-to-end
-before it is ever saved.
-
-## The security model: two gates
-
-A flow run is guarded on two independent layers, an outer one owned by the
-flows runtime and an inner one owned by the agent harness.
-
-Outer gate: the flow's origin and autonomy tier. `flows_run`/`flows_resume`
-scope a `TrustedAutomation { source: Workflow { require_approval } }` origin
-around the whole engine future
-([`flows/ops.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/ops.rs), via
-`with_origin`). Before an _acting_ node dispatches, the seam consults the user's
-`[autonomy]` tier through `SecurityPolicy::gate_decision` for that node's
-`CommandClass` (`http_request` → Network, `code` → Write, native `oh:` tools →
-their classified class) in `enforce_node_tier_gate`
-([`caps/`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/tinyflows/caps/mod.rs)):
-
-- a `readonly` run is blocked at the network/code boundary and never dispatches;
-- a `supervised` run's `Prompt` decision is escalated by `gate_call_for_tier`
- into a forced `ApprovalGate` round trip, even when the flow's own
- `require_approval` is `false`, so the tier's "ask me" can't be silently
- defeated by a saved flow's default trust.
-- a `full` run passes through.
-
-Composio `tool_call` nodes get an extra deny-by-default curation gate
-(`is_curated_flow_tool`): a slug is allowed only if it resolves to a known,
-curated, in-scope, connected toolkit action. This is stricter than the general agent
-tool-call path, because a flow's slug is a free-form string the author typed
-rather than one the backend returned from live discovery.
-
-Inner gate: the agent definition's ToolScope and sandbox. When an `agent`
-node runs a full harness `Agent`, that turn runs under the same `Workflow`
-origin (the engine future is already inside `with_origin`), so the autonomy tier
-and approval gate apply to the inner turn automatically, with no new origin
-wrapper. On top of that, the agent definition's own `ToolScope`,
-`sandbox_mode`, and iteration cap bound what the turn can do, exactly as they do
-for a chat sub-agent. So an `agent` node is gated twice: the flow's outer
-autonomy/origin gate and the agent's inner tool/sandbox gate.
-
-`agent_ref` being trusted-config-only is the third leg: untrusted trigger or
-upstream data can influence arguments (bounded by the curation, scope and
-approval checks) but never which agent kind or tool identity runs.
-
-## The trigger model
-
-`tinyflows` enforces exactly one trigger node per graph at validate time
-([`validate.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/validate.rs)). A workflow therefore
-has a single entry point, and the trigger's payload is what seeds `run.trigger`
-in the run state.
-
-That is a model-level constraint, not a product limitation. Multi-trigger is
-a host-side concern today, handled by the flows domain rather than the engine.
-`FlowTriggerSubscriber` ([`flows/bus.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/bus.rs)) is
-the trigger → run bridge: it subscribes to the normalized domain events a saved
-flow's single trigger node can bind to and calls `flows::ops::flows_run` for each
-match:
-
-- The schedule runtime's `TriggerSink`: a `flow`-type cron job fired; the one
- named flow is loaded, re-checked for a still-live `schedule` trigger, and
- dispatched with an empty trigger payload.
-- `DomainEvent::ComposioTriggerReceived`: every enabled flow with an
- `app_event` trigger bound to that `toolkit`/`trigger_slug` is dispatched with
- the event payload seeded into `run.trigger`.
-
-Dispatch is deduped per `flow_id` (a trigger burst can't spawn overlapping runs
-for the same flow), while the interactive `flows_run` RPC is deliberately not
-deduped, so a user asking to run a flow again is always honored.
-
-So "run this flow on a schedule and when a Gmail message arrives" is
-expressed as two host subscriptions fanning into the same one-trigger graph.
-Multiple triggers on one graph are future work. Nothing in the seam or the store depends on them today.
-
-## Builder, scout and executor: one harness
-
-The three agents that touch flows all run on the shared agent harness:
-`Agent::from_config_for_agent` → `run_single` under a scoped origin, the same
-pattern the flow's own `agent` nodes use:
-
-| Agent | Registry id | Entry point | Tool belt |
-| ----------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Builder (copilot) | `workflow_builder` | `flows_build` ([`ops.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/ops.rs)) | `propose_workflow` / `revise_workflow` (validate-only), `dry_run_workflow` (compile + run vs. mocks), `save_workflow`, `run_workflow`, authoring tools from `tinyflows_copilot::tools`, bound by ([`builder_host.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/builder_host.rs)); Composio catalog/connection reads ([`builder_tools.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/builder_tools.rs)) |
-| Scout (discovery) | `flow_discovery` | `flows_discover` ([`ops.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/ops.rs)) | `suggest_workflows` (`tinyflows_copilot::tools`, bound by [`builder_host.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/builder_host.rs)) |
-| Executor | (the engine) | `flows_run` / `flows_resume` | the capability seam above |
-
-Both agents live under
-[`crates/openhuman-core/src/flows/agents/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/flows/agents) as
-first-class registry agents (`agent.toml` + `prompt.md`), on the reasoning tier
-with narrow, safety-reviewed tool belts. The builder is tool-assisted
-end-to-end: it proposes graphs (validate-only), dry-runs them against mock
-capabilities as a self-test loop, and only then saves a real flow and test-runs it with confirmation first. The full discover → build → save → run lifecycle:
-
-```mermaid
-sequenceDiagram
- participant U as User
- participant S as flow_discovery<br/>(scout)
- participant B as workflow_builder<br/>(builder)
- participant St as flow store<br/>(SQLite)
- participant E as tinyflows engine
-
- U->>S: flows_discover
- S->>S: suggest_workflows (validate ideas)
- S-->>U: FlowSuggestion[]
- U->>B: flows_build (pick a suggestion / prompt)
- B->>B: propose_workflow (validate draft)
- B->>E: dry_run_workflow (compile + run vs. mocks)
- E-->>B: mock RunOutcome (self-test)
- B->>St: save_workflow (existing flow)
- B-->>U: WorkflowProposal
- U->>E: flows_run (confirm-first)
- E->>E: validate → compile → run (real caps)
- E-->>U: RunOutcome (live steps + Langfuse trace)
-```
-
-## Where to look in the code
-
-| Path | What lives there |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
-| [`vendor/tinyflows/crates/tinyflows/src/`](https://github.com/tinyhumansai/tinyflows/tree/main/crates/tinyflows/src) | The engine: `model/`, `validate.rs`, `compiler.rs`, `engine.rs`, `expr.rs`, `caps/`, `nodes/`. |
-| [`vendor/tinyflows/crates/tinyflows/src/caps/mod.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/caps/mod.rs) | The capability traits + `Capabilities` bundle. |
-| [`crates/openhuman-core/src/flows/tinyflows/caps/`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/tinyflows/caps/mod.rs) | The host adapters, `build_capabilities`, `open_flow_checkpointer`, the two-layer gate helpers. |
-| [`crates/openhuman-core/src/flows/ops.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/ops.rs) | `flows_run` / `flows_resume` / `flows_build` / `flows_discover` and CRUD. |
-| [`crates/openhuman-core/src/flows/bus.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/bus.rs) | `FlowTriggerSubscriber`: the host-side multi-trigger bridge. |
-| [`crates/openhuman-core/src/flows/builder_tools.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/builder_tools.rs) | The Composio-bound builder reads; the authoring tools are `tinyflows_copilot::tools`, bound by `flows/builder_host.rs`. |
-| [`crates/openhuman-core/src/flows/agents/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/flows/agents) | `workflow_builder` + `flow_discovery` agent definitions. |
-| [`crates/openhuman-core/src/flows/tinyflows/langfuse_export.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/tinyflows/langfuse_export.rs) | Post-run export of the durable graph observations. |
-
-## See also
-
-- [Agent harness](agent-harness.md): the tinyagents turn every `agent` node (and
- the builder/scout) runs on.
-- [Security (`crates/openhuman-core/src/security/`)](security.md): the `SecurityPolicy` /
- autonomy tier the outer node gate consults.
-- [Architecture overview](README.md): where flows sit in the bigger picture.
diff --git a/gitbooks/developing/architecture/frontend.md b/gitbooks/developing/architecture/frontend.md
deleted file mode 100644
index 5c54ba462c..0000000000
--- a/gitbooks/developing/architecture/frontend.md
+++ /dev/null
@@ -1,733 +0,0 @@
----
-description: >-
- The React and Vite frontend in app/src/: state, services, providers,
- routing, components and hooks.
-icon: browsers
----
-
-# Frontend
-
-`app/src/` is the OpenHuman desktop UI: a Vite and React 19 tree in the pnpm workspace `openhuman-app`. It uses Redux Toolkit with persistence for session state, talks to the in-process Rust core over JSON-RPC (`coreRpcClient` over local HTTP, with the Tauri `relay_http_rpc` command as a fallback relay) and socket.io (`socketService`), and reaches the cloud backend via REST (`apiClient`). Heavy logic lives in the core, not here.
-
-This page is a single reference. Use the table of contents to jump between sections.
-
-The tree also carries a mobile shell: `AppRoutesIOS.tsx`, `pages/ios/`, the `services/transport/` connection profiles and the `app/src-tauri-mobile/` host. That client is experimental and not part of the shipped desktop host, which targets Windows, macOS and Linux only. It appears here because those files sit in the same tree and share the `App.tsx` provider chain. See [iOS companion](../../features/ios-companion.md) for what it is and what still has no desktop surface.
-
-## Quick reference
-
-| Section | Covers |
-| -------------------------------------------- | --------------------------------------------------------------- |
-| [Architecture](#architecture-overview) | Provider chain, build, layout, conventions |
-| [State management](#state-management) | Redux Toolkit slices, selectors, persistence |
-| [Services layer](#services-layer) | `apiClient`, `socketService`, `coreRpcClient` |
-| [Providers](#providers) | `ThemeProvider`, `CoreState`, `Socket`, `ChatRuntime` providers |
-| [Pages and routing](#pages-and-routing) | `HashRouter`, route guards, main routes |
-| [Components](#components) | UI / settings component patterns |
-| [Hooks and utilities](#hooks-and-utilities) | Shared hooks, helpers, config |
-
-## Scale
-
-| Metric | How to read it |
-| --------------------------------------- | -------------------------------------------------------------- |
-| TypeScript / TSX files under `app/src/` | `find app/src -name '*.ts' -o -name '*.tsx' \| wc -l` |
-| App-level hooks | `ls app/src/hooks/*.ts app/src/hooks/*.tsx \| wc -l` |
-| Test runner | Vitest (`app/test/vitest.config.ts`) |
-
-## Directory layout
-
-```text
-app/src/
-├── App.tsx # Provider chain + HashRouter shell (desktop + mobile shells)
-├── AppRoutes.tsx # Desktop route table (AppRoutesIOS.tsx for mobile)
-├── main.tsx # Entry (polyfills, Sentry, store, styles)
-├── store/ # Redux slices, selectors, userScopedStorage persistence
-├── providers/ # ThemeProvider, CoreStateProvider, SocketProvider, ChatRuntimeProvider
-├── services/ # apiClient, socketService, coreRpcClient, transport/, api/*
-├── lib/ # AI prompt loaders, i18n, MCP helpers, platform, tunnel crypto
-├── pages/ # Route-level screens (incl. onboarding/, ios/, dev/)
-├── features/ # Feature verticals (human/, conversations/, voice/, wallet/, skills/)
-├── components/ # Shared UI (incl. settings/, layout/shell/, accounts/)
-├── hooks/ # App hooks
-├── utils/ # Config, Tauri command wrappers, routing utilities
-└── assets/ # Icons and static assets
-```
-
-## Architecture overview
-
-### System architecture
-
-OpenHuman's desktop UI is a React 19 app (`app/src/`) that:
-
-- Uses Redux Toolkit with persistence for session-related state
-- Connects to the backend with REST (`apiClient`) and to the local core with Socket.io (`socketService` → core socket endpoint)
-- Calls the Rust core (embedded in the Tauri host as a tokio task) over HTTP via `coreRpcClient` (JSON-RPC methods implemented in `crates/openhuman-core/src/`); non-loopback plain-http runtimes are relayed through the Tauri `relay_http_rpc` command
-- Leaves AI prompts to the core: bundled `crates/openhuman-core/src/agent/prompts` ship as Tauri resources (see `crates/openhuman-app/tauri.conf.json` resources) and are read core-side, not by the frontend
-- Uses a minimal MCP-style helper layer under `lib/mcp/` (transport, validation)
-
-### Entry points
-
-| File | Purpose |
-| ----------------------- | -------------------------------------------------------------------------------- |
-| `app/src/main.tsx` | React root, polyfills, Sentry boundary, store, global styles |
-| `app/src/App.tsx` | Provider chain (see below) + desktop/mobile shells, Settings |
-| `app/src/AppRoutes.tsx` | `HashRouter` routes, `ProtectedRoute` / `PublicRoute` / `DefaultRedirect` guards |
-
-### Provider chain
-
-<!-- BEGIN GENERATED: provider-chain — source app/src/App.tsx via scripts/generate-architecture-docs.mjs; do not edit between markers (run `pnpm docs:generate`) -->
-
-_Generated from `app/src/App.tsx` by `scripts/generate-architecture-docs.mjs`. Do not edit by hand — run `pnpm docs:generate` to refresh._
-
-| # | Component | Role |
-| --- | --- | --- |
-| 1 | `Sentry.ErrorBoundary` | Crash boundary; renders ErrorFallbackScreen |
-| 2 | `Provider` | Redux store; enables useAppSelector / dispatch app-wide |
-| 3 | `PersistGate` | Holds UI until persisted Redux slices rehydrate |
-| 4 | `ThemeProvider` | Theme tokens and dark-mode handling |
-| 5 | `I18nProvider` | Localization context consumed via useT |
-| 6 | `BootCheckGate` | Blocks render until the core boot snapshot resolves |
-| 7 | `CoreStateProvider` | Core app snapshot: auth, session, onboarding state |
-| 8 | `SocketProvider` | Core socket.io events; desktop only (mobile uses the TunnelTransport relay) |
-| 9 | `ChatRuntimeProvider` | Chat runtime events, tool timeline, and approvals |
-| 10 | `Router` | HashRouter navigation for all routes |
-| 11 | `CommandProvider` | Command palette context |
-| 12 | `ServiceBlockingGate` | Blocks the shell until required services are configured |
-
-<!-- END GENERATED: provider-chain -->
-
-Why this order
-
-1. Redux `Provider` is outermost so `useAppSelector` / dispatch work everywhere.
-2. `PersistGate` rehydrates persisted slices before children assume stable auth/session.
-3. `BootCheckGate` / `CoreStateProvider` resolve the core boot snapshot (auth, onboarding) before feature providers mount.
-4. `SocketProvider` (desktop only) and `ChatRuntimeProvider` depend on that core state for realtime events and approvals.
-5. `Router` supplies navigation to all routes.
-
-### Module relationships (simplified)
-
-```text
-App.tsx
- ├─ Redux store + persistor
- ├─ ThemeProvider / I18nProvider - theme tokens, useT() localization
- ├─ BootCheckGate - waits for the core boot snapshot
- ├─ CoreStateProvider - auth/session/onboarding snapshot (fetchCoreAppSnapshot RPC)
- ├─ SocketProvider - socket.io connection to the local core (desktop only)
- ├─ ChatRuntimeProvider - chat streaming, tool timeline, approvals → Redux
- └─ AppShell (desktop or mobile)
- ├─ AppRoutes - PublicRoute / ProtectedRoute / DefaultRedirect
- └─ SettingsModal - overlay mounted when the URL is /settings/*
-```
-
-### Services layer (conceptual)
-
-```text
-services/
- ├─ apiClient → REST to a URL resolved at runtime via `services/backendUrl#getBackendUrl`
- ├─ backendUrl → Calls `openhuman.config_resolve_api_url`; falls back to VITE_BACKEND_URL only outside Tauri
- ├─ socketService → Socket.io to the local core (base URL derived from the RPC URL); MCP-style envelopes
- ├─ coreRpcClient → JSON-RPC over HTTP to the local openhuman core; `relay_http_rpc` fallback for non-loopback http
- └─ transport/ → ConnectionProfile transports for iOS/remote (LanHttp, Tunnel, CloudHttp)
-```
-
-#### Runtime config precedence
-
-The desktop app does not bake the core RPC URL or the API host into the bundle as a hard requirement. At runtime the app resolves them in this order (highest first):
-
-1. Welcome-screen RPC URL field, saved via `utils/configPersistence` and restored on next launch. End users configure a self-hosted core address here, not by hand-editing `config.toml` or `.env` files.
-2. Tauri `core_rpc_url` command, the port the embedded core is listening on for this process.
-3. `VITE_OPENHUMAN_CORE_RPC_URL`, build-time fallback for development.
-4. The hardcoded `http://127.0.0.1:7788/rpc` default.
-
-Once the RPC handshake succeeds, `services/backendUrl` calls `openhuman.config_resolve_api_url` to pull `api_url` (and other safe client fields) from the loaded core `Config`. `VITE_BACKEND_URL` is only used as a web fallback when the app runs outside Tauri.
-
-Components that need the backend URL should call `useBackendUrl()` (or `getBackendUrl()` from non-React code), they must not import the static `BACKEND_URL` constant from `utils/config`, which represents the build-time value only.
-
-### Related docs
-
-- Rust architecture: [Architecture](../architecture.md)
-- Tauri shell: [Tauri shell](tauri-shell.md)
-
-## State management
-
-The application uses Redux Toolkit with Redux-Persist. There is no single root persist config: each slice that persists wraps its own reducer with `persistReducer` in `store/index.ts`, whitelisting exactly the fields that should survive a restart.
-
-### Storage backends
-
-- `userScopedStorage` (`store/userScopedStorage.ts`) is the default storage for persisted slices. Blobs are keyed `${userId}:persist:<key>` so state never leaks across users on logout or login.
-- Plain `localStorage` is used only for pre-login, device-wide slices (`coreMode`, `locale`, `theme`) that must survive user switches.
-
-### Slices
-
-Authoritative list = the `reducer` map in `store/index.ts`. One-line purposes:
-
-| Slice | Purpose | Persisted? |
-| --------------------- | --------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
-| `accounts` | Connected web-app accounts + rail ordering | `accounts`, `order`, `lastActiveAccountId` (not the active id) |
-| `announcement` | Harness-init announcement banner, seen ids | `shownIds` |
-| `channelConnections` | Messaging channel connections (WhatsApp, Slack, …) | connections + migration/default-channel fields |
-| `chatRuntime` | Streaming buffers, tool timelines, inference status, artifacts | only `artifactsByThread` (ready snapshots) |
-| `connectivity` | navigator.onLine, core health, renderer to core socket, core to hosted link | no |
-| `coreMode` | Pre-login core mode selection (embedded / self-hosted / cloud) | `mode` (plain localStorage) |
-| `followupSuggestions` | Follow-up chips for each thread's latest settled turn | no (in-memory only) |
-| `githubStar` | Whether the user dismissed the in-app "Star us on GitHub" CTA | `dismissed` |
-| `layout` | Two-pane layout geometry (sidebar visibility, dragged widths) | `panels` |
-| `locale` | UI language | `current` (plain localStorage) |
-| `mascot` | Mascot appearance / voice selection | `color`, `voiceId`, `customMascotGifUrl`, `selectedMascotId` |
-| `notifications` | Notification items + preferences | `items`, `preferences` |
-| `persona` | Cosmetic persona display name + description (SOUL.md lives in the core) | `displayName`, `description` |
-| `ptt` | Push-to-talk hotkey + session prefs (`isHeld` deliberately excluded) | `shortcut`, `speakReplies`, `showOverlay` |
-| `queue` | The core's per-thread run queue plus the composer's pending follow-up messages | no (in-memory only) |
-| `runMode` | Per-thread plan/build run mode | no (in-memory only) |
-| `socket` | Per-user socket connection status / socket ids | no (reconnects on boot) |
-| `theme` | Theme mode, font size, message view mode, custom themes | plain localStorage |
-| `thread` | Chat thread list + per-thread message caches | only `selectedThreadId` |
-| `threadGoal` | Durable per-thread goal state | no (in-memory only) |
-| `threadTodos` | Live per-thread todo list | no (in-memory only) |
-| `userErrors` | User-actionable runtime errors | no (in-memory only) |
-| `walletPreferences` | Hidden-token preferences for the wallet view | `hiddenTokenKeys` |
-
-Ephemeral chat state (streaming buffers, tool timelines) must not survive a restart: the UI would try to resume a turn whose live driver is gone. The one exception, agent-generated artifacts, goes through the `artifactsReadyOnlyTransform` in `store/index.ts` (pure logic in `store/artifactsPersistFilter.ts`).
-
-### Typed hooks
-
-File: `store/hooks.ts`
-
-```typescript
-// Use these instead of plain useDispatch/useSelector
-export const useAppDispatch: () => AppDispatch = useDispatch;
-export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
-```
-
-### Best practices
-
-1. Always use the typed hooks, `useAppDispatch` and `useAppSelector`.
-2. Use selectors for derived state: see `store/socketSelectors.ts`, `store/connectivitySelectors.ts`, `store/userErrorsSelectors.ts`.
-3. Whitelist persistence per slice. Never persist transient or loading state; add a per-slice `persistReducer` in `store/index.ts`.
-4. Prefer Redux over ad hoc `localStorage`. Plain localStorage is reserved for the pre-login slices noted above.
-5. In dev and E2E builds the store is exposed as `window.__OPENHUMAN_STORE__` so WDIO specs can assert backing state; production bundles do not expose it.
-
----
-
-## Services layer
-
-The application uses singleton services for external communication. This prevents connection leaks and provides consistent API access.
-
-### Service architecture
-
-```text
-app/src/services/
- ├─ apiClient (HTTP REST)
- │ └─ backend URL resolved at runtime (services/backendUrl)
- ├─ socketService (Socket.io)
- │ └─ connects to the local core's socket endpoint (base derived from the RPC URL)
- ├─ coreRpcClient.ts
- │ ├─ direct webview fetch → local openhuman core (JSON-RPC over HTTP)
- │ └─ invoke('relay_http_rpc', …) fallback for non-loopback plain-http runtimes
- ├─ coreCommandClient.ts - typed wrappers over core RPC methods
- ├─ transport/ - ConnectionProfile transports (LanHttp, Tunnel, CloudHttp) for iOS/remote
- └─ services/api/* - domain API modules (~50 files, see below)
-```
-
-### API client (`services/apiClient.ts`)
-
-Fetch-based HTTP REST client for backend communication with typed request/response handling and error handling. The backend URL is resolved at runtime (`services/backendUrl`), not baked in.
-
-```typescript
-import apiClient from "../services/apiClient";
-
-const user = await apiClient.get<User>("/users/me");
-const result = await apiClient.post<LoginResponse>("/auth/login", {
- email,
- password,
-});
-```
-
-### Domain API modules (`services/api/`)
-
-\~55 domain-scoped modules, one per feature surface, each wrapping either backend REST endpoints or core RPC methods. Representative examples:
-
-- `authApi` / `userApi`: auth + user profile
-- `threadApi`, `threadUsageApi`: chat threads
-- `agentTeamApi`, `agentWorkApi`, `subagentApi`: agents
-- `skillsApi`, `skillRegistryApi`, `flowsApi`, `workflowRunsApi`: skills & automation
-- `channelConnectionsApi`, `mcpClientsApi`, `mcpSetupApi`, `tunnelsApi`: connections
-- `memoryApi`: Memory v2 RPC wrappers (`openhuman.memory_*`)
-- `billingApi`, `creditsApi`, `referralApi`, `inviteApi`: commerce
-- `voiceSettingsApi`, `aiSettingsApi`, `modelCouncilApi`: AI/voice config
-
-For the full list, `ls app/src/services/api/`. New feature surfaces get their own module here rather than growing `apiClient`.
-
-### Socket service (`services/socketService.ts`)
-
-Socket.io client singleton connected to the local core's socket endpoint (base URL derived from the resolved RPC URL via `coreSocket.ts`; authenticated with the core RPC token). It ingests realtime core events (connection status, channel updates) and dispatches them into Redux (`socketSlice`, `connectivitySlice`, `channelConnectionsSlice`). It also hosts the MCP-style transport (`SocketIOMCPTransportImpl` from `lib/mcp`).
-
-Keep `socketService` and the core socket behavior aligned (the "dual socket sync" rule in AGENTS.md). Connection lifecycle is owned by `providers/SocketProvider.tsx`; on mobile the provider is not mounted at all: events arrive through the `TunnelTransport` relay instead.
-
-### Core RPC (`services/coreRpcClient.ts`)
-
-The Rust core runs in-process inside the Tauri host (no sidecar). The UI calls JSON-RPC methods on it over local HTTP:
-
-```typescript
-import { callCoreRpc } from "../services/coreRpcClient";
-
-const result = await callCoreRpc<MyType>({
- method: "openhuman.some_method",
- params: {
- /* … */
- },
- timeoutMs: 60_000, // optional per-call override (default 30s)
- suppressAuthExpiredEvent: false, // narrow reads can opt out of global sign-out on 401
-});
-```
-
-How a call flows:
-
-1. URL + token resolution: the RPC URL follows the precedence in [Runtime config precedence](#runtime-config-precedence); the per-launch bearer token comes from the Tauri `core_rpc_token` command (or the stored token for self-hosted cores).
-2. Direct fetch: the webview `fetch()`es the JSON-RPC envelope straight to the core (loopback http or any https URL).
-3. Shell relay fallback: plain `http://` to a non-loopback host is active mixed content and Chromium blocks it. `rpcUrlNeedsShellRelay()` detects this and routes the call through `invoke('relay_http_rpc', { url, token, body })`, implemented in `crates/openhuman-app/src/core_rpc.rs` (a thin wrapper over `openhuman_rpc::post_json_rpc` from `crates/openhuman-rpc/`), which returns `{ status, body }` re-wrapped as a `Response`.
-4. Transport override: iOS/remote connection profiles install a `CoreTransport` (`setActiveCoreTransport`) so the same `callCoreRpc` surface rides LAN/tunnel/cloud transports.
-
-Errors are classified into a stable `CoreRpcError.kind` (`auth_expired`, `transport`, `timeout`, `rate_limited`, …): callers branch on `kind`, never on message regexes. An `auth_expired` classification broadcasts `core-rpc-auth-expired`, which `CoreStateProvider` turns into a session clear.
-
-### Best practices
-
-1. Use singletons. Never create multiple service instances.
-2. Keep Tauri IPC and RPC calls in services. Do not scatter `invoke()` or raw fetches through components.
-3. Clean up on unmount by disconnecting in the `useEffect` cleanup.
-4. Handle errors through `CoreRpcError.kind` and retry only transient failures.
-
----
-
-## Providers
-
-React context providers (`app/src/providers/`) manage service lifecycle and expose core-owned state. The full nesting (including gates that live in `components/`) is the generated [provider chain](#provider-chain) above. There is no `UserProvider`, `AIProvider` or `SkillProvider`. Auth and user state live in `CoreStateProvider`, AI configuration lives in the Rust core, and skills run in the core.
-
-### ThemeProvider (`providers/ThemeProvider.tsx`)
-
-Applies theme tokens and dark-mode handling from the persisted `theme` slice (mode, font size, custom themes).
-
-### CoreStateProvider (`providers/CoreStateProvider.tsx`)
-
-The authoritative auth/session/onboarding context. Fetches the core app snapshot (`fetchCoreAppSnapshot()` RPC), exposes it via `useCoreState()` (`{ snapshot, isBootstrapping, refresh }`), and clears the session on the global `core-rpc-auth-expired` event. It follows a turn-boundary refetch contract: after every agent reply completes (`chat_done` in `ChatRuntimeProvider`) it refetches the user state (debounced 750ms) and merges it into the snapshot via `patchSnapshot`: see `providers/README.md`.
-
-### SocketProvider (`providers/SocketProvider.tsx`)
-
-Owns the socket.io connection to the local core: connects once core state is ready, updates the `socket` slice, and tears down on unmount. Desktop only: `App.tsx` skips it on mobile, where events arrive through the `TunnelTransport` relay.
-
-### ChatRuntimeProvider (`providers/ChatRuntimeProvider.tsx`)
-
-Subscribes to chat runtime socket events (message streaming, tool calls, subagent lifecycle, approval requests) and reduces them into the `chatRuntime` slice: per-thread tool timelines, streaming buffers, artifacts, and approval state consumed by the chat surface and the mascot.
-
-### Gates and shell-level contexts (in `components/`)
-
-- `BootCheckGate` (`components/BootCheckGate/`) blocks render until the core boot snapshot resolves.
-- `CommandProvider` (`components/commands/`) holds the command palette context.
-- `ServiceBlockingGate` (`components/daemon/`) blocks the shell until required services are configured.
-
-### Context vs Redux
-
-| Use Context For | Use Redux For |
-| ---------------------------------- | ---------------------------------- |
-| Service instances (socket, client) | Serializable state (status, data) |
-| Methods (emit, on, off) | Persisted state (sessions, tokens) |
-| Derived values | Complex state logic |
-
-Example: `SocketProvider` owns the socket instance; Redux stores connection status in `socketSlice`.
-
----
-
-## Human mascot surface
-
-The mascot appears on two surfaces, deliberately. `/human`
-(`app/src/features/human/HumanPage.tsx`) is the dedicated full-bleed stage with a
-right-rail chat. `/chat` carries the same mascot docked on its composer, where it
-expands into a voice stage in place. Both read one set of mascot preferences from
-`mascotSlice` (colour, voice, speak-replies, dismissal) so the two can never
-disagree about the same setting.
-
-`app/src/features/human/chatMascot/` owns the chat-side surface:
-
-| Module | Role |
-| ----------------------- | --------------------------------------------------------------------------------------------------------- |
-| `ChatMascotContext.tsx` | Shared dock/stage refs and the send binding. Every value is stable: see the re-render note below. |
-| `ChatMascotDock.tsx` | The small mascot standing on the composer's input box. An anchor + hit area; it draws nothing. |
-| `ChatMascotStage.tsx` | The scaled-up voice surface: `MicComposer`, input-device selector, speak-replies switch, collapse button. |
-| `ChatMascotOverlay.tsx` | The single Rive instance, moved between dock and stage with a `transform`. |
-| `geometry.ts` | Pure dock ⇄ stage transform maths (`inscribedSquare`, `lerpBox`, `boxTransform`). |
-
-Clicking the dock expands the mascot into a right-hand stage column while the
-transcript and the text composer stay live in the left column, so voice and text
-are the same conversation. `pages/Accounts.tsx` animates the column width;
-`ChatMascotOverlay` re-measures both anchors per frame so the mascot stays glued
-to a destination that is still moving. Expanded/collapsed and the speak-replies
-preference are persisted in `mascotSlice`.
-
-Two invariants matter here. The mascot re-renders at ~60fps during TTS
-lipsync, so (a) it is rendered as a leaf with nothing beneath it, and (b) the
-mascot context value is deliberately non-reactive: reactive state lives in
-Redux or in the send-binding external store instead. A reactive context value
-would reconcile the whole chat tree every frame, which stalls the UI. And the overlay only mounts while the agent account is selected, so a fixed
-overlay is never left alive as an invisible canvas still burning frames under
-another account.
-
-The mascot face comes from `useHumanMascot`, which subscribes to chat lifecycle
-events for thinking, speaking, acknowledgement, and error states, plus a
-`listening` pose driven by `MicComposer`'s `onRecordingChange`.
-
-Sub-agent delegation is visualized by `SubMascotLayer`. It does not introduce a
-new socket protocol. Instead, it reads the selected or active thread's
-`chatRuntime.toolTimelineByThread` entries that `ChatRuntimeProvider` already
-builds from `subagent_spawned`, `subagent_completed`, `subagent_failed`,
-`subagent_iteration_start`, `subagent_tool_call`, and `subagent_tool_result`.
-
-Lifecycle mapping:
-
-| Runtime timeline state | Sub-mascot state |
-| ---------------------- | -------------------------------------------------------------------- |
-| `running` | Small colored mascot in a thinking face with a short activity bubble |
-| `success` | Same mascot resolves to a happy face and completion bubble |
-| `error` | Same mascot resolves to a concerned face and failure bubble |
-
-Activity bubble text is intentionally compact: current child tool call, child
-iteration, the delegation prompt excerpt, or final status. The thread timeline
-remains the authoritative detailed view; sub-mascots are only the glanceable
-orchestration layer around the main mascot.
-
-### Tool-call presentation
-
-Every surface that names a tool call (chat cards, the processing panel, the
-status line, the mascot) resolves it through one registry,
-`app/src/features/conversations/tools/toolPresentation.ts`
-(`describeToolCall`). It returns the icon, a translated phrase in two tenses
-("Reading file" while running, "Read file" once settled), the target chip, and
-which rich body the call expands into. The data lives in `toolSpecs.ts` (exact
-names, collapsed tools that switch on an argument, prefix families, named
-agents) and `toolPhrases.ts` (phrases, served as
-`conversations.tools.<id>.active|done`). Composio action slugs
-(`GMAIL_SEND_EMAIL`) resolve through the toolkit catalog in
-`components/composio/toolkitMeta.tsx` to "Used Gmail · Send email" with the
-app's logo. The server's `tool_display_label` is used only for tools the
-registry cannot describe.
-
-### assistant-ui composition
-
-The conversation UI uses `@assistant-ui/react` for interaction and runtime
-state, `@assistant-ui/react-lexical` for the rich composer, and
-`@assistant-ui/react-markdown` for message rendering. The visual components
-under `components/assistant-ui/` are assistant-ui registry source installed
-through the app's shadcn configuration (`base-nova`), with OpenHuman tokens,
-translations and product slots. Registry components are editable source; they
-are not separately exported components from the npm runtime package.
-
-| Surface | assistant-ui owner | OpenHuman adapter |
-| ---------------------------------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
-| Message list, scrolling and scroll-anchor pill | `ThreadPrimitive.Viewport`, `Messages`, `ScrollToBottom` | Real thread identity through `adapters.threadList.threadId`; run-start jumps disabled to preserve readers in history |
-| Main composer, send and cancel | `ComposerPrimitive`, `LexicalComposerInput` | Draft persistence, model selection, product voice mode and core-backed file ingestion |
-| Message editing | Message-scoped `ComposerPrimitive.Root`, `Input`, `Send`, `Cancel` | Edit RPC and translated warning about subsequent turns |
-| Message actions and branches | `ActionBarPrimitive`, `BranchPickerPrimitive` | Adapter capability gates and core-backed regeneration, speech and feedback |
-| Queued follow-ups | `ComposerPrimitive.Queue`, `QueueItemPrimitive.Text`, `Remove` | Core run-queue adapter and translated registry row captions |
-| Markdown, code and citations | `MarkdownTextPrimitive` and registry elements | Source projection, app links, math and artifact access |
-| Reasoning and tool groups | `MessagePrimitive.GroupedParts`, registry tool-group/reasoning elements | Core timing and grouping interleaved reasoning with calls |
-| Tasks and subagents | Registry task-card/subagent-list, `ReadonlyThreadProvider` | Delegation state, awaiting-user replies and worktree actions |
-| Approvals, questions and plans | Registry approval-card, elicitation-form and agent-plan | Core decision RPCs, security policy and plan/workflow lifecycle |
-| Todos and goals | Registry todo-list and agent-status | Durable harness progress and remembered disclosure state |
-| Images, documents and tool results | Registry image, artifact-card, web-search, terminal-block, code-diff and web-preview | Core artifact and tool-result projection |
-| Sources, conversation map and context | Registry sources, conversation-map and context elements | Core sources, search, token usage and context breakdown RPC |
-
-Keep runtime behavior in the library. New product functionality should use a
-runtime adapter or component slot rather than a second scroll controller,
-message store, editor or queue implementation. Presentation-only registry
-components can remain local; OpenHuman owns the meaning and execution of its
-RPC-backed controls.
-
-Rendering uses assistant-ui's elements, vendored under
-`app/src/components/assistant-ui/elements/` (tool-call, tool-timeline,
-web-search, terminal-block, code-diff, web-preview) with the `tw-shimmer`
-utility. `ToolGroupRoot` / `ToolGroupTrigger` / `ToolGroupContent` wrap a run of calls in the tool timeline;
-`AssistantUiToolCallCard` renders each call. The adapters in
-`tools/ToolBodies.tsx` only map tool data onto those elements.
-
-The core's `tool_result` socket event carries `args`, `elapsed_ms`, the
-recomputed `tool_display_label` / `tool_display_detail`, and `structured`
-(the tool's `ToolResult.metadata`; web searches send
-`{ kind: "web_search", query, provider, results: [...] }`).
-`parseWebSearchResult.ts` prefers that payload and falls back to parsing the
-text rendering for older turns.
-
-`tools/__fixtures__/coreToolNames.json` lists every tool the core registers.
-The Rust test `tools/ops_tests_catalog_fixture_tests.rs` keeps it in sync
-(`UPDATE_TOOL_CATALOG=1` regenerates it) and
-`toolPresentation.catalog.test.ts` fails if any listed tool falls through to
-the generic fallback, so a new core tool cannot reach the chat unlabelled.
-`/dev/tools` (dev builds only) renders every state and the whole catalog.
-
----
-
-## Pages and routing
-
-The application uses HashRouter with protected and public route guards. Desktop routes live in `app/src/AppRoutes.tsx`; on mobile (iOS/Android) `AppRoutesIOS.tsx` renders a reduced Human/Chat/Settings set instead.
-
-### Route map
-
-`app/src/AppRoutes.tsx` is the authoritative table and is heavily commented with the rationale for each entry. The desktop routes it declares:
-
-| Route | Renders | Guard |
-| --- | --- | --- |
-| `/` | `Welcome` | `PublicRoute` (signed in: forwards to `/home`) |
-| `/auth` | `WebCallbackPage`, the auth callback | none |
-| `/callback/:kind`, `/callback/:kind/:status` | `WebCallbackPage`, generic OAuth and provider callbacks | none |
-| `/onboarding/*` | `Onboarding` stepper | `ProtectedRoute` |
-| `/human` | `HumanPage`, the dedicated mascot stage | `ProtectedRoute` |
-| `/chat/:threadId?` | `Accounts`, the unified chat (agent plus connected web apps) | `ProtectedRoute` |
-| `/flows` | `FlowsPage` | `ProtectedRoute` |
-| `/flows/draft` | `FlowCanvasDraftPage`, an unsaved proposed graph passed in `location.state` | `ProtectedRoute` |
-| `/flows/:id` | `FlowCanvasPage` | `ProtectedRoute` |
-| `/workflows` | `Activity`, the `SKILL.md` workflow hub | `ProtectedRoute` |
-| `/workflows/run` | `WorkflowsRun`, the single-purpose Skill runner | `ProtectedRoute` |
-| `/connections` | `Skills`, the connections hub | `ProtectedRoute` |
-| `/invites` | `Invites` | `ProtectedRoute` |
-| `/notifications` | `Notifications` | `ProtectedRoute` |
-| `/settings/*` | `Settings` | `ProtectedRoute` |
-| `/ptt-overlay` | `PttOverlayPage`, the push-to-talk overlay window | none |
-| `/dev/agent-insights` | `AgentInsightsPreview` | dev only |
-| `/dev/ui` | `UiGallery`, every shared UI primitive in the active theme | dev only |
-| `/dev/tools` | `ToolCallGallery`, every tool-call state and the whole core catalog | dev only |
-| `/dev/assistant-ui` | The upstream assistant-ui demo on a mock runtime | dev only |
-| `*` | `DefaultRedirect` | none |
-
-The four `/dev/*` routes are registered inside an `IS_DEV` branch (`utils/config`), so `import.meta.env.DEV` is substituted at build time, the branch folds away, and their component trees leave a production bundle entirely. They are previews, never part of the shipped product.
-
-Memory is a surface of `/connections`, not a route of its own: `?tab=brain&brain=<chip>` selects one of its eight chips, `engine`, `ask`, `explorer`, `learnings`, `conversations`, `brain`, `background` and `settings`. The list is `app/src/components/memory/memoryChips.ts` and the page is `app/src/pages/Memory.tsx`. `memoryChips.ts` also remaps the retired names (`graph`, `goals` and `context` to `ask`; `documents`, `sources`, `sync` and `history` to `brain`), and `/settings/memory-engine` redirects to the `engine` chip.
-
-Back-compat redirects, all `Navigate replace`. The `ForwardSearch` ones copy the query string to the destination so old deep links still land on the right sub-tab:
-
-| From | To |
-| --- | --- |
-| `/home` | `/chat` |
-| `/accounts` | `/chat` |
-| `/brain` | `/connections?tab=brain` (`BrainRedirect` remaps the old `?tab=` to `?brain=`) |
-| `/skills` | `/connections` (`ForwardSearch`) |
-| `/channels` | `/connections?tab=messaging` |
-| `/activity` | `/settings/account` |
-| `/intelligence` | `/settings/account` |
-| `/feedback` | `/settings/feedback` |
-| `/routines` | `/flows` |
-| `/webhooks` | `/settings/integrations` (`ForwardSearch`) |
-
-There is no `/login` route: authentication flows through the Welcome page, the `/auth` callback, and deep links. `/agents` does not exist either, and Settings is an ordinary route rather than an overlay (see [Settings](#settings)).
-
-### Route guards
-
-All three guards read `useCoreState()` (not Redux auth state) and render `RouteLoadingScreen` while bootstrapping:
-
-- `ProtectedRoute` (`components/ProtectedRoute.tsx`, `({ children, requireAuth = true, redirectTo })`): without a session token, navigates to `redirectTo || '/'`. Onboarding gating is _not_ done here; an effect in `AppShellDesktop` (App.tsx) forces non-onboarding routes back to `/onboarding` while `onboarding_completed` is false, and bounces off it once complete.
-- `PublicRoute` (`components/PublicRoute.tsx`): redirects signed-in users to `/home` (which forwards to `/chat`).
-- `DefaultRedirect` (`components/DefaultRedirect.tsx`): signed out → `/`; signed in but onboarding incomplete → `/onboarding`; otherwise → `/chat`. Waits for `snapshot.currentUser` to avoid the post-login race.
-
-### Onboarding flow (`pages/onboarding/`)
-
-A routed stepper (`Onboarding.tsx` mounts nested routes inside `OnboardingLayout`):
-
-```text
-/onboarding/welcome → WelcomePage
-/onboarding/runtime-choice → RuntimeChoicePage
- ├── cloud → /chat
- └── custom → /onboarding/custom/inference → voice → oauth → search
- → embeddings → (activity) → vault → /chat
-```
-
-Each custom step offers Default (let OpenHuman manage it) or Configure (inline controls, or a deep-link callout to Settings for domains not yet embedded). Pages live in `pages/onboarding/pages/`; the older Composio, skills and context-gathering steps (`pages/onboarding/steps/`) are not in the default flow. Completion is tracked by the core's `onboarding_completed` flag, enforced by the AppShell onboarding gate. After onboarding, `AppWalkthrough` (Joyride) runs the post-onboarding tour.
-
-### Settings
-
-Settings is a routed `/settings/*` page like every other surface, on desktop and on iOS alike. It is not a modal overlay. Older names such as `SettingsPanelLayout`, `useSettingsAnimation` and `ProfilePanel` are covered in [Removed names](#removed-names) below.
-
-- `components/settings/settingsRouteRegistry.ts`: single declarative source of truth for every settings destination (id and route slug, i18n keys, section, sidebar `navGroup`, `devOnly`, `searchKeywords`). Navigation menus and breadcrumbs derive from it.
-- `components/settings/settingsRouteElements.tsx`: maps registry entries to panel `<Route>` elements, including the redirects (`/settings/memory-engine` to the Memory `engine` chip).
-- `components/settings/layout/`: the two-pane chrome. `SettingsLayout` projects the settings nav into the app sidebar's dynamic region; `SettingsSidebar` groups entries by `SettingsNavGroup` (`general`, `appearance`, `agentsAutonomy`, `security`, `data`, `knowledgeMemory`, `automationIntegrations`, `diagnosticsLogs`, in `NAV_GROUP_ORDER`); `SettingsSubNav`, `SettingsIndexRedirect`, `SettingsTabbedPage` and `SettingsPanel`, the one panel template, sit beside them.
-- `components/settings/panels/`: leaf panels such as `AccountPanel`, `AppearancePanel`, `ThemeStudioPanel`, `AgentAccessPanel`, `AutonomyPanel`, `McpServerPanel`, `PrivacyPanel` and `DeveloperOptionsPanel`. Adding a panel means adding the component and a registry entry; navigation and breadcrumbs pick it up automatically.
-- `components/settings/controls/`: the shared form primitives every panel composes (`SettingsSwitch`, `SettingsRow`, `SettingsSection`, `SettingsSelect`, and the rest), so a boolean is a switch everywhere.
-
-### HashRouter vs BrowserRouter
-
-The app uses HashRouter for desktop compatibility:
-
-```typescript
-// App.tsx
-import { HashRouter } from "react-router-dom";
-
-// URLs look like: app://localhost/#/home
-// Instead of: app://localhost/home
-```
-
-Why HashRouter:
-
-1. Tauri deep links work with hash-based URLs
-2. No server configuration needed
-3. Works with file:// protocol
-4. Prevents 404 on direct URL access
-
-### Deep link handling
-
-Deep links are handled before routing:
-
-```typescript
-// main.tsx
-import("./utils/desktopDeepLinkListener").then((m) => {
- m.setupDesktopDeepLinkListener().catch(console.error);
-});
-```
-
-The listener intercepts `openhuman://` URLs (e.g. auth handoff), exchanges tokens through the Rust side (bypassing CORS), stores the session, and navigates to the right route. See `utils/desktopDeepLinkListener.ts`.
-
----
-
-## Components
-
-Shared UI lives in `app/src/components/`; feature-specific UI lives in `app/src/features/<vertical>/`. Highlights:
-
-```text
-components/
-├── ProtectedRoute / PublicRoute / DefaultRedirect # Route guards
-├── layout/shell/ # RootShellLayout, AppSidebar, SidebarSlot (two-pane app chrome)
-├── settings/ # Settings registry, layout, panels, controls (see above)
-├── accounts/ # Connected-app provider icons
-├── BootCheckGate/, daemon/ # Boot + service gates in the provider chain
-├── commands/ # CommandProvider (command palette)
-├── Announcement/, upsell/, notices/, walkthrough/ # Shell-level overlays
-├── keyring/, InitProgressScreen/ # Consent + init overlays
-├── memory/ # Memory v2 tabs (Engine, Ask, Explorer, Learnings, Conversations, Brain, Background, Settings) and import banner
-└── intelligence/ # Shared intelligence UI (WorkflowsTab, Toast, ConfirmationModal)
-```
-
-Conventions:
-
-- Modals render through a portal, above routed content. Settings is not one of them any more: it is a route.
-- Modals are controlled: parents own `isOpen` state and pass `onClose`.
-- All user-facing text goes through `useT()` (`lib/i18n/I18nContext`); CI enforces locale parity.
-- Production `app/src` code uses only static `import` / `import type`, never dynamic imports.
-
----
-
-## Hooks and utilities
-
-### Custom hooks (`hooks/`)
-
-`app/src/hooks/` holds the app-level hooks (the [Scale](#scale) table names the command that counts them). Representative examples:
-
-- `useUser` is a thin wrapper over `useCoreState()`; it returns `{ user: snapshot.currentUser, isLoading, error, refetch }`. There is no standalone user store.
-- `useBackendUrl` resolves the backend URL at runtime (see [Runtime config precedence](#runtime-config-precedence)).
-- `useThreadQueries` fetches chat threads.
-- `useDaemonHealth` / `useDaemonLifecycle` track core service health.
-- `useDictationHotkey` / `usePttHotkey` manage global hotkeys.
-- `useDeveloperMode`, `useMediaQuery`, `useEscapeKey` are general UI utilities.
-- Feature hooks: `useFlowRunProgress`, `useWorkflowBuilderChat`, `useConsciousItems`, `useIntelligenceStats`, `useCostDashboard`, ….
-
-Feature-local hooks live next to their feature under `features/*/`.
-
-### Utilities
-
-#### Configuration (`utils/config.ts`)
-
-Centralized build-time environment variable access: never read `import.meta.env` directly elsewhere. These constants only carry the value baked into the bundle; for the runtime URL the app actually talks to, see `services/backendUrl` and `hooks/useBackendUrl`.
-
-```typescript
-// Build-time fallback only (used outside Tauri).
-export const BACKEND_URL = /* VITE_BACKEND_URL || default */;
-// Core RPC build-time fallback.
-export const CORE_RPC_URL = /* VITE_OPENHUMAN_CORE_RPC_URL || 'http://127.0.0.1:7788/rpc' */;
-// Dev flags, e.g.
-export const DEV_FORCE_ONBOARDING = /* dev-only VITE_DEV_FORCE_ONBOARDING */;
-```
-
-> Do not import `BACKEND_URL` directly to make API calls. Resolve the URL at runtime so the core's `api_url` (via `openhuman.config_resolve_api_url`) takes effect:
->
-> ```typescript
-> // React components
-> import { useBackendUrl } from "../hooks/useBackendUrl";
-> const backendUrl = useBackendUrl();
->
-> // Non-React code
-> import { getBackendUrl } from "../services/backendUrl";
-> const backendUrl = await getBackendUrl();
-> ```
-
-#### Desktop deep link listener (`utils/desktopDeepLinkListener.ts`)
-
-Handles incoming `openhuman://` deep links via the Tauri deep-link plugin: parses the URL, performs the Rust-side token exchange (bypasses CORS), stores the session, and navigates. Set up lazily from `main.tsx` so the Tauri IPC bridge is ready first.
-
-#### URL opener (`utils/openUrl.ts`)
-
-Cross-platform URL opening: tries the Tauri opener plugin, falls back to `window.open`. Always use this instead of raw `window.open` so links open in the system browser.
-
-#### Tauri command wrappers (`utils/tauriCommands/`)
-
-Typed wrappers around `invoke(...)`, including the bridge-gap-aware `isTauri()` guard (checks `__TAURI_INTERNALS__.invoke` is actually wired, not merely that the app runs under Tauri). Use it; never check `window.__TAURI__` directly.
-
-### Polyfills (`polyfills.ts`)
-
-Node.js globals (`Buffer`, `process`, `util`) are polyfilled for the browser. Several browser-side modules use Node APIs, including voice/PTT audio encoding (`features/voice/pttAudio.ts`, `wavEncoder.ts`), mascot Rive asset caching (`features/human/Mascot/`), and tool-timeline formatting.
-
-Two layers provide them:
-
-1. `vite-plugin-node-polyfills` in `app/vite.config.ts` (`buffer`, `process`, `util`, `os`, `crypto`, `stream`, plus `Buffer`/`process`/`global` globals).
-2. `polyfills.ts`, imported first in `main.tsx`, which synchronously assigns `Buffer`/`process`/`util` onto `globalThis`/`window`/`global`/`self` before any dependent module executes.
-
-### Best practices
-
-#### Hook dependencies and cleanup
-
-```typescript
-useEffect(() => {
- on("event", handler);
- return () => off("event", handler);
-}, [on, off, handler]);
-```
-
-Always include dependencies and always clean up subscriptions.
-
-#### Error handling
-
-Wrap Tauri/utility calls in try-catch with a fallback:
-
-```typescript
-try {
- await openUrl(url);
-} catch (error) {
- console.error("Failed to open URL:", error);
-}
-```
-
-#### Type safety
-
-Use TypeScript generics for API and RPC calls:
-
-```typescript
-const user = await apiClient.get<User>("/users/me");
-const result = await callCoreRpc<Snapshot>({
- method: "openhuman.app_state_snapshot",
-});
-```
-
-## Removed names
-
-These names still turn up in older code and notes. Use the replacement:
-
-| Removed | Replaced by |
-| --- | --- |
-| `SettingsModal`, `SettingsModalFrame`, `SettingsModalLayout`, `settingsOverlay.ts` | `/settings/*` as an ordinary route rendered by `Settings` |
-| `SettingsPanelLayout`, `useSettingsAnimation`, `ProfilePanel` | The `settingsRouteRegistry` plus `components/settings/layout/` |
-| `components/settings/search/` and `settingsSearchRegistry` | Nothing: the sidebar search field was removed. `searchKeywords` stays on the registry entries. |
-| `WebviewHost` overlay in `components/accounts/` | Nothing: it went with the CEF provider webviews |
-| The frontend QuickJS skills engine | Skill execution in the Rust core |
-| `UserProvider`, `AIProvider`, `SkillProvider` | `CoreStateProvider` for auth and user state; AI configuration and skills in the core |
-| `/conversations`, `/accounts` as standalone pages | `/chat/:threadId?` (`Accounts`), the unified chat surface |
-
-## See also
-
-- [Architecture](../architecture.md): the Rust side this UI presents.
-- [Tauri shell](tauri-shell.md): the host that serves this bundle and owns the IPC surface.
-- [Agent harness](agent-harness.md): what the chat surface's tool timeline is rendering.
-- [Memory](../../features/memory.md): the user-facing shape of the `/connections?tab=brain` chips.
-- [Theming](../theming.md): the token layer behind `ThemeProvider` and Theme Studio.
-- [iOS companion](../../features/ios-companion.md): the experimental mobile client the `AppRoutesIOS` shell and the `transport/` profiles belong to.
diff --git a/gitbooks/developing/architecture/mcp-registry.md b/gitbooks/developing/architecture/mcp-registry.md
deleted file mode 100644
index 1865271341..0000000000
--- a/gitbooks/developing/architecture/mcp-registry.md
+++ /dev/null
@@ -1,95 +0,0 @@
----
-description: >-
- How OpenHuman connects MCP servers, applies product policy, and exposes their
- tools to agents through TinyBus modules.
-icon: plug
----
-
-# MCP registry
-
-`crates/openhuman-core/src/mcp/registry/` is OpenHuman's host adapter for the
-Model Context Protocol (MCP) client. It preserves the `mcp_clients` RPC and
-agent-tool surfaces while the TinyMCP module owns registry and connection
-behavior. The module is loaded through TinyBus; OpenHuman uses the published
-`tinymcp-bus` vocabulary and does not link the TinyMCP implementation into its
-normal dependency graph.
-
-The Registry tab browses the supported catalogs and adds servers through the
-user's `mcp.json` document. There is no install-from-catalog RPC or agent
-install tool. A simple hosted server can be declared in one click; other
-servers are declared from their own setup instructions. The existing
-`mcp_clients.*` RPC names and persisted `mcp_clients` name remain stable.
-
-## Ownership and request flow
-
-```text
-Frontend / agent tools
- │ mcp_clients RPCs and MCP tool calls
- ▼
-OpenHuman host adapters
- product config, credentials, proxy policy, approvals,
- prompt-injection admission, RPC outcomes and domain events
- │ typed TinyBus calls
- ▼
-TinyMCP module
- catalogs, mcp.json reconciliation, stores, connections,
- OAuth protocol, tool preparation, transports and supervisor
-```
-
-`mcp::host` converts OpenHuman configuration to `McpClientConfig` and applies
-the product proxy and endpoint credential policy. `mcp::module_client` owns
-the configured module object for each workspace, serializes access to its
-private object path, and retains open/close transition receipts so a retry can
-finish lifecycle work after cancellation or a lost reply. Configuration sent
-to the module uses confidential TinyBus delivery.
-
-The registry controllers keep the public `mcp_clients_*` RPC contract,
-translate module results into OpenHuman outcomes, and publish OpenHuman domain
-events. The host also owns product permission and exposure mapping and the
-prompt-injection scan applied before remote tools are offered to an agent. The
-module prepares stable tool names, schemas, and metadata; execution and
-protocol handling stay inside the module.
-
-## Server transports
-
-An installed server's typed `Transport` is either a local subprocess speaking
-stdio JSON-RPC or an HTTP-remote endpoint. TinyMCP owns transport startup,
-protocol, connection state, and cleanup. OpenHuman decides which server
-configuration and credentials are approved and passes them over the bus.
-
-The same ownership split applies when OpenHuman acts as an MCP server. The
-TinyMCP module owns protocol sessions, stdio framing, Streamable HTTP
-admission, and response metadata. OpenHuman keeps the curated tool catalog,
-security policy, RPC dispatch, and typed host callbacks. For HTTP DELETE, the
-host retires its local session and aborts and joins any running callback only
-after the module accepts the request; a rejected DELETE leaves the session
-usable. Session close and process shutdown drain callback work before
-releasing its local handle.
-
-## Host layout
-
-| Path | Responsibility |
-| --- | --- |
-| `crates/openhuman-core/src/mcp/host.rs` | Product configuration conversion, proxy selection, and OAuth redirect URL. |
-| `crates/openhuman-core/src/mcp/module_client.rs` | Workspace-scoped configured object lifecycle and typed/confidential bus calls. |
-| `registry/ops.rs`, `config_ops.rs`, `schemas/` | Stable RPC handlers, `mcp.json` adapter, and controller schemas. |
-| `registry/action_tool.rs`, `registry/tools.rs` | Deferred host tool adapters, product admission, and execution event mapping. |
-| `registry/supervisor_events.rs`, `registry/bus.rs` | Convert module reports and lifecycle events to OpenHuman domain events. |
-| `audit/` | OpenHuman RPC surface over module-owned MCP write-audit records. |
-| `server/` | OpenHuman's tool catalog, security policy, and typed callbacks for the local MCP server. |
-
-## Security and compatibility
-
-- Keep credentials in OpenHuman's configuration and credential stores. Use
- confidential bus methods whenever calls carry credentials or other sensitive
- tool data; ordinary module calls must not carry secrets.
-- Preserve the existing `mcp_clients.*` RPC names and user-visible server
- names. Bus DTOs and member names come from `tinymcp-bus`; do not define local
- wire copies.
-- Keep product policy in OpenHuman and generic MCP protocol, transport,
- catalog, persistence, and tool-preparation behavior in `vendor/tinymcp`.
-- Do not put user data, credentials, provider responses, or raw tool arguments
- in analytics or logs. Use the shared endpoint redactor for endpoint logging.
-
-For implementation details, see the [MCP server](../mcp-server.md) and
-[`crates/openhuman-core/src/mcp/README.md`](../../../crates/openhuman-core/src/mcp/README.md).
diff --git a/gitbooks/developing/architecture/memory.md b/gitbooks/developing/architecture/memory.md
deleted file mode 100644
index 3bb1d0caba..0000000000
--- a/gitbooks/developing/architecture/memory.md
+++ /dev/null
@@ -1,82 +0,0 @@
----
-description: >-
- The memory host layer in crates/openhuman-core/src/memory/: TinyMemory's
- agent lifecycle bound to OpenHuman's turns, RPC and UI.
-icon: diagram-project
----
-
-# Memory
-
-`crates/openhuman-core/src/memory/` is the host layer over TinyMemory. It runs the agent memory lifecycle around every turn. The prelude takes completed cached context immediately and queues user logging and refresh; committed replies are logged in the background. Compaction uses completed context and queues its own refresh without delaying the authoritative summarizer. Belief builds also run in the background.
-
-The behavior is specified in [`docs/specs/memory-v2.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/specs/memory-v2.md). The user-facing feature is [Memory](../../features/memory.md).
-
-## TinyMemory crates (`vendor/tinymemory/crates/`)
-
-| Crate | Owns |
-| --- | --- |
-| `tinymemory-api` | The engine contract: `MemoryEngine` (recall, fetch, store, forget, list, consolidate, beliefs), `StoreItem`, `MemoryMeta`, `MetaFilter`, `Namespace`/`Reach`, `EngineDescriptor`, `Error`. No I/O. Its `conformance` feature adds the suite every engine passes and the in-memory `ReferenceEngine` the unit tests use. |
-| `tinymemory-tools` | The agent surface over any engine: `AgentMemory` (`start_session`, `pre_turn`, `post_turn`, `recall_for_compaction`, `recall`), `MemoryLayout`, `Brain`, holistic recall (`ContextPack`), `BackgroundJob`/`BackgroundRunner`. |
-| `tinymemory-integrations` | Everything that touches the outside world: the CortexDB engine on both wires (`cortexdb` direct, `tinyhumans` behind the backend), the registry, document conversion and the brain filer, source readers (SSRF-guarded), secret/PII scrubbing, the v1 importer. |
-
-## Host modules
-
-| Module | Role |
-| --- | --- |
-| `engine` | Binds `[memory] engine`: `tinyhumans` over the host's backend credential (resolved per request) with the transport's attribution headers, or `cortexdb` with the key stored as `memory-cortexdb`. Off when neither is usable. |
-| `guard` | `ScrubbingEngine`: every write is scrubbed under the host policy, whichever path makes it. |
-| `scope` | `MemoryIdentity` scoped around every turn, resolved to a layout root and a memory agent id (host binding, definition pin, team, default). |
-| `lifecycle::prefetch` | Scoped, bounded in-memory cache and background workers for automatic turn and compaction recall. |
-| `lifecycle::hooks` | Lifecycle primitives; explicit/manual `pre_turn` and `compaction` retain configured deadlines. |
-| `lifecycle::jobs` | The persisted background queue and the `memory_background` cron job. |
-| `lifecycle::views` | Policy, pack preview, agents list, job views for the RPCs. |
-| `brain` | Brain source mapping for synced items and the `memory_brain_*` ops. |
-| `sources` | The `[[memory.sources]]` registry and sync into the brain. |
-| `channels` | Which channel each logged thread arrived on, for forgetting a channel. |
-| `backfill` | Consent-gated storing of past chats in the lifecycle's shape. |
-| `import` | Consent-gated, resumable v1 import. |
-| `tools`, `tool_budget`, `tool_writes` | The scoped agent tool: bounded explicit reads and durable local admission of `learn`/`forget`, followed by background delivery. |
-| `ops`, `explore` | Engine selection, recall, fetch, learn, forget, listing, the explorer. |
-| `bus` | The cron subscriber (`memory_sources_sync`, `memory_background`). |
-| `schemas` | The `openhuman.memory_*` controllers. |
-| `status`, `error`, `types` | Subsystem status, error codes, shared types. |
-
-## Where the agent loop calls memory
-
-| 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` |
-| 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` |
-| Compaction enrichment from completed cache, with background refresh | `agent/tinyagents/memory_summarizer.rs`, wrapped around the summarizer in `harness_context_ladder.rs` |
-
-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.
-
-Successful content changes clear cached packs and advance a revision, preserving queued conversation logs while rejecting older in-flight results. Engine or credential invalidation clears the caches and pending refreshes. Scoped background tasks retain both CoreContext and memory identity.
-
-The agent tool allows 15 seconds per call, 30 seconds of aggregate reserved time and eight attempts per retained run record. The tracker keeps 128 records; idle eviction under churn can reset the budget for that run, while outstanding reservations cannot be evicted. `learn`/`forget` acknowledge durable local admission, not remote completion. Their scrubbed outbox entries contain trusted scope rather than credentials, and retry under the matching owner on background/auth ticks. Direct RPC, UI and import/deletion workflows keep their explicit behavior.
-
-The turn's `MemoryTurn` (config, identity, thread, pack) rides
-`OpenHumanRunContext::memory_turn`; a child run has its own.
-
-Chat thread persistence is not memory. It is `tinyagents_session::threads`,
-wrapped by `crates/openhuman-core/src/threads/store`.
-
-The MCP server exposes `memory.recall`, `memory.fetch`, `memory.list`,
-`memory.learn` and `memory.forget` (`mcp/server/tools/specs.rs`).
-
-## Tests
-
-- Unit tests beside each module (`*_tests.rs`), against `ReferenceEngine`.
-- `tests/memory_v2_e2e.rs`: every `memory_*` RPC against the mock backend, and
- a web-chat turn whose inference request carries the pack, whose turns are
- logged with `x-sdk-name`, and whose transcript holds no pack.
-- `crates/openhuman-embed/tests/runtime_agents.rs`: `AgentSpec::memory`.
-- `app/test/playwright/specs/memory-v2.spec.ts` (UI).
-
-Against a real CortexDB server, `scripts/test-memory-cortexdb-live.sh` boots
-the pinned harness in Docker (`vendor/tinymemory/integration/cortexdb/`) and
-runs `tests/memory_cortexdb_live.rs`: learnings, a synced folder source,
-web-chat turn logging, recall, the pack preview, the pack injected into a
-turn's inference request, and belief builds. It skips unless
-`OPENHUMAN_LIVE_CORTEXDB_URL` is set.
diff --git a/gitbooks/developing/architecture/process-state.md b/gitbooks/developing/architecture/process-state.md
deleted file mode 100644
index 1a268a2908..0000000000
--- a/gitbooks/developing/architecture/process-state.md
+++ /dev/null
@@ -1,71 +0,0 @@
----
-description: Process state, tenant ownership and routing requirements for shared cores.
-icon: layers
----
-
-# Process state in shared cores
-
-This inventory tracks the named singleton candidates in [#7433](https://github.com/tinyhumansai/openhuman/issues/7433), under the [cloud-storage epic](https://github.com/tinyhumansai/openhuman/issues/7419). It records source review at `3dbdd07e5f07d917dabbbc93fb0a9dd2a24a4347`, with the MCP cleanup reservation added at `d1efa8bd58417a0715d3c93655985ccfa9c9759c`. PR evidence below was checked on October 12, 2026. It does not cover every static in the core or certify a cloud deployment.
-
-## Classification
-
-The categories describe the required ownership boundary. A row can require more than one:
-
-- **A — process:** bootstrap settings, local execution handles or process capabilities.
-- **B — scoped:** state must retain its tenant, agent, session or connection owner.
-- **C — durable:** records need a backend document, stream, blob or claim.
-- **D — routing:** requests must reach the process that owns a live handle, or use an explicit executor-routing protocol.
-
-“Pending” means the boundary still needs a regression or implementation. A process-local table cannot provide a distributed claim just because a related record is durable.
-
-### Configuration and identity
-
-Paths in the table are relative to `crates/openhuman-core/src/`.
-
-| State | Class | Current boundary and remaining work |
-| ----------------------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `security/credentials/identity.rs` `CURRENT_USER` | B | One process slot supplies prompt and tracing identity. Pending: trace authenticated profile admission and test interleaved identities before treating it as profile-owned state. |
-| `config/schema/load/active_workspace.rs` `ACTIVE_WORKSPACE` | A | Process bootstrap cache. Pending: verify profile operations cannot select another workspace through this fallback. |
-| `core/runtime/context.rs` `DEFAULT_CONTEXT` | A | Bootstrap context. SaaS tenant resolution uses the actual scoped context and refuses missing task context; the default is not a tenant authority. |
-| `agent/multimodal.rs` `ATTACHMENTS_DIR` | B, C | First-initialized local attachment directory. Attachment bytes and indexes need scoped blob ownership and an import path; see #7425. |
-| `threads/store/bus.rs` `CONVERSATION_PERSISTENCE_WORKSPACE` | A | Desktop subscriber installation explicitly refuses SaaS. This supplies no shared-core persistence or routing. |
-| `mcp/host.rs` `DEFAULT_CONFIG` | A, B | Replaces the issue's former `DEFAULT_WORKSPACE` name. Scoped clients capture configuration; missing SaaS context currently falls through to the process default. Pending refusal regression and fix. |
-| `core/logging.rs` `LOG_DIR` | A | Process logging destination. Cloud logging should use process output or a collector; directory state is not a tenant store. |
-| `config/schema/proxy.rs` proxy settings and clients | A, B | Process proxy policy and cached HTTP clients. Pending: establish operator-only mutation or capture profile policy; tenant configuration must not silently change another caller's routing. |
-| `config/schema/cli_overrides/ops.rs` `CLI_INFERENCE_STATE` | A | Launch overrides; persisted configuration is restored separately. This is process configuration, not durable tenant inference state. |
-| `agent/tinyagents/discovery` `SETTINGS` | B | Session construction overwrites one process policy, and turn assembly reads that slot. Pending interleaved-session regression; discovery policy needs a captured session owner. |
-| `storage/secrets.rs` `KEYS` | A | Caches the master provider. Native secret operations capture scope and derive scoped data keys. Pending production `current()` isolation controls; changing the master source requires restarting the process. Legacy adoption needs separate source-ownership admission. |
-| Connected-integration cache | B | Credential-only snapshots and global invalidation are corrected in [PR #7513](https://github.com/tinyhumansai/openhuman/pull/7513). Eight scope, diagnostic and epoch-reclamation controls, 363 Composio tests and five scoped-spawn controls pass. This is a pending PR, not released behavior. |
-
-### Live execution and delivery
-
-| State | Class | Current boundary and remaining work |
-| ---------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `agent/orchestration/busy_guard.rs` | B, D | Profile-keyed live-turn guards with exact guard cleanup. A second core cannot observe these guards; live turns need owner routing or durable claims. |
-| `agent/orchestration/completion_owners.rs` | B, D | Bounded IDs map to recorded profiles; delivery reopens trusted profile contexts. Restart or eviction can lose routing triggers. |
-| `agent/orchestration/background_completions.rs` | B, C, D | Workspace routers and profile-keyed gates; completion records still use workspace JSONL with a memory fallback. Shared delivery requires durable records and claims. |
-| `agent/orchestration/background_delivery.rs` | B, D | Profile-keyed local slots and scoped delivery tasks. Multiple executors need a shared delivery claim before publishing the same completion. |
-| `agent/orchestration/running_subagents` | B, C, D | [PR #7517](https://github.com/tinyhumansai/openhuman/pull/7517) captures tenant ownership in live registry keys and public controls. Seven host controls passed after six baseline failures. Review follow-ups remain: prove actual SaaS RPC admission and refuse missing-scope spawns before durable writes. Live handles still need executor routing. |
-| `agent/orchestration/workflow_runs/engine/cancel.rs` | A, D | UUID run IDs index generation-protected local signals. Public stop loads a scoped durable record first. Remote stop needs routing to the executing process; a durable row does not carry the signal. |
-| `threads/store/bus.rs` `CLAIMED_TURNS` | A | Bounded desktop channel/message deduplication; registration and claims are disabled in SaaS. No distributed or SaaS turn claim is provided. |
-
-### Capabilities and module connections
-
-| State | Class | Current boundary and remaining work |
-| -------------------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `core/event_bind_tokens.rs` `STORE` | A, D | Random one-shot client-bound capabilities with expiry. SaaS SSE rejects desktop tokens or missing profiles before consumption and filters events by the captured profile. Route consumption to the minting process; do not copy token tables into tenant documents. |
-| `desktop/control/confirmation.rs` `TABLE` | B, D | Thread-bound local confirmations; SaaS excludes this domain. Pending tests for two embedded actors sharing a thread and for cancellation after module replacement. Ownership must include the original module instance. |
-| `security/approval/gate.rs` `GLOBAL_GATE` | B, C, D | Routes already include tenant/agent scope; waiters retain original document handles. Pending missing-policy fallback controls. Normal profile hosts supply their own policy; cross-core waiter delivery still needs routing. |
-| `composio/trigger_history.rs` | B, C | Process lifecycle owner of an opaque module archive lease. Workspace changes release the old captured client before opening another. The module owns durable history; native archive consumption and trustworthy event-profile propagation remain owner/host integration work. |
-| `mcp/module_client.rs` `CLIENTS`, `CLEANUP_RESERVATIONS` | B, D | Agent-directory keys reserve retiring clients and pending cleanup callbacks. These are process-local admission fences. Pending: retain the admitted module owner through close and receipt polling; prove workspace retention and path admission after failed cleanup. They do not provide a distributed lease. |
-| Browser `THREAD_SESSIONS` | B, D | Keys include scope directory and thread; sessions retain their original browser client. Normal profiles have distinct workspaces. Pending explicit same-workspace/different-profile collision test; route live browser handles to their owner. |
-| RPC HTTP host `REGISTRY` | A, D | UUID listener handles capture task and auth state; list/get/stop lack tenant ownership. SaaS excludes the Platform surface. Pin that exclusion; exposing listeners to tenants would require an explicit owner capability. |
-| Voice `IN_FLIGHT_CORRELATIONS` | B, D | Global correlation IDs and deferred replies through the current socket manager. SaaS headless services disable Socket.IO. Pending desktop reconnect/identity-switch controls: old work must retain its connection or refuse delivery. |
-
-## Deployment constraints
-
-A load balancer must preserve the owner of live streams, approvals, workers, browser sessions and local capabilities. Reconnecting to another core requires an explicit handoff or typed refusal. Shared storage alone does not transfer an in-memory task, socket, cancellation signal or module handle.
-
-Desktop-only surfaces excluded by the SaaS preset must remain excluded until their ownership tests pass. Removing an exclusion is a capability change, even when its store has moved to a shared backend.
-
-Outstanding acceptance includes reproducing each leak candidate, shrinking the storage-bypass baseline, driver-matrix verification, and regression-tested desktop import. [PR #7519](https://github.com/tinyhumansai/openhuman/pull/7519) adds a declaration guard for new core statics and retains existing ownership records; 68 guard, lane and crate-chain tests pass. It does not expand macros or certify existing globals. The guard remains a pending PR. Prepared tests and source review do not satisfy the remaining execution requirements.
diff --git a/gitbooks/developing/architecture/security.md b/gitbooks/developing/architecture/security.md
deleted file mode 100644
index 1b97eb7d21..0000000000
--- a/gitbooks/developing/architecture/security.md
+++ /dev/null
@@ -1,113 +0,0 @@
----
-description: >-
- The trust boundary for the autonomous core: the autonomy and risk policy,
- sandbox selection, the audit log, the encrypted secret store, the pairing
- guard and the redact() helper.
-icon: shield-halved
----
-
-# Security
-
-`crates/openhuman-core/src/security/` is the trust boundary for the autonomous core. Look here first when you ask "is this agent action allowed, and if so, how is it confined?"
-
-It owns:
-
-- The autonomy and risk policy that decides whether a tool call is allowed.
-- The sandbox selection that confines calls when the host supports it.
-- The append-only audit log of every agent action.
-- The encrypted secret store.
-- The pairing guard that gates public binding of the RPC server.
-- The `redact()` helper every other domain uses to keep plaintext credentials out of logs.
-
-It does not own the cross-domain `EncryptionEngine` (in `security/encryption/`) or per-channel credential storage (in `security/credentials/`).
-
-## Public surface
-
-| Item | File | Purpose |
-| ----------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------- |
-| `SecurityPolicy` | `policy/types.rs` (path checks in `policy/path_checks.rs`, command classification in `policy/command_checks.rs`, gating in `policy/enforcement.rs`) | Assembles runtime policy from `AutonomyConfig` + workspace dir. |
-| `AutonomyLevel` (`ReadOnly` / `Supervised` / `Full`) | `policy/types.rs` | Three-step autonomy ladder. |
-| `CommandRiskLevel`, `ToolOperation`, `ActionTracker` | `policy/types.rs` | Risk classification and per-session counting. |
-| `SecretStore` | `secret_storage/encrypted_store.rs` (`secrets.rs` re-exports it) | OS-keychain / encrypted-file secret persistence with round-trip helpers. |
-| `AuditLogger`, `AuditEventType`, `AuditEvent`, `Actor`, `Action`, `ExecutionResult`, `SecurityContext`, `CommandExecutionLog` | `audit.rs` | Append-only audit trail. |
-| `PairingGuard`, `constant_time_eq`, `is_public_bind` | `pairing.rs` (`PairingGuard` and `constant_time_eq` are re-exported from `tinychannels_bus::security`) | Pairing-token check before binding the RPC server publicly. |
-| `redact(value: &str) -> String` | `core.rs` | Uniform 4-char-prefix redaction for logs. |
-| `security_policy_info_for_config(&Config) -> Outcome<serde_json::Value>` | `ops.rs` | RPC handler for the doctor / settings UI. |
-
-## Sandboxing
-
-This module carries no sandbox backends. Per-session sandbox selection lives in `crates/openhuman-core/src/sandbox/`. It delegates local OS confinement to `tinybox-jail` (vendored tinybox) and keeps its own `docker run` executor. Command classification scans shell strings with `tinybox_core::shell::scan`, and the classification rules stay in this module.
-
-## Autonomy ladder
-
-`AutonomyLevel` is a three-step ladder that sets how strictly the policy gates tool calls. It only takes effect while `[autonomy] enabled = true`.
-
-- `ReadOnly` blocks every writing class outright. No approval can authorize one.
-- `Supervised` is the default. It allows reads and parks everything else for an approval round trip.
-- `Full` allows reads and writes. It still parks the network, install and destructive classes.
-
-The wire spellings are lowercase (`readonly`, `supervised`, `full`). The user-facing table is in [Approval gate](../../features/approval-gate.md).
-
-`CommandRiskLevel` and `ToolOperation` classify a tool call. `ActionTracker` keeps the per-session counts that the policy compares against its caps. The agent harness asks `SecurityPolicy` for a decision before every executable tool dispatch.
-
-All of this applies only when the autonomy policy is on. `[autonomy] enabled = false` is the default, and `SecurityPolicy::from_config` carries that flag through every enforcement entry point. With the policy off, command classification, the approval gate, the command allowlist and the hourly action budget do nothing. `workspace_only`, `forbidden_paths` and the workspace-internal boundary are not enforced either.
-
-One check never turns off. `is_always_forbidden` blocks credential stores (`~/.ssh`, `~/.gnupg`, `~/.aws`) and system roots. It also rejects `..` traversal and null bytes in a path. This is the floor the module keeps whatever the configuration.
-
-## Audit log
-
-`audit.rs` writes an append-only stream of `AuditEvent`s under the workspace dir. Every executable tool call lands here with its `Actor` (agent or user), `Action`, `ExecutionResult` and the `SecurityContext` (autonomy level, sandbox backend and so on) it ran under. The log tells you afterwards what the agent did and why it was allowed.
-
-## Pairing guard
-
-`PairingGuard` (in `pairing.rs`) stands between the RPC server and any attempt to bind to a non-loopback address. `is_public_bind` detects that case. `PairingGuard` then requires a pairing token, compared in constant time with `constant_time_eq`, before the bind is allowed. The iOS and LAN-companion pairing flow relies on this to keep an unpaired peer from attaching to the desktop core.
-
-## Secret store
-
-`SecretStore` (implemented in `security/secret_storage/encrypted_store.rs`, re-exported through `secrets.rs`) encrypts config-field secrets with ChaCha20-Poly1305 (`enc2:` prefix). It migrates the legacy XOR `enc:` format when it decrypts. Core owns the platform-independent secret-storage contracts, an in-memory default, and an optional encrypted-file backend. `openhuman-rpc::keyring` owns the native OS providers and installs them through those contracts before host boot. RPC product hosts explicitly select persistent storage; embed uses memory unless a provider or backend override is supplied. Backend selection and migration are described in `crates/openhuman-core/src/security/secret_storage/README.md`.
-
-## `redact()`
-
-`redact(value)` returns a uniform 4-character-prefix string (for example `"sk-a…"`) for use in logs and error messages. Use it whenever a secret, credential, token, or PII string is about to be formatted into a `log::` / `tracing::` call. Other domains call it directly: `credentials/`, `webhooks/`, `composio/`, the integration adapters.
-
-## Layout
-
-| Path | Role |
-| ------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `policy/` (`mod.rs`, `types.rs`, `path_checks.rs`, `command_checks.rs`, `enforcement.rs`, `policy_*_tests.rs`, `proptest_tests.rs`) | `SecurityPolicy`, `AutonomyLevel`, risk classification, path and command checks, action tracking. |
-| `core.rs`, `core_tests.rs` | `redact()` + small shared helpers. |
-| `audit.rs` | Append-only audit log types. |
-| `secrets.rs`, `secret_storage/` | `SecretStore` (implemented in `secret_storage/encrypted_store.rs`) + round-trip tests. |
-| `pairing.rs`, `pairing_tests.rs` | `PairingGuard` + constant-time helpers. |
-| `ops.rs` | RPC handler (`security_policy_info_for_config`). |
-| `schemas.rs` | Controller schemas + handler dispatch. |
-| `mod.rs` | Re-exports of the public surface above. |
-| `live_policy.rs`, `scrub.rs`, `tools.rs` | Live-policy lookup, the host scrubbing policy (`scrub::host_policy`), and the domain's own agent tools. |
-| `approval/`, `credentials/`, `devices/`, `egress/`, `encryption/`, `keyring_consent/`, `prompt_injection/` | Sibling kernel-security domains under the same module. Each owns its own surface. This page covers the policy core only. |
-
-Local PII detection belongs to [`tinymemory_api::safety`](https://github.com/tinyhumansai/tinymemory/blob/d1b06334faf7f8abb62bd1bd4ec4c4d4862f53a4/crates/tinymemory-api/src/safety/README.md) behind its `local-safety` feature. OpenHuman keeps privacy policy and redaction decisions.
-
-## Calls into
-
-- `crates/openhuman-core/src/config/`: `SecurityConfig`, `AutonomyConfig` for policy + sandbox selection.
-- Workspace filesystem, for the audit log and secret store.
-
-## Called by
-
-- `crates/openhuman-core/src/cron/ops.rs`: wraps shell jobs in `SecurityPolicy::from_config`.
-- `crates/openhuman-core/src/tools/ops.rs` and `tools/impl/{browser,document,filesystem,network,presentation,system}/`: every executable tool consults `SecurityPolicy`.
-- `crates/openhuman-core/src/tools/impl/network/{gate,mcp,mcp_server_tools}.rs`: risk-classify outbound calls.
-- `crates/openhuman-core/src/memory/guard.rs`: wraps every memory write in `security::scrub::host_policy()`.
-- `crates/openhuman-core/src/agent/tools/delegate.rs`: sub-agent dispatch goes through the autonomy gate.
-- `crates/openhuman-core/src/security/credentials/`: uses `SecretStore` and `redact`.
-
-## Tests
-
-- Unit: `pairing_tests.rs`, `policy/policy_tests*.rs`, `policy/proptest_tests.rs`, `secret_storage/encrypted_store_tests*.rs`.
-- `core_tests.rs` covers `redact()`.
-
-## Related
-
-- [`security/README.md`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/security/README.md): the in-repo overview this page mirrors.
-- [Architecture](../architecture.md): the wider system context.
-- [Agent harness](agent-harness.md): where `SecurityPolicy` is consulted on every tool dispatch.
diff --git a/gitbooks/developing/architecture/storage.md b/gitbooks/developing/architecture/storage.md
deleted file mode 100644
index 7058527fd8..0000000000
--- a/gitbooks/developing/architecture/storage.md
+++ /dev/null
@@ -1,165 +0,0 @@
----
-description: >-
- The storage domain in crates/openhuman-core/src/storage/: the ports, URL
- resolution, Cargo features, per-agent scopes, drivers and on-disk layout.
-icon: database
----
-
-# Storage
-
-OpenHuman keeps durable state on the ports of [`tinystoragedrivers`](https://github.com/tinyhumansai/tinystoragedrivers), vendored through `vendor/tinyagents/vendor/tinystoragedrivers`. One URL picks the backend for the whole process. The host adapter is `crates/openhuman-core/src/storage/`. It resolves the URL, opens the backend, holds it in a process slot and decides which scope a call runs in. The ports, the drivers and their conformance suites belong to `tinystoragedrivers`, and the typed records stay with the domain that owns them.
-
-With no URL configured, which is the desktop default, the host opens `sqlite:<workspace>/storage` and installs it. The URL decides where the whole process keeps its state, and there is no second layout: older installs' per-domain databases, transcripts and turn-state files are imported once, read-only, when the backend is installed. The files that remain outside the ports are listed under "What is not on the ports yet" below.
-
-## The ports
-
-A backend is a `StorageBackend`. It hands out a `ScopedStorage` for each `Scope`, and every handle on it is already bound to that scope, so no method takes a scope argument.
-
-| Port | Holds | Used for |
-| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
-| `DocumentStore` | Versioned JSON documents in named collections, with filters, paging, unique indexes, compare-and-swap (`Precondition`), atomic `claim` and optional expiry | Approvals, devices, notifications, task sources, cron jobs and runs, the flow catalog, graph checkpoints, encrypted secrets |
-| `StreamStore` | Append-only logs with dense offsets | Transcripts, journals |
-| `BlobStore` | Opaque bytes by key | Attachments, artifacts |
-| `SearchIndex` | Full-text membership | Where the driver supports it |
-| `SecretStore` | Encrypted values (`enc2:` envelope) | Keyring user secrets and the credential stores |
-
-The core's stores are mostly synchronous, so `storage::block_on` runs a storage future on one shared runtime thread. It never uses `block_in_place`, which panics on a current-thread runtime. `storage::documents::Repo` is the base the domain stores build on. It declares a domain's collections once per process and runs each call.
-
-## Choosing a backend
-
-The storage URL is the first of these that is set. Blank values count as unset.
-
-1. `OPENHUMAN_STORAGE_URL`
-2. `[storage] url` in `config.toml`
-3. The default, `sqlite:<workspace>/storage` (one database per workspace)
-
-The retired `classic` opt-out value is read as unset, with a warning.
-
-`[storage]` is bootstrap configuration. It is always read from the environment or the file and never from storage itself.
-
-| URL | Driver | Cargo feature |
-| ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
-| `memory` | In-process maps, keeps nothing | Always |
-| `sqlite:<path>` (a `.db` file, or a directory that holds `storage.db`) | SQLite | `storage-sqlite` |
-| `file:<dir>` | `<dir>/scopes/<scope>/docs/<collection>/<id>.json` for documents, with collection metadata in `<dir>/_meta/collections/<collection>.json`. Streams are JSONL and blobs are raw files under the same scope directory. | `storage-file` |
-| `mongodb://…/<db>`, `mongodb+srv://…/<db>` | MongoDB, one database shared by every scope | `storage-mongodb` |
-
-A URL for a driver the build lacks fails at `storage::open`, and the error names the Cargo feature. A misconfigured deployment therefore stops at boot rather than at its first write. Credentials in a URL are redacted in logs and in `Debug` output.
-
-Each feature is forwarded through the whole library chain (`openhuman-core`, `openhuman-embed`, `openhuman-tinyhumans`, `openhuman-rpc`, then the `openhuman-cli` and `openhuman-tui` hosts). `scripts/ci/check-feature-forwarding.mjs` checks the links. A desktop build never links a MongoDB client, and a cloud build does not need SQLite.
-
-The host opens the configured backend before the core boots and installs it with `storage::install`. It then installs TinyAgents' `DriverSessionStores` over the same backend, so transcripts, turn states, the run ledger and journals live in it too. Library hosts use `RuntimeBuilder::storage(..)`, which installs only the backend: conversations move onto it with `RuntimeBuilder::session_store(..)`, configured separately.
-
-## Scopes
-
-Every record lives in a scope, and two scopes on one backend never see each other's data. A single-user install scopes by **agent id**, and a SaaS host scopes by **profile** (the tenant). `storage::scope_for_agent` and `storage::scope_for_profile` are the single mappings, and the session store uses the same ones, so every domain agrees. An agent's scope is its id when that is a valid scope name, else `sha256:<hex digest of the id>` (TinyAgents' `DriverSessionStores::scope_for`). A profile's scope is `profile:<id>`, or `profile-sha256:<hex digest of the id>` when that is not a valid scope name. The prefixes keep the two kinds of key from colliding, and `local` is the literal operator scope.
-
-`storage::current_scope()` resolves the scope of the current call from the task's tenant (`storage::scope_from(profile, agent, saas)`), in this order:
-
-1. A **profile**, when the work runs for one: the scope is the profile's, whatever agent acts inside it. In SaaS mode the agents of one profile therefore share that profile's scope.
-2. Otherwise the acting **agent** (`CoreContext::session_agent`): the scope is that agent's.
-3. Otherwise `local`: the operator, the CLI and the desktop shell in single-user mode.
-
-In SaaS mode a call with no profile is refused instead of falling into a bucket other users could share, whether or not an agent acts. If the task's tenant cannot be resolved at all (`current_tenant()` fails), `current_scope()` returns that error in every mode instead of falling back to `local`.
-
-A backend decides how it enforces the scope. SQLite and the file driver keep each scope's data apart, and `local` is the scope a single-user install uses. MongoDB injects a scope key into every filter and every index prefix.
-
-### Process state
-
-The [process-state inventory](process-state.md) classifies the named shared-core
-singleton candidates and records their tenant, durability and routing boundaries.
-It also identifies pending regressions and implementation work.
-
-### Process caches
-
-The connected-integration catalog belongs to the calling profile, or to the
-operator in single-user mode. Agents using that operator's same configuration
-and credentials share it. Its cache key
-also binds the configuration, backend endpoint and credential identity, using
-digests rather than storing those secrets in the key. Identical service
-credentials do not make two profiles share a snapshot.
-
-| Cache | Isolation and lifetime |
-| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `INTEGRATIONS_CACHE` | Per-process snapshots keyed by profile/operator scope and credential identity. Invalidation and connection reconciliation affect only the calling scope. Entries are reconstructed from the backend; they are not durable records. |
-| `CACHE_GENERATIONS` | Per-process epochs for the same profile/operator scopes. Invalidation fences that scope's in-flight fetches without rejecting another profile's completed fetch. |
-| Storage `KEYS` | The process master-key provider. Each secret operation derives its data key from the captured native storage scope; the cached value is not a tenant data key. Changing the master source requires a new process. |
-
-SaaS work without a profile cannot read, populate, reconcile or invalidate the
-integration cache. The Settings connection poll keeps its calling context when
-it starts a background refresh with `spawn_scoped`.
-
-### Background work
-
-Background work runs under the process default context, which names no agent, and on its own would only see `local`. `storage::agents` closes the gap. Agents are known when they are live (`AgentContextRegistry`) or when an earlier process recorded their id in the `local` scope (`storage_agents`). `for_each_scope` runs a step once for `local` and once under each known agent. The cron scheduler's agent pass (`cron::scheduler::tick_live_agents`, driven in tests through the public `cron::scheduler::run_live_agent_pass`) runs each live agent's due jobs under that agent's own context, so their results are recorded in the agent's own scope. A recorded agent that is not live waits until it is live again, because its jobs need its host tools and prompt.
-
-On a shared backend (MongoDB) other processes may write the same records, so boot-time recovery such as the orphaned-run sweep is skipped (`storage::installed_is_shared`).
-
-## Drivers and on-disk layout
-
-| Driver | Where the data lives |
-| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `memory` | Nowhere. Records last as long as the backend value. |
-| `sqlite:<dir>` | `<dir>/storage.db` in WAL mode (with its `-wal` and `-shm` files). The scope is a column on every row. The large relational stores keep their tables through the driver's native mode. |
-| `sqlite:<file>.db` | That file, laid out the same way. |
-| `file:<dir>` | `<dir>/scopes/<scope>/docs/<collection>/<id>.json` for documents, with collection metadata in `<dir>/_meta/collections/<collection>.json`. Streams are JSONL and blobs are raw files under the same scope directory. |
-| `mongodb://…/<db>` | One database. Each named database is a collection prefix, and every record carries its scope. |
-
-### The default follows the workspace
-
-The default URL is rooted at the workspace, so a different workspace is a different database. The desktop rebinds its workspace when a different user signs in. `storage::rebind` then re-resolves the URL for the new workspace, opens its backend, points the session store (`ReboundSessionStores`) and the process slot at it together, and runs the legacy importers over it. This happens before any other store is rebound, and a failed reopen is an error that leaves the previous backend installed rather than continuing on it. An explicit URL names one backend for every user and is never replaced.
-
-A SaaS core with no URL keeps one default database per profile workspace, and its profiles never share a scope.
-
-### What is not on the ports yet
-
-The keyring or `secrets.enc`, the path-bound artifacts and media, and a few stores that keep a file next to a document fallback (cost tracking, the Composio file store, sub-agent sessions, agent artifacts) still use files when no backend is installed. The vault watcher's mtime table stays a per-machine SQLite file on purpose, because its rows are absolute paths on one host. On first read with a backend installed, the auth-profile and HTTP-credential stores copy the records in their files into the backend, and the keyring adopts a secret it finds in the process backend. The source files are left untouched.
-
-### Importing the legacy small stores
-
-When the backend is installed, the core runs a one-time import at boot (`storage::import`, before any domain store opens). It covers the four small stores that keep one SQLite file each: approvals (`approval/approval.db`), devices (`devices/devices.db`), notifications (`notifications/notifications.db`) and task sources (`task_sources/sources.db`). The import is read-only. It copies the file, with its `-wal` and `-shm` companions, into a scratch directory and reads the copy, so the legacy reader's schema migration and the SQLite driver's table declaration never touch the real file. Both on-disk shapes are read: the original tables, and the driver document tables an earlier default wrote into the same file (those records win an id clash, being newer). Notifications for the core are re-filed under the real workspace's key.
-
-Every record is written with an absent-only precondition, so an existing record is never overwritten. When a domain's records are written, a marker document (`storage_import/<domain>@<workspace digest>`, local scope) is stored, and a later boot does nothing. A deleted record is therefore not brought back from the untouched file. A failed import leaves no marker and is retried at the next boot; boot continues either way. SaaS processes have no workspace files and import nothing.
-
-The tinyflows stores are imported the same way with TinyFlows' own reader (`tinyflows-import`): cron jobs with their runs and policies (`cron/jobs.db`, and each agent's `agents/<id>/cron/jobs.db`, filed under that agent's scope), and the flow catalog with its drafts and checkpoints (`flows/flows.db`, `flows/drafts/*.json`, `flows/checkpoints.db`). Records keep their ids, markers are `cron`, `cron/<agent>` and `flows`, and a build without the `flows` gate imports no cron jobs.
-
-TinyFlows has no storage backend of its own any more, so these stores are on the ports whatever the URL says, and the legacy files are never modified or written again.
-
-Sessions are imported through TinyAgents' `legacy` reader, which owns those formats (`storage::import::sessions`): `session_db/sessions.db` (copied with `VACUUM INTO` first, because the reader refuses a database with a WAL sidecar) fills the run ledger of the default agent, each `session_raw` transcript lands in the scope of the agent its stem names (matched against the known agent definitions, else the default agent), and the turn-state JSON goes to the default agent. The marker is `sessions`; a run that skipped records leaves no marker and is retried.
-
-Secrets with a backend installed are encrypted documents in the current storage scope: the acting agent's scope on a desktop or CLI host, and the profile's scope under SaaS, where every agent in one profile shares the profile's credentials and data key. Each scope's data key is derived with HKDF-SHA256 from the keyring master key (`OPENHUMAN_KEYRING_MASTER_KEY` or `_FILE`, else the OS keychain), and with no master key they fail closed. The config encryption key stays on the process keyring because `config.toml` is loaded before any agent acts.
-
-## Tests and CI
-
-Every storage test target runs the same body once per driver, and each run is a separate test case named after the driver (`memory::…`, `sqlite::…`, `file::…`, `mongodb::…`), so a failure says which driver broke. The shared helper is `tests/support/storage_drivers.rs`.
-
-| Driver | Runs |
-| ---------------- | ------------------------------------------------------------------------------------------------------- |
-| `memory` | Always |
-| `sqlite`, `file` | When `storage-sqlite` or `storage-file` is compiled in, on temp directories |
-| `mongodb` | When `storage-mongodb` is compiled in and `TSD_MONGO_URL` is set. Each case uses a database of its own. |
-
-The targets are `storage_approvals_e2e`, `storage_domains_e2e`, `storage_flows_e2e`, `storage_secrets_e2e`, `storage_scope_e2e`, `storage_agent_scopes_e2e`, `storage_delegation_e2e` and `cli_storage_url_e2e`. Run one locally with the drivers you want:
-
-```bash
-cargo test -p openhuman-cli --features storage-sqlite,storage-file --test storage_approvals_e2e
-```
-
-For MongoDB, start a single-node replica set and set the URL (a replica set is what lets the driver report and exercise transactions):
-
-```bash
-bash vendor/tinyagents/vendor/tinystoragedrivers/.github/scripts/start-mongo-replset.sh 27017
-export TSD_MONGO_URL='mongodb://127.0.0.1:27017/tsd_test?directConnection=true'
-cargo test -p openhuman-cli --features storage-mongodb --test storage_approvals_e2e
-```
-
-CI has two lanes for this:
-
-- The `storage-drivers` lane in `scripts/ci/self-hosted/lanes-plan.mjs` builds with `storage-sqlite,storage-file`. It runs every storage target plus the lib tests of the domains on the ports. The `storage` area in `.github/ci-paths-filter.yml` arms it when storage, cron, flows, approvals, devices, notifications, task sources, keyring or credentials, orchestration, the cost tracker, app and desktop-control state or the rpc session store change.
-- `.github/workflows/storage-mongodb.yml` builds with `storage-mongodb` against a real replica set. It runs on pull requests that touch the same paths, nightly on `main` and on demand.
-
-## Where to read next
-
-- `crates/openhuman-core/src/storage/README.md` for the entry points and the consumers.
-- The `tinystoragedrivers` specs: `docs/specs/storage-ports.md` and `docs/plans/storage-rollout.md` in `vendor/tinyagents/vendor/tinystoragedrivers`.
-- [Security](security.md) for the keyring and credential stores.
diff --git a/gitbooks/developing/architecture/tauri-shell.md b/gitbooks/developing/architecture/tauri-shell.md
deleted file mode 100644
index 27f8d4045c..0000000000
--- a/gitbooks/developing/architecture/tauri-shell.md
+++ /dev/null
@@ -1,350 +0,0 @@
----
-description: >-
- The desktop host in crates/openhuman-app/: the Tauri v2 webview, the IPC
- commands, the embedded core's lifecycle and the JSON-RPC bridge.
-icon: desktop
----
-
-# Tauri shell
-
-`crates/openhuman-app/` is the desktop host for OpenHuman. It provides the Tauri v2 webview, IPC commands and window management, and bridges to the embedded `openhuman-core` Rust runtime over core JSON-RPC. It does not duplicate the domain stack. That lives in `crates/openhuman-core` (library `openhuman_core`; the `openhuman-core` binary is `crates/openhuman-cli/src/main.rs`).
-
-### Where the shell sits
-
-The shell is one of three hosts on top of a strict crate chain, and
-`openhuman-rpc` is the only OpenHuman crate in its `Cargo.toml`:
-
-```text
- openhuman-app (this crate)
- | [dependencies] openhuman-rpc (http-client, server, jev + the product gates)
- v
- openhuman-rpc ----------> host::desktop / host::cli, server, client
- | re-exports `embed` and `tinyhumans`
- v
- openhuman-tinyhumans ---> SDK transport, session owner (`session/` uses it)
- |
- v
- openhuman-embed --------> Runtime, process helpers (tokio runtime, logging,
- | Sentry options), config/artifacts/modules facades
- v
- openhuman-core
-```
-
-| Shell code | Goes through |
-| --- | --- |
-| Embedded server (`core_process.rs`) | `openhuman_rpc::host::desktop(DesktopOptions { port, rpc_token, .. }, shutdown, ready_tx)` |
-| `OpenHuman core …` / `mcp` subcommands (`lib.rs::run_core_from_args`) | `openhuman_rpc::host::cli(args)` |
-| Tauri async runtime sizing (`lib.rs::run`) | `openhuman_rpc::embed::process::tokio_runtime()` |
-| Sentry client (`lib.rs::run`) | `openhuman_rpc::embed::process::sentry::client_options` (the shared `before_send` chain; fallback user id from `session::peek_user_id`) |
-| File logging (`file_logging.rs`), data reset log handle | `openhuman_rpc::embed::process::{init_for_embedded, log_directory, shutdown_file_guard}` |
-| Config / workspace paths, artifacts, bundled modules | `openhuman_rpc::embed::{config, artifacts, modules}` |
-| Session owner (`session/`) | `openhuman_rpc::tinyhumans` |
-| Compile-time asserts | `openhuman_rpc::embed::{VOICE_COMPILED_IN, HTTP_SERVER_COMPILED_IN}` |
-
-`scripts/ci/check-crate-chain.mjs` fails if the shell's manifest names
-another OpenHuman crate or its `src/` names `__host`, `core_host` or
-`openhuman_core::`. One embed runtime exists per process: when the shell
-restarts its embedded server, `CoreProcessHandle` waits for the old task (and
-the runtime it owns) to drop before it spawns the next one.
-
-## Responsibilities
-
-1. Web UI. Load the Vite build from `app/dist` (or dev server on port 1420).
-2. IPC. Expose an explicit set of Tauri commands (see [Tauri IPC commands](#tauri-ipc-commands-cratesopenhuman-app)).
-3. Core lifecycle. Run the core JSON-RPC server as an in-process tokio task (`core_process.rs`) and hand the renderer its URL/bearer via `core_rpc_url` / `core_rpc_token`.
-4. Window and tray. Desktop window behavior (main, mascot, notch, overlay windows) and system tray (see `lib.rs`).
-5. Session ownership. Log the user in and keep the current user fresh (`session/`, backed by `openhuman_tinyhumans::session`): exchange the login token, validate the JWT against `GET /auth/me`, cache `/auth/me`, and hand the resulting credential to the core with `auth.set_credential`. The core never talks to the backend's auth endpoints itself.
-
-## Core process model
-
-The desktop app links the core in-process, so local builds need no staged `openhuman-core-*` sidecar. The `core:stage` script in `app/package.json` is a no-op kept for script compatibility.
-
-## Stuck process recovery
-
-Normal app quit runs teardown from `RunEvent::ExitRequested`: long-lived scanner tasks stop and the embedded core's cancellation token fires. The final process sweep then sends `SIGTERM` to direct children and, after a short grace period, `SIGKILL` to any holdouts. Sweep summaries are logged as `[app] sweep: term=N kill=M total=K`; any nonzero `kill` count is a warning and means a child ignored graceful shutdown.
-
-On macOS, hard exits (Force Quit, `SIGKILL`, renderer crash) can skip normal teardown. The next launch runs startup recovery before the app runtime starts: it lists OpenHuman processes whose executable path belongs to the launching `.app/Contents`, skips the current process, sends `SIGTERM`, waits briefly, then `SIGKILL`s stragglers that still match the same pid+command. Logs use the `[startup-recovery]` prefix.
-
-Startup recovery skips when `OPENHUMAN_CORE_REUSE_EXISTING=1` is set so manual CLI-core reuse still works. The Tauri command `process_diagnostics_list_owned` returns the currently owned process list; the macOS implementation is bundle-scoped, and Linux and Windows return an empty list.
-
-## Tauri shell architecture (`crates/openhuman-app/`)
-
-### Overview
-
-The `crates/openhuman-app` crate (Cargo package `openhuman-app`, lib `openhuman`, binary `OpenHuman`) is a desktop-only host. It embeds the React UI, registers plugins (deep link, opener, OS, notifications, autostart, updater), manages the main window and tray, and runs the core JSON-RPC server in-process.
-
-Non-desktop targets fail at compile time (`compile_error!` in `lib.rs`).
-
-### Directory layout
-
-`crates/openhuman-app/src/` is a flat set of modules, with no `commands/` or `utils/` subtree. The key modules:
-
-```text
-crates/openhuman-app/src/
-├── lib.rs # `run()`, tray/menu, plugins, `generate_handler!`, most window/update/lifecycle commands
-├── main.rs # Binary entry
-├── core_process.rs # CoreProcessHandle: embedded core server task, RPC token, port conflict handling
-├── core_rpc.rs # Auth helpers + `relay_http_rpc` host-side HTTP relay
-├── gateway/ # Where the frontend's RPC goes: the core in this process, a
-│ # core at a URL, or one this app provisions in a container /
-│ # over SSH / both (tinybox). types · store · ops · registry ·
-│ # commands
-├── imessage_scanner/ # macOS-only: reads ~/Library/Messages/chat.db directly
-├── mascot_native_window.rs / notch_window.rs / window_state.rs
-├── dictation_hotkeys.rs / ptt_hotkeys.rs / ptt_overlay.rs
-├── native_notifications/
-├── artifact_commands.rs # Artifact export (copy into Downloads)
-├── directory_picker.rs # Native folder picker for the folder memory source
-├── external_navigation.rs # Keeps the main webview from navigating off-app; hands remote links to the OS browser
-├── workspace_paths.rs # Safe workspace-relative file open/reveal/preview
-├── app_update.rs # Updater support (commands live in lib.rs)
-├── loopback_oauth.rs # Localhost OAuth redirect listener
-├── session/ # Session owner: auth_* commands over openhuman_tinyhumans::session
-├── claude_code.rs # Claude Code login launch
-├── mcp_commands.rs # MCP client helpers
-├── file_logging.rs # Log file sink + logs-folder commands
-├── process_recovery.rs / process_kill.rs / local_data_reset.rs # process_recovery has per-platform submodules under process_recovery/
-├── deep_link_ipc.rs / deep_link_ipc_windows.rs / deep_link_registration_check.rs
-└── stderr_panic_hook.rs / reset_reboot_schedule.rs
-```
-
-There is no `src-tauri/src/services/session_service.rs` in this tree. Session handling lives in `session/` (see [Session](#session-session)), the web layer, the backend and the core.
-
-### Data flow: UI → core
-
-```text
-React (fetch)
- → POST http://127.0.0.1:<port>/rpc (URL from `core_rpc_url`,
- bearer from `core_rpc_token`)
- → embedded openhuman core server (tokio task in this process)
-```
-
-The renderer talks to the local core directly over HTTP: `app/src/services/coreRpcClient.ts` invokes `core_rpc_url` / `core_rpc_token` once, then issues plain `fetch()` calls. The `relay_http_rpc` Tauri command is a host-side fallback used only when the RPC URL is not a trustworthy origin for the secure `tauri://localhost` webview (for example a self-hosted runtime on a LAN IP, blocked as mixed content). In that case the Rust host delegates to `openhuman_rpc::post_json_rpc` from the shared `crates/openhuman-rpc` crate (feature `http-client`): 30 s timeout, redirects disabled when a bearer is present, status + body mirrored back verbatim as `HttpRpcResponse`. The shell adds only the gateway transport guard (`validate_remote_transport`, feature `gateways`) before delegating.
-
-`CoreProcessHandle` in `core_process.rs` owns the embedded server task (started via `openhuman_rpc::host::desktop` with a per-launch random bearer token) and handles stale-listener/port-conflict recovery.
-
-### Window and tray behavior
-
-- The shell creates a tray icon at startup (`RunEvent::Ready`) and wires actions to open the main window or quit. Tray setup is skipped on Linux packaged runs (GTK panic).
-- Hide-to-tray is implemented in the `RunEvent::WindowEvent { CloseRequested }` handlers in `lib.rs`, not as IPC commands: macOS hides the whole app (`AppHandle::hide()`), Windows hides the top-level `Chrome_WidgetWin_1` frame via `EnumWindows` and `SW_HIDE`.
-- On macOS `RunEvent::Reopen` (Dock click) restores and focuses the main window.
-
-### Bundled resources
-
-`tauri.conf.json` bundles `../../crates/openhuman-core/src/agent/prompts` so the core prompt markdown ships with the app.
-
-### Related
-
-- IPC surface: see [Tauri IPC commands](#tauri-ipc-commands-cratesopenhuman-app) below
-- HTTP bridge: see [Core bridge and helpers](#core-bridge-and-helpers-cratesopenhuman-app) below
-- Rust domains and runtime: `crates/openhuman-core/src/`, `crates/openhuman-core/src/core/`
-- Shared RPC contracts + HTTP client: `crates/openhuman-rpc/` (also used by `crates/openhuman-tui` for envelope decoding)
-
-## Tauri IPC commands (`crates/openhuman-app`)
-
-All commands are registered in `crates/openhuman-app/src/lib.rs` inside `tauri::generate_handler![...]`. That list is the reference. The major families:
-
-### Core RPC and diagnostics
-
-| Command | Purpose |
-| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
-| `core_rpc_url` | Return the active gateway's JSON-RPC URL: the embedded core's `http://127.0.0.1:<port>/rpc` unless another gateway is active |
-| `core_rpc_token` | Return the active gateway's bearer. Paired with `core_rpc_url`: a token minted for the embedded core is meaningless to a core in a container |
-| `core_rpc_endpoint` | Return the URL and bearer together from one resolved snapshot, so a gateway switch between two separate calls cannot pair one gateway's URL with another's token |
-| `relay_http_rpc` | Host-side JSON-RPC POST (`{ url, token?, body }` → `{ status, body }`) for self-hosted runtimes the webview cannot fetch (mixed content) |
-| `overlay_parent_rpc_url` | RPC URL inherited from a parent process (overlay windows), from `OPENHUMAN_CORE_RPC_URL` |
-| `process_diagnostics_list_owned` | List OpenHuman processes owned by this app bundle (macOS; empty elsewhere) |
-
-Use `app/src/services/coreRpcClient.ts` (`callCoreRpc`) from the frontend.
-
-### Gateways: running the core somewhere else
-
-A gateway is one way of reaching an OpenHuman core. Four exist: the core inside this
-process, a core somebody else is running at a URL, and two this app provisions itself: in
-a Docker container, or on a machine reached over SSH. The last two are the same code:
-[tinybox](https://github.com/tinyhumansai/tinybox) models *reach* (`local` / `ssh`) and
-*confinement* (`passthrough` / `docker`) as independent axes, so "a container on the build
-server" is those two choices made separately rather than a third case with code of its own.
-
-The seam is one line. A gateway resolves to a URL and a bearer, and `core_rpc_url` /
-`core_rpc_token` answer from the active one. Every RPC call site in the renderer therefore
-follows along unchanged: there is no per-gateway transport in the frontend, and
-`services/transport/` (the iOS `ConnectionProfile` path) is not involved.
-
-Provisioning is four tinybox calls: `create` a box publishing the core's port, `spawn` the
-core in it detached with a freshly minted bearer, `forward` that published port back to
-this machine, then poll the core's unauthenticated `/health`. The third step is the one
-that is easy to omit and impossible to notice missing: publishing puts the port on the
-*box's* host, which for an SSH placement is the far machine.
-
-| Command | Purpose |
-| ------------------ | -------------------------------------------------------------------------- |
-| `gateway_list` | Every configured gateway, the built-in desktop one first |
-| `gateway_save` | Add or replace a gateway. Does not activate it |
-| `gateway_delete` | Forget a gateway. The running session is unaffected |
-| `gateway_activate` | Provision if needed, then make it the one RPC goes to |
-| `gateway_active` | Which gateway is active |
-| `gateway_status` | `inactive` / `activating{step}` / `connected{endpoint}` / `failed{reason}` |
-
-Records live shell-side in `gateways.json`, not renderer `localStorage`. An SSH
-identity path and a remote bearer are materially more sensitive than a window position, and
-the renderer's own notes on the cloud token (`utils/configPersistence.ts`) already
-say a renderer XSS can read anything kept there. The frontend holds a gateway *id*.
-
-Shell-internal callers (`imessage_scanner`, `local_data_reset`) deliberately
-keep talking to the embedded core: they are about *this* machine's iMessage database, *this*
-install's data, and *this* machine's audio, so routing them to a remote gateway would be
-wrong rather than incomplete.
-
-Gated by the shell-local `gateways` Cargo feature (default on). That gate is unrelated to
-the feature-forwarding rules in `AGENTS.md`, which govern which core gates the shell
-forwards on its `openhuman-rpc` dependency; nothing here belongs in `scripts/ci/product-features.txt`.
-
-Frontend: `app/src/services/gatewayService.ts`, surfaced in Settings → Core connection
-(`components/settings/panels/core/GatewaySection.tsx`).
-
-### Core and app lifecycle
-
-| Command | Purpose |
-| ------------------------------------------------- | --------------------------------------------- |
-| `start_core_process` / `restart_core_process` | Start / restart the embedded core server task |
-| `recover_port_conflict` / `force_quit_port_owner` | Resolve a foreign listener on the core port |
-| `reset_local_data` | Wipe local app data (`local_data_reset.rs`) |
-| `app_quit` / `restart_app` | Quit or relaunch the app |
-| `get_active_user_id` | Read the active user id |
-
-### Session (`session/`)
-
-The shell is the session owner on the desktop: it talks to the TinyHumans backend's auth endpoints so the core never has to. `openhuman_tinyhumans::session` does the work; the shell adds the link to the core (`HttpCoreLink`, the same `(url, token)` the renderer uses, so a gateway switch is followed) and these commands. Errors carry a stable `PREFIX:` (`REJECTED`, `EXPIRED`, `TRANSIENT`, `CONSUME_FAILED`, `USER_ID_UNAVAILABLE`, `CORE`) the renderer classifies on.
-
-| Command | Purpose |
-| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
-| `auth_login_with_token` | Exchange a one-time login token (`POST /auth/login-token/consume`), validate the JWT (`GET /auth/me`), install it in the core |
-| `auth_store_session` | Install a JWT the renderer already holds (validated first) or the offline local token (stored as-is with its user) |
-| `auth_logout` | Clear the session credential in the core |
-| `auth_state` | The core's credential state plus the cached current user |
-| `auth_current_user` | The current user from the `/auth/me` cache (5 s TTL, stale-while-revalidate, backoff); `force` bypasses the cache |
-
-Events: `auth://changed` (credential or current user changed; payload `SessionState`) and `auth://expired` (the backend rejected the stored credential and it has been cleared; payload `{ source }`). `app/src/services/session/shellSessionEvents.ts` bridges them into the window events `CoreStateProvider` already handles.
-
-A JWT accepted while the backend is unreachable (live `exp`, subject claim) is installed with a `pendingBackendValidation` placeholder user and revalidated in the background; a rejected JWT is never installed. In cloud mode the renderer targets a remote core the shell does not know about, so `app/src/services/session/sessionOwner.ts` runs a thin browser equivalent there (and in the browser build).
-
-### Updates
-
-`check_core_update` / `apply_core_update` (embedded core) and `check_app_update` / `download_app_update` / `install_app_update` / `apply_app_update` (desktop app, via the updater plugin).
-
-### Hotkeys (dictation, PTT)
-
-| Command | Purpose |
-| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
-| `register_dictation_hotkey` / `unregister_dictation_hotkey` | Global dictation shortcuts (`dictation_hotkeys.rs`) |
-| `register_ptt_hotkey` / `unregister_ptt_hotkey` / `show_ptt_overlay` | Push-to-talk: see the [PTT section](#push-to-talk-ptt-hotkey-and-overlay) below |
-
-### Notifications
-
-`notification_permission_state` / `notification_permission_request` / `show_native_notification` provide the OS-level notification surface. They are implemented in `native_notifications`.
-
-### Window management
-
-| Command | Purpose |
-| -------------------------------------------------- | ---------------------------------------------- |
-| `activate_main_window` | Show + focus the main window |
-| `set_titlebar_for_sidebar` | macOS only: switch the main window's title bar style when the sidebar collapses, so the webview keeps spanning the full window |
-| `mascot_window_show` / `mascot_window_hide` | Toggle the mascot native window |
-| `notch_window_show` / `notch_window_hide` | Toggle the notch window |
-
-Hide-to-tray / reopen behavior is not an IPC command: it lives in the `RunEvent` handlers in `lib.rs` (see [Window and tray behavior](#window-and-tray-behavior)).
-
-### Artifacts, logs, MCP, OAuth
-
-| Command | Purpose |
-| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
-| `download_artifact_to_downloads` | Copy an artifact straight to the Downloads folder (`artifact_commands.rs`); there is no Save-As dialog |
-| `pick_directory_via_dialog` | Native OS folder picker for the folder memory source, returning an absolute path a `webkitdirectory` input cannot report (`directory_picker.rs`) |
-| `reveal_logs_folder` / `logs_folder_path` | Open / return the file-logging folder (`file_logging.rs`) |
-| `mcp_resolve_binary_path` / `mcp_open_client_config` | MCP client helpers (`mcp_commands.rs`) |
-| `start_loopback_oauth_listener` / `stop_loopback_oauth_listener` | Localhost OAuth redirect listener (`loopback_oauth.rs`) |
-| `claude_code_login_launch` | Launch the Claude Code login flow (`claude_code.rs`) |
-
-### Workspace file links
-
-From `workspace_paths.rs` . These commands accept workspace-relative paths only. The shell resolves each path against the active OpenHuman workspace, canonicalizes the target, and rejects traversal, absolute paths, URI-like prefixes, and symlink escapes before opening or reading anything.
-
-| Command | Purpose |
-| --------------------------------- | ---------------------------------------------------------------------- |
-| `open_workspace_path` | Open an existing workspace file or directory with the OS default app. |
-| `reveal_workspace_path` | Reveal an existing workspace file or directory in the OS file manager. |
-| `preview_workspace_text` | Read a capped UTF-8 text preview from an existing workspace file. |
-
-### Push-to-talk (PTT) hotkey and overlay
-
-Registered in `lib.rs` (`ptt_hotkeys.rs` + `ptt_overlay.rs`). These commands manage the global push-to-talk shortcut and the floating overlay window.
-
-| Command | Signature | Purpose |
-| ----------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `register_ptt_hotkey` | `(shortcut: String) -> Result<(), String>` | Register (or re-register) a global hotkey for push-to-talk. Emits Tauri events `ptt://start { session_id }` (key pressed) and `ptt://stop { session_id }` (key released). Returns an error string if the shortcut conflicts with dictation or if the OS rejects it (e.g. Wayland, Accessibility permission required on macOS). |
-| `unregister_ptt_hotkey` | `() -> Result<(), String>` | Unregister the current PTT hotkey and tear down the overlay window. |
-| `show_ptt_overlay` | `(active: bool, session_id: u64) -> ()` | Show (`active: true`) or hide (`active: false`) the floating PTT overlay window. The window is focus-stealing-free (`focus: false`). Called by `PttHotkeyManager.tsx` via `app/src/utils/tauriCommands/ptt.ts`. |
-
-Event flow: `register_ptt_hotkey` wires the OS hotkey to fire `ptt://start` / `ptt://stop` Tauri events that `PttHotkeyManager.tsx` subscribes to via `@tauri-apps/api/event`. The manager forwards them into the `pttService` state machine which drives the audio capture → transcribe → chat-send pipeline.
-
-Conflict detection: `register_ptt_hotkey` checks for overlap with the active dictation shortcuts before registering. If a conflict is detected it returns `"ConflictsWithDictation(<shortcut>)"` without registering anything, and the settings panel surfaces this as `pttSettings.errorConflictsWithDictation`.
-
-### Synthetic input main-thread executor (native registry, not `invoke`)
-
-Registered in `lib.rs` at startup under the event-bus native-request method
-`computer.input_on_main_thread` (`INPUT_ON_MAIN_THREAD_METHOD`, defined in
-`openhuman_core::tools::computer::main_thread`). This is not a
-`@tauri-apps/api` `invoke` command. It is an in-process native request the
-core dispatches to the shell so synthetic input runs on the real app
-main thread.
-
-Why: enigo's macOS keyboard-layout lookup (`TSMGetInputSourceProperty`) traps
-(`_dispatch_assert_queue_fail`, `EXC_BREAKPOINT`) and crashes the desktop host when
-called off the main thread. The `mouse` / `keyboard` tools therefore never call
-enigo on their tokio worker; they build a closure and dispatch it here, where
-the shell runs it via `AppHandle::run_on_main_thread`.
-
-| Field | Shape |
-| ------------ | --------------------------------------------------------------------------------------------------- |
-| Method | `computer.input_on_main_thread` |
-| Request | `MainThreadInputOp { run: Box<dyn FnOnce() -> Result<String, String> + Send> }` (passed by value) |
-| Response | `Result<String, String>`: `Ok(message)` on success, `Err(reason)` on failure |
-| Availability | Desktop only. Headless / CLI builds register no executor; the core call then returns a clean `Err`. |
-
-### Names that do not exist
-
-The following do not exist in the current `generate_handler!` list: `greet`, `core_rpc_relay` (replaced by direct `fetch` and `relay_http_rpc`), `ai_get_config` / `ai_refresh_config` / `write_ai_config_file`, `show_window` / `hide_window` / `toggle_window` / `minimize_window` / `maximize_window` / `close_window`, the `openhuman_*` daemon/service helpers, `exchange_token`, `get_auth_state`, `socket_connect`, `start_telegram_login`. Authentication and sockets are handled in the React app and the core process, not through these IPC names.
-
-### Example: core RPC
-
-```typescript
-import { callCoreRpc } from "../services/coreRpcClient"; // app/src/services/coreRpcClient.ts
-
-// Direct HTTP to the embedded core (URL + bearer resolved via
-// `core_rpc_url` / `core_rpc_token` under the hood):
-const result = await callCoreRpc({
- method: "your.rpc.method",
- params: { foo: "bar" },
-});
-```
-
----
-
-See `crates/openhuman-app/src/lib.rs` (`generate_handler!`) for the full list.
-
-## Core bridge and helpers (`crates/openhuman-app`)
-
-The Tauri crate does not embed a duplicate Socket.io server or Telegram client; it focuses on in-process core lifecycle and the thin HTTP/auth glue around the core's JSON-RPC surface.
-
-### `CoreProcessHandle` (`core_process.rs`)
-
-- Runs the core's HTTP/JSON-RPC server as a tokio task inside the Tauri host via `openhuman_rpc::host::desktop`: no sidecar binary. The runtime the task builds is dropped when the task ends; `shutdown` and the startup-timeout abort wait for that before a respawn, because a process holds one embed runtime at a time.
-- Generates a per-launch 256-bit hex bearer token (`generate_rpc_token`) and hands it to the embedded server; the renderer reads it via the `core_rpc_token` command.
-- Stale-listener policy: if the core port is already occupied, probes whether the listener is an old OpenHuman core (terminate + respawn) or something foreign (surface the conflict). `OPENHUMAN_CORE_REUSE_EXISTING=1` opts back into attach-to-existing for debugging.
-- Managed as Tauri state in `lib.rs` (`app.manage(core_handle)`).
-
-### `core_rpc` (`core_rpc.rs`)
-
-- Shared auth helpers for host-side calls to the local core (URL from `OPENHUMAN_CORE_RPC_URL` or the default port; bearer from `core_process::current_rpc_token`).
-- `relay_http_rpc` Tauri command: a thin wrapper over `openhuman_rpc::post_json_rpc` (`crates/openhuman-rpc`, feature `http-client`) for self-hosted runtimes on non-trustworthy origins; `bearer_header`, `redact_url_for_log` and `HttpRpcResponse` are re-exported from that crate (see [Core RPC and diagnostics](#core-rpc-and-diagnostics)).
diff --git a/gitbooks/developing/building-rust-core.md b/gitbooks/developing/building-rust-core.md
deleted file mode 100644
index c035512d75..0000000000
--- a/gitbooks/developing/building-rust-core.md
+++ /dev/null
@@ -1,264 +0,0 @@
----
-description: Build the Rust core from scratch on a fresh machine.
-icon: terminal
----
-
-# Building the Rust core
-
-This page shows how to compile the Rust core on a fresh machine. It covers the core workspace and its sibling crates:
-
-- Cargo package: `openhuman`
-- Binary: `openhuman-core` (built from `openhuman-cli`)
-- Library: `openhuman_core`
-
-The root `Cargo.toml` is a virtual workspace whose members are
-`crates/openhuman-core`, `crates/openhuman-embed`, `crates/openhuman-rpc`,
-`crates/openhuman-tinyhumans`, `crates/openhuman-cli`, and
-`crates/openhuman-tui`. `crates/openhuman-app` (the Tauri desktop shell) is
-excluded from that workspace and builds from its own manifest.
-
-If you want the full desktop app (`pnpm dev`, Tauri, frontend tooling), use [Getting set up](getting-set-up.md). That path needs extra JavaScript, submodule and desktop-runtime tooling that a core-only `cargo` workflow does not.
-
-## 1. Install the pinned Rust toolchain
-
-The repository pins Rust in [`rust-toolchain.toml`](https://github.com/tinyhumansai/openhuman/blob/main/rust-toolchain.toml):
-
-- Channel: `1.96.1`
-- Components: `rustfmt`, `clippy`
-
-The pin exists because `rusqlite` 0.40 and `libsqlite3-sys` 0.38 use the
-`cfg_select!` macro, which became stable in 1.96.
-
-Recommended install:
-
-```bash
-rustup toolchain install 1.96.1 --component rustfmt --component clippy
-rustup default 1.96.1
-```
-
-You can also let `cargo` auto-install from `rust-toolchain.toml` after `rustup` itself is installed.
-
-## 2. Clone the repo
-
-Core-only work:
-
-```bash
-git clone https://github.com/tinyhumansai/openhuman.git
-cd openhuman
-```
-
-That is enough for the Rust workspace. Here is where things live:
-
-- `crates/openhuman-core/` holds the core sources, the package manifest and the domain implementation.
-- `crates/openhuman-embed/` is the library facade for hosts.
-- `crates/openhuman-tui/` is the terminal frontend.
-- `crates/openhuman-cli/` holds the `openhuman-core` binary, the developer and benchmark bins, and the root `tests/*.rs` and `examples/*.rs` targets. It depends on `crates/openhuman-tinyhumans/` for the SDK-backed backend transport, which the core does not carry.
-- `crates/openhuman-rpc/` holds the JSON-RPC contracts and the HTTP client that the Tauri shell and the TUI use.
-
-The recursive submodules under repo-root `vendor/` are required for the core
-build too, not just the desktop shell. `crates/openhuman-core/Cargo.toml`
-path-depends on `vendor/tinyagents`, `vendor/tinymemory`, `vendor/tinymcp`,
-and the rest of the `tiny*` family, and the root `Cargo.toml` `[patch]`
-tables point into `vendor/tinymemory`, `vendor/tinyflows`,
-`vendor/tinychannels`, and the `tinyinference`
-copy nested under `vendor/tinyagents/`.
-
-```bash
-git submodule update --init --recursive vendor/
-```
-
-Desktop and Tauri work has extra requirements. Follow [Getting set up](getting-set-up.md) for those.
-
-## 3. Build commands
-
-From the repository root:
-
-```bash
-# Fast dependency and type check
-cargo check --manifest-path Cargo.toml
-
-# Debug build of the CLI and RPC binary
-cargo build --manifest-path Cargo.toml -p openhuman-cli --bin openhuman-core
-
-# Check the stable host-facing embedding facade
-cargo check --manifest-path Cargo.toml -p openhuman-embed
-
-# Check the shared RPC contracts and HTTP client crate
-cargo check --manifest-path Cargo.toml -p openhuman-rpc
-
-# Build the terminal frontend (embeds the core in-process)
-cargo build --manifest-path Cargo.toml -p openhuman-tui
-
-# Check the desktop shell (separate Cargo world, own manifest and lockfile)
-cargo check --manifest-path crates/openhuman-app/Cargo.toml
-
-# Release build
-cargo build --manifest-path Cargo.toml --release -p openhuman-cli --bin openhuman-core
-
-# Rust tests
-cargo test --manifest-path Cargo.toml
-```
-
-Notes:
-
-- The core library's package is `openhuman` (crate `openhuman_core`). The runnable binary, `openhuman-core`, is built from the `openhuman-cli` package (`crates/openhuman-cli/src/main.rs`), which is why the commands above pass `-p openhuman-cli`.
-- The built binary lands at `target/debug/openhuman-core` or `target/release/openhuman-core`.
-
-### Faster local linking (optional)
-
-The `openhuman` core crate links a large single rlib, so the edit, `cargo check` and `cargo test` loop is often link-bound. A faster linker (mold
-on Linux, lld on macOS) cuts a large slice off every incremental relink.
-[`.cargo/config.toml`](https://github.com/tinyhumansai/openhuman/blob/main/.cargo/config.toml) documents the manual
-opt-in. The easiest path is:
-
-```bash
-# installs mold/lld detection into $CARGO_HOME/config.toml, never the
-# repo's tracked .cargo/config.toml, so it is a per-machine opt-in
-scripts/dev-setup-linker.sh
-
-# preview the change first
-scripts/dev-setup-linker.sh --dry-run
-```
-
-Install the linker first (`apt install mold` / `brew install llvm`). The
-script detects it and exits with instructions if it is missing. It is
-idempotent, so running it again after the linker is configured does nothing.
-CI enables the same flag through `RUSTFLAGS` in the Linux Rust jobs. The
-script gives local `cargo` runs the same speedup.
-
-### Feature gates and binary size
-
-`crates/openhuman-core/Cargo.toml` builds most of its domains behind Cargo
-features. A bare `cargo check` compiles the contributor default set (`media`,
-`skills`, `flows`, `mcp`, `channels`, `http-server`, `scheduler-gate`,
-`file-logging`, `modules`), which is not what the desktop app
-ships. `scripts/ci/product-features.txt` is the single source of truth for
-the shipped product's gate list, and `scripts/ci/check-feature-forwarding.mjs`
-checks that `crates/openhuman-app/Cargo.toml` forwards exactly that set.
-Turning a gate off drops real code and, for some gates, whole native dependencies. For measured binary sizes and RSS across a few feature recipes,
-see [Performance](performance.md).
-
-## Local module development
-
-Loadable modules (`documents`, `voice`, `mcp`, and so on) come from pinned,
-digest-checked GitHub releases by default. That is the only source CI and
-shipped builds use. To iterate on a module in `vendor/<submodule>` without
-releasing it, switch the source locally:
-
-```bash
-# Build the module from its gitlink and print the environment for it
-eval "$(node scripts/modules/build.mjs tinydocs --print-env)"
-OPENHUMAN_MODULE_SOURCE=source ./target/debug/openhuman-core serve
-
-# Or link it into the CLI (non-product feature)
-OPENHUMAN_MODULE_SOURCE=linked cargo run -p openhuman-cli --features linked-modules -- serve
-
-# Before pushing: is the gitlink ahead of the registry pin?
-node scripts/modules/pin-status.mjs
-
-# Release the module and re-pin the registry (asks before publishing)
-node scripts/modules/release-and-repin.mjs tinydocs --bump patch
-```
-
-`OPENHUMAN_MODULE_SOURCE_<ID>` overrides one module. If a `linked` or `source`
-module is unavailable the core falls back to the release and logs a warning;
-`modules.list` shows which source each module is served from. Details:
-[Loadable modules](loadable-modules.md).
-
-## 4. macOS prerequisites
-
-Install:
-
-- Xcode Command Line Tools: `xcode-select --install`
-
-Why: native dependencies compile C and Objective-C code during the build, and they need the Apple toolchain and SDK headers. These include `cpal` for audio capture (behind the `inference` feature, which `voice` requires) and the `objc2` Contacts crates compiled by the vendored `tinymemory` crates.
-
-After Xcode CLT is installed, the core should build with the cargo commands above.
-
-## 5. Linux prerequisites
-
-### Core-only package set
-
-Install these packages before running `cargo` on a fresh Linux machine.
-
-Ubuntu or Debian:
-
-```bash
-sudo apt-get update
-sudo apt-get install -y \
- build-essential cmake pkg-config clang libssl-dev libclang-dev \
- libasound2-dev libxi-dev libxtst-dev libxdo-dev libudev-dev \
- libstdc++-14-dev
-```
-
-Arch Linux:
-
-```bash
-sudo pacman -S --needed base-devel cmake pkgconf clang openssl \
- alsa-lib libxi libxtst xdotool libevdev
-```
-
-> On Arch, `clang` includes `libclang` and `base-devel` includes `gcc` (providing `libstdc++`), so you do not need separate `-dev` packages.
-
-Why these matter:
-
-- `build-essential` / `base-devel`, `cmake`, `pkg-config` / `pkgconf`: native builds for transitive Rust dependencies.
-- `clang`, `libclang-dev`: bindgen (used by native crates such as `cpal`'s ALSA bindings) and C/C++ compilation paths.
-- `libssl-dev` / `openssl`: OpenSSL headers needed by some networking dependencies.
-- `libasound2-dev` / `alsa-lib`, `libxi-dev` / `libxi`, `libxtst-dev` / `libxtst`, `libxdo-dev` / `xdotool`, `libudev-dev` (included in Arch `systemd-libs`), `libevdev`: required by the audio, input and device crates (`cpal`, `enigo`/X11 input handling) pulled into the core build.
-- `libstdc++-14-dev`: `clang`-driven builds may pick GCC 14 C++ headers on Ubuntu runners; this keeps `libstdc++.so` resolvable for those native crates.
-
-### Linux desktop/Tauri package set
-
-If you are building the desktop shell instead of the core-only crate, install the broader dependency set.
-
-Ubuntu or Debian (mirrored from [`.github/workflows/build-desktop.yml`](https://github.com/tinyhumansai/openhuman/blob/main/.github/workflows/build-desktop.yml)):
-
-```bash
-sudo apt-get update
-sudo apt-get install -y \
- libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev \
- patchelf cmake libasound2-dev libxdo-dev libxtst-dev libx11-dev libxi-dev \
- libevdev-dev libssl-dev libclang-dev \
- libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \
- libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
- libgbm1 libpango-1.0-0 libcairo2 libatspi2.0-0 libxshmfence1 libu2f-udev
-```
-
-Arch Linux:
-
-```bash
-sudo pacman -S --needed gtk3 webkit2gtk-4.1 libayatana-appindicator \
- librsvg patchelf nss nspr at-spi2-core libcups libdrm \
- libxkbcommon libxcomposite libxdamage libxfixes libxrandr \
- mesa pango cairo libxshmfence
-```
-
-Use the desktop lists only when you need `crates/openhuman-app/`; for root-crate work, the smaller core-only list above is the relevant baseline.
-
-## 6. Windows prerequisites
-
-Install:
-
-- Rust via `rustup`
-- Visual Studio Build Tools 2022 or Visual Studio with the Desktop development with C++ workload
-- The MSVC target used by CI and release builds: `x86_64-pc-windows-msvc`
-
-Recommended commands after the Microsoft toolchain is installed:
-
-```powershell
-rustup toolchain install 1.96.1 --component rustfmt --component clippy
-rustup target add x86_64-pc-windows-msvc
-cargo build --manifest-path Cargo.toml -p openhuman-cli --bin openhuman-core
-```
-
-Use the MSVC toolchain, not MinGW, to match CI and release builds.
-
-## 7. Related paths
-
-- [Getting set up](getting-set-up.md): the full desktop contributor setup with `pnpm`, Tauri and submodules. The core runs in-process inside the desktop shell (see [Tauri shell](architecture/tauri-shell.md)), so there is no sidecar staging step.
-- [Architecture overview](architecture/README.md): where the core fits into the desktop app and RPC flow.
-- [Architecture](architecture.md): the full crate map and repository layout.
-- [Embedding](embedding.md): using `crates/openhuman-embed` to run the core as a library in another product.
-- [Engines](engines.md): the pluggable LLM, embedding, memory and search backends the core can run against.
-- [Performance](performance.md): binary size, cold start, and memory numbers across feature recipes.
diff --git a/gitbooks/developing/cef.md b/gitbooks/developing/cef.md
deleted file mode 100644
index ee85de397c..0000000000
--- a/gitbooks/developing/cef.md
+++ /dev/null
@@ -1,34 +0,0 @@
----
-description: >-
- Why the desktop shell no longer uses Chromium (CEF), what replaced it, and
- the rule against injecting JavaScript into child webviews.
-icon: chrome
----
-
-# Chromium Embedded Framework (retired)
-
-OpenHuman no longer ships its own Chromium. The desktop shell, `crates/openhuman-app/`, runs on the native webview that Tauri v2 provides through Wry: WKWebView on macOS, WebView2 on Windows and WebKitGTK on Linux. Do not restore CEF or Chrome DevTools Protocol (CDP) scanner assumptions. [`AGENTS.md`](https://github.com/tinyhumansai/openhuman/blob/main/AGENTS.md) states this rule.
-
-This page is background for anyone who finds CEF references in older code or notes.
-
-## What CEF was for
-
-For a while the shell shipped Chromium through a fork of `tauri-runtime`. The stock native webviews do not expose CDP, and CDP was what let the app watch connected web apps such as Slack, WhatsApp, Telegram, Discord and Google Meet. Each one ran in its own child webview with isolated storage, and a scanner for each read its state over CDP rather than through injected JavaScript. The same runtime also powered a Google Meet camera that showed the mascot, and notification interception for embedded apps.
-
-None of that is in the shipped app.
-
-## What replaced it
-
-- Browser automation moved out of the shell. A real Chrome is driven over CDP from the Rust side, through the `tinycomputer` module, as a separate process that the agent launches or attaches to. See [Browser and computer control](../features/native-tools/browser-and-computer.md).
-- The scanners that walked third-party apps are gone. The iMessage scanner remains because it reads `~/Library/Messages/chat.db` directly and never needed a browser.
-
-## No JavaScript injection into child webviews
-
-Do not add JavaScript injection to child webviews. New behavior belongs in Rust-side IPC hooks, and any new Tauri plugin should be audited for `js_init_script`.
-
-Host-controlled code that runs inside a third-party origin is an attack-surface risk. A persistent bridge inside another site breaks when that site updates, and one mistake can expose the bridge to attacker-controlled JavaScript.
-
-## See also
-
-- [Tauri shell](architecture/tauri-shell.md): the current desktop host and its IPC surface.
-- [`AGENTS.md`](https://github.com/tinyhumansai/openhuman/blob/main/AGENTS.md): the repo-wide rules.
diff --git a/gitbooks/developing/components.md b/gitbooks/developing/components.md
deleted file mode 100644
index 9aad18c4cf..0000000000
--- a/gitbooks/developing/components.md
+++ /dev/null
@@ -1,83 +0,0 @@
----
-description: >-
- The [components] config table: one switch per tiny dependency, how it narrows
- a host, and how legacy flags migrate.
-icon: toggle-on
----
-
-# Components
-
-`config.toml` has a `[components]` table with one boolean per tiny dependency. All default to `true`.
-
-```toml
-[components]
-flows = true # tinyflows: saved workflows
-memes = true # tinymemes
-documents = true # tinydocs
-search = true # tinysearch
-mcp = true # tinymcp
-connectors = true # tinyconnectors (Composio)
-hosting = true # tinyhosts
-juice = true # tinyjuice
-memory = true # tinymemory
-wallet = true # tinywallet (web3, x402)
-computer = true # tinycomputer
-sandbox = true # tinybox
-channels = true # tinychannels
-skills = true # tinyskills
-voice = true # tinyvoice
-```
-
-Each switch also reads `OPENHUMAN_COMPONENT_<NAME>=0|1` (for example `OPENHUMAN_COMPONENT_VOICE=0`); the environment wins over the file.
-
-## What a switch does
-
-The switches only narrow. The core resolves them into a component set and computes `effective = host choice ∩ components` for the domain families, background services and tool groups. A host preset (`harness`, `kernel`, `saas`, ...) decides what may exist; a switch can remove something from it, never add something back.
-
-A method whose component is off answers `COMPONENT_DISABLED:<name>` (JSON-RPC `error.message`, with `error.data = {"kind": "component_disabled", "component": "<name>"}`) instead of `unknown method`, so the UI and CLI can explain why. A method that the host simply left out still looks unregistered.
-
-Loadable modules follow the same switches. A module whose component is off is never downloaded, mapped or registered: `modules.list` reports its state as `disabled`, boot skips it (including a matching artifact on the module search path), and loading it returns `COMPONENT_DISABLED:<name>`. `about_app` marks capabilities backed by a disabled component with status `disabled`.
-
-A flag change takes effect on the next core start. There is no hot toggling.
-
-Each component's domain wires itself to its switch (tools, services and RPC) in its own change; until then a switch removes only the families, services and tool groups listed in the core's component set.
-
-## Not toggleable
-
-The kernel dependencies (tinyagents, tinytools, tinyinference, tinybus) are always on. `[modules] enabled` remains the global kill switch for loadable native modules.
-
-## Legacy flags
-
-The first load of an older config moves these once into `[components]`, and the next save writes the result:
-
-| Legacy setting | Becomes |
-| --- | --- |
-| `[hosting] enabled = false` | `components.hosting = false` |
-| `[search] enabled = false` | `components.search = false` |
-| `[mcp_client] enabled = false` | `components.mcp = false` |
-| `[memory] engine = "none"` | `components.memory = false` (`engine` is kept) |
-| `OPENHUMAN_TINYMEMES` set to an off value | `components.memes = false` |
-| `OPENHUMAN_DISABLE_CHANNEL_LISTENERS=1` | `components.channels = false` at load (env override, kept for one release; `OPENHUMAN_COMPONENT_CHANNELS` wins) |
-| `[dictation] enabled`, `[voice_server] auto_start` and `always_on_enabled` all explicitly `false` | `components.voice = false` (any other mix keeps voice on) |
-| `[sandbox] enabled = false` (or `[security.sandbox] enabled = false`) | `components.sandbox = false` (`enabled = true` or unset keeps it on; the old key is kept) |
-| `[composio] enabled` | dropped; it was never read |
-
-A `components.*` key already present in the file always wins over its legacy flag, so the migration is idempotent and turning a component back on sticks.
-
-## Memes
-
-`components.memes` is the master switch: off means no remix and no module load, and the A/B arm is ignored. When on, `OPENHUMAN_TINYMEMES` (`off`, `on`, `ab`, `ab:NN`; build-time default `OPENHUMAN_TINYMEMES_DEFAULT`) picks the threads that are remixed. The `[memes]` section tunes it: `timeout_ms` (default 20000) and `meme_cooldown` (default 3). `OPENHUMAN_TINYMEMES_TIMEOUT_MS` and `OPENHUMAN_TINYMEMES_MEME_COOLDOWN` override them when set.
-
-The module reads its own `TINYMEMES_*` overrides from the process environment, so credentials never cross the bus: `TINYMEMES_OPENROUTER_KEY` (and `TINYMEMES_MODEL`) route the rewrite model and slang research through OpenRouter, `TINYMEMES_JEV` (`auto`, `typesafe`, `openrouter`, `openjev`, `llm`) with `TINYMEMES_TYPESAFE_KEY` / `TINYMEMES_OPENJEV_KEY` picks the Jev route. Without any override the module asks OpenHuman for Jev; when OpenHuman has none (signed out, offline session) the chat model answers Jev's questions instead. After the reply is delivered the module may run slang and meme research in the background through OpenHuman web search. Learned slang, memes and the remixed-message ring are documents on the storage port (older `<workspace>/tinymemes/*.json` files are adopted once and renamed `*.migrated`).
-
-## Wallet
-
-`wallet = false` removes the `web3` domain family and tool group, so `wallet.*`, `web3.*` and `x402.*` answer `COMPONENT_DISABLED:wallet`. The x402 payment hook behind `http_request` declines before any quote or signing (the 402 response comes back unpaid), and `tinywallet` is never downloaded, attested or loaded. Keychain material, spending limits (`OPENHUMAN_X402_*_MAX`) and RPC endpoints (`OPENHUMAN_WALLET_RPC_*`) are left as they are, so setting `wallet = true` again restores the wallet on the next core start.
-
-## Voice
-
-`voice = false` removes the `voice` domain family, so `voice.*` answers `COMPONENT_DISABLED:voice`. The embedded voice server, the dictation hotkey listener and always-on listening do not start whatever `[dictation] enabled`, `[voice_server] auto_start` and `always_on_enabled` say, and `tinyvoice` is never downloaded, attested or loaded. `about_app` and `modules.list` report voice as disabled. The Cargo `voice` feature is unchanged.
-
-## Sandbox
-
-`sandbox = false` means the TinyBox module is never downloaded, attested, loaded or initialised, and `sandbox.*` answers `COMPONENT_DISABLED:sandbox`. Sandboxed execution takes the documented fallback, the same as `[sandbox] enabled = false` or `OPENHUMAN_SANDBOX=off`: the command runs unjailed and the Rust path checks, the always-forbidden credential floor and the security policy still apply. TinyBox registers no tools and starts no background services. `modules.list` reports `tinybox` as `disabled`, `about_app` marks the sandbox capability as disabled, and the host `DomainSet` still wins. A SaaS core still requires the per-user container path, so with the module disabled it fails closed instead of running unsandboxed.
diff --git a/gitbooks/developing/e2e-testing.md b/gitbooks/developing/e2e-testing.md
deleted file mode 100644
index 5bfa1ae3a3..0000000000
--- a/gitbooks/developing/e2e-testing.md
+++ /dev/null
@@ -1,278 +0,0 @@
----
-description: >-
- How to run the end-to-end suites: the WDIO and tauri-driver harness, a spec
- locally or in Docker, the environment variables, and which lanes run in CI.
-icon: vials
----
-
-# E2E testing
-
-End-to-end coverage runs in three lanes: a Rust mock-backend suite, a Playwright web suite, and a desktop suite driven through `tauri-driver`. Only the Linux desktop harness runs in CI. macOS and Windows are manual.
-
-## Overview
-
-Desktop E2E tests use WebDriverIO (WDIO) to drive the app through a single `tauri-driver` (WebDriver) session against its native Wry/WebKit webview:
-
-| Platform | Driver | Port | App format | Selectors |
-| --------- | ------------------------------ | ---- | ------------ | --------- |
-| Linux | tauri-driver + WebKitWebDriver | 4444 | Debug binary | CSS / DOM |
-
-Linux CI drives the debug binary under Xvfb through `tauri-driver`. macOS and Windows have no automated desktop E2E coverage yet. The Chromium-based driver they used is gone, and a native driver (Appium Mac2 on macOS, WinAppDriver on Windows) would have to replace it. `pnpm --filter openhuman-app test:e2e:build` still produces a `.app` bundle on macOS for manual testing, but there is no supported automated session there.
-
----
-
-## Quick start
-
-### Linux
-
-```bash
-# Build the E2E app
-pnpm --filter openhuman-app test:e2e:build
-
-# Run every spec in one shared tauri-driver session
-pnpm --filter openhuman-app test:e2e:session
-
-# Run all flows, sharded by suite category
-pnpm --filter openhuman-app test:e2e:all:flows
-
-# Run a single spec
-bash app/scripts/e2e-run-spec.sh test/e2e/specs/smoke.spec.ts smoke
-```
-
-`app/scripts/e2e-run-session.sh` starts `tauri-driver` on `TAURI_DRIVER_PORT`
-(default `4444`) with `WebKitWebDriver` as its native driver, waits for its
-`/status` endpoint, then runs WDIO against `app/test/wdio.conf.ts`. On
-headless Linux the app itself runs under Xvfb for a virtual display; the
-driver process does not need one.
-
-### Docker on macOS (Linux harness locally)
-
-To run the same Linux harness from macOS, use Docker.
-
-```bash
-# Build and run all E2E flows
-docker compose -f e2e/docker-compose.yml run --rm e2e
-
-# Build the app first (if needed)
-docker compose -f e2e/docker-compose.yml run --rm e2e \
- pnpm --filter openhuman-app test:e2e:build
-
-# Run a single spec
-docker compose -f e2e/docker-compose.yml run --rm e2e \
- bash app/scripts/e2e-run-spec.sh test/e2e/specs/smoke.spec.ts smoke
-```
-
-Requires Docker Desktop or Colima. The repo is bind-mounted so builds persist between runs.
-
----
-
-## Architecture
-
-### Platform detection
-
-`app/test/e2e/helpers/platform.ts` exports two functions, both hardcoded to `true`: `isTauriDriver()` and `supportsExecuteScript()`. Every session exposes the webview DOM and supports `browser.execute()`, so specs that still branch on either check always take the DOM path. Treat them as compatibility shims, not as platform detection.
-
-### Element helpers
-
-`app/test/e2e/helpers/element-helpers.ts` provides one API over the webview DOM:
-
-| Helper | Behavior |
-| ------------------------- | -------------------------------------------- |
-| `waitForText(text)` | XPath over DOM text content |
-| `waitForButton(text)` | `button` / `[role="button"]` XPath |
-| `clickText(text)` | Standard `el.click()` |
-| `clickNativeButton(text)` | Standard `el.click()` on button |
-| `clickToggle()` | `[role="switch"]` / `input[type="checkbox"]` |
-| `waitForWindowVisible()` | Window handle check |
-| `waitForWebView()` | `document.readyState` check |
-| `hasAppChrome()` | Window handle check |
-| `dumpAccessibilityTree()` | HTML page source |
-
-### Stable test IDs
-
-Prefer stable `data-testid` hooks for UI affordances that E2E specs click or poll. Use the taxonomy `<surface>-<element>-<id?>`, for example:
-
-- `cron-jobs-panel`, `cron-refresh`
-- `cron-job-row-<jobId>`, `cron-job-toggle-<jobId>`, `cron-job-run-<jobId>`, `cron-job-view-runs-<jobId>`, `cron-job-remove-<jobId>`
-- `settings-nav-<routeId>`
-- `skill-row-<skillId>`, `skill-install-<skillId>`, `skill-uninstall-<skillId>`
-- `thread-row-<threadId>`, `new-thread-button`, `send-message-button`
-- `onboarding-next-button`
-
-Use `waitForTestId(testId)` and `clickTestId(testId)` from `element-helpers.ts` when a spec targets one of these hooks. Keep text selectors for user-visible copy assertions, not row/action discovery.
-
-### Deep link helpers
-
-`app/test/e2e/helpers/deep-link-helpers.ts` handles auth deep links:
-
-- Primary path: `browser.execute(window.__simulateDeepLink(url))`. It works against the webview on every platform tauri-driver supports.
-- macOS-only fallbacks: the `macos: deepLink` extension command, then `open -a ...`. CI does not exercise these, because macOS has no automated desktop session.
-- Linux has no shell fallback. `xdg-open openhuman://...` needs a `.desktop` file that registers the URL scheme, and the CI container does not have one. If the webview simulate call fails there, `triggerDeepLink` throws immediately.
-
-For release candidates, also run one manual secondary-instance smoke test on Linux
-or macOS when you touch single-instance or deep-link startup code. It exercises
-`tauri-plugin-single-instance`, which OpenHuman registers with the
-`deep-link` feature.
-
-1. Launch OpenHuman normally and leave it running.
-2. Trigger `openhuman://auth?token=e2e-token&key=auth` through the OS opener.
-3. Confirm the already-running window receives the callback instead of a
- second app instance starting.
-4. Confirm the secondary process exits cleanly.
-
-This catches a second instance that starts, or exits with an
-error, before Tauri's deep-link forwarding path is installed.
-
-### Writing cross-platform specs
-
-1. Use the helpers in `element-helpers.ts`. Never use raw `XCUIElementType*` selectors in specs.
-2. Use `clickNativeButton(text)` instead of inline button-clicking code.
-3. Use `hasAppChrome()` instead of checking for `XCUIElementTypeMenuBar`.
-4. Use `waitForWebView()` instead of checking for `XCUIElementTypeWebView`.
-5. For macOS-only tests, use `process.platform` guards or separate spec files.
-6. Use `navigateViaHash(route)` for hash routes. It waits for the hash, `document.readyState` and a mounted React root before it returns. After onboarding, `walkOnboarding()` also waits for `#/home` and a Home-page marker before specs navigate elsewhere.
-
----
-
-## Environment variables
-
-| Variable | Default | Description |
-| --------------------------- | ---------- | ---------------------------------------------------------------------- |
-| `TAURI_DRIVER_PORT` | `4444` | Port `tauri-driver` listens on; `wdio.conf.ts` connects here |
-| `E2E_MOCK_PORT` | `18473` | Mock backend server port |
-| `E2E_PORT_BASE` | unset | Web lane port block: mock `base`, core `base+1`, web host `base+2` |
-| `OPENHUMAN_WORKSPACE` | (temp dir) | App workspace directory |
-| `OPENHUMAN_SERVICE_MOCK` | `0` | Enable service mock mode |
-| `OPENHUMAN_E2E_MODE` | unset | Enables destructive test-support RPCs; the E2E runner sets this to `1` |
-| `OPENHUMAN_E2E_AUTH_BYPASS` | unset | Enable JWT bypass auth |
-| `DEBUG_E2E_DEEPLINK` | (verbose) | Set to `0` to silence deep link logs |
-| `E2E_FORCE_CARGO_CLEAN` | unset | Force cargo clean before E2E build |
-
-Two web E2E sessions on one machine need separate ports. The lane refuses to start when any of its three ports is already listening. Its readiness probes are ordinary HTTP GETs that another session's mock, core and web host would answer just as happily, and `openhuman-core run` falls back to a neighboring port instead of exiting, so it could stay alive on a port nothing probes. Set `E2E_PORT_BASE` for the build and the run alike. The mock and core ports are compiled into the bundle and cannot be changed afterwards.
-
-```bash
-E2E_PORT_BASE=31000 pnpm --filter openhuman-app test:e2e:web
-```
-
----
-
-## CI workflows
-
-### Push / PR checks
-
-The default pull-request gate is `.github/workflows/ci-fast.yml`: quality
-checks plus the complete unit-test suites for each changed area. No E2E suite
-runs on a pull request to `main`.
-
-`.github/workflows/ci-full.yml` runs on pull requests targeting `release` and
-on every push to it, and carries three E2E lanes:
-
-| Lane | Job | Platform |
-| --- | --- | --- |
-| Rust mock backend | `rust-e2e` | Linux |
-| Playwright web | `playwright-e2e` | Linux |
-| Desktop | `e2e-desktop`, via `e2e-reusable.yml` | Linux only |
-
-The desktop lane calls the reusable workflow with `run_linux: true`, `run_macos: false` and `run_windows: false`, so only the Linux harness runs. The job's "3 OS" title names the matrix the reusable workflow can run, not the one CI Full asks for.
-
-macOS and Windows desktop E2E therefore have no scheduled coverage on any branch. `.github/workflows/e2e.yml` is a manual dispatch whose `run_macos` and `run_windows` inputs also default to `false`. To get cross-platform desktop signal before a promotion, someone has to opt in. Both stay off until a native driver exists for each platform.
-
----
-
-## Troubleshooting
-
-### Linux: "WebView not ready" timeout
-
-This usually means `tauri-driver` never reached its `/status` endpoint, or the app crashed before mounting its webview. Use `app/scripts/e2e-run-session.sh`, which starts `tauri-driver` and waits on that endpoint before invoking WDIO, rather than driving the app by hand.
-
-Ensure `DISPLAY` is set and Xvfb is running:
-
-```bash
-export DISPLAY=:99
-Xvfb :99 -screen 0 1280x1024x24 &
-```
-
-Also make sure dbus is running (webkit2gtk needs it):
-
-```bash
-eval $(dbus-launch --sh-syntax)
-```
-
-### Linux: `tauri-driver` or `WebKitWebDriver` not found
-
-Install `tauri-driver` with `cargo install tauri-driver`, and make sure `WebKitWebDriver` is on `PATH` (on Debian and Ubuntu it ships in `webkit2gtk-driver`) or point `WEBKIT_WEBDRIVER` at its location. `e2e-run-session.sh` defaults to `/usr/bin/WebKitWebDriver`.
-
-### macOS: Deep links not working in `tauri dev`
-
-Deep links require a `.app` bundle. Use `pnpm tauri build --debug --bundles app` instead.
-
-### Docker: Build is slow on first run
-
-The first Docker build compiles Rust and installs the E2E harness dependencies. Subsequent runs use cached layers. Docker volumes cache the Cargo registry and git sources.
-
-## Spec: notifications
-
-The spec `app/test/e2e/specs/notifications.spec.ts` tests notification RPC methods through the in-process core and the Notifications UI page:
-
-- `notification_ingest`, creates a new notification via core RPC
-- `notification_list`, verifies the ingested notification is returned
-- `notification_mark_read`, marks a notification as read
-- `notification_stats`, checks aggregate statistics shape
-- UI: Notifications page renders the integration notifications section (`[data-testid="integration-notifications-section"]`)
-- UI: Notifications page shows the System Events section (`[data-testid="system-events-section"]`)
-
-Run it with:
-
-```bash
-bash app/scripts/e2e-run-spec.sh test/e2e/specs/notifications.spec.ts notifications
-```
-
-Both the RPC calls and the UI assertions in this spec run inside the same `tauri-driver` session, which supports `browser.execute()`.
-
----
-
-## Agent-observable artifact flow
-
-### Starting a composer test
-
-Chat drafts persist per thread. Before a spec types its initial prompt, call
-`replaceChatComposerText(input, prompt)` from
-`app/test/playwright/helpers/chat-composer.ts`. It selects and deletes the
-restored draft, waits for the empty value, types through keyboard events, and
-checks the exact prompt. Use `clearChatComposer(input)` when a case needs an
-empty composer. These helpers support both textarea and Lexical surfaces.
-
-Cases that exercise draft restoration or append a follow-up should keep their
-draft and drive that behavior explicitly. The helper's browser regressions live
-in `app/test/playwright/specs/chat-composer-helper.spec.ts`.
-
-For a canonical, inspectable run that drops screenshots, page-source dumps, and mock request logs on disk:
-
-```bash
-bash app/scripts/e2e-agent-review.sh
-```
-
-Artifacts land in `app/test/e2e/artifacts/<timestamp>-agent-review/`. Full details and the helper API: [`agent-observability.md`](agent-observability.md). Any failing test triggers `wdio.conf.ts`'s `afterTest` hook, which writes `failure-*.png` and `failure-*.source.xml` into the same run dir.
-
----
-
-## Rust inference provider E2E
-
-These tests (`tests/inference_provider_e2e.rs`) use wiremock to mock HTTP upstreams and require no live LLM API calls. They cover OpenAI-compat chat, Anthropic auth style, per-model temperature suppression, Ollama local provider, and the `/v1` HTTP endpoint auth layer.
-
-```bash
-# Local:
-bash scripts/test-rust-inference-e2e.sh
-
-# Via Docker (Linux, same image as CI):
-docker compose -f e2e/docker-compose.yml run --rm inference-e2e
-```
-
----
-
-## See also
-
-- [Testing strategy](testing-strategy.md): which layer a given test belongs in.
-- [Agent observability](agent-observability.md): the artifact flow the review run writes to.
-- [Tauri shell](architecture/tauri-shell.md): the Wry webview `tauri-driver` attaches to.
-- [Getting set up](getting-set-up.md): toolchain and submodules a local E2E build needs.
diff --git a/gitbooks/developing/embed/README.md b/gitbooks/developing/embed/README.md
deleted file mode 100644
index 29e568533e..0000000000
--- a/gitbooks/developing/embed/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
----
-description: "Run the OpenHuman core inside a Rust application with one Runtime and independently configured Agents."
----
-
-# Embedding OpenHuman
-
-`openhuman-embed` runs the OpenHuman core inside your Rust program. Your host owns the user interface, server transport and authentication flow; the core owns agent turns, memory, tools, approvals and execution policy. Calling its typed facades does not require a JSON-RPC server or the desktop shell.
-
-Build one `Runtime` per process and register the agents your product needs. Each agent can choose its own provider, prompt, working folder, tool scope, skills and MCP servers. Agents share runtime credentials; use `ProfileRuntime` when separate customers need separate credentials and workspaces.
-
-## Start here
-
-- [Installation](installation.md): dependency, Cargo gates, runtime setup and configuration.
-- [Quickstart](quickstart.md): run a verified offline turn, then choose a live provider explicitly.
-- [Architecture](architecture.md): ownership, lifecycle and the library chain.
-- [Concepts](concepts/README.md): the 18 public API concepts and their runtime/agent scope.
-- [Guides](guides/README.md): chatbots, multiple agents, SaaS, server deployment and tests.
-- [Integrations](integrations/README.md): inference, MCP, connectors, storage and channels.
-- [Cookbook](cookbook.md): generated inventory of executable examples.
-- [API reference](api-reference.md): local rustdoc, source links and generated builder knobs.
-
-## Choose the right surface
-
-| Requirement | Start with |
-| --- | --- |
-| One agent with a small host | `Harness` |
-| Several independently configured agents | `Runtime` and `AgentSpec` |
-| Stateless model generation | `Completer` |
-| Authenticated users with isolated credentials and state | `ProfileRuntime` |
-| Public JSON-RPC server or shipped desktop host | The `openhuman-rpc` host layer |
-
-The snippets in this section are injected from compiled, offline-tested Rust examples. Their full source files include the surrounding setup. `pnpm docs:check` checks source drift, local links, the generated API inventory and the published English mirror.
-
-See [FAQ](faq.md) for design choices and [troubleshooting](troubleshooting.md) for setup failures.
diff --git a/gitbooks/developing/embed/api-index.json b/gitbooks/developing/embed/api-index.json
deleted file mode 100644
index 588cd10c7f..0000000000
--- a/gitbooks/developing/embed/api-index.json
+++ /dev/null
@@ -1,596 +0,0 @@
-{
- "schema_version": 1,
- "exports": [
- "Access",
- "Agent",
- "AgentDefaults",
- "AgentDefinition",
- "AgentDefinitionSpec",
- "AgentError",
- "AgentLayout",
- "AgentProgress",
- "AgentSpec",
- "AgentTurnOrigin",
- "ApiKey",
- "ApprovalDecision",
- "ApprovalHandler",
- "ApprovalSubscription",
- "Approvals",
- "ApprovalsError",
- "Auth",
- "AuthState",
- "BackendRequest",
- "BackendTransport",
- "BackendTransportError",
- "BaseUrlPurpose",
- "CancellationToken",
- "ChannelError",
- "ChannelListener",
- "Channels",
- "ChatMessage",
- "ChatReply",
- "Completer",
- "CompletionObserver",
- "CompletionRequest",
- "CompletionResponse",
- "CompletionTrace",
- "CompletionUsage",
- "ComposioHostCredential",
- "Config",
- "ConfigSource",
- "ConfigurationInfo",
- "ControllerSchema",
- "CoreAgent",
- "CoreBuilder",
- "CoreError",
- "CoreRuntime",
- "Cron",
- "CronDelivery",
- "CronError",
- "CronReply",
- "CronSweepReport",
- "DEFAULT_MAX_AGENTS",
- "DaemonConfig",
- "DefaultsInfo",
- "DefinitionBase",
- "DirectProfileProvider",
- "DomainSet",
- "EventStreamError",
- "GroupMode",
- "HTTP_SERVER_COMPILED_IN",
- "Harness",
- "HarnessBuilder",
- "HarnessCore",
- "HarnessError",
- "HostAttachment",
- "HostKind",
- "HostTools",
- "HostTurnTools",
- "HttpHeader",
- "InMemorySessionStores",
- "JobOrigin",
- "JobRun",
- "JobRunRecord",
- "JobSchedule",
- "JobSpec",
- "JobTarget",
- "LastTurnUsage",
- "LearningSettings",
- "McpAuthConfig",
- "McpServer",
- "MemoryBinding",
- "ModelDefaults",
- "NoTenant",
- "OpenError",
- "PendingApproval",
- "PermissionFuture",
- "PermissionLevel",
- "PickListenPortError",
- "ProfileError",
- "ProfileEvents",
- "ProfileHandle",
- "ProfileId",
- "ProfileIdMode",
- "ProfileRuntime",
- "ProfileRuntimeBuilder",
- "ProfileSummary",
- "Provider",
- "Provisioned",
- "RelayAccepted",
- "RelayMessage",
- "RemoveAgent",
- "Route",
- "Runtime",
- "RuntimeBuilder",
- "RuntimeConfig",
- "RuntimeDefaults",
- "RuntimeError",
- "RuntimeEvent",
- "RuntimeEventKind",
- "RuntimeEvents",
- "RuntimeFlags",
- "RuntimeInfo",
- "RuntimeModule",
- "SaasConfig",
- "SandboxModeSpec",
- "ScheduledJob",
- "SearchHostCredential",
- "ServiceSet",
- "Session",
- "SessionStoreProvider",
- "SkillsPolicy",
- "StorageInfo",
- "StreamEvent",
- "StreamMode",
- "SystemJobContext",
- "TelegramChannelSpec",
- "Tenant",
- "TokenSource",
- "Tool",
- "ToolAttachmentError",
- "ToolExposure",
- "ToolGroups",
- "ToolPolicy",
- "ToolResult",
- "ToolScopeSpec",
- "TransportProfile",
- "TrustedAccess",
- "TrustedAutomationSource",
- "Turn",
- "TurnCancellation",
- "TurnContext",
- "TurnOutcome",
- "TurnRequest",
- "TurnStream",
- "UnknownKeyedSearchProvider",
- "VOICE_COMPILED_IN",
- "WeightClass",
- "Workspace",
- "absolute",
- "agent_progress",
- "artifacts",
- "budget",
- "cancellation",
- "channels",
- "chat_surface",
- "complete",
- "config",
- "cron",
- "current_tenant",
- "embeddings",
- "events",
- "fanout",
- "identity",
- "install_backend_transport",
- "installed_backend_transport",
- "memory",
- "modules",
- "observe",
- "process",
- "profiles",
- "providers",
- "routing",
- "run_from_args",
- "schema_for_rpc_method",
- "seams",
- "secret_storage",
- "session_store",
- "skill_registry",
- "stream",
- "structured"
- ],
- "builder_setters": [
- {
- "name": "access",
- "signature": "pub fn access(mut self, access: Access) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 368
- },
- {
- "name": "action_dir",
- "signature": "pub fn action_dir(mut self, dir: impl Into<PathBuf>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 325
- },
- {
- "name": "agent_defaults",
- "signature": "pub fn agent_defaults(mut self, defaults: super::AgentDefaults) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 158
- },
- {
- "name": "api_key",
- "signature": "pub fn api_key(mut self, key: impl Into<ApiKey>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 345
- },
- {
- "name": "autonomy",
- "signature": "pub fn autonomy(mut self, value: openhuman_core::config::schema::AutonomyConfig) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 193
- },
- {
- "name": "backend_transport",
- "signature": "pub fn backend_transport(mut self, transport: Arc<dyn BackendTransport>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 232
- },
- {
- "name": "backend_url",
- "signature": "pub fn backend_url(mut self, url: impl Into<String>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 355
- },
- {
- "name": "config",
- "signature": "pub fn config(mut self, config: Config) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 485
- },
- {
- "name": "config_source",
- "signature": "pub fn config_source(mut self, source: ConfigSource) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 333
- },
- {
- "name": "controller_extension",
- "signature": "pub fn controller_extension(mut self, extension: ControllerExtension) -> Self",
- "source": "crates/openhuman-embed/src/runtime/seams.rs",
- "line": 415
- },
- {
- "name": "cron",
- "signature": "pub fn cron(mut self, value: openhuman_core::config::schema::CronConfig) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 218
- },
- {
- "name": "cron_delivery",
- "signature": "pub fn cron_delivery( mut self, delivery: Arc<dyn openhuman_core::cron::host_delivery::CronDelivery>, ) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 276
- },
- {
- "name": "defer_services",
- "signature": "pub fn defer_services(mut self) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 403
- },
- {
- "name": "definition_base",
- "signature": "pub fn definition_base(mut self, definition: crate::AgentDefinitionSpec) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 177
- },
- {
- "name": "domains",
- "signature": "pub fn domains(mut self, domains: DomainSet) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 415
- },
- {
- "name": "host_kind",
- "signature": "pub fn host_kind(mut self, host_kind: HostKind) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 432
- },
- {
- "name": "learning",
- "signature": "pub fn learning(mut self, value: super::LearningSettings) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 213
- },
- {
- "name": "listen",
- "signature": "pub fn listen(self, host: impl Into<String>, port: u16) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 454
- },
- {
- "name": "listen_host",
- "signature": "pub fn listen_host(mut self, host: impl Into<String>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 459
- },
- {
- "name": "listen_port",
- "signature": "pub fn listen_port(mut self, port: u16) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 465
- },
- {
- "name": "live_policy",
- "signature": "pub fn live_policy(mut self, policy: Arc<SecurityPolicy>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/seams.rs",
- "line": 464
- },
- {
- "name": "max_agents",
- "signature": "pub fn max_agents(mut self, limit: usize) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 288
- },
- {
- "name": "mcp_baseline",
- "signature": "pub fn mcp_baseline(mut self, servers: impl IntoIterator<Item = crate::McpServer>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 188
- },
- {
- "name": "memory_engine",
- "signature": "pub fn memory_engine(mut self, engine: Arc<dyn tinymemory_api::MemoryEngine>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 246
- },
- {
- "name": "model_defaults",
- "signature": "pub fn model_defaults(mut self, model: super::ModelDefaults) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 167
- },
- {
- "name": "modules",
- "signature": "pub fn modules(mut self, modules: impl IntoIterator<Item = RuntimeModule>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/selection.rs",
- "line": 155
- },
- {
- "name": "post_turn_hook",
- "signature": "pub fn post_turn_hook(mut self, hook: Arc<dyn PostTurnHook>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/seams.rs",
- "line": 430
- },
- {
- "name": "privacy",
- "signature": "pub fn privacy(mut self, value: openhuman_core::config::schema::PrivacyConfig) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 203
- },
- {
- "name": "provider",
- "signature": "pub fn provider(mut self, provider: Provider) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 361
- },
- {
- "name": "sandbox",
- "signature": "pub fn sandbox(mut self, mode: crate::SandboxModeSpec) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 172
- },
- {
- "name": "secrets",
- "signature": "pub fn secrets(mut self, value: openhuman_core::config::schema::SecretsConfig) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 208
- },
- {
- "name": "server_launcher",
- "signature": "pub fn server_launcher(mut self, launcher: ServerLauncher) -> Self",
- "source": "crates/openhuman-embed/src/runtime/seams.rs",
- "line": 444
- },
- {
- "name": "services",
- "signature": "pub fn services(mut self, services: ServiceSet) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 387
- },
- {
- "name": "session",
- "signature": "pub fn session(mut self, session: Session) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 475
- },
- {
- "name": "session_store",
- "signature": "pub fn session_store(mut self, provider: Arc<dyn SessionStoreProvider>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 261
- },
- {
- "name": "skills",
- "signature": "pub fn skills(mut self, policy: super::SkillsPolicy) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 182
- },
- {
- "name": "storage",
- "signature": "pub fn storage(mut self, source: impl Into<StorageSource>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/seams.rs",
- "line": 457
- },
- {
- "name": "token",
- "signature": "pub fn token(mut self, token: TokenSource) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 442
- },
- {
- "name": "tool_groups",
- "signature": "pub fn tool_groups(mut self, tool_groups: ToolGroups) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 424
- },
- {
- "name": "tool_hook",
- "signature": "pub fn tool_hook(mut self, hook: Arc<dyn ToolHook>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/seams.rs",
- "line": 437
- },
- {
- "name": "tool_ranker",
- "signature": "pub fn tool_ranker(mut self, ranker: Arc<dyn ToolRanker>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/seams.rs",
- "line": 422
- },
- {
- "name": "tool_rules",
- "signature": "pub fn tool_rules(mut self, value: tinytools::ToolRules) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 198
- },
- {
- "name": "workspace",
- "signature": "pub fn workspace(mut self, workspace: Workspace) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 298
- },
- {
- "name": "workspace_dir",
- "signature": "pub fn workspace_dir(mut self, dir: impl Into<PathBuf>) -> Self",
- "source": "crates/openhuman-embed/src/runtime/builder.rs",
- "line": 312
- }
- ],
- "capabilities": {
- "schema_version": 1,
- "configuration_resolved": true,
- "compiled_features": {
- "channels": true,
- "crash-reporting": false,
- "default": true,
- "documents": false,
- "e2e-test-support": false,
- "file-logging": true,
- "flows": true,
- "hosting": false,
- "http-server": true,
- "inference": false,
- "mcp": true,
- "media": true,
- "modules": true,
- "rss-bench": false,
- "scheduler-gate": true,
- "skills": true,
- "storage-file": false,
- "storage-mongodb": false,
- "storage-s3": false,
- "storage-sqlite": true,
- "tinymemes": true,
- "voice": false,
- "web3": false,
- "whatsapp-web": false
- },
- "domains": [
- "agent",
- "memory",
- "threads",
- "config",
- "security",
- "flows",
- "skills",
- "channels",
- "inference",
- "integrations",
- "automation",
- "runtimes",
- "platform"
- ],
- "services": [],
- "tool_groups": {
- "coding": "withheld",
- "composio": "withheld",
- "docs": "withheld",
- "documents": "withheld",
- "goals": "withheld",
- "mcp": "withheld",
- "media": "withheld",
- "scheduling": "withheld",
- "skills": "withheld",
- "storage": "withheld",
- "system": "withheld",
- "tasks": "withheld",
- "web3": "withheld",
- "workflows": "withheld"
- },
- "host_kind": "Library",
- "max_agents": 1024,
- "defaults": {
- "model": {
- "temperature": 0.7,
- "max_tokens": null,
- "top_p": null,
- "max_iterations": 200
- },
- "provider_model": "openrouter/deepseek/deepseek-v4-flash",
- "routed_provider": false,
- "sandbox": "None",
- "approval_gate": true,
- "include_user_skills": false,
- "has_skills_root": false,
- "mcp_servers": 0,
- "templates": []
- },
- "configuration": {
- "autonomy_enabled": true,
- "privacy": "Standard",
- "secrets_encrypted": true,
- "cron_enabled": true,
- "learning": {
- "build_beliefs_every": 10,
- "learnings_limit": 8
- },
- "has_tool_rules": false
- },
- "storage": {
- "source": "workspace",
- "driver": null,
- "configured": false
- },
- "modules": [],
- "weight": "custom"
- },
- "pages": [
- "gitbooks/developing/embed/README.md",
- "gitbooks/developing/embed/api-reference.md",
- "gitbooks/developing/embed/architecture.md",
- "gitbooks/developing/embed/concepts/README.md",
- "gitbooks/developing/embed/concepts/access-approvals.md",
- "gitbooks/developing/embed/concepts/agents.md",
- "gitbooks/developing/embed/concepts/channels.md",
- "gitbooks/developing/embed/concepts/completer.md",
- "gitbooks/developing/embed/concepts/cron.md",
- "gitbooks/developing/embed/concepts/errors.md",
- "gitbooks/developing/embed/concepts/hooks-seams.md",
- "gitbooks/developing/embed/concepts/mcp.md",
- "gitbooks/developing/embed/concepts/memory.md",
- "gitbooks/developing/embed/concepts/observability.md",
- "gitbooks/developing/embed/concepts/profiles-saas.md",
- "gitbooks/developing/embed/concepts/providers.md",
- "gitbooks/developing/embed/concepts/runtime-defaults.md",
- "gitbooks/developing/embed/concepts/runtime.md",
- "gitbooks/developing/embed/concepts/skills.md",
- "gitbooks/developing/embed/concepts/testing.md",
- "gitbooks/developing/embed/concepts/tools.md",
- "gitbooks/developing/embed/concepts/turns-sessions.md",
- "gitbooks/developing/embed/faq.md",
- "gitbooks/developing/embed/guides/README.md",
- "gitbooks/developing/embed/guides/cli-chatbot.md",
- "gitbooks/developing/embed/guides/deploy-server.md",
- "gitbooks/developing/embed/guides/lean-headless.md",
- "gitbooks/developing/embed/guides/mock-backend-testing.md",
- "gitbooks/developing/embed/guides/multi-agent.md",
- "gitbooks/developing/embed/guides/saas-multi-tenant.md",
- "gitbooks/developing/embed/installation.md",
- "gitbooks/developing/embed/integrations/README.md",
- "gitbooks/developing/embed/integrations/channels.md",
- "gitbooks/developing/embed/integrations/composio.md",
- "gitbooks/developing/embed/integrations/local-models.md",
- "gitbooks/developing/embed/integrations/mcp.md",
- "gitbooks/developing/embed/integrations/openai-compatible.md",
- "gitbooks/developing/embed/integrations/storage-drivers.md",
- "gitbooks/developing/embed/integrations/tinyhumans-managed.md",
- "gitbooks/developing/embed/integrations/web-search.md",
- "gitbooks/developing/embed/quickstart.md",
- "gitbooks/developing/embed/troubleshooting.md",
- "crates/openhuman-embed/README.md",
- "gitbooks/developing/embedding.md",
- "gitbooks/developing/embed/cookbook.md",
- "gitbooks/developing/embed/capability-matrix.md",
- "gitbooks/developing/embed/builder-setters.md",
- "gitbooks/developing/embed/api-index.md"
- ]
-}
diff --git a/gitbooks/developing/embed/api-index.md b/gitbooks/developing/embed/api-index.md
deleted file mode 100644
index cff0f40a26..0000000000
--- a/gitbooks/developing/embed/api-index.md
+++ /dev/null
@@ -1,286 +0,0 @@
-# API index
-
-<!-- Generated by scripts/generate-embed-docs.mjs; do not edit. -->
-
-Generate the complete local Rust API reference with `cargo doc -p openhuman-embed --all-features --no-deps --open`. This crate is currently unpublished; docs.rs is a future publication target. Names below are source-listed exports, including conditional Cargo-gated items; local rustdoc with your selected features describes availability. [Canonical facade source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs).
-
-- [`Access`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Agent`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`AgentDefaults`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`AgentDefinition`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`AgentDefinitionSpec`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`AgentError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`AgentLayout`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`AgentProgress`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`AgentSpec`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`AgentTurnOrigin`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ApiKey`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ApprovalDecision`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ApprovalHandler`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ApprovalSubscription`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Approvals`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ApprovalsError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Auth`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`AuthState`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`BackendRequest`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`BackendTransport`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`BackendTransportError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`BaseUrlPurpose`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CancellationToken`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ChannelError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ChannelListener`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Channels`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ChatMessage`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ChatReply`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Completer`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CompletionObserver`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CompletionRequest`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CompletionResponse`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CompletionTrace`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CompletionUsage`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ComposioHostCredential`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Config`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ConfigSource`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ConfigurationInfo`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ControllerSchema`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CoreAgent`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CoreBuilder`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CoreError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CoreRuntime`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Cron`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CronDelivery`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CronError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CronReply`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`CronSweepReport`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`DEFAULT_MAX_AGENTS`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`DaemonConfig`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`DefaultsInfo`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`DefinitionBase`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`DirectProfileProvider`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`DomainSet`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`EventStreamError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`GroupMode`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`HTTP_SERVER_COMPILED_IN`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Harness`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`HarnessBuilder`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`HarnessCore`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`HarnessError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`HostAttachment`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`HostKind`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`HostTools`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`HostTurnTools`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`HttpHeader`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`InMemorySessionStores`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`JobOrigin`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`JobRun`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`JobRunRecord`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`JobSchedule`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`JobSpec`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`JobTarget`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`LastTurnUsage`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`LearningSettings`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`McpAuthConfig`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`McpServer`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`MemoryBinding`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ModelDefaults`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`NoTenant`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`OpenError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`PendingApproval`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`PermissionFuture`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`PermissionLevel`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`PickListenPortError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ProfileError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ProfileEvents`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ProfileHandle`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ProfileId`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ProfileIdMode`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ProfileRuntime`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ProfileRuntimeBuilder`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ProfileSummary`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Provider`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Provisioned`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RelayAccepted`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RelayMessage`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RemoveAgent`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Route`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Runtime`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RuntimeBuilder`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RuntimeConfig`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RuntimeDefaults`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RuntimeError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RuntimeEvent`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RuntimeEventKind`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RuntimeEvents`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RuntimeFlags`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RuntimeInfo`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`RuntimeModule`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`SaasConfig`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`SandboxModeSpec`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ScheduledJob`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`SearchHostCredential`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ServiceSet`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Session`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`SessionStoreProvider`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`SkillsPolicy`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`StorageInfo`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`StreamEvent`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`StreamMode`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`SystemJobContext`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`TelegramChannelSpec`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Tenant`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`TokenSource`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Tool`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ToolAttachmentError`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ToolExposure`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ToolGroups`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ToolPolicy`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ToolResult`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`ToolScopeSpec`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`TransportProfile`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`TrustedAccess`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`TrustedAutomationSource`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Turn`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`TurnCancellation`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`TurnContext`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`TurnOutcome`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`TurnRequest`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`TurnStream`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`UnknownKeyedSearchProvider`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`VOICE_COMPILED_IN`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`WeightClass`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`Workspace`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`absolute`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`agent_progress`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`artifacts`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`budget`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`cancellation`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`channels`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`chat_surface`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`complete`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`config`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`cron`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`current_tenant`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`embeddings`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`events`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`fanout`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`identity`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`install_backend_transport`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`installed_backend_transport`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`memory`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`modules`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`observe`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`process`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`profiles`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`providers`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`routing`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`run_from_args`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`schema_for_rpc_method`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`seams`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`secret_storage`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`session_store`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`skill_registry`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`stream`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-- [`structured`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs)
-
-The compiled capability report describes this build:
-
-```json
-{
- "schema_version": 1,
- "configuration_resolved": true,
- "compiled_features": {
- "channels": true,
- "crash-reporting": false,
- "default": true,
- "documents": false,
- "e2e-test-support": false,
- "file-logging": true,
- "flows": true,
- "hosting": false,
- "http-server": true,
- "inference": false,
- "mcp": true,
- "media": true,
- "modules": true,
- "rss-bench": false,
- "scheduler-gate": true,
- "skills": true,
- "storage-file": false,
- "storage-mongodb": false,
- "storage-s3": false,
- "storage-sqlite": true,
- "tinymemes": true,
- "voice": false,
- "web3": false,
- "whatsapp-web": false
- },
- "domains": [
- "agent",
- "memory",
- "threads",
- "config",
- "security",
- "flows",
- "skills",
- "channels",
- "inference",
- "integrations",
- "automation",
- "runtimes",
- "platform"
- ],
- "services": [],
- "tool_groups": {
- "coding": "withheld",
- "composio": "withheld",
- "docs": "withheld",
- "documents": "withheld",
- "goals": "withheld",
- "mcp": "withheld",
- "media": "withheld",
- "scheduling": "withheld",
- "skills": "withheld",
- "storage": "withheld",
- "system": "withheld",
- "tasks": "withheld",
- "web3": "withheld",
- "workflows": "withheld"
- },
- "host_kind": "Library",
- "max_agents": 1024,
- "defaults": {
- "model": {
- "temperature": 0.7,
- "max_tokens": null,
- "top_p": null,
- "max_iterations": 200
- },
- "provider_model": "openrouter/deepseek/deepseek-v4-flash",
- "routed_provider": false,
- "sandbox": "None",
- "approval_gate": true,
- "include_user_skills": false,
- "has_skills_root": false,
- "mcp_servers": 0,
- "templates": []
- },
- "configuration": {
- "autonomy_enabled": true,
- "privacy": "Standard",
- "secrets_encrypted": true,
- "cron_enabled": true,
- "learning": {
- "build_beliefs_every": 10,
- "learnings_limit": 8
- },
- "has_tool_rules": false
- },
- "storage": {
- "source": "workspace",
- "driver": null,
- "configured": false
- },
- "modules": [],
- "weight": "custom"
-}
-```
diff --git a/gitbooks/developing/embed/api-reference.md b/gitbooks/developing/embed/api-reference.md
deleted file mode 100644
index 54d363ad22..0000000000
--- a/gitbooks/developing/embed/api-reference.md
+++ /dev/null
@@ -1,54 +0,0 @@
----
-description: "Use local rustdoc and source-derived indexes for the complete Embed public surface."
----
-
-# Embedding API reference
-
-Generate usable local Rust API documentation with `cargo doc -p openhuman-embed --no-deps --open`. Include `--features mcp,skills,channels,storage-sqlite` for the facade gates used by the offline examples, or select the feature set your host actually builds. For all exported optional surfaces use `--all-features`.
-
-The crate is currently `publish = false`; docs.rs links are a publication metadata target, not a claim that a live package reference exists. Local rustdoc and [canonical facade source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/lib.rs) are the current complete reference.
-
-## Generated inventories
-
-- [API index](api-index.md): names exported by the public facade and a versioned runtime report.
-- [Machine-readable API index](api-index.json): export names, builder signatures, capabilities and page paths.
-- [RuntimeBuilder setters](builder-setters.md): current public consuming setters with source locations.
-- [Compiled feature matrix](capability-matrix.md): the actual core gates from the default-feature capability-report executable.
-- [Cookbook](cookbook.md): example titles, run modes and required named facade features from source headers.
-
-The generated setter list is the authoritative knob inventory. It excludes static presets and borrowed inspection/build/run methods; those belong in local rustdoc. Core compiled gates, runtime module/domain selection and named facade exports are separate availability layers.
-
-## Public surface by purpose
-
-| Purpose | API starting point |
-| --- | --- |
-| Boot and inspect a host | `RuntimeBuilder`, `Runtime`, `RuntimeInfo` |
-| Register and remove scoped agents | `AgentSpec`, `Agent`, `AgentDefinitionSpec`, `RemoveAgent` |
-| Configure execution and decisions | `Access`, `SandboxModeSpec`, `Approvals`, `ApprovalHandler` |
-| Execute or stream native turns | `Turn`, `TurnOutcome`, `TurnStream`, `StreamEvent` |
-| Supply custom model adapters | `Provider` and `providers::ChatModel` |
-| Stateless generation | `Completer`, `CompletionRequest`, structured response helpers |
-| Typed non-turn domains | Memory and cron facades, config/auth/artifacts/chat surface |
-| Replace infrastructure ports | `seams`, `session_store`, memory engine and provider contracts |
-| Serve isolated customer profiles | `ProfileRuntime`, `ProfileHandle`, `SaasConfig` |
-
-## Versioned capability data
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/capability_report.rs#capability_report -->
-
-```rust
- let info = runtime.capabilities();
- assert_eq!(info.schema_version, 1);
- assert!(info.defaults.routed_provider);
- let serialized = serde_json::to_string(&info)?;
- assert!(!serialized.contains("sk-test"));
- assert!(!serialized.contains(&provider.uri()));
- assert!(!serialized.contains(&runtime.workspace_dir().display().to_string()));
- println!("{}", serde_json::to_string_pretty(&info)?);
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/capability_report.rs), including runtime construction, imports and fixture setup.
-
-The report's schema version is explicit. Read its fields rather than inferring capabilities from preset names, and handle future schema changes deliberately. It omits endpoint, credential, prompt and workspace values so hosts can expose build metadata without exposing private configuration.
diff --git a/gitbooks/developing/embed/architecture.md b/gitbooks/developing/embed/architecture.md
deleted file mode 100644
index 8afb97be68..0000000000
--- a/gitbooks/developing/embed/architecture.md
+++ /dev/null
@@ -1,68 +0,0 @@
----
-description: "The host composes infrastructure around one core; agents derive scoped contexts over its runtime."
----
-
-# Embedding architecture
-
-Embed is the library facade above `openhuman-core`. The TinyHumans layer installs the backend SDK transport and owns product login/session behavior; the RPC layer adds JSON-RPC, server listeners and shipped host boot. A Rust embedder can stay at the facade when it owns those concerns itself.
-
-## Ownership boundaries
-
-| Component | Owns |
-| --- | --- |
-| Your application | UI/HTTP transport, user authentication, supplied credentials, application tools and resource lifetimes |
-| OpenHuman core and Embed facade | Runtime composition, per-agent context, policy, approvals, sandbox selection and typed domain calls |
-| TinyAgents | Model/tool loop, parsing, dialects, durable sessions and transcript replay |
-| TinyInference | Native model/provider contracts and generic ordered fallback |
-| TinyTools | Shared tool traits and contract types |
-| Storage and module libraries | Their backend/module implementations; OpenHuman adapts and orchestrates them |
-
-The library chain is core → Embed → TinyHumans → RPC → app/CLI/TUI. Shipped hosts depend on the layer immediately below them and use its curated facades. Embed users should not build new integrations on doc-hidden `__host` internals.
-
-## Runtime composition versus agent scope
-
-Cargo features decide which implementations exist in an artifact. Runtime domains, services, tool groups and module selection narrow those compiled choices. Agent specs narrow the runtime further and add provider, access, prompt, skills, MCP and action-directory choices.
-
-A turn dispatches through the agent's native context, not through JSON-RPC or an operator fallback. Recursive child contexts inherit the parent host overrides, including custom provider and hook composition, while independent sibling agents remain separately scoped.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/two_agents.rs#two_agents -->
-
-```rust
- let analyst_dir = tempfile::tempdir()?;
- let writer_dir = tempfile::tempdir()?;
- let analyst = runtime.agent(
- AgentSpec::new("analyst")
- .system_prompt("ANALYST_PROMPT: summarize documents")
- .action_dir(analyst_dir.path())
- .access(openhuman_embed::Access::readonly()),
- )?;
- let writer = runtime.agent(
- AgentSpec::new("writer")
- .system_prompt("WRITER_PROMPT: compose explanations")
- .action_dir(writer_dir.path())
- .access(openhuman_embed::Access::full()),
- )?;
- assert_ne!(analyst.action_dir(), writer.action_dir());
- assert_ne!(analyst.home_dir(), writer.home_dir());
- assert_ne!(analyst.workspace_dir(), analyst.action_dir());
- assert!(!analyst.run("Analyze").await?.reply.is_empty());
- assert!(!writer.run("Explain").await?.reply.is_empty());
- if support::offline() {
- let requests = support::chat_requests(&provider).await;
- assert_eq!(requests.len(), 2);
- assert!(String::from_utf8_lossy(&requests[0].body).contains("ANALYST_PROMPT"));
- assert!(!String::from_utf8_lossy(&requests[0].body).contains("WRITER_PROMPT"));
- assert!(String::from_utf8_lossy(&requests[1].body).contains("WRITER_PROMPT"));
- }
- println!("two distinct prompts and action workspaces verified");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/two_agents.rs), including runtime construction, imports and fixture setup.
-
-## Lifetime and isolation
-
-An agent handle keeps the core alive after the runtime handle is dropped. Explicit removal marks that instance removed, cancels turns and callbacks, denies parked approvals and clears its state/MCP registration. The ID remains reserved through cleanup, including natural last-handle destruction and cancellation of a started removal. Pointer-checked release prevents an old retained instance from removing a newer registry entry.
-
-Agent separation is not credential separation: all ordinary runtime agents share the operator's config path and credential root. Use [profiles](concepts/profiles-saas.md) for independently authenticated users. See [storage architecture](../architecture/storage.md) for scope/driver ownership and [agent harness architecture](../architecture/agent-harness.md) for session execution.
diff --git a/gitbooks/developing/embed/builder-setters.md b/gitbooks/developing/embed/builder-setters.md
deleted file mode 100644
index 91ac4b1fc3..0000000000
--- a/gitbooks/developing/embed/builder-setters.md
+++ /dev/null
@@ -1,50 +0,0 @@
-# RuntimeBuilder setters
-
-<!-- Generated by scripts/generate-embed-docs.mjs; do not edit. -->
-
-Public consuming methods that return `Self`, extracted from the RuntimeBuilder implementations. Static host and weight presets, inspection methods and build/run methods are excluded.
-
-- [`access`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L368): `pub fn access(mut self, access: Access) -> Self`
-- [`action_dir`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L325): `pub fn action_dir(mut self, dir: impl Into<PathBuf>) -> Self`
-- [`agent_defaults`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L158): `pub fn agent_defaults(mut self, defaults: super::AgentDefaults) -> Self`
-- [`api_key`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L345): `pub fn api_key(mut self, key: impl Into<ApiKey>) -> Self`
-- [`autonomy`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L193): `pub fn autonomy(mut self, value: openhuman_core::config::schema::AutonomyConfig) -> Self`
-- [`backend_transport`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L232): `pub fn backend_transport(mut self, transport: Arc<dyn BackendTransport>) -> Self`
-- [`backend_url`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L355): `pub fn backend_url(mut self, url: impl Into<String>) -> Self`
-- [`config`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L485): `pub fn config(mut self, config: Config) -> Self`
-- [`config_source`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L333): `pub fn config_source(mut self, source: ConfigSource) -> Self`
-- [`controller_extension`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/seams.rs#L415): `pub fn controller_extension(mut self, extension: ControllerExtension) -> Self`
-- [`cron`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L218): `pub fn cron(mut self, value: openhuman_core::config::schema::CronConfig) -> Self`
-- [`cron_delivery`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L276): `pub fn cron_delivery( mut self, delivery: Arc<dyn openhuman_core::cron::host_delivery::CronDelivery>, ) -> Self`
-- [`defer_services`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L403): `pub fn defer_services(mut self) -> Self`
-- [`definition_base`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L177): `pub fn definition_base(mut self, definition: crate::AgentDefinitionSpec) -> Self`
-- [`domains`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L415): `pub fn domains(mut self, domains: DomainSet) -> Self`
-- [`host_kind`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L432): `pub fn host_kind(mut self, host_kind: HostKind) -> Self`
-- [`learning`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L213): `pub fn learning(mut self, value: super::LearningSettings) -> Self`
-- [`listen`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L454): `pub fn listen(self, host: impl Into<String>, port: u16) -> Self`
-- [`listen_host`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L459): `pub fn listen_host(mut self, host: impl Into<String>) -> Self`
-- [`listen_port`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L465): `pub fn listen_port(mut self, port: u16) -> Self`
-- [`live_policy`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/seams.rs#L464): `pub fn live_policy(mut self, policy: Arc<SecurityPolicy>) -> Self`
-- [`max_agents`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L288): `pub fn max_agents(mut self, limit: usize) -> Self`
-- [`mcp_baseline`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L188): `pub fn mcp_baseline(mut self, servers: impl IntoIterator<Item = crate::McpServer>) -> Self`
-- [`memory_engine`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L246): `pub fn memory_engine(mut self, engine: Arc<dyn tinymemory_api::MemoryEngine>) -> Self`
-- [`model_defaults`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L167): `pub fn model_defaults(mut self, model: super::ModelDefaults) -> Self`
-- [`modules`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/selection.rs#L155): `pub fn modules(mut self, modules: impl IntoIterator<Item = RuntimeModule>) -> Self`
-- [`post_turn_hook`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/seams.rs#L430): `pub fn post_turn_hook(mut self, hook: Arc<dyn PostTurnHook>) -> Self`
-- [`privacy`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L203): `pub fn privacy(mut self, value: openhuman_core::config::schema::PrivacyConfig) -> Self`
-- [`provider`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L361): `pub fn provider(mut self, provider: Provider) -> Self`
-- [`sandbox`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L172): `pub fn sandbox(mut self, mode: crate::SandboxModeSpec) -> Self`
-- [`secrets`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L208): `pub fn secrets(mut self, value: openhuman_core::config::schema::SecretsConfig) -> Self`
-- [`server_launcher`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/seams.rs#L444): `pub fn server_launcher(mut self, launcher: ServerLauncher) -> Self`
-- [`services`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L387): `pub fn services(mut self, services: ServiceSet) -> Self`
-- [`session`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L475): `pub fn session(mut self, session: Session) -> Self`
-- [`session_store`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L261): `pub fn session_store(mut self, provider: Arc<dyn SessionStoreProvider>) -> Self`
-- [`skills`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L182): `pub fn skills(mut self, policy: super::SkillsPolicy) -> Self`
-- [`storage`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/seams.rs#L457): `pub fn storage(mut self, source: impl Into<StorageSource>) -> Self`
-- [`token`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L442): `pub fn token(mut self, token: TokenSource) -> Self`
-- [`tool_groups`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L424): `pub fn tool_groups(mut self, tool_groups: ToolGroups) -> Self`
-- [`tool_hook`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/seams.rs#L437): `pub fn tool_hook(mut self, hook: Arc<dyn ToolHook>) -> Self`
-- [`tool_ranker`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/seams.rs#L422): `pub fn tool_ranker(mut self, ranker: Arc<dyn ToolRanker>) -> Self`
-- [`tool_rules`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L198): `pub fn tool_rules(mut self, value: tinytools::ToolRules) -> Self`
-- [`workspace`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L298): `pub fn workspace(mut self, workspace: Workspace) -> Self`
-- [`workspace_dir`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L312): `pub fn workspace_dir(mut self, dir: impl Into<PathBuf>) -> Self`
diff --git a/gitbooks/developing/embed/capability-matrix.md b/gitbooks/developing/embed/capability-matrix.md
deleted file mode 100644
index d47e453514..0000000000
--- a/gitbooks/developing/embed/capability-matrix.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# Compiled feature matrix
-
-<!-- Generated by scripts/generate-embed-docs.mjs; do not edit. -->
-
-This matrix comes from the default-feature compiled capability-report example. Runtime presets can narrow enabled domains and services; core Cargo features determine which implementations are available. Named Embed features also gate facade exports: enable `mcp` or `skills` explicitly for their public setters even when core defaults compile those implementations. Embed defaults enable the named `channels` feature. See the installation guide for these separate layers.
-
-| Cargo feature | Compiled in this build |
-| --- | --- |
-| `channels` | Yes |
-| `crash-reporting` | No |
-| `default` | Yes |
-| `documents` | No |
-| `e2e-test-support` | No |
-| `file-logging` | Yes |
-| `flows` | Yes |
-| `hosting` | No |
-| `http-server` | Yes |
-| `inference` | No |
-| `mcp` | Yes |
-| `media` | Yes |
-| `modules` | Yes |
-| `rss-bench` | No |
-| `scheduler-gate` | Yes |
-| `skills` | Yes |
-| `storage-file` | No |
-| `storage-mongodb` | No |
-| `storage-s3` | No |
-| `storage-sqlite` | Yes |
-| `tinymemes` | Yes |
-| `voice` | No |
-| `web3` | No |
-| `whatsapp-web` | No |
diff --git a/gitbooks/developing/embed/concepts/README.md b/gitbooks/developing/embed/concepts/README.md
deleted file mode 100644
index 5262dcd86a..0000000000
--- a/gitbooks/developing/embed/concepts/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
----
-description: "The ownership and lifecycle rules behind the Embed public API."
----
-
-# Concepts
-
-Start with Runtime and agents to understand which settings are shared. Then follow the lifecycle of a request through provider selection, tools, approvals and its durable session. The scope tables distinguish runtime composition from the state a host must isolate per agent or profile.
-
-- [Runtime](runtime.md): A Runtime owns one initialized core and the process-wide resources that its agents share.
-- [Runtime defaults](runtime-defaults.md): Runtime defaults form the starting point for newly registered agents; explicit agent settings override them.
-- [Agents](agents.md): An Agent combines one identity, derived context and independently configured tool/model behavior on a shared Runtime.
-- [Access and approvals](access-approvals.md): Access configures turn identity and permission policy; the host chooses how parked requests receive decisions.
-- [Providers](providers.md): A provider supplies a route or native ChatModel implementation, with agent overrides and optional ordered fallback.
-- [Turns and sessions](turns-sessions.md): A turn is one native model/tool loop; a session is the durable identity that makes subsequent turns a conversation.
-- [Tools](tools.md): Tool catalogs expose only the allowed execution surface; host tools use the same native Tool contract as built-in tools.
-- [MCP](mcp.md): MCP servers add remote tool discovery and execution to one agent, with explicit server configuration and tool allowlists.
-- [Skills](skills.md): Skills are copied bundles of instructions and resources discovered inside an agent’s own home.
-- [Memory](memory.md): The typed memory facade binds a namespace before learning, retrieving or forgetting records.
-- [Cron](cron.md): Cron provides durable named jobs, explicit run-now execution and job history addressed to registered agents.
-- [Channels](channels.md): A channel listener binds external messages to one registered agent and keeps transport lifecycle under host control.
-- [Profiles and SaaS](profiles-saas.md): ProfileRuntime isolates authenticated users by workspace, credentials, conversations and event streams.
-- [Completer](completer.md): Completer sends stateless model requests without booting a Runtime or entering the agent tool loop.
-- [Hooks and seams](hooks-seams.md): Host seams replace infrastructure ports; hooks observe or control selected turn and tool boundaries.
-- [Observability](observability.md): Runtime metadata events track lifecycle and approvals; turn streams carry per-turn progress and the final result.
-- [Testing](testing.md): Deterministic local providers and explicit observations prove behavior without contacting real inference or backend services.
-- [Errors](errors.md): Typed errors distinguish build availability, expected domain states, host setup failures and removed agent instances.
diff --git a/gitbooks/developing/embed/concepts/access-approvals.md b/gitbooks/developing/embed/concepts/access-approvals.md
deleted file mode 100644
index eef15dbe59..0000000000
--- a/gitbooks/developing/embed/concepts/access-approvals.md
+++ /dev/null
@@ -1,80 +0,0 @@
----
-description: "Access configures turn identity and permission policy; the host chooses how parked requests receive decisions."
----
-
-# Access and approvals
-
-`Access` groups permission level, origin, standing grants and trusted roots. Choose an origin and tier together: a trusted local host request and an external channel message are different security contexts. `Access::full()` configures both access fields. A sandbox is an additional execution boundary, configured through `AgentDefinitionSpec`.
-
-The core autonomy policy is disabled by default. Set `config.autonomy.enabled` when you require its command classification, approval gate, allowlist and budget enforcement. Platform isolation and the credential/system-root safety floor have separate responsibilities; a tool group filter is not an operating-system sandbox.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Autonomy policy defaults and installed approval gate | Origin, access tier, grants, trusted roots and scoped decisions |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/approvals.rs#approvals -->
-
-```rust
- let scratch = tempfile::tempdir()?;
- let marker = scratch.path().join("approved-marker");
- let write_provider = support::scripted_provider(
- vec![support::tool_call_completion(
- "shell",
- &serde_json::json!({"command": format!("touch {}", marker.display())}).to_string(),
- )],
- "approved",
- )
- .await;
- let agent = runtime.agent(
- AgentSpec::new("supervised")
- .provider(support::route(&write_provider, "fixture"))
- .action_dir(scratch.path())
- .access(
- openhuman_embed::Access::supervised()
- .origin(openhuman_embed::AgentTurnOrigin::WebChat {
- thread_id: "demo".into(),
- client_id: "host".into(),
- request_id: None,
- })
- .auto_approve(Vec::<String>::new())
- .auto_approve_all(false)
- .trust(
- scratch.path().display().to_string(),
- openhuman_embed::TrustedAccess::ReadWrite,
- ),
- )
- .definition(
- AgentDefinitionSpec::new().tools(ToolScopeSpec::Named(vec!["shell".into()])),
- ),
- )?;
- let pending_agent = agent.clone();
- let turn = tokio::spawn(async move { pending_agent.run("Create a marker").await });
- let pending = support::eventually("approval", || {
- agent.approvals().pending().ok()?.into_iter().next()
- })
- .await;
- assert!(!marker.exists(), "execution waits for the host decision");
- assert_eq!(pending.agent_id.as_deref(), Some("supervised"));
- agent.approvals().decide(
- &pending.request_id,
- openhuman_embed::ApprovalDecision::ApproveOnce,
- )?;
- assert_eq!(turn.await??.reply, "approved");
- assert!(marker.exists());
- assert!(agent.approvals().pending()?.is_empty());
- println!("parked write executed only after approval");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/approvals.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The verified example enables autonomy before building the runtime. It starts a real shell write, observes that no marker exists while the call is parked, and creates it only after `ApproveOnce`. `agent.approvals()` lists and decides only that instance's requests. A removed instance returns an empty pending list and rejects decisions even if the same public ID has been reused.
-
-For asynchronous integration use `AgentSpec::approval_handler` or retain the handle returned by `Agent::handle_approvals`. Dropping a subscription cancels its pending decision future; it does not silently approve the request. Agent removal cancels both builder and live callbacks. Continue with the [approval callback example](../cookbook.md#polling-and-callback-approvals-with-cancellation) and [sandbox guide](../guides/multi-agent.md).
diff --git a/gitbooks/developing/embed/concepts/agents.md b/gitbooks/developing/embed/concepts/agents.md
deleted file mode 100644
index fe05398cdd..0000000000
--- a/gitbooks/developing/embed/concepts/agents.md
+++ /dev/null
@@ -1,59 +0,0 @@
----
-description: "An Agent combines one identity, derived context and independently configured tool/model behavior on a shared Runtime."
----
-
-# Agents
-
-Register an `AgentSpec` with `Runtime::agent`. Its ID selects the agent's home, durable session identity and addressed cron/channel work. An `Agent` clone refers to the same instance; it does not copy state or start another core. Runtime-wide credentials remain shared, so two agents are not two authenticated customers.
-
-Keep `action_dir` separate from the internal workspace. The action directory is where tools act; the agent home stores internal transcripts, skills and other state. The example gives an analyst and a writer distinct folders and prompts while sharing one provider connection setup.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Core, shared configuration path and registry capacity | ID, context, prompt, action directory, provider and per-agent stores |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/two_agents.rs#two_agents -->
-
-```rust
- let analyst_dir = tempfile::tempdir()?;
- let writer_dir = tempfile::tempdir()?;
- let analyst = runtime.agent(
- AgentSpec::new("analyst")
- .system_prompt("ANALYST_PROMPT: summarize documents")
- .action_dir(analyst_dir.path())
- .access(openhuman_embed::Access::readonly()),
- )?;
- let writer = runtime.agent(
- AgentSpec::new("writer")
- .system_prompt("WRITER_PROMPT: compose explanations")
- .action_dir(writer_dir.path())
- .access(openhuman_embed::Access::full()),
- )?;
- assert_ne!(analyst.action_dir(), writer.action_dir());
- assert_ne!(analyst.home_dir(), writer.home_dir());
- assert_ne!(analyst.workspace_dir(), analyst.action_dir());
- assert!(!analyst.run("Analyze").await?.reply.is_empty());
- assert!(!writer.run("Explain").await?.reply.is_empty());
- if support::offline() {
- let requests = support::chat_requests(&provider).await;
- assert_eq!(requests.len(), 2);
- assert!(String::from_utf8_lossy(&requests[0].body).contains("ANALYST_PROMPT"));
- assert!(!String::from_utf8_lossy(&requests[0].body).contains("WRITER_PROMPT"));
- assert!(String::from_utf8_lossy(&requests[1].body).contains("WRITER_PROMPT"));
- }
- println!("two distinct prompts and action workspaces verified");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/two_agents.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-IDs stay reserved until teardown completes, including while the last handle's destructor is clearing state. `remove_agent(id).await` marks retained handles removed, cancels active turns, denies parked approvals and releases the ID after cleanup. Add `.purge()` only when the agent's persisted home should also be deleted. Cancelling a started removal still performs teardown and a requested purge.
-
-An old polling handle or approval callback never follows a reused ID to its replacement. Active host tools cancel cooperatively and may finish their external work after removal; the host still owns those external lifetimes. See [turns and sessions](turns-sessions.md) and [access and approvals](access-approvals.md).
diff --git a/gitbooks/developing/embed/concepts/channels.md b/gitbooks/developing/embed/concepts/channels.md
deleted file mode 100644
index 6588d7dbe3..0000000000
--- a/gitbooks/developing/embed/concepts/channels.md
+++ /dev/null
@@ -1,93 +0,0 @@
----
-description: "A channel listener binds external messages to one registered agent and keeps transport lifecycle under host control."
----
-
-# Channels
-
-`Runtime::channels` creates listeners addressed to a live agent ID. A listener owns its transport task; dropping or stopping it ends that listener. The agent supplies the prompt, provider and tools used for every incoming message instead of handing messages to an operator agent.
-
-The named Embed `channels` feature is enabled by default. The runtime must also allow the channel family. Create listeners inside the Tokio runtime after their agents have been registered.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Channel implementation, listener registry and runtime domain ceiling | Bound agent, conversation identity and external-message access context |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/telegram.rs#telegram -->
-
-```rust
- let bot = wiremock::MockServer::start().await;
- let token = "123456:EXAMPLE";
- let updates = format!("/bot{token}/getUpdates");
- wiremock::Mock::given(wiremock::matchers::path(updates.clone())).respond_with(
- wiremock::ResponseTemplate::new(200).set_body_json(serde_json::json!({"ok":true,"result":[{
- "update_id":1,"message":{"message_id":1,"date":0,"text":"hello channel",
- "from":{"id":99,"is_bot":false,"username":"alice"},"chat":{"id":4242,"type":"private"}}
- }]}))).up_to_n_times(1).with_priority(1).mount(&bot).await;
- wiremock::Mock::given(wiremock::matchers::path(updates))
- .respond_with(
- wiremock::ResponseTemplate::new(200)
- .set_body_json(serde_json::json!({"ok":true,"result":[]}))
- .set_delay(std::time::Duration::from_millis(100)),
- )
- .with_priority(2)
- .mount(&bot)
- .await;
- wiremock::Mock::given(wiremock::matchers::any())
- .respond_with(
- wiremock::ResponseTemplate::new(200)
- .set_body_json(serde_json::json!({"ok":true,"result":{
- "message_id":2,"id":1,"is_bot":true,"username":"example_bot"}})),
- )
- .with_priority(10)
- .mount(&bot)
- .await;
- std::env::set_var("OPENHUMAN_TELEGRAM_BOT_API_BASE", bot.uri());
- let agent = runtime.agent(
- AgentSpec::new("channel-agent").definition(
- AgentDefinitionSpec::new()
- .bare_prompt("Reply briefly.")
- .tools(ToolScopeSpec::HostOnly),
- ),
- )?;
- let listener = runtime.channels().telegram(
- openhuman_embed::TelegramChannelSpec::new(token, agent.id()).allowed_users(["alice"]),
- )?;
- let mut sent = false;
- for _ in 0..200 {
- let requests = bot.received_requests().await.unwrap_or_default();
- sent = requests.iter().any(|request| {
- request.url.path().ends_with("/sendMessage")
- && serde_json::from_slice::<serde_json::Value>(&request.body).is_ok_and(|body| {
- body["chat_id"].to_string().contains("4242")
- && body["text"]
- .as_str()
- .is_some_and(|text| text.contains("hello from the stub"))
- })
- });
- if sent {
- break;
- }
- tokio::time::sleep(std::time::Duration::from_millis(50)).await;
- }
- listener.stop();
- assert!(
- sent,
- "the bound agent must send a reply to the stub Bot API"
- );
- std::env::remove_var("OPENHUMAN_TELEGRAM_BOT_API_BASE");
- println!("Telegram update answered in the correct chat");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/telegram.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The verified Telegram example uses a local Bot API stub, so the channel test does not contact Telegram. Its live mode requires explicit example credentials and remains opt-in.
-
-External messages use `ExternalChannel` origin and a read-only cap. Model-requested writes and other external effects are not parked for approval from the sender. Keep public-chat tools read-only and perform authorized side effects in host code or a separately configured job. When the bound agent is removed, channel work fails as unavailable instead of falling back to the operator. See [channel integration](../integrations/channels.md).
diff --git a/gitbooks/developing/embed/concepts/completer.md b/gitbooks/developing/embed/concepts/completer.md
deleted file mode 100644
index 5631c02fa2..0000000000
--- a/gitbooks/developing/embed/concepts/completer.md
+++ /dev/null
@@ -1,54 +0,0 @@
----
-description: "Completer sends stateless model requests without booting a Runtime or entering the agent tool loop."
----
-
-# Completer
-
-Use `Completer` for one-shot text or structured generation when you do not need an agent, its tool loop or persistent transcript. It takes an explicit route and a `CompletionRequest`; the caller supplies the model and messages for every request.
-
-A standalone completer does not claim the process runtime slot. An agent-backed completion uses the agent's effective configuration but still has no implicit durable session. Keep conversation state in your application if you need several completion calls to form a conversation.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| No runtime required for a standalone routed Completer | Optional effective agent configuration; no implicit tools or transcript |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/completer.rs#completer -->
-
-```rust
- let route = support::example_provider(&provider)?;
- let completer = openhuman_embed::Completer::new(route.route().expect("explicit route").clone());
- let response = completer
- .complete(openhuman_embed::CompletionRequest::new(
- route.model_id().expect("explicit model"),
- vec![openhuman_embed::ChatMessage::user("Say hello")],
- ))
- .await?;
- assert!(!response.text.is_empty());
- if support::offline() {
- assert_eq!(response.text, "completion reply");
- assert_eq!(support::chat_requests(&provider).await.len(), 1);
- }
- println!("{}", response.text);
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/completer.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The example checks that exactly one inference request was made and verifies the returned text. It uses a local provider fixture by default; the source contains the explicit opt-in live route path.
-
-Choose `Agent` when a model should call tools, resume a durable thread or execute with an agent's access context. Choose the structured completion helpers when the host only needs a validated data result. For routes and transport failures see [providers](providers.md) and [errors](errors.md).
-
-## Timeouts and fallback
-
-Set `CompletionRequest::timeout_ms(120_000)` to bound each physical provider HTTP request to 120 seconds. The optional field defaults to unset and is omitted from serialized requests when absent, retaining the provider's transport defaults. Each structured repair attempt receives its own physical timeout; this is not a total completion or ladder deadline.
-
-A physical timeout is an RPC transport failure, so an explicit `CompletionLadder` can try its next route. By contrast, `Completer::timeout(duration)` bounds the entire logical completion, including repair attempts, and returns terminal `DeadlineExceeded`. Cancellation also stops the ladder without fallback. You can use both bounds when the host needs separate physical and logical limits.
-
-A timed-out physical attempt has unknown reported cost. Ladder aggregate cost stays unknown, and a budgeted call keeps its conservative reservation if no authoritative usage arrived. The remaining budget may therefore refuse a fallback before it sends another request. See the [routing guide](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/ROUTING.md) for the explicit ladder API.
diff --git a/gitbooks/developing/embed/concepts/cron.md b/gitbooks/developing/embed/concepts/cron.md
deleted file mode 100644
index 4f2ee929c1..0000000000
--- a/gitbooks/developing/embed/concepts/cron.md
+++ /dev/null
@@ -1,54 +0,0 @@
----
-description: "Cron provides durable named jobs, explicit run-now execution and job history addressed to registered agents."
----
-
-# Cron
-
-The typed `Cron` facade creates named jobs with `JobSpec` and `JobSchedule`. `upsert` preserves a job's identity when the same name is configured again; `runs` exposes execution history. An agent-targeted job resolves the configured agent ID and executes with that agent's provider, prompt, tools and derived context.
-
-Background scheduling is a runtime service choice. Explicit `run_now` is useful for tests and host-triggered execution without relying on wall-clock scheduling. Keep the agent registered while scheduled work should be available.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Cron storage, scheduler service and system-job handlers | Addressed job target and the agent configuration used for its turn |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/cron.rs#cron -->
-
-```rust
- let agent = runtime.agent(AgentSpec::new("scheduled"))?;
- let cron = runtime.cron();
- let spec = openhuman_embed::JobSpec::agent(
- "daily",
- agent.id(),
- "Say hello",
- openhuman_embed::JobSchedule::Cron {
- expr: "0 0 * * *".into(),
- tz: None,
- },
- );
- let first = cron.upsert(spec.clone())?;
- assert_eq!(cron.upsert(spec)?.id, first.id);
- let run = cron.run_now("daily").await?;
- assert!(run.success, "{}", run.output);
- if support::offline() {
- assert!(run.output.contains("hello from the stub"));
- }
- assert_eq!(cron.runs("daily", 1)?[0].status, "ok");
- assert!(cron.remove("daily")?);
- assert!(cron.list()?.is_empty());
- println!("cron execution and history verified");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/cron.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The example checks stable upsert identity, executes a job immediately, inspects a successful run record, and removes the job. No test waits for a daily schedule to arrive.
-
-Removing or dropping an agent deregisters its context, leaving addressed cron jobs dormant rather than silently running them as the operator. Hosts can register runtime system-job handlers for work they own outside a model turn. Review [runtime configuration](runtime-defaults.md) and [channels](channels.md) when mixing scheduled work with public chat input.
diff --git a/gitbooks/developing/embed/concepts/errors.md b/gitbooks/developing/embed/concepts/errors.md
deleted file mode 100644
index f7bb71ddfa..0000000000
--- a/gitbooks/developing/embed/concepts/errors.md
+++ /dev/null
@@ -1,61 +0,0 @@
----
-description: "Typed errors distinguish build availability, expected domain states, host setup failures and removed agent instances."
----
-
-# Errors
-
-Match the error type at its boundary: `RuntimeError` describes boot/configuration, `AgentError` describes registration/layout, and `CoreError` describes typed facade calls and turns. A missing compiled or selected domain is `CoreError::Unavailable`; it is a capability decision the host can reflect in its UI.
-
-A structured `CoreError::Domain` carries a stable kind and `expected_user_state`. Expected stale-session or missing-resource states should be shown as notices rather than treated as internal faults. `Decode` signals a facade/domain shape mismatch; retrying unchanged input does not repair it.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Boot errors, unavailable domains and shared transport setup | Registration errors, scoped domain failures and AgentRemoved on retained handles |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/sandbox_access.rs#sandbox_access -->
-
-```rust
- let scratch = tempfile::tempdir()?;
- let marker = scratch.path().join("attempted-write");
- let attempted_write = support::tool_call_completion(
- "write_file",
- &serde_json::json!({
- "path": marker.display().to_string(), "content": "example"
- })
- .to_string(),
- );
- let read_provider = support::scripted_provider(vec![attempted_write], "write refused").await;
- let read = runtime.agent(
- AgentSpec::new("read")
- .provider(support::route(&read_provider, "fixture"))
- .action_dir(scratch.path())
- .access(openhuman_embed::Access::readonly())
- .definition(
- AgentDefinitionSpec::new().sandbox(openhuman_embed::SandboxModeSpec::ReadOnly),
- ),
- )?;
- let full = runtime.agent(AgentSpec::new("full").access(openhuman_embed::Access::full()))?;
- assert_ne!(read.config().autonomy.level, full.config().autonomy.level);
- assert!(!read.run("Write a marker").await?.reply.is_empty());
- assert!(
- !marker.exists(),
- "readonly sandbox must refuse the attempted write"
- );
- let requests = support::chat_requests(&read_provider).await;
- assert!(!support::tool_names(&requests[0]).contains(&"write_file".to_string()));
- println!("readonly sandbox refused a model-requested write");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/sandbox_access.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The example's refused write is handled as a tool result while the turn can still finish with a reply. Do not assume every rejected tool action is a failed turn. Conversely, a finished stream can contain an error; always inspect `StreamEvent::Finished`.
-
-Bearer routes refuse non-TLS remote endpoints before sending credentials. `BACKEND_UNAVAILABLE` means the embed-only host has no backend transport installed; check the host layer before rotating keys. Agent removal makes later turns on retained handles return `AgentRemoved`, even when its ID now belongs to another instance. See [troubleshooting](../troubleshooting.md) and [provider integration](../integrations/openai-compatible.md).
diff --git a/gitbooks/developing/embed/concepts/hooks-seams.md b/gitbooks/developing/embed/concepts/hooks-seams.md
deleted file mode 100644
index cbbe25c8d4..0000000000
--- a/gitbooks/developing/embed/concepts/hooks-seams.md
+++ /dev/null
@@ -1,45 +0,0 @@
----
-description: "Host seams replace infrastructure ports; hooks observe or control selected turn and tool boundaries."
----
-
-# Hooks and seams
-
-Runtime builders accept host-owned ports for storage, sessions, memory, tools and controller extensions. These are composition seams: the host supplies an implementation of the owning library's contract, while OpenHuman retains access policy, approvals and lifecycle.
-
-Post-turn and tool hooks can be registered runtime-wide or on one agent. Agent hooks compose with parent runtime hooks and do not leak into sibling contexts. Use stable hook names to replace or remove runtime registrations through the live API; changes apply to subsequent turns.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Shared port implementations and named global hook registrations | Scoped hooks and host overrides inherited by recursive child contexts |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/hooks.rs#hooks -->
-
-```rust
- let count = std::sync::Arc::new(std::sync::atomic::AtomicUsize::new(0));
- let agent = runtime.agent(
- AgentSpec::new("hooked").post_turn_hook(std::sync::Arc::new(Counter(count.clone()))),
- )?;
- let sibling = runtime.agent(AgentSpec::new("sibling"))?;
- assert!(!agent.run("Hello hook").await?.reply.is_empty());
- support::eventually("post-turn hook", || {
- (count.load(std::sync::atomic::Ordering::SeqCst) == 1).then_some(())
- })
- .await;
- assert!(!sibling.run("Hello sibling").await?.reply.is_empty());
- assert_eq!(count.load(std::sync::atomic::Ordering::SeqCst), 1);
- println!("post-turn hook isolated to its agent");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/hooks.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The example verifies that an agent-local post-turn counter observes the configured agent and not its sibling. Runtime live add/remove behavior is demonstrated in the [runtime events example](../cookbook.md#runtime-lifecycle-events-and-live-hook-registration).
-
-Removing or replacing a builder-installed named hook through the runtime API affects that registration too; the runtime tracks and restores prior process slots when its seam ownership ends. Keep hooks fast, cancellation-aware and free of sensitive logging. Use the generated [setter list](../builder-setters.md) and [API reference](../api-reference.md) for the actual port signatures.
diff --git a/gitbooks/developing/embed/concepts/mcp.md b/gitbooks/developing/embed/concepts/mcp.md
deleted file mode 100644
index 4bc0c350fd..0000000000
--- a/gitbooks/developing/embed/concepts/mcp.md
+++ /dev/null
@@ -1,74 +0,0 @@
----
-description: "MCP servers add remote tool discovery and execution to one agent, with explicit server configuration and tool allowlists."
----
-
-# MCP
-
-MCP connects a native agent turn to tools served over an MCP protocol transport. Configure a server on `AgentSpec::mcp`, with its transport, authentication and allowed tool names. Another agent on the same runtime does not inherit that server configuration.
-
-Enable the named Embed `mcp` Cargo feature for `McpServer` and the agent setter. The default core may already contain MCP code, but a core capability flag does not activate a separately gated Embed API. Runtime domain selection must also allow the MCP family.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Compiled MCP implementation and runtime domain ceiling | Server configuration, auth, discovery and allowed remote tools |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/mcp.rs#mcp -->
-
-```rust
- let mcp = wiremock::MockServer::start().await;
- wiremock::Mock::given(wiremock::matchers::method("POST"))
- .respond_with(McpStub)
- .mount(&mcp)
- .await;
- let discovery = wiremock::MockServer::start().await;
- wiremock::Mock::given(wiremock::matchers::path("/v1/chat/completions"))
- .respond_with(ForecastModel(std::sync::atomic::AtomicUsize::new(0)))
- .mount(&discovery)
- .await;
- let agent = runtime.agent(
- AgentSpec::new("mcp-client")
- .provider(support::route(&discovery, "fixture"))
- .mcp(
- openhuman_embed::McpServer::http("forecast", format!("{}/mcp", mcp.uri()))
- .allow_tools(["forecast"]),
- )
- .access(openhuman_embed::Access::full()),
- )?;
- assert_eq!(
- agent
- .run("List the forecast server tools, then call its forecast tool")
- .await?
- .reply,
- "sunny verified"
- );
- let requests = mcp.received_requests().await.expect("MCP requests");
- let methods: Vec<String> = requests
- .iter()
- .filter_map(|r| {
- serde_json::from_slice::<serde_json::Value>(&r.body).ok()?["method"]
- .as_str()
- .map(str::to_string)
- })
- .collect();
- assert!(methods.iter().any(|m| m == "initialize"), "{methods:?}");
- assert!(methods.iter().any(|m| m == "tools/list"), "{methods:?}");
- assert!(methods.iter().any(|m| m == "tools/call"), "{methods:?}");
- let requests = support::chat_requests(&discovery).await;
- assert!(support::tool_results(&requests[1]).contains("forecast"));
- assert!(support::tool_results(&requests[2]).contains("sunny"));
- println!("MCP handshake, discovery and remote execution verified");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/mcp.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The example uses a real loopback protocol stub: it verifies initialization, `tools/list`, and `tools/call`, then checks that the model saw the remote result. It does not call an external MCP service or require credentials.
-
-Tool allowlists reduce the remote catalog before model disclosure. Server authentication remains host-owned input, and remote tool side effects still pass through the relevant execution/access policy. Removing the agent evicts its MCP host after old-instance teardown, before the ID can be reused. See the [MCP integration](../integrations/mcp.md) for deployment setup.
diff --git a/gitbooks/developing/embed/concepts/memory.md b/gitbooks/developing/embed/concepts/memory.md
deleted file mode 100644
index 02ac00af99..0000000000
--- a/gitbooks/developing/embed/concepts/memory.md
+++ /dev/null
@@ -1,43 +0,0 @@
----
-description: "The typed memory facade binds a namespace before learning, retrieving or forgetting records."
----
-
-# Memory
-
-`Runtime::memory(namespace)` returns a facade bound to that namespace. The caller establishes scope before sending record data; namespace identity is not taken from model arguments or record metadata. Learning and deletion use the selected memory engine contract.
-
-A custom `memory_engine` can replace the default engine for a host or test. An agent's `MemoryBinding` configures its own memory context, while the runtime owns engine availability. Scope namespaces separately from provider/model choices: changing inference does not move a record to another tenant.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Memory engine seam and available memory domain | MemoryBinding, acting context and bound namespace |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/memory.rs#memory -->
-
-```rust
- let acme = runtime.memory("team:acme")?;
- let other = runtime.memory("team:other")?;
- let params = serde_json::from_value(serde_json::json!({"text":"Acme ships on Fridays"}))?;
- let learned = acme.learn(params).await?;
- let hits = acme.get(vec![learned.id.clone()]).await?;
- assert_eq!(hits.len(), 1);
- assert_eq!(hits[0].meta.namespace.to_string(), "team:acme");
- assert!(other.get(vec![learned.id.clone()]).await?.is_empty());
- assert_eq!(other.forget(vec![learned.id.clone()]).await?.forgotten, 0);
- assert_eq!(acme.forget(vec![learned.id]).await?.forgotten, 1);
- println!("memory learning, tenant isolation and deletion verified");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/memory.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The example uses the reference in-memory engine and proves that another namespace cannot retrieve or forget the first namespace's record. Forgetting succeeds only through the owning namespace. This is a scope test, not a persistence claim; choose a durable engine/backend for application state that must survive restarts.
-
-Background conversation ingestion can run independently of a completed turn. Tests should disable unrelated learning/ingest activity when asserting ephemeral-workspace cleanup. See [runtime defaults](runtime-defaults.md), [storage drivers](../integrations/storage-drivers.md), and the [memory architecture](../../architecture/memory.md).
diff --git a/gitbooks/developing/embed/concepts/observability.md b/gitbooks/developing/embed/concepts/observability.md
deleted file mode 100644
index 26c78c0d28..0000000000
--- a/gitbooks/developing/embed/concepts/observability.md
+++ /dev/null
@@ -1,73 +0,0 @@
----
-description: "Runtime metadata events track lifecycle and approvals; turn streams carry per-turn progress and the final result."
----
-
-# Observability
-
-Subscribe with `Runtime::events` before starting work you want to observe. Each event has a sequence number and runtime identity, with an agent ID and per-call turn ID where applicable. Repeated calls on the same durable session receive different turn IDs; the session ID is not the observation ID.
-
-Runtime events contain lifecycle metadata, not user prompts or model output. Detailed text/tool progress belongs to the explicitly requested turn stream. A bounded event receiver reports lag explicitly rather than silently claiming that it delivered every event.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Runtime sequence, content-safe lifecycle feed and registered-agent filter | Per-call turn correlation and opt-in text/tool progress stream |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/runtime_events.rs#runtime_events -->
-
-```rust
- let mut events = runtime.events();
- let count = Arc::new(AtomicUsize::new(0));
- runtime.post_turn_hook("live-counter", Some(Arc::new(Counter(count.clone()))));
- let agent = runtime.agent(AgentSpec::new("observed"))?;
- assert_eq!(agent.run("private payload one").await?.reply, "event reply");
- support::eventually("runtime hook", || {
- (count.load(Ordering::SeqCst) == 1).then_some(())
- })
- .await;
- runtime.post_turn_hook("live-counter", None);
- assert_eq!(agent.run("private payload two").await?.reply, "event reply");
- assert_eq!(
- count.load(Ordering::SeqCst),
- 1,
- "removed hook stops observing turns"
- );
- runtime.remove_agent(agent.id()).await?;
- let mut previous = 0;
- let (mut added, mut started, mut ended) = (0, 0, 0);
- loop {
- let event =
- tokio::time::timeout(std::time::Duration::from_secs(5), events.recv()).await??;
- assert!(event.sequence > previous);
- previous = event.sequence;
- assert_eq!(event.agent_id.as_deref(), Some("observed"));
- assert!(!serde_json::to_string(&event)?.contains("private payload"));
- match event.kind {
- RuntimeEventKind::AgentAdded => added += 1,
- RuntimeEventKind::TurnStarted => {
- assert!(event.turn_id.is_some());
- started += 1;
- }
- RuntimeEventKind::TurnEnded { success } => {
- assert!(success);
- ended += 1;
- }
- RuntimeEventKind::AgentRemoved => break,
- _ => {}
- }
- }
- assert_eq!((added, started, ended), (1, 2, 2));
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/runtime_events.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The example checks ordered add/start/end/remove events and confirms that private prompt text is absent from serialized metadata. Approval events are filtered to agents registered on this runtime. Correlation follows the effective origin thread; a request's later decision keeps its original turn correlation after the turn has ended.
-
-When simultaneous turns share an origin thread, approval correlation can be ambiguous and its turn ID is absent rather than guessed. Handle receiver lag by refreshing state, and do not send text from `AgentProgress` to content-free analytics. See [turns and sessions](turns-sessions.md), [approvals](access-approvals.md), and [testing](testing.md).
diff --git a/gitbooks/developing/embed/concepts/profiles-saas.md b/gitbooks/developing/embed/concepts/profiles-saas.md
deleted file mode 100644
index 7c1e8ef868..0000000000
--- a/gitbooks/developing/embed/concepts/profiles-saas.md
+++ /dev/null
@@ -1,61 +0,0 @@
----
-description: "ProfileRuntime isolates authenticated users by workspace, credentials, conversations and event streams."
----
-
-# Profiles and SaaS
-
-Ordinary runtime agents share an operator's configuration path and credentials. Use `ProfileRuntime` when one server serves different authenticated users who must not share those resources. Provision a profile, install its credential, and retain a `ProfileHandle` while serving that user's requests.
-
-Profile mode claims the process separately from ordinary `Runtime` and `Harness`. Its root must satisfy the boot guard: absolute, existing, outside the operator's workspace and not world-writable. Remove single-user workspace/token environment variables before booting a profile server.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| One profile host, shared compiled core and managed backend transport | Per-profile credential, workspace, threads, memory and event access |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/profiles.rs#profiles -->
-
-```rust
- let profiles = openhuman_embed::ProfileRuntime::build(config).await?;
- let mut handles = Vec::new();
- for (user, text) in [("alice", "Alice private note"), ("bob", "Bob private note")] {
- let profile = profiles.provision(user).await?;
- profiles
- .set_credential(
- &profile.profile_id,
- openhuman_embed::profiles::ProfileCredentialKind::ApiKey,
- &format!("{user}-fixture"),
- )
- .await?;
- let handle = profiles.open(user).await?;
- let reply = handle.chat("shared-thread", text).await?;
- assert!(reply.text.contains(text), "{}", reply.text);
- handles.push(handle);
- }
- assert_ne!(handles[0].workspace_dir(), handles[1].workspace_dir());
- for (index, own, other) in [
- (0, "Alice private note", "Bob private note"),
- (1, "Bob private note", "Alice private note"),
- ] {
- let messages = handles[index].messages("shared-thread").await?;
- let text = serde_json::to_string(&messages)?;
- assert!(text.contains(own));
- assert!(!text.contains(other));
- }
- drop(handles);
- profiles.shutdown().await;
- println!("two profiles keep same-thread conversations separate");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/profiles.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The example creates Alice and Bob with the same thread name and verifies that each transcript contains only its own note. Handles keep their profiles open; release/idle eviction can close a profile only after those handles are dropped.
-
-Production managed calls need the TinyHumans transport installed by the host layer. `ProfileHandle::call` exposes the reviewed user surface rather than arbitrary operator controllers. Profiles do not make a shared file-system action directory safe automatically; provision external application resources per user too. See [SaaS deployment guide](../guides/saas-multi-tenant.md) and [SaaS architecture](../../saas-profiles.md).
diff --git a/gitbooks/developing/embed/concepts/providers.md b/gitbooks/developing/embed/concepts/providers.md
deleted file mode 100644
index d04e5f74de..0000000000
--- a/gitbooks/developing/embed/concepts/providers.md
+++ /dev/null
@@ -1,80 +0,0 @@
----
-description: "A provider supplies a route or native ChatModel implementation, with agent overrides and optional ordered fallback."
----
-
-# Providers
-
-A runtime provider is the default inference choice for its agents. An agent can override it with an OpenAI-compatible route or a native `ChatModel<()>` through `Provider::custom`. The `providers` facade exposes the request/response contracts so custom adapters do not need to implement an HTTP server.
-
-Named workload roles bind an adapter to selections such as `hint:coding`. The example proves that the role-pinned model bypasses the primary fallback chain. These pins are explicit host configuration; they do not ask the model to decide its own provider.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Default route/model and native adapter chain | Provider override, model selection and workload hint |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/custom_provider.rs#custom_provider -->
-
-```rust
- let provider = Provider::custom_with_fallback(
- Arc::new(LocalModel {
- reply: None,
- calls: failed.clone(),
- }),
- vec![Arc::new(LocalModel {
- reply: Some("fallback answer"),
- calls: fallback.clone(),
- })],
- )
- .model("local-custom")
- .role(
- "coding",
- Arc::new(LocalModel {
- reply: Some("coding answer"),
- calls: pinned.clone(),
- }),
- );
- let runtime = Runtime::builder()
- .config(support::offline_config())
- .backend_url(backend.uri())
- .provider(provider)
- .build()
- .await?;
- let definition = || {
- AgentDefinitionSpec::new()
- .bare_prompt("Reply briefly")
- .tools(ToolScopeSpec::HostOnly)
- };
- let regular = runtime.agent(AgentSpec::new("fallback-agent").definition(definition()))?;
- assert_eq!(regular.run("Hello").await?.reply, "fallback answer");
- assert_eq!(failed.load(Ordering::SeqCst), 1);
- assert_eq!(fallback.load(Ordering::SeqCst), 1);
- let coding = runtime.agent(
- AgentSpec::new("coding-agent")
- .model("hint:coding")
- .definition(definition()),
- )?;
- assert_eq!(
- coding.run("Explain a function").await?.reply,
- "coding answer"
- );
- assert_eq!(pinned.load(Ordering::SeqCst), 1);
- assert_eq!(
- failed.load(Ordering::SeqCst),
- 1,
- "coding bypasses the primary chain"
- );
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/custom_provider.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-Ordered fallback advances only on eligible provider failures before visible output. Validation or unsupported-input failures stop the chain. Once text, reasoning or tool-call content becomes visible, the chosen stream keeps its identity and a later failure is reported without switching providers. Requests, options, correlation metadata and cancellation remain attached to the selected adapter.
-
-Use HTTPS when sending bearer credentials; loopback HTTP is supported for local test/model servers. Managed inference needs the TinyHumans host transport and a runtime credential. See [OpenAI-compatible integration](../integrations/openai-compatible.md), [managed integration](../integrations/tinyhumans-managed.md), and [local models](../integrations/local-models.md).
diff --git a/gitbooks/developing/embed/concepts/runtime-defaults.md b/gitbooks/developing/embed/concepts/runtime-defaults.md
deleted file mode 100644
index e4963ab670..0000000000
--- a/gitbooks/developing/embed/concepts/runtime-defaults.md
+++ /dev/null
@@ -1,62 +0,0 @@
----
-description: "Runtime defaults form the starting point for newly registered agents; explicit agent settings override them."
----
-
-# Runtime defaults
-
-The runtime's default provider, access policy and `ModelDefaults` reduce repeated setup. `AgentSpec` can override those defaults for an analyst, a writing agent or another workload without changing its siblings. Temperature and token limits are forwarded to the selected native model request, rather than being merely descriptive builder values.
-
-`Runtime::defaults()` returns a snapshot. Runtime default setters affect agents created afterward; existing agents retain the configuration they were built with. Configure an explicit agent override when its behavior must remain independent of future runtime defaults.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Default provider, access and generation settings | Explicit override captured when AgentSpec is registered |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/defaults_overrides.rs#defaults_overrides -->
-
-```rust
- let inherited = runtime.agent(AgentSpec::new("inherited"))?;
- let override_provider = support::provider("override reply").await;
- let overridden = runtime.agent(
- AgentSpec::new("overridden")
- .provider(support::route(&override_provider, "override-model"))
- .access(openhuman_embed::Access::readonly())
- .model_defaults(openhuman_embed::ModelDefaults {
- temperature: Some(0.8),
- max_tokens: Some(128),
- ..Default::default()
- }),
- )?;
- let inherited_reply = inherited.run("Hello default").await?;
- let overridden_reply = overridden.run("Hello override").await?;
- if support::offline() {
- assert_eq!(inherited_reply.reply, "hello from the stub");
- let requests = support::chat_requests(&provider).await;
- let body: serde_json::Value = serde_json::from_slice(&requests[0].body)?;
- assert_eq!(body["model"], "fixture");
- assert_eq!(body["temperature"], 0.4);
- assert_eq!(body["max_tokens"], 256);
- }
- assert_eq!(overridden_reply.reply, "override reply");
- let requests = support::chat_requests(&override_provider).await;
- let body: serde_json::Value = serde_json::from_slice(&requests[0].body)?;
- assert_eq!(body["model"], "override-model");
- assert_eq!(body["temperature"], 0.8);
- assert_eq!(body["max_tokens"], 128);
- assert_eq!(runtime.defaults().model.temperature, Some(0.4));
- println!("default and override routes answered independently");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/defaults_overrides.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The example checks the request bodies actually received by both providers, including model, temperature and maximum tokens. This distinction matters when testing a configuration change: a correct defaults snapshot alone does not prove that inference received those values.
-
-Use the generated [builder setters](../builder-setters.md) for the current knob list. [Configuration and installation](../installation.md) explain runtime configuration discovery; [providers](providers.md) cover route selection and native models.
diff --git a/gitbooks/developing/embed/concepts/runtime.md b/gitbooks/developing/embed/concepts/runtime.md
deleted file mode 100644
index 2270f91ceb..0000000000
--- a/gitbooks/developing/embed/concepts/runtime.md
+++ /dev/null
@@ -1,40 +0,0 @@
----
-description: "A Runtime owns one initialized core and the process-wide resources that its agents share."
----
-
-# Runtime
-
-A `Runtime` boots the in-process core once. It owns the selected domains, background services, module host and runtime defaults. Its agents share that core while using separately derived contexts. Build one runtime and pass an `Arc<Runtime>` to the parts of your application that register agents.
-
-The process guard rejects a second runtime with `RuntimeError::AlreadyRunning`. Independent customer credentials and workspaces require [profiles](profiles-saas.md), rather than several ordinary runtimes. `Harness` is the one-agent shorthand and exposes its underlying runtime and agent if you later need more agents.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Cargo gates and selected domains/services | Provider, prompt, working folder and tool scope |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/capability_report.rs#capability_report -->
-
-```rust
- let info = runtime.capabilities();
- assert_eq!(info.schema_version, 1);
- assert!(info.defaults.routed_provider);
- let serialized = serde_json::to_string(&info)?;
- assert!(!serialized.contains("sk-test"));
- assert!(!serialized.contains(&provider.uri()));
- assert!(!serialized.contains(&runtime.workspace_dir().display().to_string()));
- println!("{}", serde_json::to_string_pretty(&info)?);
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/capability_report.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-`RuntimeBuilder::describe()` reports a plan before boot; `Runtime::capabilities()` reports resolved configuration afterward. The versioned metadata excludes credentials, endpoints, prompts and workspace paths. Use its `configuration_resolved` flag when deciding whether to treat an inspection result as effective configuration.
-
-Dropping the runtime handle does not tear down the core while an agent still holds it. Drop listeners, agents and the runtime before restarting the host in the same process. See [architecture](../architecture.md), [defaults](runtime-defaults.md), and the generated [builder setters](../builder-setters.md).
diff --git a/gitbooks/developing/embed/concepts/skills.md b/gitbooks/developing/embed/concepts/skills.md
deleted file mode 100644
index a40cf6e558..0000000000
--- a/gitbooks/developing/embed/concepts/skills.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-description: "Skills are copied bundles of instructions and resources discovered inside an agent\u2019s own home."
----
-
-# Skills
-
-A skill bundle contains `SKILL.md` plus any referenced resources. `AgentSpec::skills_dir` copies bundles into the agent's `agents/<id>/skills/` tree. Copying is intentional: discovery rejects symlinked bundles, so linking a shared directory does not install it.
-
-Enable the named Embed `skills` feature for skill setters and registry access. Library agents hide the operator's user skill directory unless `include_user_skills(true)` is explicitly selected. Treat skill installation as part of the agent's configuration, rather than reading arbitrary operator files into every tenant.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Skill registry seam and default user-skill policy | Copied bundles, discovery context and explicit user-skill opt-in |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/skills.rs#skills -->
-
-```rust
- let skills = tempfile::tempdir()?;
- std::fs::create_dir(skills.path().join("summarize"))?;
- std::fs::write(skills.path().join("summarize/SKILL.md"),
- "---\nname: summarize\ndescription: Summarize documents clearly.\n---\nInclude the main points.\n")?;
- let agent = runtime.agent(AgentSpec::new("skilled").skills_dir(skills.path()))?;
- let copied = agent
- .workspace_dir()
- .join("agents/skilled/skills/summarize/SKILL.md");
- assert_eq!(
- std::fs::read_to_string(&copied)?,
- std::fs::read_to_string(skills.path().join("summarize/SKILL.md"))?
- );
- assert!(!std::fs::symlink_metadata(copied)?.file_type().is_symlink());
- assert!(!agent.run("Hello").await?.reply.is_empty());
- println!("skill bundle copied without symlinks");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/skills.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The example writes a bundle, registers an agent, checks the copied contents and verifies that the destination is not a symlink. Use the same directory layout for production bundles; do not depend on the fixture's temporary directory lifetime.
-
-A resumed session's prompt is frozen, so adding or editing a bundle does not rewrite an existing conversation's recorded prefix. Start a new session when you want updated instructions to become visible. See [turns and sessions](turns-sessions.md) and the generated [builder setters](../builder-setters.md) for runtime policy knobs.
diff --git a/gitbooks/developing/embed/concepts/testing.md b/gitbooks/developing/embed/concepts/testing.md
deleted file mode 100644
index 883138743b..0000000000
--- a/gitbooks/developing/embed/concepts/testing.md
+++ /dev/null
@@ -1,80 +0,0 @@
----
-description: "Deterministic local providers and explicit observations prove behavior without contacting real inference or backend services."
----
-
-# Testing
-
-The runnable examples default to loopback fixtures. They assert request bodies, tool results, file effects, transcript scope and event ordering; a successful Rust compilation alone does not prove those behaviors. Live example execution is explicitly opt-in through the documented environment variables.
-
-A native `ChatModel<()>` stub is useful for provider selection and cancellation tests without HTTP. Protocol-level stubs remain useful for OpenAI-compatible routing, MCP or messaging transport behavior. Pick the boundary whose behavior your host needs to verify.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Offline configuration, mock backend and injected model/engine ports | Isolated temp action directories, deterministic IDs and scoped assertions |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/custom_provider.rs#custom_provider -->
-
-```rust
- let provider = Provider::custom_with_fallback(
- Arc::new(LocalModel {
- reply: None,
- calls: failed.clone(),
- }),
- vec![Arc::new(LocalModel {
- reply: Some("fallback answer"),
- calls: fallback.clone(),
- })],
- )
- .model("local-custom")
- .role(
- "coding",
- Arc::new(LocalModel {
- reply: Some("coding answer"),
- calls: pinned.clone(),
- }),
- );
- let runtime = Runtime::builder()
- .config(support::offline_config())
- .backend_url(backend.uri())
- .provider(provider)
- .build()
- .await?;
- let definition = || {
- AgentDefinitionSpec::new()
- .bare_prompt("Reply briefly")
- .tools(ToolScopeSpec::HostOnly)
- };
- let regular = runtime.agent(AgentSpec::new("fallback-agent").definition(definition()))?;
- assert_eq!(regular.run("Hello").await?.reply, "fallback answer");
- assert_eq!(failed.load(Ordering::SeqCst), 1);
- assert_eq!(fallback.load(Ordering::SeqCst), 1);
- let coding = runtime.agent(
- AgentSpec::new("coding-agent")
- .model("hint:coding")
- .definition(definition()),
- )?;
- assert_eq!(
- coding.run("Explain a function").await?.reply,
- "coding answer"
- );
- assert_eq!(pinned.load(Ordering::SeqCst), 1);
- assert_eq!(
- failed.load(Ordering::SeqCst),
- 1,
- "coding bypasses the primary chain"
- );
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/custom_provider.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-Run the offline example suite with `node scripts/run-embed-examples.mjs`; it clears inherited credentials/workspaces and uses one union feature graph for all examples. Run embed unit/integration tests with `cargo test -p openhuman-embed --features mcp,skills,channels,storage-sqlite --lib --tests -- --test-threads=1`.
-
-Build your Tokio workers with the documented large stack constants for nested agent turns. Use channels, cancellation guards and bounded waits to prove lifecycle transitions instead of sleeps. The [mock-backend guide](../guides/mock-backend-testing.md) covers host fixtures, and [troubleshooting](../troubleshooting.md) distinguishes compile gates from runtime availability.
diff --git a/gitbooks/developing/embed/concepts/tools.md b/gitbooks/developing/embed/concepts/tools.md
deleted file mode 100644
index e84840f7ac..0000000000
--- a/gitbooks/developing/embed/concepts/tools.md
+++ /dev/null
@@ -1,61 +0,0 @@
----
-description: "Tool catalogs expose only the allowed execution surface; host tools use the same native Tool contract as built-in tools."
----
-
-# Tools
-
-An agent's `ToolScopeSpec` chooses built-ins, named tools or `HostOnly`. Host-only mode starts with the host's advertised tools, requires an explicit bare prompt, and does not inherit an orchestrator tool catalog. This is useful when your application already owns read-only data access or tightly scoped actions.
-
-`AgentSpec::tools` is a per-turn factory returning `HostTurnTools`. Factories can attach the turn's context to their executors without sharing mutable tool state across unrelated sessions. Import `Tool`, `ToolResult` and `ToolPolicy` from `openhuman_embed` so their types match the vendored implementation used by the core.
-
-Declare a host executor's requirements with `Tool::policy`, for example `ToolPolicy::read_only()`. The host implements application-specific tools and owns their authorization, data boundaries and output handling; Embed supplies the generic execution contract.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Domain/tool-group ceiling and shared execution policy | ToolScopeSpec, advertised host belt, attachments and prompt |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/host_tools.rs#host_tools -->
-
-```rust
- let calls = std::sync::Arc::new(std::sync::atomic::AtomicUsize::new(0));
- let recorded_calls = calls.clone();
- let tool_provider = support::scripted_provider(
- vec![support::tool_call_completion("host_ping", "{}")],
- "pong complete",
- )
- .await;
- let agent = runtime.agent(
- AgentSpec::new("host-tools")
- .provider(support::route(&tool_provider, "fixture"))
- .definition(
- AgentDefinitionSpec::new()
- .bare_prompt("Use host_ping")
- .tools(ToolScopeSpec::HostOnly),
- )
- .tools(move |_| {
- openhuman_embed::HostTurnTools::advertised(vec![Box::new(Ping(
- recorded_calls.clone(),
- ))])
- }),
- )?;
- assert_eq!(agent.run("Ping").await?.reply, "pong complete");
- assert_eq!(calls.load(std::sync::atomic::Ordering::SeqCst), 1);
- let requests = support::chat_requests(&tool_provider).await;
- assert_eq!(support::tool_names(&requests[0]), vec!["host_ping"]);
- assert!(support::tool_results(&requests[1]).contains("pong"));
- println!("host_ping executed once; only host tools advertised");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/host_tools.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Behavior to account for
-
-The example drives an actual host tool call and inspects the provider's advertised catalog: it contains only `host_ping`, which executes exactly once. A host executor remains responsible for authorizing its own application operations. Catalog visibility narrows what the model sees; it is not a substitute for permission checks or sandboxing.
-
-Runtime tool hooks apply across agents; local hooks observe only their configured agent. Tool attachments can be added and removed for later turns, while existing durable sessions retain recorded declarations. See [hooks](hooks-seams.md), [MCP](mcp.md), and [access and approvals](access-approvals.md).
diff --git a/gitbooks/developing/embed/concepts/turns-sessions.md b/gitbooks/developing/embed/concepts/turns-sessions.md
deleted file mode 100644
index 1f6d5c7c0d..0000000000
--- a/gitbooks/developing/embed/concepts/turns-sessions.md
+++ /dev/null
@@ -1,71 +0,0 @@
----
-description: "A turn is one native model/tool loop; a session is the durable identity that makes subsequent turns a conversation."
----
-
-# Turns and sessions
-
-`Agent::run` collects a turn. `Agent::turn` lets you set an explicit session, per-turn options, progress sink and cancellation before sending. Reuse the returned session identity for follow-up messages that should see the same transcript. Two calls on the same durable session remain distinct turn executions and receive distinct observation IDs.
-
-`Agent::stream` returns a bounded `TurnStream`. Drain it while the turn is running: progress includes visible deltas and tool lifecycle notifications, followed by one `StreamEvent::Finished` containing the typed final result. Dropping the stream cancels its turn and recursive child work cooperatively.
-
-## Runtime and agent scope
-
-| Runtime responsibility | Agent or call responsibility |
-| --- | --- |
-| Session store provider and shared progress/event infrastructure | Durable agent/thread identity, transcript and per-call cancellation |
-
-## Verified example
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/streaming.rs#streaming -->
-
-```rust
- let agent = runtime.agent(AgentSpec::new("streamer"))?;
- let mut stream = agent.stream("Hello streaming");
- let mut count = 0;
- let mut deltas = String::new();
- let mut finished = None;
- while let Some(event) = stream.recv().await {
- match event {
- openhuman_embed::StreamEvent::Progress(progress) => {
- println!("{progress:?}");
- if let openhuman_embed::AgentProgress::TextDelta { delta, .. } = progress {
- assert!(finished.is_none(), "text deltas precede Finished");
- deltas.push_str(&delta);
- }
- count += 1;
- }
- openhuman_embed::StreamEvent::Finished(result) => finished = Some(result?),
- }
- }
- let outcome = finished.expect("stream ends with an outcome");
- assert!(!outcome.reply.is_empty());
- assert!(
- !deltas.is_empty(),
- "stream must publish visible text before Finished"
- );
- assert_eq!(deltas, outcome.reply);
- if support::offline() {
- let regular = agent.run("Hello streaming").await?;
- assert_eq!(
- outcome.reply, regular.reply,
- "streaming and collected turns agree"
- );
- }
- println!("progress events: {count}");
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/streaming.rs). The full file includes imports, runtime setup and local fixtures used by this excerpt.
-
-## Attaching files
-
-A host that already holds a file's bytes (an inbound photo from a channel webhook, an upload) attaches it with `Turn::attach(HostAttachment::new(bytes, mime).named(name))`, or several at once with `Turn::attachments`. Each file is staged into the agent's acting workspace and reaches the model ahead of the message: `image/*` as an image block, anything else as a document block. A model that cannot take a file natively gets the core's fallback instead (extracted text for PDF and Office documents, a vision readout for images, metadata otherwise). The `[multimodal]` and `[multimodal_files]` count and size limits apply, and a turn over them fails before any model call. Blank or `application/octet-stream` types are sniffed from the name and bytes.
-
-No local path is read, so attachments are accepted whatever the turn's origin, including external-channel turns whose `[IMAGE:…]`/`[FILE:…]` text markers are refused. Only a runtime-owned `Agent` carries them: a turn on a caller-built runtime's orchestrator (`Core::agent`) is refused with `attachments_unsupported` rather than run without its files, because `inference.agent_chat` carries only a string.
-
-## Behavior to account for
-
-The stream example checks that deltas precede the final result and that collected and streaming replies agree. A cancellation token passed to a turn is preserved by streaming; cancellation unblocks forwarding even when the consumer has stopped draining a full buffer.
-
-The harness derives transcript paths from the thread and agent IDs without a timestamp. Resumed sessions reuse their recorded system prompt and tool declarations; edits to prompts, skills or integrations apply to new sessions. Compaction seals a generation and opens a child instead of erasing history. See [observability](observability.md) for session IDs versus per-call turn IDs, and [API reference](../api-reference.md) for the session-store port.
diff --git a/gitbooks/developing/embed/cookbook.md b/gitbooks/developing/embed/cookbook.md
deleted file mode 100644
index ddfd086037..0000000000
--- a/gitbooks/developing/embed/cookbook.md
+++ /dev/null
@@ -1,189 +0,0 @@
-# Cookbook
-
-<!-- Generated by scripts/generate-embed-docs.mjs; do not edit. -->
-
-Executable recipes are indexed from their source headers. Each entry records the declared run mode and any named Embed feature required by the example. Full source includes the surrounding setup and assertions.
-
-## Polling and callback approvals with cancellation
-
-Allow and deny real parked writes, then cancel an in-flight callback without losing its pending request.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/approvals.rs) · offline with loopback stubs; no live path.
-
-Run: `cargo run -p openhuman-embed --example approvals`
-
-## Stable capability metadata before and after boot
-
-Stable capability metadata before and after boot.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/capability_report.rs) · offline with loopback stubs; no live path.
-
-Run: `cargo run -p openhuman-embed --example capability_report`
-
-## Stateless completion without booting an agent runtime
-
-Stateless completion without booting an agent runtime.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/completer.rs) · offline; optional live via OPENHUMAN_EXAMPLE_LIVE=1 and BASE_URL/API_KEY/MODEL.
-
-Run: `cargo run -p openhuman-embed --example completer`
-
-## Run and inspect an agent cron job
-
-Run and inspect an agent cron job.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/cron.rs) · offline; optional live via OPENHUMAN_EXAMPLE_LIVE=1 and BASE_URL/API_KEY/MODEL.
-
-Run: `cargo run -p openhuman-embed --example cron`
-
-## Native custom providers, fallback and workload role pins
-
-Inject deterministic native models and prove fallback and role selection without inference HTTP.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/custom_provider.rs) · offline; no live inference path.
-
-Run: `cargo run -p openhuman-embed --example custom_provider`
-
-## Runtime defaults and per-agent overrides
-
-Runtime defaults and per-agent overrides.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/defaults_overrides.rs) · offline; optional live via OPENHUMAN_EXAMPLE_LIVE=1 and BASE_URL/API_KEY/MODEL.
-
-Run: `cargo run -p openhuman-embed --example defaults_overrides`
-
-## A per-agent post-turn hook observes completed turns
-
-A per-agent post-turn hook observes completed turns.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/hooks.rs) · offline; optional live via OPENHUMAN_EXAMPLE_LIVE=1 and BASE_URL/API_KEY/MODEL.
-
-Run: `cargo run -p openhuman-embed --example hooks`
-
-## Host tools and HostOnly keep the advertised tool catalog exact
-
-Host tools and HostOnly keep the advertised tool catalog exact.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/host_tools.rs) · offline with loopback stubs; no live path.
-
-Run: `cargo run -p openhuman-embed --example host_tools`
-
-## Lean runtime without background services
-
-Lean runtime without background services.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/lean_headless.rs) · offline with loopback stubs; optional live via OPENHUMAN_EXAMPLE_LIVE.
-
-Run: `cargo run -p openhuman-embed --example lean_headless`
-
-## Linux agent fleet memory and latency
-
-Measure retained runtime-owned agents using loopback inference and two worker threads.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/linux_fleet.rs) · offline on Linux; use a fresh constrained cgroup for release measurements.
-
-Run: `cargo run -p openhuman-embed --release --example linux_fleet --no-default-features`
-
-## Connect an actual MCP protocol stub over loopback
-
-Connect an actual MCP protocol stub over loopback.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/mcp.rs) · offline with loopback stubs; no live path. · feature: mcp
-
-Run: `cargo run -p openhuman-embed --example mcp --features mcp`
-
-## Tenant scoped memory facade with an in-memory engine
-
-Tenant scoped memory facade with an in-memory engine.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/memory.rs) · offline with loopback stubs; no live path.
-
-Run: `cargo run -p openhuman-embed --example memory`
-
-## SaaS profiles isolate conversation history
-
-SaaS profiles isolate conversation history.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/profiles.rs) · offline with loopback stubs; no live path. · feature: channels
-
-Run: `cargo run -p openhuman-embed --example profiles --features channels`
-
-## Hello agent: a prompt in and a reply out
-
-Hello agent: a prompt in and a reply out.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/run_turn.rs) · offline; optional live via OPENHUMAN_EXAMPLE_LIVE=1 and BASE_URL/API_KEY/MODEL.
-
-Run: `cargo run -p openhuman-embed --example run_turn`
-
-## Runtime lifecycle events and live hook registration
-
-Observe ordered metadata and add/remove a runtime-wide hook while agents keep running.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/runtime_events.rs) · offline with a loopback provider; no live path.
-
-Run: `cargo run -p openhuman-embed --example runtime_events`
-
-## Access tiers and explicit sandbox choices
-
-Access tiers and explicit sandbox choices.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/sandbox_access.rs) · offline with loopback stubs; no live path.
-
-Run: `cargo run -p openhuman-embed --example sandbox_access`
-
-## Embed an agent behind a host-owned HTTP server
-
-Embed an agent behind a host-owned HTTP server.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/server.rs) · offline; optional live via OPENHUMAN_EXAMPLE_LIVE=1 and BASE_URL/API_KEY/MODEL.
-
-Run: `cargo run -p openhuman-embed --example server`
-
-## Copy a skill bundle into its agent workspace
-
-Copy a skill bundle into its agent workspace.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/skills.rs) · offline; optional live via OPENHUMAN_EXAMPLE_LIVE=1 and BASE_URL/API_KEY/MODEL. · feature: skills
-
-Run: `cargo run -p openhuman-embed --example skills --features skills`
-
-## SQLite writes and MongoDB configuration through Embed
-
-Open a real local SQLite backend and describe a MongoDB deployment without connecting.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/storage.rs) · offline; optional live MongoDB with OPENHUMAN_EXAMPLE_MONGODB_URL and storage-mongodb. · feature: storage-sqlite
-
-Run: `cargo run -p openhuman-embed --example storage --features storage-sqlite`
-
-## Streaming progress with a draining receiver
-
-Streaming progress with a draining receiver.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/streaming.rs) · offline; optional live via OPENHUMAN_EXAMPLE_LIVE=1 and BASE_URL/API_KEY/MODEL.
-
-Run: `cargo run -p openhuman-embed --example streaming`
-
-## Structured output parsed and checked against the request
-
-Structured output parsed and checked against the request.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/structured_output.rs) · offline with loopback stubs; no live path.
-
-Run: `cargo run -p openhuman-embed --example structured_output`
-
-## Telegram channel answered by its bound agent via a local Bot API
-
-Telegram channel answered by its bound agent via a local Bot API.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/telegram.rs) · offline with loopback stubs; no live path. · feature: channels
-
-Run: `cargo run -p openhuman-embed --example telegram --features channels`
-
-## Two agents with independent prompts and working folders
-
-Two agents with independent prompts and working folders.
-
-[Source](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/two_agents.rs) · offline; optional live via OPENHUMAN_EXAMPLE_LIVE=1 and BASE_URL/API_KEY/MODEL.
-
-Run: `cargo run -p openhuman-embed --example two_agents`
diff --git a/gitbooks/developing/embed/faq.md b/gitbooks/developing/embed/faq.md
deleted file mode 100644
index ec7e19cf55..0000000000
--- a/gitbooks/developing/embed/faq.md
+++ /dev/null
@@ -1,41 +0,0 @@
----
-description: "Answers to common host, lifecycle, feature and provider choices."
----
-
-# Embedding FAQ
-
-## Can I create more than one runtime?
-
-An ordinary embed process supports one `Runtime`; a second build returns `AlreadyRunning`. Add agents to the existing runtime. A multi-user host uses `ProfileRuntime` instead and needs a process dedicated to that mode. See [runtime](concepts/runtime.md) and [profiles](concepts/profiles-saas.md).
-
-## Is an agent clone an independent agent?
-
-No. It is another handle to the same agent instance, context and state. Register a different `AgentSpec` ID for a separate agent. Runtime credentials are still shared, so agent IDs alone do not isolate authenticated customers.
-
-## Does lean mean fewer dependencies?
-
-`RuntimeBuilder::lean()` selects a smaller runtime surface. Cargo still compiles enabled gates; use `--no-default-features` and explicit named gates for graph reduction. The [compiled matrix](capability-matrix.md) reports one fixed default build, and the [lean guide](guides/lean-headless.md) separates those controls.
-
-## Why do MCP or skills methods disappear while the report says they are compiled?
-
-The report describes core Cargo gates. Named Embed gates control facade exports too. Enable Embed's `mcp` or `skills` feature for their setters/re-exports, even when core defaults already compile the implementation. `channels` is named in Embed defaults.
-
-## Can I supply an in-process model without HTTP?
-
-Yes: `Provider::custom` takes the native `ChatModel<()>` contract. A provider can add an ordered fallback chain and explicit workload role pins. [Providers](concepts/providers.md) describes the rule that fallback stops after visible output.
-
-## Do I need the backend for every agent turn?
-
-An explicit BYOK/local/native provider can run independently of hosted inference. Hosted integrations, voice, billing or other backend surfaces need an installed backend transport and a credential. Use the [TinyHumans layer](integrations/tinyhumans-managed.md) for managed calls; Embed alone reports backend unavailable.
-
-## Can an old handle control a replacement with the same ID?
-
-No. Removal binds cancellation, callbacks and polling handles to the original lifecycle. It keeps the ID reserved until teardown/purge completes; later old handles cannot decide replacement approvals or send replacement turns. Dropping a handle does not purge its persisted home.
-
-## Why did a prompt or tool change not affect a resumed thread?
-
-A resumed session reuses recorded system messages and tool declarations. Start a new session for the changed prompt/tool catalog. Compaction preserves prior generations; it does not rewrite the old conversation. See [turns and sessions](concepts/turns-sessions.md).
-
-## Where is the complete builder knob list?
-
-[RuntimeBuilder setters](builder-setters.md) is generated from actual consuming public setters, with source signatures. Host/weight presets and non-setter methods are intentionally documented through [API reference](api-reference.md).
diff --git a/gitbooks/developing/embed/guides/README.md b/gitbooks/developing/embed/guides/README.md
deleted file mode 100644
index b94b18d716..0000000000
--- a/gitbooks/developing/embed/guides/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-description: "Build a chatbot, host multiple agents, serve profiles, or test an embedded runtime."
-icon: code
----
-
-# Embedding guides
-
-Choose the guide that matches your host:
-
-- [CLI chatbot](cli-chatbot.md): create an agent and collect or stream its reply.
-- [Multiple agents](multi-agent.md): give agents independent prompts, access, and working folders.
-- [SaaS with multiple tenants](saas-multi-tenant.md): isolate user state through profiles.
-- [Deploy a server](deploy-server.md): call an embedded agent from your HTTP host.
-- [Lean and headless hosts](lean-headless.md): select runtime services and Cargo features separately.
-- [Test with a mock backend](mock-backend-testing.md): run the entire example suite offline.
-
-Start with [Embedding](../README.md) for the library boundary and quickstart. See [Integrations](../integrations/README.md) for providers, storage, MCP, and channels.
diff --git a/gitbooks/developing/embed/guides/cli-chatbot.md b/gitbooks/developing/embed/guides/cli-chatbot.md
deleted file mode 100644
index 281c9588e5..0000000000
--- a/gitbooks/developing/embed/guides/cli-chatbot.md
+++ /dev/null
@@ -1,74 +0,0 @@
----
-description: "Collect a reply or consume progress events in a Rust command-line host."
-icon: code
----
-
-# CLI chatbot
-
-Keep one `Runtime` alive for the process and create an `Agent` for the conversation. The executable example starts with a single message, checks the reply, and prints it. A CLI input loop can send subsequent messages through the same agent; choose a stable thread identity when your host exposes separate conversations.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/run_turn.rs#run_turn -->
-
-```rust
- let agent = runtime.agent(
- AgentSpec::new("hello").definition(
- AgentDefinitionSpec::new()
- .bare_prompt("Reply briefly.")
- .tools(ToolScopeSpec::HostOnly),
- ),
- )?;
- let outcome = agent.run("Say hello").await?;
- assert!(!outcome.reply.is_empty());
- if support::offline() {
- assert_eq!(outcome.reply, "hello from the stub");
- }
- println!("{}", outcome.reply);
-```
-
-<!-- END EMBED -->
-
-Run `cargo run -p openhuman-embed --example run_turn` from the repository root. It uses a loopback provider and temporary state. The [complete run_turn example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/run_turn.rs) includes imports, runtime construction, and offline setup.
-
-For incremental output, consume `agent.stream(...)` until `StreamEvent::Finished`. Progress includes text deltas; the final event carries the same outcome shape as `run`. Dropping the stream cancels the underlying turn.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/streaming.rs#streaming -->
-
-```rust
- let agent = runtime.agent(AgentSpec::new("streamer"))?;
- let mut stream = agent.stream("Hello streaming");
- let mut count = 0;
- let mut deltas = String::new();
- let mut finished = None;
- while let Some(event) = stream.recv().await {
- match event {
- openhuman_embed::StreamEvent::Progress(progress) => {
- println!("{progress:?}");
- if let openhuman_embed::AgentProgress::TextDelta { delta, .. } = progress {
- assert!(finished.is_none(), "text deltas precede Finished");
- deltas.push_str(&delta);
- }
- count += 1;
- }
- openhuman_embed::StreamEvent::Finished(result) => finished = Some(result?),
- }
- }
- let outcome = finished.expect("stream ends with an outcome");
- assert!(!outcome.reply.is_empty());
- assert!(
- !deltas.is_empty(),
- "stream must publish visible text before Finished"
- );
- assert_eq!(deltas, outcome.reply);
- if support::offline() {
- let regular = agent.run("Hello streaming").await?;
- assert_eq!(
- outcome.reply, regular.reply,
- "streaming and collected turns agree"
- );
- }
- println!("progress events: {count}");
-```
-
-<!-- END EMBED -->
-
-The [complete streaming example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/streaming.rs) checks that text arrives before completion and that the offline streamed reply equals a collected reply. [Provider configuration](../integrations/openai-compatible.md) covers explicit live inference.
diff --git a/gitbooks/developing/embed/guides/deploy-server.md b/gitbooks/developing/embed/guides/deploy-server.md
deleted file mode 100644
index 0e5d076d59..0000000000
--- a/gitbooks/developing/embed/guides/deploy-server.md
+++ /dev/null
@@ -1,58 +0,0 @@
----
-description: "Invoke agents from a host-owned HTTP service without adding RPC to Embed."
-icon: code
----
-
-# Deploy a server
-
-Your HTTP host can keep a runtime alive and invoke its agents directly. The executable example binds a loopback listener, handles one request, and sends back the agent's reply. It exercises the request path without requiring an RPC server dependency in `openhuman-embed`.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/server.rs#server -->
-
-```rust
- use tokio::io::{AsyncReadExt, AsyncWriteExt};
- let agent = runtime.agent(
- AgentSpec::new("http-agent").definition(
- AgentDefinitionSpec::new()
- .bare_prompt("Reply briefly.")
- .tools(ToolScopeSpec::HostOnly),
- ),
- )?;
- let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await?;
- let address = listener.local_addr()?;
- // A real host should use its HTTP framework and authenticate requests.
- // This single-request fixture keeps the library dependency direction intact.
- let server = tokio::spawn(async move {
- let (mut socket, _) = listener.accept().await?;
- let mut request = vec![0; 4096];
- let length = socket.read(&mut request).await?;
- assert!(String::from_utf8_lossy(&request[..length]).starts_with("GET /hello "));
- let reply = agent.run("Say hello").await?.reply;
- let response = format!(
- "HTTP/1.1 200 OK\r\nContent-Length: {}\r\nConnection: close\r\n\r\n{}",
- reply.len(),
- reply
- );
- socket.write_all(response.as_bytes()).await?;
- Ok::<_, anyhow::Error>(())
- });
- let reply = reqwest::get(format!("http://{address}/hello"))
- .await?
- .error_for_status()?
- .text()
- .await?;
- assert!(!reply.is_empty());
- if support::offline() {
- assert_eq!(reply, "hello from the stub");
- }
- server.await??;
- println!("host HTTP request reached the in-process agent");
-```
-
-<!-- END EMBED -->
-
-Run `cargo run -p openhuman-embed --example server`. The [complete server example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/server.rs) checks the HTTP response against the deterministic provider reply.
-
-Use your HTTP framework for a deployed service. The example's one-request parser is deliberately small; a deployed host must handle authentication, request limits, cancellation, and shutdown. Select agents from authenticated host state. For multiple users, use [SaaS profiles](saas-multi-tenant.md).
-
-If your host needs OpenHuman's existing JSON-RPC server, depend on `openhuman-rpc`, the layer above Embed. Adding that dependency to Embed would reverse the crate chain. [Channels](../integrations/channels.md) provide another way to deliver messages to bound agents.
diff --git a/gitbooks/developing/embed/guides/lean-headless.md b/gitbooks/developing/embed/guides/lean-headless.md
deleted file mode 100644
index ddc9c00dd6..0000000000
--- a/gitbooks/developing/embed/guides/lean-headless.md
+++ /dev/null
@@ -1,33 +0,0 @@
----
-description: "Control runtime activity separately from compile-time Cargo features."
-icon: code
----
-
-# Lean and headless hosts
-
-`RuntimeBuilder::lean()` selects the agent, memory, and inference families without background services. Runtime module selection controls what is active; Cargo features control what is compiled. A lean preset alone does not shed compiled dependencies.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/lean_headless.rs#lean_headless -->
-
-```rust
- let info = runtime.capabilities();
- assert_eq!(info.weight, openhuman_embed::WeightClass::Lean);
- assert!(info.services.is_empty());
- let agent = runtime.agent(
- AgentSpec::new("lean").definition(
- AgentDefinitionSpec::new()
- .bare_prompt("Reply briefly.")
- .tools(ToolScopeSpec::HostOnly),
- ),
- )?;
- assert!(!agent.run("Hello lean runtime").await?.reply.is_empty());
- println!("lean runtime runs a turn without background services");
-```
-
-<!-- END EMBED -->
-
-Run `cargo run -p openhuman-embed --example lean_headless`. The [complete lean_headless example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/lean_headless.rs) uses `ServiceSet::none()`, verifies the lean capability report, and completes an actual turn. For a host crate that needs fewer compiled features, disable default features on its Embed dependency and enable only the gates it needs. Verify enabled and disabled builds for that selection.
-
-A headless host also owns process setup: initialize its encryption key before storing credentials, choose its state directory, and keep the runtime alive until shutdown. The example support code uses a random fixture key and temporary credential directory; deployed hosts supply a durable key and durable workspace.
-
-[Storage drivers](../integrations/storage-drivers.md) covers persistent backends. The [complete capability_report example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/capability_report.rs) reports compiled features and active services without exposing provider keys or URLs.
diff --git a/gitbooks/developing/embed/guides/mock-backend-testing.md b/gitbooks/developing/embed/guides/mock-backend-testing.md
deleted file mode 100644
index 7fb20fac2a..0000000000
--- a/gitbooks/developing/embed/guides/mock-backend-testing.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-description: "Run the embedding examples offline and verify behavior, not just compilation."
-icon: code
----
-
-# Test with a mock backend
-
-Run `node scripts/run-embed-examples.mjs` from the repository root. The runner builds and executes every example with the union of required features, clears inherited live-example credentials and operator workspace settings, and requires each program's `EXAMPLE_OK` marker after its assertions.
-
-The shared support module uses loopback Wiremock servers for backend and inference requests. It disables unrelated online services and supplies isolated keyring state. Examples assert replies, transmitted model settings, tool results, and state isolation. MCP and Telegram use their real protocol shapes against local stubs; SQLite performs real local writes.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/host_tools.rs#host_tools -->
-
-```rust
- let calls = std::sync::Arc::new(std::sync::atomic::AtomicUsize::new(0));
- let recorded_calls = calls.clone();
- let tool_provider = support::scripted_provider(
- vec![support::tool_call_completion("host_ping", "{}")],
- "pong complete",
- )
- .await;
- let agent = runtime.agent(
- AgentSpec::new("host-tools")
- .provider(support::route(&tool_provider, "fixture"))
- .definition(
- AgentDefinitionSpec::new()
- .bare_prompt("Use host_ping")
- .tools(ToolScopeSpec::HostOnly),
- )
- .tools(move |_| {
- openhuman_embed::HostTurnTools::advertised(vec![Box::new(Ping(
- recorded_calls.clone(),
- ))])
- }),
- )?;
- assert_eq!(agent.run("Ping").await?.reply, "pong complete");
- assert_eq!(calls.load(std::sync::atomic::Ordering::SeqCst), 1);
- let requests = support::chat_requests(&tool_provider).await;
- assert_eq!(support::tool_names(&requests[0]), vec!["host_ping"]);
- assert!(support::tool_results(&requests[1]).contains("pong"));
- println!("host_ping executed once; only host tools advertised");
-```
-
-<!-- END EMBED -->
-
-The [complete host_tools example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/host_tools.rs) checks the advertised catalog, executes a host tool exactly once, and verifies that its result reaches the next model request. This catches a host adapter that advertises a tool but never runs it.
-
-Run a single gated example with `cargo run -p openhuman-embed --example mcp --features mcp`, or use the full runner to select all gates automatically. The individual examples default to offline mode. Only the [explicit live provider options](../integrations/openai-compatible.md) and [MongoDB live option](../integrations/storage-drivers.md) contact configured services.
diff --git a/gitbooks/developing/embed/guides/multi-agent.md b/gitbooks/developing/embed/guides/multi-agent.md
deleted file mode 100644
index ad2ffc03e4..0000000000
--- a/gitbooks/developing/embed/guides/multi-agent.md
+++ /dev/null
@@ -1,85 +0,0 @@
----
-description: "Share one runtime while configuring independent agent prompts and working folders."
-icon: code
----
-
-# Multiple agents
-
-A runtime owns shared services and credentials. Each `AgentSpec` selects its prompt, model route, access policy, and `action_dir`. Internal agent state belongs to its agent home; the action directory is where acting tools operate.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/two_agents.rs#two_agents -->
-
-```rust
- let analyst_dir = tempfile::tempdir()?;
- let writer_dir = tempfile::tempdir()?;
- let analyst = runtime.agent(
- AgentSpec::new("analyst")
- .system_prompt("ANALYST_PROMPT: summarize documents")
- .action_dir(analyst_dir.path())
- .access(openhuman_embed::Access::readonly()),
- )?;
- let writer = runtime.agent(
- AgentSpec::new("writer")
- .system_prompt("WRITER_PROMPT: compose explanations")
- .action_dir(writer_dir.path())
- .access(openhuman_embed::Access::full()),
- )?;
- assert_ne!(analyst.action_dir(), writer.action_dir());
- assert_ne!(analyst.home_dir(), writer.home_dir());
- assert_ne!(analyst.workspace_dir(), analyst.action_dir());
- assert!(!analyst.run("Analyze").await?.reply.is_empty());
- assert!(!writer.run("Explain").await?.reply.is_empty());
- if support::offline() {
- let requests = support::chat_requests(&provider).await;
- assert_eq!(requests.len(), 2);
- assert!(String::from_utf8_lossy(&requests[0].body).contains("ANALYST_PROMPT"));
- assert!(!String::from_utf8_lossy(&requests[0].body).contains("WRITER_PROMPT"));
- assert!(String::from_utf8_lossy(&requests[1].body).contains("WRITER_PROMPT"));
- }
- println!("two distinct prompts and action workspaces verified");
-```
-
-<!-- END EMBED -->
-
-The [complete two_agents example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/two_agents.rs) sends real turns and checks the provider requests: the analyst prompt does not contain the writer prompt. It also checks different action directories and agent homes. Run `cargo run -p openhuman-embed --example two_agents`.
-
-Agents on one runtime share the runtime configuration and credential root. Separate action directories are useful for cooperating agents; use [SaaS profiles](saas-multi-tenant.md) for user isolation.
-
-Runtime defaults can supply a provider and model settings; individual agents override selected fields. The [complete defaults_overrides example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/defaults_overrides.rs) verifies both routes and their transmitted temperature and token limits.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/defaults_overrides.rs#defaults_overrides -->
-
-```rust
- let inherited = runtime.agent(AgentSpec::new("inherited"))?;
- let override_provider = support::provider("override reply").await;
- let overridden = runtime.agent(
- AgentSpec::new("overridden")
- .provider(support::route(&override_provider, "override-model"))
- .access(openhuman_embed::Access::readonly())
- .model_defaults(openhuman_embed::ModelDefaults {
- temperature: Some(0.8),
- max_tokens: Some(128),
- ..Default::default()
- }),
- )?;
- let inherited_reply = inherited.run("Hello default").await?;
- let overridden_reply = overridden.run("Hello override").await?;
- if support::offline() {
- assert_eq!(inherited_reply.reply, "hello from the stub");
- let requests = support::chat_requests(&provider).await;
- let body: serde_json::Value = serde_json::from_slice(&requests[0].body)?;
- assert_eq!(body["model"], "fixture");
- assert_eq!(body["temperature"], 0.4);
- assert_eq!(body["max_tokens"], 256);
- }
- assert_eq!(overridden_reply.reply, "override reply");
- let requests = support::chat_requests(&override_provider).await;
- let body: serde_json::Value = serde_json::from_slice(&requests[0].body)?;
- assert_eq!(body["model"], "override-model");
- assert_eq!(body["temperature"], 0.8);
- assert_eq!(body["max_tokens"], 128);
- assert_eq!(runtime.defaults().model.temperature, Some(0.4));
- println!("default and override routes answered independently");
-```
-
-<!-- END EMBED -->
diff --git a/gitbooks/developing/embed/guides/saas-multi-tenant.md b/gitbooks/developing/embed/guides/saas-multi-tenant.md
deleted file mode 100644
index 3c328b8e8f..0000000000
--- a/gitbooks/developing/embed/guides/saas-multi-tenant.md
+++ /dev/null
@@ -1,50 +0,0 @@
----
-description: "Isolate user credentials, workspaces, and conversation history with ProfileRuntime."
-icon: code
----
-
-# SaaS with multiple tenants
-
-Use `ProfileRuntime` for a process serving multiple users. Provision each profile, install that profile's credential, and open a handle to its workspace. Reusing a thread id in two profiles does not share their conversation history.
-
-The complete example prepares a temporary SaaS root and initializes the keyring at `SaasConfig::operator_config().workspace_dir` before boot. SaaS validates the operator root, service token, permitted domains, and environment. A process-wide `OPENHUMAN_WORKSPACE` override is rejected. A SaaS core must be the only core in its process.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/profiles.rs#profiles -->
-
-```rust
- let profiles = openhuman_embed::ProfileRuntime::build(config).await?;
- let mut handles = Vec::new();
- for (user, text) in [("alice", "Alice private note"), ("bob", "Bob private note")] {
- let profile = profiles.provision(user).await?;
- profiles
- .set_credential(
- &profile.profile_id,
- openhuman_embed::profiles::ProfileCredentialKind::ApiKey,
- &format!("{user}-fixture"),
- )
- .await?;
- let handle = profiles.open(user).await?;
- let reply = handle.chat("shared-thread", text).await?;
- assert!(reply.text.contains(text), "{}", reply.text);
- handles.push(handle);
- }
- assert_ne!(handles[0].workspace_dir(), handles[1].workspace_dir());
- for (index, own, other) in [
- (0, "Alice private note", "Bob private note"),
- (1, "Bob private note", "Alice private note"),
- ] {
- let messages = handles[index].messages("shared-thread").await?;
- let text = serde_json::to_string(&messages)?;
- assert!(text.contains(own));
- assert!(!text.contains(other));
- }
- drop(handles);
- profiles.shutdown().await;
- println!("two profiles keep same-thread conversations separate");
-```
-
-<!-- END EMBED -->
-
-Run `cargo run -p openhuman-embed --example profiles`. The [complete profiles example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/profiles.rs) installs a loopback backend transport, chats as Alice and Bob, then checks distinct workspaces and same-thread history isolation. No live account or backend is contacted.
-
-Authenticate users in your host before selecting a profile. Keep the operator's configuration and gateway credential separate from user credentials. [Managed inference](../integrations/tinyhumans-managed.md) explains who provides the backend transport.
diff --git a/gitbooks/developing/embed/installation.md b/gitbooks/developing/embed/installation.md
deleted file mode 100644
index 0d3a82145e..0000000000
--- a/gitbooks/developing/embed/installation.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-description: "Add the Embed dependency, choose compile-time gates, and configure the host\u2019s runtime and state deliberately."
----
-
-# Installation
-
-`openhuman-embed` is currently an unpublished workspace crate. Use a local path dependency when developing in this repository, or a Git dependency on `https://github.com/tinyhumansai/openhuman` with `package = "openhuman-embed"`. Pin a reviewed Git revision for a deployed application; the nested vendored libraries are part of that revision's build inputs.
-
-Run repository commands from its root. Build the facade with `cargo check -p openhuman-embed`; validate a narrow graph with `cargo check -p openhuman-embed --no-default-features`. Runtime weight presets and Cargo features control different things.
-
-## Compile-time gates versus runtime selection
-
-| Choice | What it controls |
-| --- | --- |
-| Cargo default features | Code and dependencies compiled into the artifact |
-| Named Embed feature such as `mcp` or `skills` | Public facade items and the forwarded core gate |
-| `RuntimeBuilder::modules`, domains, services and tool groups | Which compiled families a runtime exposes or starts |
-| Agent tool scope and access | Which subset one agent can use |
-
-Embed defaults forward the core defaults and enable the named Embed `channels` feature. Core defaults can include MCP and skills without enabling Embed's separately gated `McpServer`/agent MCP setter or skill setters. Add `--features mcp,skills` when using those public APIs. A runtime selection cannot enable a Cargo gate that was compiled out; inspect the [generated compiled matrix](capability-matrix.md) and the [source manifest](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/Cargo.toml).
-
-`RuntimeBuilder::lean()` narrows runtime activity; it does not reduce the dependency graph by itself. Pair it with `--no-default-features` for a narrow build and explicitly add the gates you need. Use `scripts/assert-shed.sh` or the repository dependency simulator before claiming a dependency reduction. See [lean/headless guide](guides/lean-headless.md).
-
-## Host runtime and credentials
-
-Build a Tokio multi-thread runtime with `enable_all`, a large worker stack and a bounded blocking pool. The verified examples use the [core runtime constants](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/core/runtime/mod.rs) through their repository support module: currently a 20 MiB worker stack and 64 blocking workers. Tokio's default 2 MiB worker stack is insufficient for nested agent turns. Follow the full example's host setup rather than adding an unconfigured `#[tokio::main]` to a large agent workload.
-
-Initialize the credential master key through `openhuman_embed::process::init_master_key` before persisting a runtime API key. Headless hosts can provide a protected 64-hex-character `OPENHUMAN_KEYRING_MASTER_KEY` or configured key file; keep this credential out of source and logs. The offline examples create disposable fixture keys, not production credentials.
-
-## State, configuration and inspection
-
-`Workspace::Ephemeral` is the library preset's default. `Workspace::Dir` moves both internal state and the credential root together; `workspace_dir` overrides internal state only, leaving the credential root at the resolved config path. Keep the action directory outside the internal workspace. Operator host presets use discovered configuration, while a supplied `Config` is resolved host configuration.
-
-[Runtime defaults](concepts/runtime-defaults.md) explains inheritance. The generated [builder setters](builder-setters.md) is the source-derived list of configuration knobs, and `RuntimeBuilder::describe` reports the pre-build plan without starting services.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/capability_report.rs#capability_report -->
-
-```rust
- let info = runtime.capabilities();
- assert_eq!(info.schema_version, 1);
- assert!(info.defaults.routed_provider);
- let serialized = serde_json::to_string(&info)?;
- assert!(!serialized.contains("sk-test"));
- assert!(!serialized.contains(&provider.uri()));
- assert!(!serialized.contains(&runtime.workspace_dir().display().to_string()));
- println!("{}", serde_json::to_string_pretty(&info)?);
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/capability_report.rs), including runtime construction, imports and fixture setup.
-
-The example checks the effective report after boot and proves that credentials, provider URL and workspace path are absent. The generated matrix uses the fixed default-feature report command; it describes that build, not every feature combination a host might compile.
diff --git a/gitbooks/developing/embed/integrations/README.md b/gitbooks/developing/embed/integrations/README.md
deleted file mode 100644
index fc709a519a..0000000000
--- a/gitbooks/developing/embed/integrations/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
----
-description: "Choose provider, tool, storage, and channel adapters for your host."
-icon: code
----
-
-# Embedding integrations
-
-An embedded runtime composes the capabilities its host supplies. Start with the adapter your application needs:
-
-- [OpenAI-compatible providers and BYOK](openai-compatible.md)
-- [TinyHumans managed inference](tinyhumans-managed.md)
-- [Local models](local-models.md)
-- [MCP servers](mcp.md)
-- [Composio](composio.md)
-- [Web search](web-search.md)
-- [Storage drivers](storage-drivers.md)
-- [Channels](channels.md)
-
-[Guides](../guides/README.md) show how these pieces fit into a CLI, an HTTP server, or a SaaS host. Every linked executable example defaults to offline mode; a live endpoint requires an explicit choice.
diff --git a/gitbooks/developing/embed/integrations/channels.md b/gitbooks/developing/embed/integrations/channels.md
deleted file mode 100644
index f4fa9979e5..0000000000
--- a/gitbooks/developing/embed/integrations/channels.md
+++ /dev/null
@@ -1,82 +0,0 @@
----
-description: "Bind an incoming channel to an agent and verify the delivered reply."
-icon: code
----
-
-# Channels
-
-Enable the `channels` Cargo feature to use channel adapters. Your host configures the channel credential and binds incoming messages to an agent. In the Telegram example, the Bot API endpoint is a loopback stub, so updates and replies exercise the adapter without contacting Telegram.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/telegram.rs#telegram -->
-
-```rust
- let bot = wiremock::MockServer::start().await;
- let token = "123456:EXAMPLE";
- let updates = format!("/bot{token}/getUpdates");
- wiremock::Mock::given(wiremock::matchers::path(updates.clone())).respond_with(
- wiremock::ResponseTemplate::new(200).set_body_json(serde_json::json!({"ok":true,"result":[{
- "update_id":1,"message":{"message_id":1,"date":0,"text":"hello channel",
- "from":{"id":99,"is_bot":false,"username":"alice"},"chat":{"id":4242,"type":"private"}}
- }]}))).up_to_n_times(1).with_priority(1).mount(&bot).await;
- wiremock::Mock::given(wiremock::matchers::path(updates))
- .respond_with(
- wiremock::ResponseTemplate::new(200)
- .set_body_json(serde_json::json!({"ok":true,"result":[]}))
- .set_delay(std::time::Duration::from_millis(100)),
- )
- .with_priority(2)
- .mount(&bot)
- .await;
- wiremock::Mock::given(wiremock::matchers::any())
- .respond_with(
- wiremock::ResponseTemplate::new(200)
- .set_body_json(serde_json::json!({"ok":true,"result":{
- "message_id":2,"id":1,"is_bot":true,"username":"example_bot"}})),
- )
- .with_priority(10)
- .mount(&bot)
- .await;
- std::env::set_var("OPENHUMAN_TELEGRAM_BOT_API_BASE", bot.uri());
- let agent = runtime.agent(
- AgentSpec::new("channel-agent").definition(
- AgentDefinitionSpec::new()
- .bare_prompt("Reply briefly.")
- .tools(ToolScopeSpec::HostOnly),
- ),
- )?;
- let listener = runtime.channels().telegram(
- openhuman_embed::TelegramChannelSpec::new(token, agent.id()).allowed_users(["alice"]),
- )?;
- let mut sent = false;
- for _ in 0..200 {
- let requests = bot.received_requests().await.unwrap_or_default();
- sent = requests.iter().any(|request| {
- request.url.path().ends_with("/sendMessage")
- && serde_json::from_slice::<serde_json::Value>(&request.body).is_ok_and(|body| {
- body["chat_id"].to_string().contains("4242")
- && body["text"]
- .as_str()
- .is_some_and(|text| text.contains("hello from the stub"))
- })
- });
- if sent {
- break;
- }
- tokio::time::sleep(std::time::Duration::from_millis(50)).await;
- }
- listener.stop();
- assert!(
- sent,
- "the bound agent must send a reply to the stub Bot API"
- );
- std::env::remove_var("OPENHUMAN_TELEGRAM_BOT_API_BASE");
- println!("Telegram update answered in the correct chat");
-```
-
-<!-- END EMBED -->
-
-Run `cargo run -p openhuman-embed --example telegram --features channels`. The [complete telegram example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/telegram.rs) receives a stub update, runs the bound agent, and checks that the resulting reply was posted to the expected chat id.
-
-Keep channel credentials in host configuration and map messages to the intended identity and conversation. A provider route controls inference; it does not configure a channel or provide a hosted relay. [Managed backend setup](tinyhumans-managed.md) explains that separate transport responsibility.
-
-For a live Telegram host, supply the real Bot API configuration through your application's channel setup. This offline example deliberately has no live channel environment switch. [Deploy a server](../guides/deploy-server.md) covers a host-owned HTTP alternative.
diff --git a/gitbooks/developing/embed/integrations/composio.md b/gitbooks/developing/embed/integrations/composio.md
deleted file mode 100644
index 694e719733..0000000000
--- a/gitbooks/developing/embed/integrations/composio.md
+++ /dev/null
@@ -1,14 +0,0 @@
----
-description: "Pin connector credentials per agent while the host supplies backend transport."
-icon: code
----
-
-# Composio
-
-Composio calls use the host backend transport. Install that transport before booting a managed runtime; see [TinyHumans managed inference](tinyhumans-managed.md). An explicit inference provider route supplies model inference, not the connector transport.
-
-Use `AgentSpec::composio(ComposioHostCredential)` to pin a connector credential to an agent. This keeps the credential selection on the host side instead of asking the model to choose another user's credential. Configure the agent's tool scope and access separately. The connector tools still pass through the host's execution policy.
-
-The repository's [Composio agent integration test](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/tests/composio_agents.rs) verifies two agents using their own pinned credentials against a loopback backend. It checks the outgoing authentication and action results rather than contacting Composio. Run the Embed integration suite through the repository's cancellation-aware runner when changing this adapter.
-
-Account login, linking, and credential acquisition belong to your connected host and connector layer. Keep secrets out of prompts and capability reports. For multiple users, use [SaaS profiles](../guides/saas-multi-tenant.md); independent action directories on a shared library runtime do not establish tenant isolation.
diff --git a/gitbooks/developing/embed/integrations/local-models.md b/gitbooks/developing/embed/integrations/local-models.md
deleted file mode 100644
index 194145321d..0000000000
--- a/gitbooks/developing/embed/integrations/local-models.md
+++ /dev/null
@@ -1,69 +0,0 @@
----
-description: "Use a local OpenAI-compatible server or inject a native ChatModel implementation."
-icon: code
----
-
-# Local and custom models
-
-For a local server that implements chat completions, use `Provider::openai_compatible` with its API root and model id. The constructor requires a bearer string even when a particular local server ignores it. Set the endpoint explicitly rather than relying on another user's installed configuration. The [OpenAI-compatible example controls](openai-compatible.md) can point a live example at that local server.
-
-A native provider implements `openhuman_embed::providers::ChatModel<()>`. `Provider::custom_with_fallback` tries fallback models when the primary fails before output; validation failures and failures after streamed content do not switch providers. A named role pin can select another native model for a workload.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/custom_provider.rs#custom_provider -->
-
-```rust
- let provider = Provider::custom_with_fallback(
- Arc::new(LocalModel {
- reply: None,
- calls: failed.clone(),
- }),
- vec![Arc::new(LocalModel {
- reply: Some("fallback answer"),
- calls: fallback.clone(),
- })],
- )
- .model("local-custom")
- .role(
- "coding",
- Arc::new(LocalModel {
- reply: Some("coding answer"),
- calls: pinned.clone(),
- }),
- );
- let runtime = Runtime::builder()
- .config(support::offline_config())
- .backend_url(backend.uri())
- .provider(provider)
- .build()
- .await?;
- let definition = || {
- AgentDefinitionSpec::new()
- .bare_prompt("Reply briefly")
- .tools(ToolScopeSpec::HostOnly)
- };
- let regular = runtime.agent(AgentSpec::new("fallback-agent").definition(definition()))?;
- assert_eq!(regular.run("Hello").await?.reply, "fallback answer");
- assert_eq!(failed.load(Ordering::SeqCst), 1);
- assert_eq!(fallback.load(Ordering::SeqCst), 1);
- let coding = runtime.agent(
- AgentSpec::new("coding-agent")
- .model("hint:coding")
- .definition(definition()),
- )?;
- assert_eq!(
- coding.run("Explain a function").await?.reply,
- "coding answer"
- );
- assert_eq!(pinned.load(Ordering::SeqCst), 1);
- assert_eq!(
- failed.load(Ordering::SeqCst),
- 1,
- "coding bypasses the primary chain"
- );
-```
-
-<!-- END EMBED -->
-
-Run `cargo run -p openhuman-embed --example custom_provider`. The [complete custom_provider example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/custom_provider.rs) includes the concrete model implementation. It checks one primary failure, one fallback invocation, and a coding role that bypasses the primary chain. These native models are deterministic and make no inference network requests.
-
-For live local inference, configure model availability and authentication in your server. For runtime selection and service controls, see [Lean and headless hosts](../guides/lean-headless.md).
diff --git a/gitbooks/developing/embed/integrations/mcp.md b/gitbooks/developing/embed/integrations/mcp.md
deleted file mode 100644
index 0688ce318e..0000000000
--- a/gitbooks/developing/embed/integrations/mcp.md
+++ /dev/null
@@ -1,63 +0,0 @@
----
-description: "Connect a declared MCP server and verify remote discovery and execution."
-icon: code
----
-
-# MCP servers
-
-Enable the `mcp` Cargo feature and declare a server with `AgentSpec::mcp`. `McpServer::http` takes a registered name and endpoint; `allow_tools` narrows the remote tool list. Server configuration and its connections belong to the agent that declared them.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/mcp.rs#mcp -->
-
-```rust
- let mcp = wiremock::MockServer::start().await;
- wiremock::Mock::given(wiremock::matchers::method("POST"))
- .respond_with(McpStub)
- .mount(&mcp)
- .await;
- let discovery = wiremock::MockServer::start().await;
- wiremock::Mock::given(wiremock::matchers::path("/v1/chat/completions"))
- .respond_with(ForecastModel(std::sync::atomic::AtomicUsize::new(0)))
- .mount(&discovery)
- .await;
- let agent = runtime.agent(
- AgentSpec::new("mcp-client")
- .provider(support::route(&discovery, "fixture"))
- .mcp(
- openhuman_embed::McpServer::http("forecast", format!("{}/mcp", mcp.uri()))
- .allow_tools(["forecast"]),
- )
- .access(openhuman_embed::Access::full()),
- )?;
- assert_eq!(
- agent
- .run("List the forecast server tools, then call its forecast tool")
- .await?
- .reply,
- "sunny verified"
- );
- let requests = mcp.received_requests().await.expect("MCP requests");
- let methods: Vec<String> = requests
- .iter()
- .filter_map(|r| {
- serde_json::from_slice::<serde_json::Value>(&r.body).ok()?["method"]
- .as_str()
- .map(str::to_string)
- })
- .collect();
- assert!(methods.iter().any(|m| m == "initialize"), "{methods:?}");
- assert!(methods.iter().any(|m| m == "tools/list"), "{methods:?}");
- assert!(methods.iter().any(|m| m == "tools/call"), "{methods:?}");
- let requests = support::chat_requests(&discovery).await;
- assert!(support::tool_results(&requests[1]).contains("forecast"));
- assert!(support::tool_results(&requests[2]).contains("sunny"));
- println!("MCP handshake, discovery and remote execution verified");
-```
-
-<!-- END EMBED -->
-
-Run `cargo run -p openhuman-embed --example mcp --features mcp`. The [complete mcp example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/mcp.rs) performs an actual MCP initialize handshake, lists remote tools, calls the forecast tool, and verifies the returned `sunny` result in the next model request.
-
-The immediately available `mcp_list_tools` and `mcp_call_tool` bridge tools work with a cold configured server. Individual per-server tools use a cached catalog and are deferred by default. On a cold first turn, that catalog may still be warming in the background; do not assume `tool_search` already contains the per-server tool name. Use the bridge to discover and call it, and copy returned tool names and arguments.
-
-MCP transport does not bypass the host's execution policy. Configure agent access and approvals for actions exposed by the server. [Mock testing](../guides/mock-backend-testing.md) keeps this protocol path local during development.
diff --git a/gitbooks/developing/embed/integrations/openai-compatible.md b/gitbooks/developing/embed/integrations/openai-compatible.md
deleted file mode 100644
index ac5b643820..0000000000
--- a/gitbooks/developing/embed/integrations/openai-compatible.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-description: "Route inference to an explicit endpoint and bearer without changing shared host configuration."
-icon: code
----
-
-# OpenAI-compatible providers and BYOK
-
-Construct a route with `Provider::openai_compatible(base_url, api_key).model(model_id)`, then set it on the runtime or an individual agent. Pass the API root, such as a provider's `/v1` URL; the adapter appends `/chat/completions`. Supply an explicit model id so the route can register that model for its workload roles.
-
-The runtime and agent routes in this example answer independently. Assertions inspect the actual request bodies, including model, temperature, and token limits.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/defaults_overrides.rs#defaults_overrides -->
-
-```rust
- let inherited = runtime.agent(AgentSpec::new("inherited"))?;
- let override_provider = support::provider("override reply").await;
- let overridden = runtime.agent(
- AgentSpec::new("overridden")
- .provider(support::route(&override_provider, "override-model"))
- .access(openhuman_embed::Access::readonly())
- .model_defaults(openhuman_embed::ModelDefaults {
- temperature: Some(0.8),
- max_tokens: Some(128),
- ..Default::default()
- }),
- )?;
- let inherited_reply = inherited.run("Hello default").await?;
- let overridden_reply = overridden.run("Hello override").await?;
- if support::offline() {
- assert_eq!(inherited_reply.reply, "hello from the stub");
- let requests = support::chat_requests(&provider).await;
- let body: serde_json::Value = serde_json::from_slice(&requests[0].body)?;
- assert_eq!(body["model"], "fixture");
- assert_eq!(body["temperature"], 0.4);
- assert_eq!(body["max_tokens"], 256);
- }
- assert_eq!(overridden_reply.reply, "override reply");
- let requests = support::chat_requests(&override_provider).await;
- let body: serde_json::Value = serde_json::from_slice(&requests[0].body)?;
- assert_eq!(body["model"], "override-model");
- assert_eq!(body["temperature"], 0.8);
- assert_eq!(body["max_tokens"], 128);
- assert_eq!(runtime.defaults().model.temperature, Some(0.4));
- println!("default and override routes answered independently");
-```
-
-<!-- END EMBED -->
-
-The [complete defaults_overrides example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/defaults_overrides.rs) includes the loopback endpoint setup. Run `cargo run -p openhuman-embed --example defaults_overrides` for its offline assertions.
-
-Examples using `support::example_provider` switch to live inference only with `OPENHUMAN_EXAMPLE_LIVE=1` and all three of `OPENHUMAN_EXAMPLE_BASE_URL`, `OPENHUMAN_EXAMPLE_API_KEY`, and `OPENHUMAN_EXAMPLE_MODEL`. These settings are example controls, not replacements for your application's credential configuration. Keep provider keys in your host's secret configuration.
-
-For a non-HTTP implementation, [local and custom models](local-models.md) covers `Provider::custom`, native fallback, and role pins. [Managed inference](tinyhumans-managed.md) uses a different backend transport boundary.
diff --git a/gitbooks/developing/embed/integrations/storage-drivers.md b/gitbooks/developing/embed/integrations/storage-drivers.md
deleted file mode 100644
index f3449560a0..0000000000
--- a/gitbooks/developing/embed/integrations/storage-drivers.md
+++ /dev/null
@@ -1,84 +0,0 @@
----
-description: "Configure SQLite or MongoDB through Embed and inspect the selected backend."
-icon: code
----
-
-# Storage drivers
-
-Enable `storage-sqlite` for SQLite or `storage-mongodb` for MongoDB on your Embed dependency. These Cargo gates make the driver available; choosing a URL selects the runtime backend. Set `RuntimeConfig.storage.url`, pass a URL through `RuntimeBuilder::storage`, or set the `url` field in the `[storage]` section of the host's configuration. `OPENHUMAN_STORAGE_URL` is the environment override used by host configuration resolution.
-
-The SQLite example sets `config.storage.url` to a `sqlite:` URL under a temporary directory, then obtains `Runtime::storage`. It creates a scoped collection, writes a document, reads it back, and deletes it. A configured backend also supplies the default driver-backed session stores; an explicit host session-store adapter takes precedence.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/storage.rs#storage_sqlite -->
-
-```rust
- let mut config = support::offline_config();
- config.storage.url = Some(format!(
- "sqlite:{}",
- directory.path().join("storage").display()
- ));
- let runtime = Runtime::builder()
- .workspace(Workspace::Ephemeral)
- .config(config)
- .backend_url(backend.uri())
- .build()
- .await?;
- let storage = runtime.storage().expect("configured SQLite backend");
- assert_eq!(storage.driver(), "sqlite");
- let scoped = storage.for_scope(&Scope::local())?;
- let documents = scoped.documents();
- documents
- .ensure_collection(&CollectionSpec::new("settings"))
- .await?;
- let value = serde_json::json!({"theme":"dark"});
- documents
- .put("settings", "demo", value.clone(), Precondition::Absent)
- .await?;
- assert_eq!(
- documents
- .get("settings", "demo")
- .await?
- .expect("stored value")
- .doc,
- value
- );
- assert!(
- documents
- .delete("settings", "demo", Precondition::None)
- .await?
- );
- assert!(documents.get("settings", "demo").await?.is_none());
- assert_eq!(
- runtime.capabilities().storage.driver.as_deref(),
- Some("sqlite")
- );
-```
-
-<!-- END EMBED -->
-
-Run `cargo run -p openhuman-embed --example storage --features storage-sqlite`. This performs real local SQLite writes. The [complete storage example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/storage.rs) also describes a MongoDB URL without connecting.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/storage.rs#storage_mongodb -->
-
-```rust
- // Enable `storage-mongodb` for a deployment that builds this config.
- // Describing it does not contact MongoDB and never exposes credentials.
- let mut mongo = support::offline_config();
- mongo.storage.url = Some("mongodb://app:[email protected]:27017/openhuman".into());
- let builder = RuntimeBuilder::library().config(mongo);
- let description = builder.describe();
- assert_eq!(description.storage.driver.as_deref(), Some("mongodb"));
- assert!(description.storage.configured);
- assert!(!serde_json::to_string(&description)?.contains("example-password"));
- // An explicit environment variable is the only path to a live database.
- if let Ok(url) = std::env::var("OPENHUMAN_EXAMPLE_MONGODB_URL") {
- let live = RuntimeBuilder::library().storage(url).build().await?;
- assert_eq!(live.storage().expect("MongoDB backend").driver(), "mongodb");
- }
-```
-
-<!-- END EMBED -->
-
-`RuntimeBuilder::describe()` reports the driver and whether storage is configured, omitting URL credentials. Describing a MongoDB URL does not prove the server is reachable or that the MongoDB driver was compiled. Building a runtime with that URL requires `storage-mongodb` and a reachable server.
-
-The only live database path in this example is `OPENHUMAN_EXAMPLE_MONGODB_URL`. To exercise it deliberately, enable both `storage-sqlite` and `storage-mongodb` and supply your own MongoDB URL. The offline CI runner clears this setting. A deployed host supplies its persistent URL and credentials through its own configuration.
diff --git a/gitbooks/developing/embed/integrations/tinyhumans-managed.md b/gitbooks/developing/embed/integrations/tinyhumans-managed.md
deleted file mode 100644
index ef5118247f..0000000000
--- a/gitbooks/developing/embed/integrations/tinyhumans-managed.md
+++ /dev/null
@@ -1,52 +0,0 @@
----
-description: "Install the host backend transport before using managed inference and hosted services."
-icon: code
----
-
-# TinyHumans managed inference
-
-Embed wraps the core; it does not contain a TinyHumans SDK backend client. A managed host must supply a `BackendTransport` through `RuntimeBuilder::backend_transport`, or boot through the SDK-backed builder in `openhuman-tinyhumans`. The connected host layer owns transport and session login. `RuntimeBuilder::backend_url` selects a URL; it does not install a transport.
-
-Supply a library backend key with `RuntimeBuilder::api_key` and initialize the process master key before credential storage. Library mode does not perform user login. Managed inference uses the key as a bearer; backend REST calls resolve it through the backend credential seam. Without an installed transport, hosted backend calls return a typed backend-unavailable error.
-
-The SaaS example uses a deterministic implementation of that transport boundary and installs separate profile credentials. It verifies managed turns without a live service.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/profiles.rs#profiles -->
-
-```rust
- let profiles = openhuman_embed::ProfileRuntime::build(config).await?;
- let mut handles = Vec::new();
- for (user, text) in [("alice", "Alice private note"), ("bob", "Bob private note")] {
- let profile = profiles.provision(user).await?;
- profiles
- .set_credential(
- &profile.profile_id,
- openhuman_embed::profiles::ProfileCredentialKind::ApiKey,
- &format!("{user}-fixture"),
- )
- .await?;
- let handle = profiles.open(user).await?;
- let reply = handle.chat("shared-thread", text).await?;
- assert!(reply.text.contains(text), "{}", reply.text);
- handles.push(handle);
- }
- assert_ne!(handles[0].workspace_dir(), handles[1].workspace_dir());
- for (index, own, other) in [
- (0, "Alice private note", "Bob private note"),
- (1, "Bob private note", "Alice private note"),
- ] {
- let messages = handles[index].messages("shared-thread").await?;
- let text = serde_json::to_string(&messages)?;
- assert!(text.contains(own));
- assert!(!text.contains(other));
- }
- drop(handles);
- profiles.shutdown().await;
- println!("two profiles keep same-thread conversations separate");
-```
-
-<!-- END EMBED -->
-
-See the [complete profiles example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/profiles.rs) and its shared support transport for the full offline setup. For a deployed SDK-backed host, follow the connected layer's setup instead of copying the loopback transport.
-
-Use [OpenAI-compatible routing](openai-compatible.md) when your host wants to send inference directly to a BYOK endpoint. That explicit provider route does not supply hosted backend services.
diff --git a/gitbooks/developing/embed/integrations/web-search.md b/gitbooks/developing/embed/integrations/web-search.md
deleted file mode 100644
index 145258f103..0000000000
--- a/gitbooks/developing/embed/integrations/web-search.md
+++ /dev/null
@@ -1,18 +0,0 @@
----
-description: "Pin a web-search provider key per agent, held only in memory."
-icon: code
----
-
-# Web search
-
-An agent's web-search tools (`web_search_tool`, `web_answer_tool`, `web_contents_tool`) run through the process-wide TinySearch module. Several agents in one runtime can each search with their own provider key: pin it on that agent's config, and it is never written to `config.toml`, the environment, or a log.
-
-In the agent's `AgentSpec::config` closure, call `config.search.pin_host_credential("brave", SearchHostCredential::new(key))`. `SearchHostCredential` is exported from `openhuman_embed`.
-
-`pin_host_credential` accepts `brave`, `exa`, `gemini`, `parallel`, `querit`, `tavily` and `tinyfish`, and refuses any other provider with `UnknownKeyedSearchProvider`. It turns search on and puts that provider on its direct route, the route a key authenticates; a pinned `gemini` key also serves deep research. `SearchHostCredential::with_base_url` sends the provider's calls to another endpoint, such as a proxy or a local stand-in under test.
-
-While an agent's config carries a pinned key, its search calls run under that config instead of a reload of the runtime's `config.toml`. The module is reconfigured whenever the next call needs a different configuration, and calls take turns, so one agent's call never runs with another agent's key. Agents without a pinned key keep the runtime's settings, environment and default managed routing.
-
-Provider order per role still comes from `search.roles` and TinySearch's defaults. A runtime signed in to the managed backend serves the managed providers first; set `search.roles` on the agent to put the pinned provider first.
-
-The repository's [pinned-key integration test](https://github.com/tinyhumansai/openhuman/blob/main/tests/search_pinned_keys_e2e.rs) runs two agents with different keys against a loopback provider. It checks each call's outgoing key, and that no key reaches the environment, a file or a log line.
diff --git a/gitbooks/developing/embed/quickstart.md b/gitbooks/developing/embed/quickstart.md
deleted file mode 100644
index 4a3d6e21ca..0000000000
--- a/gitbooks/developing/embed/quickstart.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-description: "Run one agent against a local fixture, then choose a provider and working directory for your host."
----
-
-# Quickstart
-
-Start from a checkout of the repository and run `cargo run -p openhuman-embed --example run_turn`. The example boots an ephemeral runtime, creates its own local provider/backend fixtures and prints `hello from the stub`. It needs no inference account and does not contact a real backend.
-
-## Create an agent and send a turn
-
-The full example constructs the runtime before this excerpt. `AgentSpec` names the agent and gives it a bare prompt with `HostOnly` tools. With no host tools attached, this is a text-only agent: it cannot inherit the operator's built-in tool catalog.
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/run_turn.rs#run_turn -->
-
-```rust
- let agent = runtime.agent(
- AgentSpec::new("hello").definition(
- AgentDefinitionSpec::new()
- .bare_prompt("Reply briefly.")
- .tools(ToolScopeSpec::HostOnly),
- ),
- )?;
- let outcome = agent.run("Say hello").await?;
- assert!(!outcome.reply.is_empty());
- if support::offline() {
- assert_eq!(outcome.reply, "hello from the stub");
- }
- println!("{}", outcome.reply);
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/run_turn.rs), including runtime construction, imports and fixture setup.
-
-`Agent::run` returns a `TurnOutcome` containing the reply and session identity. Use `Agent::turn(...).session(...)` for subsequent messages in the same conversation, or [stream progress](concepts/turns-sessions.md) when your interface should display deltas as they arrive.
-
-## Connect your own host
-
-Replace the fixture provider with an explicit OpenAI-compatible `Provider` or a native custom model. Give tools an explicit action directory, decide whether autonomy enforcement should be enabled, and keep runtime state separate from acting-tool folders. Configure the Tokio worker stack and credential master key as described in [installation](installation.md).
-
-The example's live path requires `OPENHUMAN_EXAMPLE_LIVE=1` plus `OPENHUMAN_EXAMPLE_BASE_URL`, `OPENHUMAN_EXAMPLE_API_KEY` and `OPENHUMAN_EXAMPLE_MODEL`. Choosing a live path is an explicit decision; setting credentials alone does not turn the default example into a live call.
-
-For managed TinyHumans inference, use the [TinyHumans host integration](integrations/tinyhumans-managed.md), which installs the backend transport. Embed by itself does not install one.
-
-## Extend the example
-
-- Give an analyst and a writer separate tools and folders: [multiple agents](guides/multi-agent.md).
-- Serve a request through your own HTTP transport: [deploy a server](guides/deploy-server.md).
-- Attach application functions: [tools](concepts/tools.md).
-- Isolate authenticated customers: [SaaS guide](guides/saas-multi-tenant.md).
-- Keep the setup offline and deterministic: [mock-backend testing](guides/mock-backend-testing.md).
-
-Drop listeners and agent handles before shutting down the runtime. For early removal, await `remove_agent` so retained handles stop admitting turns and the old ID is released only after cleanup.
diff --git a/gitbooks/developing/embed/troubleshooting.md b/gitbooks/developing/embed/troubleshooting.md
deleted file mode 100644
index 244a0b68dd..0000000000
--- a/gitbooks/developing/embed/troubleshooting.md
+++ /dev/null
@@ -1,46 +0,0 @@
----
-description: "Diagnose missing features, blocked turns, credentials, state paths and lifecycle failures."
----
-
-# Embedding troubleshooting
-
-Use the typed error and the effective capability report together. A method that was compiled out is a different problem from a configured method with a provider failure. Keep credentials, user prompts and raw provider payloads out of routine diagnostics.
-
-| Symptom | Check and next step |
-| --- | --- |
-| `RuntimeError::AlreadyRunning` | Reuse the process runtime; drop old listeners, agents and runtime before restarting. Profiles require their own process mode. |
-| Method or type not found at compile time | Check named Embed Cargo gates, especially `mcp`/`skills`. Core compiled flags alone do not activate those facade exports. |
-| `CoreError::Unavailable` | Inspect effective domains/modules as well as compiled features. Runtime selections can narrow a compiled family. |
-| `BACKEND_UNAVAILABLE` | Install the host backend transport, normally through `openhuman-tinyhumans`, before backend-touching calls. |
-| Credential master-key failure | Initialize process master-key state before persisting a runtime API key; check headless key/file setup without printing its value. |
-| Invalid or insecure provider route | Supply a nonblank endpoint/key and use HTTPS for remote bearer routes. Loopback fixtures are separate from remote endpoints. |
-| Stack overflow on a nested turn | Use the documented Tokio worker stack; the default 2 MiB stack is insufficient. Follow the runnable example support setup. |
-| A write is waiting indefinitely | Poll the same agent's approvals or retain an active callback subscription. Check origin, enabled autonomy and trusted action roots. |
-| Streaming appears stalled | Drain the bounded progress stream while work runs; inspect the final result. Dropping it cancels forwarding and the turn cooperatively. |
-| A skill is absent | Copy a real bundle into the agent's skill directory; symlinked bundles are rejected. New instructions need a new session. |
-| Agent registration returns `DuplicateId` | Another instance or teardown still reserves the ID. Wait for removal/last-handle cleanup to finish. |
-| Retained handle returns `AgentRemoved` | That instance was removed; obtain a newly registered handle rather than reusing the old one. |
-| `Decode` error on a typed facade | Treat it as an API/result-shape mismatch; preserve safe metadata and report a regression. |
-
-## Inspect without exposing credentials
-
-<!-- BEGIN EMBED: crates/openhuman-embed/examples/capability_report.rs#capability_report -->
-
-```rust
- let info = runtime.capabilities();
- assert_eq!(info.schema_version, 1);
- assert!(info.defaults.routed_provider);
- let serialized = serde_json::to_string(&info)?;
- assert!(!serialized.contains("sk-test"));
- assert!(!serialized.contains(&provider.uri()));
- assert!(!serialized.contains(&runtime.workspace_dir().display().to_string()));
- println!("{}", serde_json::to_string_pretty(&info)?);
-```
-
-<!-- END EMBED -->
-
-[Complete runnable example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/capability_report.rs), including runtime construction, imports and fixture setup.
-
-Before boot, `RuntimeBuilder::describe` can report a provisional plan; check `configuration_resolved`. After boot, `Runtime::capabilities` describes resolved defaults, storage source/driver and selection without its URL/key. Runtime events provide content-free lifecycle metadata, while explicit turn progress can contain text and should be handled accordingly.
-
-Reproduce behavior with [offline testing](guides/mock-backend-testing.md) before using a live provider. The [error concept](concepts/errors.md) explains structured kinds and expected-user-state errors.
diff --git a/gitbooks/developing/embedding.md b/gitbooks/developing/embedding.md
deleted file mode 100644
index de8bf1d715..0000000000
--- a/gitbooks/developing/embedding.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Embedding OpenHuman
-
-The embedding documentation now lives in the [Embedding section](embed/README.md).
-
-Start with [installation](embed/installation.md) and the [quickstart](embed/quickstart.md), then use the [concepts](embed/concepts/README.md), [guides](embed/guides/README.md), [integrations](embed/integrations/README.md) and generated [cookbook](embed/cookbook.md).
-
-The public library uses one Runtime per process with independently configured Agents. For isolated authenticated users, read [profiles and SaaS](embed/concepts/profiles-saas.md).
diff --git a/gitbooks/developing/engines.md b/gitbooks/developing/engines.md
deleted file mode 100644
index 2319800191..0000000000
--- a/gitbooks/developing/engines.md
+++ /dev/null
@@ -1,82 +0,0 @@
----
-description: >-
- The four swappable engines (models, embeddings, memory, search) and the
- config key that selects each one.
-icon: gears
----
-
-# Pluggable engines
-
-OpenHuman sends four kinds of work through a config key instead of a hardcoded client: chat and reasoning, embeddings, memory and web search. Each has a managed default that needs no key, plus a bring-your-own-key or local option. This page lists what is supported and the key that selects it. The linked Features pages cover setup and tradeoffs.
-
-## LLM providers
-
-Chat, reasoning, vision and coding work each have their own provider field (`chat_provider`, `reasoning_provider`, `agentic_provider`, `coding_provider`, `vision_provider` and more). Each is a string of the form `<slug>:<model>`. A field that is unset, blank or set to `cloud` stays on the managed default.
-
-Supported routes:
-
-- Managed (TinyHumans): the default. It gives you the OpenRouter model catalogue with no key to manage.
-- Local: a runtime you install and run (Ollama, LM Studio, MLX, OMLX). Address it as `ollama:<model>`, `lmstudio:<model>`, `mlx:<model>` or `omlx:<model>`, and set the endpoint in `[local_ai] base_url`. OpenHuman does not install the runtime or download models. You pull them yourself.
-- A local OpenAI-compatible endpoint: any server that speaks the OpenAI chat API. Use `local-openai:<model>`, or register it with its own slug and endpoint.
-- Claude Code / Claude Agent SDK: a provider slug that runs your installed Claude Code CLI instead of calling a hosted API.
-- 26 bring-your-own-key slugs, each with a preset endpoint so you only need a key: `openai`, `anthropic`, `google`, `openrouter`, `orcarouter`, `groq`,
- `mistral`, `deepseek`, `together`, `fireworks`, `cerebras`, `xai`,
- `moonshot`, `gmi`, `huggingface`, `nvidia`, `zai`, `minimax`, `stepfun`,
- `kilocode`, `deepinfra`, `novita`, `venice`, `vercel-ai-gateway`, `sumopod`,
- `modelscope`.
-
-Provider definitions live under `crates/openhuman-core/src/inference/provider/`
-(`factory.rs` turns a `<slug>:<model>` string into a client, and `types.rs` holds the provider shapes). Setup and the local-model capability table are in [Local models and bring your own key](../features/model-routing/local-and-byok-models.md). Routing and fallback order are in [Automatic model routing](../features/model-routing/README.md).
-
-## Embeddings
-
-Embeddings have their own provider setting, separate from the chat provider. Set it with `embeddings.update_settings` over RPC, or override it per workload with `embeddings_provider`.
-
-- Managed (default): the OpenHuman backend's Voyage-backed embedding endpoint. It works on a fresh install with no local daemon.
-- Voyage: the Voyage AI API with your own key.
-- OpenAI: cloud embeddings through the OpenAI API.
-- Cohere: the Cohere embed API with your own key.
-- Ollama: a local model you have pulled. `bge-m3` is recommended (`ollama pull bge-m3`). The memory engine does not use these, because it embeds on its own side.
-- Custom: any OpenAI-compatible embeddings endpoint.
-
-The code is in `crates/openhuman-core/src/inference/embedding_host/`. `mod.rs` lists the providers, `factory.rs` builds the client, and `schemas.rs` defines the `embeddings.*` RPC surface, including `set_api_key` per provider slug.
-
-## Memory
-
-Memory is Recall, Fetch and Store over a pluggable engine. The contract is `tinymemory-api`, vendored at `vendor/tinymemory/`. It defines a `MemoryEngine` trait with `recall`, `fetch`, `store`, `forget`, `list` and `health`. An `EngineDescriptor` says whether the engine is hosted, whether it needs an endpoint or key, and which fetch modes it supports. `tinymemory::list_engines` and `build_engine` are the registry.
-
-Two engines ship, both served by `tinymemory-integrations`:
-
-| id | what | endpoint | key |
-| --- | --- | --- | --- |
-| `tinyhumans` | CortexDB hosted behind the TinyHumans backend (`/memory/*`) | the backend origin | the signed-in session or API key, resolved per request through the host credential seam |
-| `cortexdb` | the user's own CortexDB (direct `/v1/*`) | `[memory.engines.cortexdb] endpoint` (default `https://api-v1.cortexdb.ai`) | stored in the OS keychain as `memory-cortexdb` |
-
-Select one with `[memory] engine` or from Connections > Memory > Engine (`openhuman.memory_engine_set`). `memory::engine::resolve` binds it. If you are signed out and have no CortexDB key, memory is off: the `memory` tool is not registered, ingestion does nothing and RPCs answer `MEMORY_OFF`.
-
-Built engines are cached by a fingerprint of engine id, endpoint and credential identity. Changing any of them rebuilds the engine on the next call. Engines do not migrate, so switching starts empty. The one-time import of an older store uploads to whichever engine is selected, after you consent.
-
-Both engines declare `fetch_modes = [hybrid]`, because the CortexDB recall wire has no keyword or vector switch. Asking for another mode fails with `UNSUPPORTED`.
-
-Related pages: [Memory](../features/memory.md) and
-[Memory architecture](architecture/memory.md).
-
-## Web search
-
-`[search] engine` selects the active provider. Only one is active at a time:
-
-- `managed` (default): proxied through the backend, no key needed.
-- `parallel`: search, extract, chat, research, enrich and dataset tools on the Parallel API.
-- `brave`: Brave Search (web, news, images, videos).
-- `querit`: Querit web search.
-- `exa`: Exa neural search (search, find-similar, contents). It calls `api.exa.ai` directly, never through the managed backend.
-- `tavily`: Tavily search and extract (web, news, finance). It calls `api.tavily.com` directly.
-- `disabled`: no search tools registered.
-
-If you pick a bring-your-own-key engine without a stored key, search falls back to `managed` so the agent is never left without a search tool.
-
-SearXNG is a separate toggle (`[searxng] enabled`, `base_url`), not a `search.engine` value, because it points at a self-hosted instance instead of a vendor API.
-
-The providers live in the `tinysearch` module (`vendor/tinysearch`), which owns the per-provider transports and role dispatch. The host keeps provider resolution and credential policy in `crates/openhuman-core/src/search/` and `crates/openhuman-core/src/config/schema/tools/search.rs`. Its provider list comes from the module contract.
-
-See [Web search](../features/native-tools/web-search.md) for the tools each engine exposes.
diff --git a/gitbooks/developing/getting-set-up.md b/gitbooks/developing/getting-set-up.md
deleted file mode 100644
index 339a9054a6..0000000000
--- a/gitbooks/developing/getting-set-up.md
+++ /dev/null
@@ -1,163 +0,0 @@
----
-description: >-
- Build OpenHuman from source, or install a release: toolchain, submodules,
- desktop builds and the installers for each platform.
-icon: wrench
----
-
-# Getting set up
-
-There are two ways to get OpenHuman running: build it from source, or install the latest release. This page covers both.
-
-If you only need the Rust workspace under `crates/` (no Node, no Tauri), use [Building the Rust core](building-rust-core.md). It has the pinned toolchain, OS packages and the `cargo` commands for `openhuman-core`.
-
-## Prerequisites
-
-- `git`
-- Node.js 24 or newer (see `app/package.json`)
-- `[email protected]` (see the root `package.json` `packageManager` field)
-- Rust 1.96.1 through `rustup` with `rustfmt` and `clippy` (see `rust-toolchain.toml`)
-- CMake, required by native Rust dependencies
-- Every `vendor/` submodule listed in `.gitmodules`, initialized recursively (`git submodule update --init --recursive`). The root `Cargo.toml` `[patch]` tables point into that tree, so cargo reads every manifest, optional crate or not. A partial checkout always fails to build
-- Platform desktop build tools: Xcode Command Line Tools on macOS, or the Tauri GTK/WebKit/AppIndicator package set on Linux
-
-macOS Homebrew quick start:
-
-```bash
-brew install node@24 pnpm rustup-init cmake
-rustup toolchain install 1.96.1 --profile minimal
-rustup component add rustfmt clippy --toolchain 1.96.1
-```
-
-Arch Linux quick start:
-
-```bash
-sudo pacman -S --needed nodejs npm rustup cmake base-devel clang openssl \
- alsa-lib xdotool libxtst libxi libevdev gtk3 webkit2gtk-4.1 \
- libayatana-appindicator librsvg patchelf nss nspr at-spi2-core \
- libcups libdrm libxkbcommon libxcomposite libxdamage libxfixes \
- libxrandr mesa pango cairo libxshmfence
-npm install -g [email protected]
-rustup toolchain install 1.96.1 --profile minimal
-rustup component add rustfmt clippy --toolchain 1.96.1
-```
-
-## Build from source
-
-Run from the repository root:
-
-```bash
-# 1) Clone and enter the repo
-git clone https://github.com/tinyhumansai/openhuman.git
-cd openhuman
-
-# 2) Fetch the vendored tiny* submodules
-git submodule update --init --recursive
-
-# 3) Install JS dependencies
-pnpm install
-
-# 4) Build the desktop app
-pnpm build
-```
-
-For development instead of a production build:
-
-```bash
-# Web-only UI development
-pnpm dev
-
-# Desktop app development: runs scripts/run-dev-macos.sh (`cargo tauri dev` with a dev config override)
-pnpm dev:app
-
-# Other Tauri CLI commands (from app/node_modules) run against crates/openhuman-app/
-pnpm tauri build
-```
-
-## Install the latest release on macOS and Linux
-
-Run the install script:
-
-```bash
-curl -fsSL https://raw.githubusercontent.com/tinyhumansai/openhuman/main/scripts/install.sh | bash
-```
-
-The script:
-
-- Finds the latest stable release for your platform.
-- Checks the download against its SHA-256 digest.
-- Installs without sudo.
-- On macOS, installs `OpenHuman.app` into `~/Applications`.
-- On Linux x64, installs the AppImage as `~/.local/bin/openhuman` and writes a desktop entry.
-
-To preview what it would do without writing files, add `--dry-run`:
-
-```bash
-curl -fsSL https://raw.githubusercontent.com/tinyhumansai/openhuman/main/scripts/install.sh | bash -s -- --dry-run
-```
-
-### Arch Linux
-
-There is no published AUR package. The repository includes an `openhuman-bin` recipe at [`packages/arch/openhuman-bin`](https://github.com/tinyhumansai/openhuman/tree/main/packages/arch/openhuman-bin). It uses the official x86_64 AppImage, extracts it during `makepkg`, installs a desktop entry and exposes `/usr/bin/openhuman`. Build it locally:
-
-```bash
-cd packages/arch/openhuman-bin
-makepkg --syncdeps --install
-```
-
-## Windows
-
-Use PowerShell:
-
-```powershell
-irm https://raw.githubusercontent.com/tinyhumansai/openhuman/main/scripts/install.ps1 | iex
-```
-
-The script:
-
-- Finds the latest stable release.
-- Downloads the x64 MSI or EXE.
-- Checks its SHA-256 digest.
-- Runs a per-user install where the installer supports it.
-
-## ARM Linux build (aarch64)
-
-CI builds the `aarch64-unknown-linux-gnu` target on an `ubuntu-24.04-arm` runner with the same Tauri command as x64 (see
-[`.github/workflows/build-desktop.yml`](https://github.com/tinyhumansai/openhuman/blob/main/.github/workflows/build-desktop.yml)).
-Locally, with the Linux desktop package set installed:
-
-```bash
-pnpm tauri build --target aarch64-unknown-linux-gnu --bundles deb appimage
-```
-
-The shell is stock Tauri on Wry, so the binary needs no extra library path. Install the `.deb` bundle with `dpkg -i`.
-
-You can also download any platform's installer from [tinyhumans.ai/openhuman](https://tinyhumans.ai/openhuman) or the [latest release](https://github.com/tinyhumansai/openhuman/releases/latest).
-
-## Troubleshooting
-
-### Stale `openhuman` process on the core port
-
-A previous Tauri build or `openhuman-core run` can leave a process listening on `OPENHUMAN_CORE_PORT` (default `7788`). If a new build attached to it, you would see version drift and 401s, because the new build's `OPENHUMAN_CORE_TOKEN` would not match.
-
-`core_process::ensure_running` now probes the port at startup:
-
-- If `GET /` identifies the listener as an OpenHuman core (a JSON body with `"name": "openhuman"`), it is treated as a stale process and stopped. On Unix it gets `SIGTERM`, then `SIGKILL` after 750 ms. On Windows it uses `taskkill /F /T /PID`. The Tauri host then starts its own embedded core.
-- If the listener is something else, or does not speak HTTP, startup fails and the log shows the conflict.
-- Set `OPENHUMAN_CORE_REUSE_EXISTING=1` to attach to whatever is listening instead. This is useful when you run `openhuman-core run` by hand for debugging.
-
-To clean up manually:
-
-```bash
-pkill -f "OpenHuman.app/Contents"
-pkill -f "openhuman-core"
-```
-
----
-
-## See also
-
-- [Building the Rust core](building-rust-core.md): the cargo-only path, without Node or Tauri.
-- [E2E testing guide](e2e-testing.md): the harness a local desktop build feeds.
-- [Architecture](architecture.md): what the shell, the core and the frontend each own.
-- [Cloud deployment](../features/cloud-deploy.md): running the same core headless on a server.
diff --git a/gitbooks/developing/hooks.md b/gitbooks/developing/hooks.md
deleted file mode 100644
index a4c5447701..0000000000
--- a/gitbooks/developing/hooks.md
+++ /dev/null
@@ -1,219 +0,0 @@
----
-description: >-
- File-based hooks that observe and gate an agent turn, with a
- Cursor-compatible contract.
-icon: link
----
-
-# Hooks
-
-A hook is a script you own. OpenHuman runs it at a set moment, such as before a tool runs, after a file is edited or when a turn finishes, and the agent obeys its answer. Hooks let you enforce rules that live in your repository instead of in our code. You can block `rm -rf`, run the formatter after every edit, write an audit line per tool call, or refuse to read `.env`.
-
-The contract matches [Cursor's](https://cursor.com/docs/hooks): the same file name, event names, stdin envelope, stdout decision and exit codes. A hook script written for either host runs on the other unchanged.
-
-> "Hook" has a second, unrelated meaning in this codebase: the in-process Rust traits in `crates/openhuman-core/src/agent/hooks.rs`. An embedding host installs those by compiling against the core. This page is about the file-based kind.
-
-## The file
-
-`hooks.json`, schema version 1:
-
-```json
-{
- "version": 1,
- "hooks": {
- "beforeShellExecution": [
- {
- "command": "./.openhuman/deny-destructive.sh",
- "matcher": "^\\s*(rm|dd|mkfs)\\b",
- "timeout": 5,
- "failClosed": true
- }
- ],
- "afterFileEdit": [
- { "command": "./.openhuman/format.sh", "matcher": "\\.rs$" }
- ]
- }
-}
-```
-
-OpenHuman reads four locations and concatenates them. A more specific file cannot remove a broader file's rules.
-
-| Layer | Path |
-| ----- | ---- |
-| System | `/etc/openhuman/hooks.json` · `/Library/Application Support/OpenHuman/hooks.json` · `%ProgramData%\OpenHuman\hooks.json` |
-| User | `~/.openhuman/hooks.json` |
-| Workspace | `<workspace_dir>/hooks.json` |
-| Project | `<action_dir>/.openhuman/hooks.json` |
-
-Concatenation is safe because the strictest verdict wins. Across every hook that ran, deny beats ask, and ask beats allow. Adding a hook never loosens a policy that another hook set. A repository can therefore ship its own `hooks.json` onto a machine an operator has already locked down.
-
-### Fields
-
-| Field | Meaning |
-| ----- | ------- |
-| `command` | Program to run, or the prompt text for `"type": "prompt"`. It runs with the directory of its `hooks.json` as the working directory. |
-| `type` | `command` (default) or `prompt`. |
-| `matcher` | Which occurrences reach this hook. See Matchers below. Absent means all. |
-| `timeout` | Seconds. Falls back to `[hooks] default_timeout_secs` (30). |
-| `failClosed` | Treat a crashed, missing or timed-out hook as a denial. Default `false`. |
-| `loop_limit` | Follow-ups this hook may inject per session. Default 5; `0` means unlimited. |
-| `model` | Model override for a `prompt` hook. |
-| `enabled` | Set `false` to park a hook without deleting it. |
-
-## The protocol
-
-The event arrives on stdin as one JSON object. The decision goes to stdout. The exit code decides how stdout is read:
-
-| Exit | Meaning |
-| ---- | ------- |
-| `0` | stdout is the decision. Empty stdout is a no-op. |
-| `2` | Deny, whatever stdout said. stderr becomes the reason the agent is told. |
-| anything else | Failure. It fails open (the action proceeds) unless `failClosed` is set. |
-
-A timeout, a missing interpreter and unparseable stdout all take the same failure path. A hook that denies only when it manages to run is not a security control, so `failClosed` covers every way a script can fail to answer.
-
-stdout is parsed leniently. The last standalone JSON object wins, so a script that logs progress before answering works as written.
-
-### Decision object
-
-Every field is optional. Each event honors the subset it defines:
-
-```json
-{
- "permission": "allow" | "deny" | "ask",
- "user_message": "shown to the human",
- "agent_message": "shown to the model",
- "updated_input": { "...": "replacement tool arguments" },
- "additional_context": "appended to the tool result",
- "continue": false,
- "followup_message": "sent as another user turn",
- "env": { "KEY": "value" }
-}
-```
-
-`ask` goes to the approval gate where one exists. Inside the tool middleware, which has no approval channel, it denies instead of quietly allowing.
-
-## Events
-
-`hook_event_name` in the envelope tells a script which moment it is in. Names match loosely: `preToolUse`, `PreToolUse` and `pre_tool_use` are the same event, and Claude Code's `UserPromptSubmit` maps to `beforeSubmitPrompt`.
-
-| Event | Fires | Honors |
-| ----- | ----- | ------- |
-| `preToolUse` | before any tool | `permission`, `updated_input`, `agent_message` |
-| `postToolUse` | after a tool succeeded | `additional_context` |
-| `postToolUseFailure` | after a tool failed | - |
-| `beforeShellExecution` | before `shell` | `permission`, `agent_message` |
-| `afterShellExecution` | after one completed | - |
-| `beforeReadFile` | before `file_read` / `read_diff` | `permission` |
-| `afterFileEdit` | after `file_write` / `edit` / `apply_patch` | - |
-| `beforeMCPExecution` / `afterMCPExecution` | around an MCP tool | `permission` |
-| `beforeSubmitPrompt` | on a chat message, before the model | `continue`, `permission`, `additional_context` |
-| `subagentStart` | before a delegation | `permission` |
-| `subagentStop` | after one (not fired yet, see below) | `followup_message` |
-| `stop` | after a turn | `followup_message` |
-| `afterAgentResponse` | on the assistant's message | - |
-
-`sessionStart`, `sessionEnd`, `preCompact`, `afterAgentThought` and `subagentStop` are defined. They parse, match and execute, and you can exercise them with `hooks test`, but the core does not fire them yet. Configuring one produces a load warning, and `hooks list` reports `"wired": false` for it. A hook that silently never runs would be worse, so the warning is deliberate.
-
-### Derived events
-
-OpenHuman has no separate "shell execution" or "file read" call site. Those are the `shell`, `file_read` and `file_write` tools going through the ordinary tool path. The shell, file and MCP events are therefore derived from tool calls, and their payloads are reshaped the way a Cursor hook expects: a `command` string, a `file_path`, an `edits` array. The generic `preToolUse` fires first, then the specialized event.
-
-## Matchers
-
-A matcher is one string, matched against a subject the event chooses. That is the tool name for tool events, the command line for shell events, the path for file events and the agent id for subagent events.
-
-* absent or `*`: everything
-* `Shell`: a literal, case-insensitive name
-* `Read|Write|Shell`: alternation
-* `MCP:search_docs`: an MCP tool by name
-* anything containing punctuation: a regular expression (`^rm\b`, `\.rs$`)
-
-An invalid regex matches nothing and is logged.
-
-## Latency
-
-Gating events run their hooks one after another and the turn waits. A denial skips the rest. Observational events (`afterShellExecution`, `postToolUseFailure`, `afterAgentResponse` and others) run on a background task and the turn never waits, so a hung audit hook cannot hang the agent.
-
-When nothing is configured, the harness bridge is not installed, so an unconfigured host pays nothing per tool call.
-
-## Environment
-
-Hook processes inherit the core's environment plus:
-
-`OPENHUMAN_PROJECT_DIR` (also exported as `CLAUDE_PROJECT_DIR` and
-`CURSOR_PROJECT_DIR`), `OPENHUMAN_VERSION`, `OPENHUMAN_HOOK_EVENT`,
-`OPENHUMAN_SESSION_ID`, `OPENHUMAN_AGENT_ID`.
-
-## Prompt hooks
-
-With `"type": "prompt"` you write the policy in English instead of shell. The text goes to a model with the event JSON substituted for `$ARGUMENTS`, and the model answers `{"ok": true}` or `{"ok": false, "reason": "..."}`.
-
-```json
-{ "command": "Deny if $ARGUMENTS deletes anything outside /tmp.", "type": "prompt" }
-```
-
-Each event costs a model call, so use prompt hooks for rare, high-stakes moments, not every tool call.
-
-## Inspecting and debugging
-
-Three commands cover it:
-
-```bash
-openhuman-core hooks list # what is configured, from which file, and whether it is wired
-openhuman-core hooks reload # re-read every layer
-openhuman-core hooks test --event beforeShellExecution \
- --payload '{"command":"rm -rf /","sandbox":false}'
-```
-
-Over JSON-RPC they are `openhuman.hooks_list`, `openhuman.hooks_reload` and `openhuman.hooks_test`.
-
-`hooks test` fires one synthetic event in the foreground and reports what each matching hook decided. That includes hooks on observational events, which a real dispatch would run in the background. Use it to debug a hook instead of asking the agent to do the dangerous thing to see whether the rule fires.
-
-## Host switches
-
-`config.toml`:
-
-```toml
-[hooks]
-enabled = true # off means no hooks.json is read and no bridge installed
-default_timeout_secs = 30 # for hooks that name no timeout of their own
-```
-
-## Example
-
-`.openhuman/hooks.json`:
-
-```json
-{
- "version": 1,
- "hooks": {
- "beforeReadFile": [{ "command": "./.openhuman/no-secrets.sh", "matcher": "\\.env" }],
- "afterFileEdit": [{ "command": "./.openhuman/fmt.sh", "matcher": "\\.rs$" }]
- }
-}
-```
-
-`.openhuman/no-secrets.sh`:
-
-```sh
-#!/bin/sh
-echo '{"permission":"deny","agent_message":"Secrets files are off limits. Ask the user for the value you need."}'
-```
-
-`.openhuman/fmt.sh`:
-
-```sh
-#!/bin/sh
-cat > /dev/null # drain stdin, this hook ignores the event
-cargo fmt >/dev/null 2>&1
-echo '{}'
-```
-
-Both need `chmod +x`.
-
-## Implementation
-
-The engine and the whole `hooks.json` contract live upstream in `tinyagents_runtime::command_hooks`. That covers the types, the file and its layering, the matcher, running one hook (stdin, timeout, exit codes), selection, ordering and aggregation, the context envelope, and follow-ups.
-
-`crates/openhuman-core/src/hooks/` holds the host half: `bridge` (mounts the engine on the harness's tool and turn paths), `ops` (moments with no existing path), `host`, `schemas` (the RPC surface) and `prompt_eval`. The `README.md` beside the code is the authoritative split.
diff --git a/gitbooks/developing/jev.md b/gitbooks/developing/jev.md
deleted file mode 100644
index a5cd46b459..0000000000
--- a/gitbooks/developing/jev.md
+++ /dev/null
@@ -1,119 +0,0 @@
----
-description: >-
- Jev, the small decision model: what it answers, where OpenHuman uses it,
- what it costs and how to configure it.
-icon: scale-balanced
----
-
-# Jev
-
-Jev is a decision model, not a text generator. Give it a request and a handful of labelled options, and it returns a calibrated probability for each one in about 150 milliseconds. OpenHuman uses it as a fast, cheap judge wherever a turn must pick from a short list instead of writing prose. That means tool selection during a search and step-by-step browser control.
-
-The models are `jev-1.13` and `jev-latest`, built by TypeSafe AI. OpenHuman reaches them through the TinyHumans System One proxy or, on a bring-your-own-key OpenRouter route, directly. Input costs $0.042 per million tokens and output is free. A typical tool search uses one to two thousand tokens. There is no session, no chain of thought and nothing to stream: one request, one set of probabilities.
-
-## Three question types
-
-Jev answers three kinds of question. They are defined in `tinyjevclient`:
-
-- Choice: probabilities over a set of named options. The caller can take the best one, the top three, or drop everything below a confidence floor.
-- Score: one calibrated number for one thing, instead of a choice among several.
-- Noul: a yes/no probability. OpenHuman uses it to ask "does this apply at all" instead of "which of these applies".
-
-Tool search sends a Choice and a Noul in the same request. The Choice picks a tool from the shortlist (plus a `none` option), and the Noul says whether the request needs a tool at all. Browser control calls Jev once per step to decide the next action.
-
-## Why retrieval comes first
-
-Jev accepts at most 255 options in one Choice, and its accuracy drops as the list fills with entries unrelated to the request. So OpenHuman never hands Jev a whole tool catalogue. `tinytools-jev` (`vendor/tinyagents/vendor/tinytools/crates/tinytools-jev/`) narrows first and decides second:
-
-1. A retriever (BM25 by default, or an embedding ranker when one is configured) shortlists `retrieval_k` candidates, 20 by default. This step is skipped when the catalogue already fits in one Choice.
-2. One request goes to Jev: a Choice over the shortlist plus `none`, and a Noul asking whether the request needs a tool at all.
-3. Hits come back ranked by probability. `none` is removed, and anything below `min_probability` (0.05 by default) is dropped.
-
-`JevRankerConfig::with_strategy` picks how the catalogue is narrowed:
-
-- `RetrieveThenDecide` (the default): retrieve the top 20, then decide once. Recall is capped by the retriever, because a paraphrase it misses never reaches Jev.
-- `FamilyThenDecide`: one evaluation picks the family first (a toolkit or pack, with anything else in `core`). A second evaluation then runs per chosen family over every member of it. `max_families` defaults to 2 and the evaluations run concurrently. A family that fits in one Choice skips retrieval, so a paraphrase is judged on meaning at both stages instead of being filtered out lexically first.
-
-## How OpenHuman uses it
-
-### Tool search
-
-The tinyagents harness owns the `tool_search` / `tool_call` bridge over every tool registered as deferred. `openhuman-tinyhumans` installs `TinyHumansJevRanker` (`crates/openhuman-tinyhumans/src/jev/ranker.rs`) as the process-wide ranker for that bridge (`crates/openhuman-core/src/agent/tinyagents/discovery/`). The product default uses `RetrieveThenDecide` with the process's embedding provider as the retriever, so candidates are found by meaning, not shared words, before Jev decides.
-
-The ranker resolves its Jev route and credential on every search instead of caching them at install time, because a desktop can sign in and out while the process keeps running. The route is `agent.tool_search.jev_route` (see [Configuration](#configuration)): the TinyHumans proxy, TypeSafe's own API, or OpenRouter's System One API. The built Jev client is cached by route, credential and backend URL, so a stable session does not rebuild an HTTP client on every search.
-
-If the process has no usable embedding provider, `TinyHumansJevRanker` declines and the harness uses its own BM25 ranking. Running Jev over a lexical shortlist would only add a network round trip for no gain.
-
-### Browser control
-
-`crates/openhuman-core/src/modules/browser_task.rs` hands browser tasks to TinyComputer's task members (`StartTask`, then `AwaitTask` until the task pauses or finishes). Tasks stay on the browser surface and the allowed websites.
-
-The decision model is set in `[computer] decision_model`: Jev (through the hosted proxy when signed in, or your OpenRouter key), OpenJev or Sage. A failed step goes to the rescue model (`[computer] rescue_model`, up to `max_rescues` times) before the task fails. An irreversible step pauses as `needs_approval`. The browser tool holds it behind a one-use token, and only `confirm_pending`, through the host approval gate, answers `ContinueTask`.
-
-The TinyComputer module keeps what finished browser tasks learned, per site, through the host's `SiteMemoryHost` interface (`crates/openhuman-core/src/modules/site_memory_host.rs` stores it in `<workspace>/state/computer/sites/`). `StartTask.site` makes the module load that and hand it to the task on the same site:
-
-- The plan a run finished with goes in as the task's flow for the same goal and facts, so no planning is needed.
-- The elements it found go in as its grounding hints. A remembered element costs one yes/no instead of a search.
-
-Only a finished run (`done`, or its payment checkpoint) teaches anything. A plan is kept only when its run needed no rescue and holds no fact value its goal does not. A reused plan that fails or needs a rescue is forgotten. Elements holding a fact value or page text are not kept. Entries expire after 30 days unused, and none of it reaches the agent's memory or prompts. `[browser] learn_from_tasks` turns this off, and `modules.browser_forget_sites` forgets one site or all.
-
-## Measured results
-
-These numbers come from [`docs/plans/jev-tool-search-baseline.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/plans/jev-tool-search-baseline.md). The test used 215 core tools plus 1,000 recorded Composio actions and 160 hand-written requests. Of those, 66 map to a Composio action, 63 to a core tool and 31 should get no tool.
-
-| Ranker | Top-1 | Top-3 | Needless calls (of 31) | p50 latency |
-| --- | --- | --- | --- | --- |
-| BM25 | 22.5% | 38.0% | 26 | 28 ms |
-| Jev, BM25 top-20 then decide | 57.4% | 62.0% | 1 | 1.5 s |
-| Jev, embedding top-20 then decide (product default) | 62.0% | 66.7% | 1 | 1.5 s |
-| Jev, family then decide | 62.0 to 64.3% | 67.4 to 69.0% | 1 | 1.3 s |
-
-On the Composio-only slice, `FamilyThenDecide` with an embedding cut for oversized families reaches 80.3% top-1 and 87.9% top-3. BM25 reaches 18.2% and 36.4%.
-
-The gap comes mostly from retrieval, not the decision. With `RetrieveThenDecide` and BM25 shortlisting, Jev's Composio top-3 (72.7%) equals BM25's recall@20. Jev chooses correctly from everything it sees, but a paraphrase like "ping alex" for `SLACK_SEND_MESSAGE` never reaches it. Letting Jev pick the family first removes the shortlist for every toolkit that fits in one Choice and lifts Composio top-3 into the high 80s.
-
-Needless tool calls drop sharply under any Jev setup. BM25 answers 26 of 31 tool-less requests with a wrong tool. Jev's `none` option and `needs_tool` Noul let it abstain on all but one.
-
-## Configuration
-
-`ToolSearchConfig` (`crates/openhuman-core/src/config/schema/agent.rs`) is the `[agent.tool_search]` block:
-
-```toml
-[agent.tool_search]
-ranker = "jev" # "jev" (default) | "auto" | "bm25" | "compare"
-jev_route = "auto" # "auto" (default) | "tinyhumans" | "typesafe" | "openrouter"
-# jev_base_url = "http://127.0.0.1:18080" # typesafe/openrouter origin override
-top_k = 3
-```
-
-- `ranker = "jev"`: use the installed decision-model ranker. It falls back to BM25 only when Jev fails or the process has no TinyHumans credential.
-- `"auto"`: the same fallback as `"jev"`.
-- `"bm25"`: the built-in lexical ranker only, with no network call.
-- `"compare"`: serve Jev, and also record the BM25 ranking in the `tool.searched` telemetry. You can compare the two on live traffic without changing what the model sees.
-- `jev_route`: where Jev calls go. `"auto"` uses the TinyHumans credential if the process has one, else `TYPESAFE_API_KEY` (direct to TypeSafe), else an OpenRouter key (`OPENROUTER_API_KEY`, or the stored `openrouter` key). `"tinyhumans"`, `"typesafe"` and `"openrouter"` pin one route and never fall through to another credential. Override per launch with `OPENHUMAN_JEV_ROUTE`.
-- `jev_base_url`: replaces the API origin of the `typesafe` and `openrouter` routes, for example a metering proxy or a mirror. Remote origins must be HTTPS. HTTP is accepted only for literal loopback IPs. Override per launch with `OPENHUMAN_JEV_BASE_URL`.
-- `top_k`: how many matches a search returns when the model does not ask for a number. The default is three, enough to choose from without returning so many schemas that deferring them loses its point.
-
-Without an embedding provider, or without a credential for the selected route, tool search falls back to BM25 automatically. `auto` and `jev` therefore cost nothing extra when no credential is set. A setup with no TinyHumans account needs an embedding provider that does not depend on one (for example `memory.embedding_provider = "custom:<OpenAI-compatible endpoint>"`) and a TypeSafe or OpenRouter key.
-
-## Running the benchmark
-
-`tool-search-bench` lives in the `profile/` crate of [openhuman-benchmarks](https://github.com/tinyhumansai/openhuman-benchmarks). From a checkout of that repository:
-
-```bash
-cargo run --manifest-path profile/Cargo.toml --bin tool-search-bench -- --ranker all --misses
-cargo run --manifest-path profile/Cargo.toml --bin tool-search-bench -- --ranker jev --family --embedding
-cargo run --manifest-path profile/Cargo.toml --bin tool-search-bench -- --dump-catalogue
-```
-
-`OPENHUMAN_BACKEND_API_KEY` (or `TYPESAFE_API_KEY`) selects the credential. Without one, the bench ranks through the signed-in TinyHumans session, as the product does.
-
-## Where the code lives
-
-- `vendor/tinyagents/vendor/tinytools/crates/tinytools-jev/`: the transport-neutral `ToolRanker` implementation, its retrieval strategies and the `JevRankerConfig` / `JevRanking` types.
-- `crates/openhuman-tinyhumans/src/jev/`: the TinyHumans evaluator (`TinyJevEvaluator`, over `tinyjevclient`) and the process-installed ranker (`TinyHumansJevRanker`).
-- `crates/openhuman-core/src/agent/tinyagents/discovery/`: the host slot that holds the installed ranker and turns `[agent.tool_search]` into the policy a turn runs with.
-- `crates/openhuman-core/src/modules/browser_task.rs`: the browser-task entry point that runs `JevController`.
-- [`docs/plans/jev-tool-search-baseline.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/plans/jev-tool-search-baseline.md): the full benchmark writeup.
-
-See also [Performance](performance.md) for the wider cost and density picture, [Pluggable engines](engines.md) for the other swappable pieces, and [Embedding OpenHuman](embedding.md) for running an agent as a library.
diff --git a/gitbooks/developing/loadable-modules.md b/gitbooks/developing/loadable-modules.md
deleted file mode 100644
index 44048b99df..0000000000
--- a/gitbooks/developing/loadable-modules.md
+++ /dev/null
@@ -1,116 +0,0 @@
----
-description: >-
- How OpenHuman loads optional native modules at runtime: the registry,
- admission checks and what happens when a module faults.
-icon: puzzle-piece
----
-
-# Loadable modules
-
-Feature gates decide what compiles into the binary. Modules decide what the running binary can reach. A module is a first-party native library, loaded into the core process, that serves a small typed interface over TinyBus.
-
-The trade is explicit. A module shares the core's address space and crash domain, so it is trusted code and the admission checks matter. In return, a user who never generates a document never pays for the document writer in download size, memory or dependencies.
-
-## Host access and contracts
-
-Hosts reach module clients through the `openhuman-rpc` facade chain. The shared
-`openhuman_rpc::embed::modules::ModuleClient` accepts explicit configuration
-and uses the process-wide lazy loader before or after core startup. Constructing
-a client starts nothing and requires no signed-in session. Set bundled-artifact
-discovery before its first call. Without the loader, a call returns an explicit
-unavailable error.
-
-A `*-bus` crate contains serialized vocabulary, errors, identifiers, versions,
-schemas and static tool declarations. Parsing, provider dispatch, cryptography,
-processes and device access execute inside the compiled module. Hosts retain
-configuration, credentials, approvals and execution policy. They never link an
-implementation fallback when a module is unavailable. Stateful adapters release
-module-owned resources through explicit close, cancellation and shutdown calls.
-
-The remaining migration work and temporary dependency exceptions are tracked
-in [the module-boundary inventory](../../docs/module-boundary-inventory.md).
-
-## The registry
-
-`crates/openhuman-core/src/modules/registry/` compiles eleven records. Only this registry may select an artifact. Nothing reads a module name from config and goes looking for it.
-
-| Module | Provides |
-| --- | --- |
-| `tinycomputer` | Desktop and browser observation and control |
-| `tinysearch` | Web-search provider dispatch |
-| `tinydocs` | Document extraction and `.docx` / `.pptx` synthesis |
-| `tinywallet` | Key derivation and transaction signing |
-| `tinyjuice` | Tool-output compression and recovery |
-| `tinyvoice` | Audio framing, VAD, wake-word gating, hallucination detection |
-| `tinymcp` | The MCP client and registry |
-| `tinyconnectors` | OAuth connector actions and triggers |
-| `tinybox` | Sandbox/resource lifecycle, bounded and supervised execution, jail and Docker operations, shell execution, file transfer and port forwarding |
-| `tinychannels` | Messaging channel transports |
-| `tinyhosts` | Hosting provider operations |
-
-Each record carries a version, the release it came from, and one `PlatformAsset` per supported build. Seven records publish eleven builds: `ubuntu-24.04` and `ubuntu-22.04` on `x86_64` and `arm64`, `macos-26` and `macos-15` on `arm64` and `x86_64`, `windows-2025-x86_64`, `windows-2022-x86_64` and `windows-11-arm64`. TinyComputer publishes sixteen assets; TinyBox, TinyMCP and TinyWallet each publish seventeen, adding Arch Linux and Fedora builds. Asset availability is module-specific, so a release's count should not be inferred from another module's matrix.
-
-Every asset carries a SHA-256 copied verbatim from the published release's own checksum file. Do not compute a replacement pin from a local build. The digest must describe the artifact the release workflow signed, not the one on your machine.
-
-## Resolution order
-
-Each step avoids the cost of the next:
-
-1. Already serving on the host's broker.
-2. An operator override: a path in `[modules].overrides`, or a source mode (`[modules] source` / `OPENHUMAN_MODULE_SOURCE`, local development only; CI uses `release`). `linked` serves a module compiled into the running `openhuman-core` (build it with `--features linked-modules`, which links `crates/openhuman-modules-linked`; no product build or other host can reach that crate). `source` serves a library built from the module's vendored gitlink by `node scripts/modules/build.mjs <id|all>` (it writes `target/module-sources/<id>/` with an operator-trust `modules.toml`; set `OPENHUMAN_MODULE_SOURCE_DIR` to that directory). Local digests are never registry pins. `node scripts/modules/pin-status.mjs` reports whether each gitlink is in sync with, ahead of or behind its registry pin (ahead means you are running a locally compiled module that CI will refuse), and `node scripts/modules/release-and-repin.mjs <id>` publishes a release and re-pins from its `checksum.toml`. The strict `check-module-pins.mjs` is unchanged.
-3. The module search path: `OPENHUMAN_MODULE_PATH`, then the platform data directories.
-4. Bundled releases staged into the app at build time.
-5. The release cache, downloading only if `[modules].allow_download` is true.
-
-An override bypasses the digest check, because the artifact is whatever sits at that path. That is acceptable only because it is the operator's own file, named in the operator's own config. It also means an override cannot add a module that is not already in the registry.
-
-Platform candidates are ordered newest first, with fallthrough. On Linux, glibc 2.39 or newer prefers the 24.04 build and falls back to 22.04. glibc 2.35 or newer gets 22.04. Anything older, plus musl or an unknown libc, gets an empty candidate list, so no published artifact loads there by design.
-
-## Admission
-
-These checks run in order, all before any module code runs:
-
-1. Directory ownership and mode, and a regular platform library file within the size cap.
-2. The digest allowlist beside the artifact, when present, which is authoritative for its directory.
-3. Resolve the ABI descriptor symbol, and validate its frozen 16-byte prefix before reading the rest.
-4. Validate the full descriptor: matching pointer width, endianness and target triple, a compatible TinyBus series, and module feature bits that are a subset of the host's. A module built with `panic = "abort"` is refused, because an aborting panic takes the host down with it.
-5. Parse the manifest and resolve dependencies, rejecting missing providers, cycles and name clashes.
-6. Initialize, take the vtable, attach the transport.
-
-Each module declares its interface in its own small `*-bus` contract crate: the interface name, the object path, one constant per member, and a contract version. The bind rule is that majors are equal and the module's minor is at least the host's. A newer module serves an older host, and the reverse is refused instead of half working. Never redeclare a contract type in OpenHuman, and call members through the contract's constants, not string literals.
-
-## Faults are terminal
-
-Of the eleven lifecycle states, five are terminal: rejected, faulted, failed, stopped and disabled. A module in one of those answers "unavailable" immediately and is never retried in the same process.
-
-This follows from a second rule: the loader never unloads a library. A stopped module releases its transport and its names, but its code, thread-locals, panic metadata and callback addresses stay mapped until the process exits. Replacing an artifact needs a restart. Retrying a faulted module in place would run code whose invariants you already know are broken.
-
-Untrusted code does not belong here. It belongs in a separate process, which is what the sandbox backends are for.
-
-## Configuration
-
-```toml
-[modules]
-enabled = true # when off, features report it instead of failing at use
-allow_download = true # false suits an air-gapped or reproducible deployment
-# install_dir = "..." # defaults to the user cache dir, then the workspace
-```
-
-Nothing is downloaded silently either way. The digest comes from the compiled-in registry, not from the release being fetched.
-
-The `modules` RPC namespace exposes `list`, `status` and `load` (by id, never by path), plus `computer_status` and `browser_check_readiness` for the computer module's readiness. `browser_forget_sites` forgets what browser tasks learned about one site or every site (see [Jev](jev.md)).
-
-## Adding or moving one
-
-A module's behavior belongs in the submodule that owns it. The host side is the adapter: the proxy, the config it pushes at initialization and the policy around the call. When you change a module:
-
-1. Land the change upstream and cut a release there.
-2. Move the gitlink under `vendor/`.
-3. Update the record's version, release URL and digests from that release's checksum file.
-4. Test both the gate-on and gate-off builds, because a missing leaf gate should mean the module is absent, not present and failing.
-
-## See also
-
-- [Architecture](architecture/README.md): where modules sit relative to the core.
-- [Building the Rust core](building-rust-core.md): the feature gates that decide what compiles.
-- [Performance and footprint](performance.md): what the lazy-loading trade is worth.
diff --git a/gitbooks/developing/mcp-server.md b/gitbooks/developing/mcp-server.md
deleted file mode 100644
index 66398a3084..0000000000
--- a/gitbooks/developing/mcp-server.md
+++ /dev/null
@@ -1,170 +0,0 @@
----
-description: Run OpenHuman Core as a stdio Model Context Protocol server for local MCP clients.
-icon: plug
----
-
-# MCP server
-
-OpenHuman Core can run as an opt-in stdio MCP server. Local MCP clients such as Claude Desktop, Cursor or Zed can then use its search, memory and sub-agent tools.
-
-```bash
-openhuman-core mcp
-```
-
-The command does not start the HTTP JSON-RPC server. It reads newline-delimited JSON-RPC 2.0 messages from stdin and writes MCP responses to stdout. Logs go to stderr. Add `--verbose` for debug output.
-
-## Client provenance
-
-During `initialize`, the server captures `params.clientInfo.name` for the stdio session. It normalizes the name in four steps: trim whitespace, lowercase, replace each run of non-ASCII-alphanumeric characters with one hyphen, then trim leading and trailing hyphens. `Claude Desktop` becomes `claude-desktop`, `Cursor` becomes `cursor` and `Windsurf` becomes `windsurf`.
-
-If the client omits `clientInfo.name`, sends an empty value, or sends a name that normalizes to nothing, the session uses the bare `mcp` source label. Write-capable MCP tools use this label for memory provenance. Unidentified clients write as `mcp`, and identifiable clients write as `mcp:<client>`.
-
-## Tools
-
-The MCP surface routes through the controller registry and the core security policy. Read tools pass the read gate. Three tools pass the act gate. Two of them, `memory.learn` and `memory.forget`, are also recorded on the MCP write-audit path. `agent.run_subagent` is not, because the sub-agent's own side-effecting calls are audited through the approval gate instead.
-
-| MCP tool | Backing RPC | Purpose |
-| ------------------- | ------------------------------------ | ----------------------------------------------------------------------- |
-| `web_search`\* | `openhuman.tools_web_search` | Ranked web search through the configured providers, with fallback. |
-| `web_answer`\* | `openhuman.tools_web_answer` | Grounded answer with citations (Gemini with Google Search by default). |
-| `searxng_search`\* | `openhuman.tools_searxng_search` | Search a configured self-hosted SearXNG instance. |
-| `memory.recall` | `openhuman.memory_recall` | Ask a question; get an answer with citations (read-only). |
-| `memory.fetch` | `openhuman.memory_fetch` | Raw hits for a query, with metadata filters and a cursor (read-only). |
-| `memory.list` | `openhuman.memory_items_list` | Page through stored items, newest first (read-only). |
-| `memory.learn` | `openhuman.memory_learn` | Store one learning (adds an item; non-destructive). |
-| `memory.forget` | `openhuman.memory_forget` | Permanently remove items by id (destructive; act-gated). |
-| `core.list_tools` | served in-layer | The live core agent tool catalog OpenHuman exposes to its orchestrator. |
-| `core.tool_instructions` | served in-layer | The Markdown tool-use instruction block injected into prompt-guided agents. |
-| `agent.list_subagents` | served in-layer | The registered sub-agent definitions the core can dispatch. |
-| `agent.run_subagent` | served in-layer | Run a registered sub-agent and return its final response (act-gated). |
-
-Tools marked \* are listed only when a provider can serve them. `web_search` and `web_answer` need a usable provider for their search role, which is a signed-in session or a provider with your own key. `searxng_search` needs SearXNG enabled in search settings.
-
-Arguments:
-
-- `web_search`: `query`, optional `max_results` (1 to 20), and optional `provider` (pins one provider and disables fallback).
-- `web_answer`: `query` and optional `depth` (`quick` or `deep`).
-- `searxng_search`: `query` and optional `max_results` (1 to 20).
-- `memory.recall`: `question`, plus optional `filter` and `limit`.
-- `memory.fetch`: `query`, plus optional `mode`, `filter`, `limit` and `cursor`. `mode` must be one the active memory engine supports. Both launch engines (`tinyhumans`, `cortexdb`) support only `hybrid`, so leave it out unless you know otherwise.
-- `memory.list`: optional `filter`, `limit` and `cursor`.
-- `memory.learn`: `text`, plus optional `kind` (`preference`, `fact`, `procedure`, `correction`, `other`) and `confidence` (0 to 1).
-- `memory.forget`: `ids` (1 to 100).
-
-`limit` defaults to 10 and is capped at 100. `filter` takes any of `workspace`, `folder`, `file_path`, `language`, `repo`, `commit`, `url`, `thread_id`, `agent_id`, `kinds` (`document`, `conversation`, `learning`), `sources`, `tags_any`, `observed_after` and `observed_before` (RFC 3339). Memory tools answer `MEMORY_OFF` when no memory engine is usable. See the [memory spec](https://github.com/tinyhumansai/openhuman/blob/main/docs/specs/memory-v2.md) for the model.
-
-Enable SearXNG under Connections > Search, in `config.toml`, or with environment variables:
-
-```toml
-[search.providers.searxng]
-enabled = true
-route = "direct"
-
-[searxng]
-enabled = true
-base_url = "http://localhost:8080"
-max_results = 10
-default_language = "en"
-timeout_seconds = 10
-```
-
-```bash
-OPENHUMAN_SEARXNG_ENABLED=true
-OPENHUMAN_SEARXNG_BASE_URL=http://localhost:8080
-OPENHUMAN_SEARXNG_MAX_RESULTS=10
-OPENHUMAN_SEARXNG_DEFAULT_LANGUAGE=en
-OPENHUMAN_SEARXNG_TIMEOUT_SECONDS=10
-```
-
-## Resources
-
-The server exposes the bundled prompt assets as static resources. Clients that support `resources/list` and `resources/read` can read the agent personality and sub-agent prompt templates without running any tool.
-
-### Capability advertisement
-
-The `initialize` response includes:
-
-```json
-{
- "capabilities": {
- "tools": {},
- "resources": { "subscribe": false, "listChanged": false }
- }
-}
-```
-
-### URI scheme
-
-| URI | Content |
-| --------------------------------- | ------------------------------------------------------ |
-| `openhuman://prompts/identity` | `IDENTITY.md` (core agent identity) |
-| `openhuman://prompts/soul` | `SOUL.md` (core agent personality and values) |
-| `openhuman://prompts/user` | `USER.md` (user-profile context) |
-| `openhuman://prompts/agents/<id>` | `<id>/prompt.md` for each of the 15 built-in subagents |
-
-All resources have `mimeType: "text/markdown"`.
-
-### Catalog parity
-
-A unit test (`catalog_mirrors_builtins`) checks the resource catalog against the `BUILTINS` slice in `loader.rs`. Adding a built-in sub-agent without a matching catalog entry fails CI.
-
-### Resource templates
-
-The catalog is static: every URI is concrete and none are templated. `resources/templates/list` therefore always returns an empty `resourceTemplates` array. The handler exists so clients that probe it after seeing the `resources` capability get a valid result instead of `-32601 Method not found`.
-
-### Smoke test for resources
-
-```bash
-printf '%s\n' \
- '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}' \
- '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
- '{"jsonrpc":"2.0","id":2,"method":"resources/list"}' \
- '{"jsonrpc":"2.0","id":3,"method":"resources/templates/list"}' \
- '{"jsonrpc":"2.0","id":4,"method":"resources/read","params":{"uri":"openhuman://prompts/identity"}}' \
- | openhuman-core mcp
-```
-
-## Tool registry
-
-The HTTP JSON-RPC server also exposes a read-only tool registry. Agents and dashboards can use it to discover tools without opening an MCP stdio session:
-
-| RPC method | Purpose |
-| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `openhuman.tool_registry_list` | List MCP stdio tools and controller-backed tools with stable `tool_id`, route, version, input/output schemas, allowed agents, tags, enabled state, and health. |
-| `openhuman.tool_registry_get` | Return one registry entry by `tool_id`, for example `memory.recall` or `tools.web_search`. |
-| `openhuman.tool_registry_diagnostics` | Return redacted inventory counts, write-surface candidates, policy surfaces, and external capability-provider diagnostics. |
-
-The registry is for discovery only. It does not change tool dispatch or permission checks. MCP calls still go through `tools/call`, and controller-backed tools still use their own JSON-RPC methods.
-
-### External capability providers
-
-You can record trusted external capability providers in `config.toml`. This is governance metadata only. It does not install packages, run remote code or bypass the MCP and controller dispatch paths.
-
-```toml
-[[capability_providers]]
-id = "Acme Tools"
-display_name = "Acme Tools"
-source_uri = "https://example.com/openhuman/acme-tools"
-source_digest = "sha256:abc123"
-trust_state = "trusted"
-enabled = true
-```
-
-Provider ids are normalized before policy checks, so `Acme Tools` becomes `acme-tools`. Duplicates after normalization are rejected. A provider is eligible for future admission checks only when it has both `enabled = true` and `trust_state = "trusted"`. With no provider config, the registry is empty and no existing tools are hidden.
-
-## Smoke test for tools
-
-```bash
-printf '%s\n' \
- '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}' \
- '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
- '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
- | openhuman-core mcp
-```
-
-The response should include `capabilities.tools` from `initialize` and the tool names from `tools/list`. A successful run writes exactly two compact JSON lines to stdout. `notifications/initialized` is a notification and has no response.
-
-```text
-{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2025-06-18","capabilities":{"tools":{},"resources":{"subscribe":false,"listChanged":false}},"serverInfo":{"name":"openhuman-core","version":"<crate version>"},"instructions":"..."}}
-{"jsonrpc":"2.0","id":2,"result":{"tools":[{"name":"memory.recall",...},{"name":"memory.fetch",...},{"name":"memory.list",...},{"name":"memory.learn",...},{"name":"memory.forget",...}]}}
-```
diff --git a/gitbooks/developing/performance.md b/gitbooks/developing/performance.md
deleted file mode 100644
index 8ec233b7ed..0000000000
--- a/gitbooks/developing/performance.md
+++ /dev/null
@@ -1,175 +0,0 @@
----
-description: >-
- Measured footprint: how many agents fit in one process, cold start, binary
- size and the dependency limits that keep it small.
-icon: gauge
----
-
-# Performance and footprint
-
-OpenHuman's Rust core runs in-process as a library, not as one OS process per agent. Most of the density numbers on this page come from that one decision. A fixed bootstrap cost (allocator warm-up, code paging, registries, detectors) is paid once per process and shared by every agent inside it.
-
-The original measurements below were made on Apple Silicon macOS with a `--release` build and a deterministic mock inference provider (the `rss-bench` feature), not real network calls. Treat the absolute numbers as numbers for that machine. The ratios (density, marginal cost, binary delta) are the parts worth generalizing. The scripts to reproduce them are listed at the end.
-
-## Fleet: how many agents fit in one process
-
-`library-fleet.sh` runs N concurrent live agents in a single process. Mock inference takes 200 ms, so idle time behaves like a real network wait instead of a busy loop. The script reports the marginal RSS per additional agent once the fixed base is paid. That number decides how many agents fit in a box.
-
-| N agents | Marginal KiB/agent | Settled MiB | Idle CPU ms/10s | Threads | FDs |
-| ---: | ---: | ---: | ---: | ---: | ---: |
-| 50 | 1,985 | 223 | 3 | 71 | 420 |
-| 100 | 1,866 | 356 | 3 | 123 | 820 |
-| 500 | 1,770 | 1,393 | 3 | 211 | 3,220 |
-
-500 agents fit in one process at 1,770 KiB (about 1.73 MiB) marginal cost each. Idle CPU stays flat as N grows, which matters because an agent that is not mid-turn should not spend cycles. Thread count grows by about 0.35 per agent. Watch that line before pushing past 500 in production.
-
-Thousands of agents on one box is a goal, not a measured result. The marginal cost settles across 50, 100 and 500 agents instead of rising, which makes the goal plausible.
-
-## In-process vs one process per agent
-
-`library-instances.sh` spawns N independent `library-profile` processes instead of N agents in one process. Each instance used about 47.8 to 48.2 MiB, flat across N = 10, 25 and 50. That puts roughly 42 instances in a 2 GiB box by summed RSS. This is an upper bound, because macOS has no PSS-equivalent metric to divide out shared pages.
-
-One process per agent pays the 30 to 50 MiB fixed base every time. The in-process model pays it once. At the measured marginal cost, one process is roughly 25 times denser than one process per agent for the same memory budget.
-
-## Cold start
-
-| Scenario | Median settled RSS | Median duration |
-| --- | ---: | ---: |
-| `agent-turn` (cold, one turn, no delegation) | 47.6 MiB | 102 ms |
-| `cold-phases` (nine bootstrap phases: config load, registry init, agent build, memory construction, first turn) | 51.2 MiB | 476 ms |
-
-The `cold-phases` scenario was removed from the profile binary, so that row cannot be re-run from this tree. Everything else on this page reproduces with the commands below.
-
-A cold agent turn answers in about 102 ms. The full nine-phase bootstrap, which a process pays once, takes 476 ms. After that, a warmed turn in the same process costs 0.5 to 1.9 MiB, not the 26 to 31 MiB a first turn retains. Most of a cold turn's cost is executable code paging in for the first time, not per-turn allocation.
-
-## Slim build footprint
-
-A `--no-default-features --features rss-bench` build, which drops every optional domain, settles at about 15.2 MiB of private physical memory and roughly 42 MiB RSS. The rest of that RSS is reclaimable executable text and allocator high-water retention, not live data. A deep attribution pass found about 3.2 MiB of live heap and 18.7 MiB of resident executable text inside the 42 MiB.
-
-## Binary size by feature set
-
-Cargo feature gates control what compiles in. Two starting points matter: Contrib (`[features] default` in `crates/openhuman-core/Cargo.toml`, what a bare `cargo check` builds) and Product (`scripts/ci/product-features.txt`, what the desktop app ships).
-
-| Build | Features | Unstripped | Stripped |
-| --- | --- | ---: | ---: |
-| Default (all gates) | Contrib/Product superset | 115.9 MiB | n/a |
-| library-minimal | `skills,flows` | ~81.1 MiB | ~60.4 MiB |
-| Pure slim | none | 68.4 MiB | 51.0 MiB |
-
-The `skills,flows` recipe in [`docs/library-minimal-recipe.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/library-minimal-recipe.md) is the supported embed target for a headless host. It keeps SKILL.md execution and saved-workflow runs, drops voice, web3, media, MCP and the desktop automation stack, and ends up about 30% smaller than the default build. Most of that gain is binary size and code-paging surface. It moves settled RSS by only about 3 to 5 MiB per scenario, because RSS depends more on initialization and allocator behavior than on linked code size.
-
-Note that the smallest figure here, 15.2 MiB, is private memory in a slim running process. It is not a binary size. The smallest binary is 51 MiB stripped with nothing enabled.
-
-## Feature gates and loadable modules
-
-Cargo features (`media`, `skills`, `flows`, `mcp`, `channels`, `http-server`, `scheduler-gate`, `file-logging`, `modules` and more) decide what compiles in. Beyond that, several domains ship as loadable native `cdylib` modules that are not linked into the core binary at all.
-
-The compiled registry pins eleven module names: `tinycomputer`, `tinysearch`, `tinydocs`, `tinywallet`, `tinyjuice`, `tinyvoice`, `tinymcp`, `tinyconnectors`, `tinybox`, `tinychannels` and `tinyhosts`. Each sits behind a small `*-bus` contract crate. A module loads into the same process and shares its privileges, so the admission checks (ABI, manifest, dependency, digest) matter more than for an ordinary dependency. See [Loadable modules](loadable-modules.md).
-
-## The dependency-floor ratchet
-
-`scripts/kernel-floor.sh` measures the dependency graph of the `flows` profile (`--no-default-features --features flows`, the surface a second host would embed) on three counts: packages, unique crate names and native (C/C++) builds. `scripts/kernel-floor.limits` holds the ceiling for each. The ratchet only moves down. A change that grows the graph must lower those numbers in the same PR, and raising one needs a written justification. Read the current ceiling from the file, because it changes. The ratchet stops the dependency floor from creeping back up after a gating effort sheds crates.
-
-## How to reproduce
-
-Every number above comes from the driver scripts in the [openhuman-benchmarks](https://github.com/tinyhumansai/openhuman-benchmarks) repository, under `profile/scripts/`. They are built around `profile/src/bin/library_profile/main.rs` there (the scenarios) and the `library-profile` and `rss-bench` binaries, compiled against a vendored checkout of this repository. The benchmarks run from these scripts, not in CI. Run the commands below from an openhuman-benchmarks checkout, except the dependency-floor ratchet, which runs here.
-
-```bash
-# RSS/duration medians across fresh processes, all scenarios
-./profile/scripts/library-bench.sh
-
-# Same, against the slim (--no-default-features) recipe
-./profile/scripts/library-bench.sh --slim
-
-# Fleet sweep + the 2 GB / 2 vCPU budget gate
-./profile/scripts/library-fleet.sh --agents "50,100,500" --target 1000 --budget-mib 2048
-
-# Many-processes counterpart to the fleet sweep
-./profile/scripts/library-instances.sh --instances "10,25,50" --hold-secs 30
-
-# Dependency-floor ratchet
-scripts/kernel-floor.sh flows
-```
-
-[`profile/scripts/README.md`](https://github.com/tinyhumansai/openhuman-benchmarks/blob/main/profile/scripts/README.md) documents the remaining scripts: `library-cpu.sh` for CPU profiling with samply and `library-heap.sh` for live-heap attribution with dhat. Full methodology, caveats and the per-scenario breakdown are in
-[`profile/docs/library-benchmarking.md`](https://github.com/tinyhumansai/openhuman-benchmarks/blob/main/profile/docs/library-benchmarking.md) and
-[`docs/library-minimal-recipe.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/library-minimal-recipe.md).
-
-## Measurement conditions
-
-These numbers were gathered on macOS. It has no local cgroup memory limit and no `/proc/<pid>/smaps_rollup`, so there is no true PSS (proportional shared memory) reading. RSS overcounts shared pages, and the error grows with agent count. The fleet and instances numbers project from measured marginal cost. They are not a live test of surviving an OOM kill at N agents on a 2 GB / 2 vCPU Linux box. Every scenario also replaces network inference with a mock provider at fixed latency, so turn timings measure orchestration overhead, not real model latency. The Linux cgroup measurements in the following section use a different host and harness.
-
-For token cost instead of process footprint, see [Smart token compression](../features/token-compression.md). It is the other half of "cheap": it controls how much of what the harness assembles reaches the model.
-
-## Linux runtime-owned agents (Medulla integration)
-
-Measured on 2026-10-10 at OpenHuman commit `b783b39e78`, using the release
-`openhuman-embed` example `linux_fleet` with default features disabled. This
-exercises one `Runtime` and N `AgentSpec`s, with two Tokio workers, ephemeral
-session storage, and a loopback HTTP chat-completions mock. Each agent
-advertises the builtin `shell` tool; the mock returns text without executing it.
-Conversation memory, local model runtimes, and session dual writes are off.
-The host is x86_64 Ubuntu, Linux 7.0.0-31-generic, on an Intel Core i7-14700F.
-Other builds were running on the host, so these are shared-host measurements.
-
-Each run starts in a fresh cgroup with `memory.max = 2147483648` and
-`cpu.max = 200000 100000` (2 GiB and a two-CPU quota). Three fresh processes
-were measured at each size with the default swap limit; the table gives medians.
-RSS is sampled after every agent completes one concurrent turn, with all agent handles retained. Marginal
-RSS is `(RSS after turns - RSS after Runtime::build) / N`, without allocator
-trimming. The cgroup peak includes the HTTP mock and the Python measurement
-wrapper. Mock request recording is disabled, so retained HTTP request history
-is excluded. RSS and cgroup accounting differ because shared file pages may be
-charged outside the new cgroup.
-
-| Concurrent agents | Process RSS after turns | Marginal RSS/agent | Cgroup peak | Fleet wall time | Turn p95 |
-| --- | --- | --- | --- | --- | --- |
-| 50 | 270.21 MiB | 4.702 MiB | 237.32 MiB | 1,527 ms | 1,462 ms |
-| 100 | 437.38 MiB | 4.028 MiB | 417.89 MiB | 3,537 ms | 3,370 ms |
-| 500 | 1,712.97 MiB | 3.355 MiB | 1,760.32 MiB | 20,784 ms | 19,450 ms |
-
-The 500-agent median is within twice the earlier macOS/mock 1,770 KiB
-figure (1.728515625 MiB per agent, doubled to 3.45703125 MiB, or about
-3.46 MiB); the 50- and 100-agent medians miss that target. The
-500-agent runs ranged from 3.341 to 3.585 MiB per agent. These are different
-hosts and harness entry points, so the table is a capacity measurement rather
-than a controlled comparison of the platforms. This run also incorporates the
-upstream embed lifecycle-event and dynamic-agent APIs; results are higher than
-the earlier prerequisite-branch measurements recorded before that base update.
-
-Runtime boot took 259–263 ms. The first turn in each fresh process took
-49.9–87.4 ms, before launching the concurrent fleet. Both are within twice the
-earlier 476 ms bootstrap and 102 ms first-turn figures. “First turn” includes
-session/model/tool initialization, but excludes compiling and loading the
-executable; the OS page cache was warm.
-
-A separate 500-agent run with **swap disabled** (`MemorySwapMax=0`) completed
-in 19,090 ms, with 3.541 MiB marginal RSS per agent and a
-1,884.52 MiB cgroup peak. Its marginal RSS exceeds the approximately
-3.46 MiB target. The integration ticket used a nominal 1.77 MiB baseline
-and 3.54 MiB doubled target; this run also narrowly exceeds that nominal target.
-Every run recorded zero `max`, `oom`, and `oom_kill` memory events.
-This does not establish capacity for real providers, tool subprocesses, MCP
-servers, or 1,000 simultaneously active turns. Measure those workloads before
-sizing a production fleet.
-
-To reproduce from the OpenHuman repository root:
-
-```sh
-cargo build -p openhuman-embed --locked --release --no-default-features --example linux_fleet
-systemd-run --user --scope -p MemoryMax=2G -p CPUQuota=200% --quiet \
- python3 crates/openhuman-embed/examples/linux_fleet_cgroup.py 500
-```
-
-Use `50` or `100` for the other sizes and repeat each command in a fresh scope
-three times to reproduce the main table medians. Leave swap at its default
-limit for those runs. To reproduce the separate no-swap 500-agent run:
-
-```sh
-systemd-run --user --scope -p MemoryMax=2G -p MemorySwapMax=0 -p CPUQuota=200% --quiet \
- python3 crates/openhuman-embed/examples/linux_fleet_cgroup.py 500
-```
-
-The JSON output records process RSS, bootstrap/turn timings, cgroup limits,
-peak memory, and OOM counters. The raw runs are checked in as
-[`docs/benchmarks/medulla-embed-linux.json`](../../docs/benchmarks/medulla-embed-linux.json).
diff --git a/gitbooks/developing/providers/claude-code.md b/gitbooks/developing/providers/claude-code.md
deleted file mode 100644
index 5645f65ea9..0000000000
--- a/gitbooks/developing/providers/claude-code.md
+++ /dev/null
@@ -1,106 +0,0 @@
----
-description: >-
- Route chat workloads through the Claude Code CLI.
-icon: terminal
----
-
-# Claude Code CLI provider
-
-OpenHuman can send any chat workload through Anthropic's `claude` CLI instead of calling the Anthropic HTTP API directly. The CLI handles model selection, auth and prompt caching. OpenHuman runs it as a long-lived child process that resumes sessions, parses its stream-json output, and gives it an MCP endpoint so the model can reach OpenHuman state (memory, threads, agents, search). This is one of several pluggable LLM backends. See [Engines](../engines.md) for the full list.
-
-`tinyagents-harness` (vendor/tinyagents) owns the provider, `ClaudeCodeProvider`. See [its README](https://github.com/tinyhumansai/tinyagents/blob/main/crates/tinyagents-harness/src/providers/claude_code/README.md) for the file map and implementation notes. OpenHuman only wires it up in `crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rs`, which supplies the MCP endpoint (`OpenHumanMcpEndpoint`, below) and reads the resulting model string back into its own routing.
-
-## Requirements
-
-- Claude Code CLI 2.0.0 or newer (`MIN_CLI_VERSION`). It can be on `PATH`, in a supported well-known install location, or selected with `OPENHUMAN_CLAUDE_CLI=/abs/path/to/claude`.
-- An Anthropic API key in `ANTHROPIC_API_KEY`, or an existing `~/.claude/.credentials.json` from `claude login`.
-- The `http-server` Cargo feature (on by default). OpenHuman exposes its MCP tools to the CLI over a loopback HTTP endpoint (`crate::mcp::server::ensure_local_http`), not by running `openhuman-core mcp` as a subprocess. Without that feature the provider still runs, but the CLI gets no OpenHuman tools.
-
-## Routing a workload through the CLI
-
-Use the provider prefix `claude-code:<model>[@<temperature>]`. Set it per role through the standard inference settings:
-
-```bash
-# Through the JSON-RPC update endpoint:
-openhuman-core rpc openhuman.inference_update_model_settings \
- --json '{"chat_provider":"claude-code:claude-sonnet-4-5"}'
-```
-
-| Role string | Field updated |
-| -------------------- | -------------------------------- |
-| `chat_provider` | foreground chat replies |
-| `reasoning_provider` | long-context reasoning workloads |
-| `agentic_provider` | multi-step agentic loops |
-
-A workload set to `claude-code:<model>` starts a fresh `claude` child for every turn. Concurrency is capped at `MAX_CONCURRENT_TURNS = 4` per `ClaudeCodeProvider` instance (see [Per-turn behavior](#per-turn-behavior)).
-
-## Verifying the install
-
-The status RPC is in the inference namespace:
-
-```bash
-openhuman-core rpc openhuman.inference_claude_code_status
-```
-
-It returns one of these (`CliStatus` in [`tinyagents-harness`'s `claude_code/types.rs`](https://github.com/tinyhumansai/tinyagents/blob/main/crates/tinyagents-harness/src/providers/claude_code/types.rs)):
-
-- `{"status":"ok","version":"2.0.4","path":"/usr/local/bin/claude"}`: ready
-- `{"status":"not_installed"}`: no usable `claude` was found through the
- configured override, `PATH`, or the supported fallback locations
-- `{"status":"outdated","version":"1.9.0","min_required":"2.0.0","path":"..."}`: upgrade the CLI
-- `{"status":"unusable","path":"...","reason":"..."}`: binary present but the version probe failed
-
-Binary lookup checks `OPENHUMAN_CLAUDE_CLI` first, then `PATH`, then the ordered fallback locations. The fallbacks cover the native installer and common user-local, Bun, npm-global and Homebrew installs. When the CLI is found through a fallback, its directory and the user bin directories are prepended to the child process `PATH`. The inherited entries stay available.
-
-The settings panel shows the same status through `ClaudeCodeStatusCard` ([`app/src/components/settings/panels/ai/ClaudeCodeStatusCard.tsx`](https://github.com/tinyhumansai/openhuman/blob/main/app/src/components/settings/panels/ai/ClaudeCodeStatusCard.tsx)).
-
-## Per-turn behavior
-
-`ClaudeCodeProvider::run_chat` takes one of `MAX_CONCURRENT_TURNS` (4) semaphore permits, plus a per-thread mutex so two overlapping calls for the same conversation cannot race on one session UUID. Each turn then:
-
-1. Resolves a per-thread session UUID from `<workspace_dir>/claude-code-sessions.json`. New threads get a fresh RFC 4122 v4 UUID, because the CLI requires v4 for `--resume`.
-2. Asks the host's `McpEndpointProvider` for an MCP endpoint. OpenHuman's implementation (`OpenHumanMcpEndpoint`) lazily starts one in-process HTTP MCP server per core (`crate::mcp::server::ensure_local_http`, loopback only) and returns its URL plus a bearer token. The config file passed with `--mcp-config` carries that token in its `Authorization` header. If the endpoint fails to start, the turn still runs, without OpenHuman tools.
-3. Spawns the CLI with:
- - `-p --input-format stream-json --output-format stream-json --verbose --include-partial-messages --add-dir <project_dir>`
- - `--mcp-config <scratch>/openhuman-mcp-config.json --strict-mcp-config` when the endpoint resolved, so only the configured MCP servers are visible
- - `--permission-mode acceptEdits` (default) or `bypassPermissions` (full access, described below)
- - by default, `--disallowedTools Bash,BashOutput,KillShell,WebFetch,WebSearch,Task`, so Claude Code's own shell, network and sub-agent builtins stay off and OpenHuman tools (`mcp__openhuman__*`) are the only way to reach those capabilities. This flag is omitted when full access is on
- - `--session-id <uuid>` on the first turn, `--resume <uuid>` after that
- - `--model <model>` (the suffix after `claude-code:`)
- - `--append-system-prompt-file <scratch>/append-system-prompt.txt` if the conversation carries a system message. It is a file, not an argument, so a large harness prompt does not hit Windows' argument length limit
-4. Pipes stdin. A new session gets the full conversation history folded into a text preamble. A `--resume` gets only the pending user turns, because the CLI already holds the earlier context.
-5. Streams stdout through the JSONL parser, then the event mapper, into `ProviderDelta`s on the request's `stream` sink.
-
-If the CLI exits non-zero, the driver returns its stderr (capped at 16 KiB) as the error message.
-
-On macOS the spawn runs inside a Seatbelt jail (`sandbox-exec`) by default when `/usr/bin/sandbox-exec` exists. Set `OPENHUMAN_CLAUDE_CODE_SANDBOX=0` to opt out. The profile blocks reads and writes under the first `.openhuman*`-named ancestor of `workspace_dir`, which holds this provider's own session store and settings. It does not restrict the CLI's own file tools. Linux and Windows have no OS-level wall yet.
-
-### Permission posture and full access
-
-The default, `acceptEdits`, limits Claude Code to file reads and edits under `project_dir` and withholds shell, network and `Task` access through `--disallowedTools`. You can opt into full access (the whole Claude Code toolset, including Bash) with the settings toggle saved in `<workspace_dir>/claude_code_settings.json`, or with `OPENHUMAN_CLAUDE_CODE_PERMISSION_MODE=bypass|bypassPermissions|full`. This is an explicit choice. Enabling the provider alone never grants shell or network access.
-
-## Auth resolution order
-
-1. `ANTHROPIC_API_KEY` env var (highest precedence, set on the spawned child).
-2. `~/.claude/.credentials.json`: the CLI's own login from `claude login` (Pro or Max subscription). OpenHuman leaves `ANTHROPIC_API_KEY` unset on the child, so the CLI reads its own credentials. On macOS they live in the Keychain under the `Claude Code-credentials` service.
-3. Neither: the CLI fails with an auth error.
-
-The `openhuman.inference_claude_code_auth_status` RPC reports the richer state for the Settings > AI panel. It runs `claude auth status --json` with a 10-second timeout instead of reading the credentials file, because a macOS login lives in the Keychain, not on disk.
-
-## Tool surface exposed to the CLI
-
-The CLI sees these tools as `mcp__openhuman__<name>`, served over the loopback HTTP MCP endpoint described above. It is the same tool set that the stdio MCP server in [`crates/openhuman-core/src/mcp/server/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/mcp/server) exposes to other MCP clients:
-
-- `core.list_tools`, `core.tool_instructions`
-- `memory.recall`, `memory.fetch`, `memory.list`, `memory.learn`, `memory.forget`
-- `agent.list_subagents`, `agent.run_subagent` (write, flagged `destructiveHint` as the MCP spec requires)
-- `searxng_search`
-
-The MCP server enforces `SecurityPolicy::ToolOperation` checks. `agent.run_subagent`, `memory.learn` and `memory.forget` write. The rest are read-only. The CLI's own `tool_use` blocks (its internal Read, Bash and similar calls) never reach OpenHuman as harness tool calls, because the CLI has already run them by the time they appear in the stream. `event_mapper.rs` only strips their argument JSON from the visible text.
-
-## Limitations
-
-- Vision input is forwarded as native image blocks when pasted images are available to the Claude Code provider. Images that cannot be read are sent as a short text notice.
-- Every role routed to `claude-code:` shares the same `MAX_CONCURRENT_TURNS` semaphore; under load a turn waits in the queue instead of failing fast.
-- Cost accounting from the CLI's `result.total_cost_usd` is captured in the mapper but not yet wired into OpenHuman's cost tracking ([`crates/openhuman-core/src/platform/cost/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/platform/cost)).
-- Linux and Windows run the CLI unconfined; the Seatbelt jail is macOS-only.
diff --git a/gitbooks/developing/quickstart.md b/gitbooks/developing/quickstart.md
deleted file mode 100644
index f900a2fbdd..0000000000
--- a/gitbooks/developing/quickstart.md
+++ /dev/null
@@ -1,264 +0,0 @@
----
-description: >-
- Go from an empty Cargo project to many agents on one OpenHuman runtime in
- your own Rust process.
-icon: rocket
----
-
-# Build agents in Rust: quickstart
-
-This page takes you from an empty Cargo project to a fleet of agents in one process. Each step builds on the last and ends with code you can run. [Embedding OpenHuman](embedding.md) is the full reference for every type used here.
-
-## What you get
-
-`openhuman-embed` runs the OpenHuman core inside your binary. There is no daemon to start and no RPC hop, so a turn is a function call. You build one `Runtime` per process, then create as many `Agent`s on it as you need. Each agent has its own model, access tier, working directory, MCP servers and skills.
-
-Sharing one process is where the density comes from. The bootstrap cost is paid once, and each extra agent adds a small marginal cost. With a mock inference provider, 500 agents in one process used about 1.8 MiB of marginal memory each. Thousands of agents per box is a goal, not a measured result. The numbers and how to reproduce them are on the [Performance](performance.md) page.
-
-## Prerequisites
-
-You need Rust 1.96.1 or newer, the version pinned in [`rust-toolchain.toml`](https://github.com/tinyhumansai/openhuman/blob/main/rust-toolchain.toml). You also need an API key for any OpenAI-compatible endpoint, or a TinyHumans API key (see step 6).
-
-If you depend on OpenHuman through Cargo as shown below, Cargo fetches the vendored submodules for you. If you build from a clone, initialize them first:
-
-```bash
-git submodule update --init --recursive vendor/
-```
-
-## Step 1: add the dependency
-
-```toml
-[dependencies]
-openhuman-embed = { git = "https://github.com/tinyhumansai/openhuman", package = "openhuman-embed" }
-# Needed for the tokio worker settings in step 2.
-openhuman_core = { git = "https://github.com/tinyhumansai/openhuman", package = "openhuman" }
-tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time"] }
-anyhow = "1"
-```
-
-The default feature set is the contributor build. To ship less code, turn defaults off and pick the features you use. The set below keeps the model provider layer and MCP:
-
-```toml
-openhuman-embed = { git = "https://github.com/tinyhumansai/openhuman", package = "openhuman-embed", default-features = false, features = ["inference", "mcp"] }
-```
-
-Cargo applies `[patch]` tables only from the top-level workspace, so the ones in OpenHuman's [root `Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/Cargo.toml) do not reach your crate. They make every crate share one copy of `tinytools` and `tinyinference`. If dependency resolution fails over those crates, or you see two incompatible `tinytools` types, copy the same `[patch]` sections into your own workspace.
-
-Each feature forwards to the same-named feature on the core. `mcp` and `skills` also gate `AgentSpec::mcp` and `AgentSpec::skills_dir`, so enable them if your agents need those.
-
-## Step 2: build the tokio runtime yourself
-
-Do not use `#[tokio::main]`. A turn is a large async state machine, and a sub-agent nested inside a turn overflows tokio's default 2 MiB worker stack and aborts the process. Build the runtime with the stack size and blocking-thread limit that the core exports:
-
-```rust
-use openhuman_core::core::runtime::{AGENT_WORKER_STACK_BYTES, MAX_BLOCKING_THREADS};
-
-fn main() -> anyhow::Result<()> {
- let rt = tokio::runtime::Builder::new_multi_thread()
- .enable_all()
- .thread_stack_size(AGENT_WORKER_STACK_BYTES)
- .max_blocking_threads(MAX_BLOCKING_THREADS)
- .build()?;
- rt.block_on(run())
-}
-
-async fn run() -> anyhow::Result<()> {
- Ok(())
-}
-```
-
-The remaining steps fill in `run`.
-
-## Step 3: your first agent
-
-`Harness` is a runtime plus exactly one agent. It is the shortest path to a reply. This version points at an OpenAI-compatible endpoint with a key you supply, uses a throwaway workspace, and is read-only:
-
-```rust
-use openhuman_embed::{Access, Harness, Provider, Workspace};
-
-async fn run() -> anyhow::Result<()> {
- let harness = Harness::builder()
- .provider(
- Provider::openai_compatible(
- "https://api.openai.com/v1",
- std::env::var("OPENAI_API_KEY")?,
- )
- .model("gpt-5"),
- )
- .workspace(Workspace::Ephemeral)
- .access(Access::readonly())
- .action_dir(std::env::current_dir()?)
- .build()
- .await?;
-
- let outcome = harness.run("What can you see in this directory?").await?;
- println!("{}", outcome.reply);
- Ok(())
-}
-```
-
-Pass the API root as the URL. `/chat/completions` is appended for you. `Workspace::Ephemeral` is removed when the harness drops, so nothing touches an existing install. `Access::readonly()` allows no writes and no shell, which makes it safe to point at any directory.
-
-A complete runnable version, with progress streaming, is the [`run_turn` example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/run_turn.rs):
-
-```bash
-OPENHUMAN_EXAMPLE_BASE_URL=https://api.openai.com/v1 \
-OPENHUMAN_EXAMPLE_API_KEY=sk-... \
-OPENHUMAN_EXAMPLE_MODEL=gpt-5 \
- cargo run -p openhuman-embed --example run_turn -- "What can you see in this directory?"
-```
-
-## Step 4: many agents on one runtime
-
-When you need more than one agent, build the `Runtime` directly and create agents from `AgentSpec`s. `Harness` does this underneath, so moving over later is a small change.
-
-```rust
-use openhuman_embed::{Access, AgentSpec, Provider, Runtime, Workspace};
-
-async fn run() -> anyhow::Result<()> {
- let runtime = Runtime::builder()
- .workspace(Workspace::dir("/var/lib/my-product/openhuman"))
- .build()
- .await?;
-
- let provider = Provider::openai_compatible(
- "https://api.openai.com/v1",
- std::env::var("OPENAI_API_KEY")?,
- )
- .model("gpt-5");
-
- let analyst = runtime.agent(
- AgentSpec::new("analyst")
- .system_prompt("You summarize documents and never edit files.")
- .provider(provider.clone())
- .access(Access::readonly())
- .action_dir("/srv/documents"),
- )?;
-
- let writer = runtime.agent(
- AgentSpec::new("writer")
- .system_prompt("You compose explanations inside your working directory.")
- .provider(provider)
- .access(Access::full())
- .action_dir("/srv/documents"),
- )?;
-
- let analysis = analyst.run("Summarise this document.").await?;
- let draft = writer
- .turn(format!("Explain these points:\n{}", analysis.reply))
- .send()
- .await?;
- println!("{}", draft.reply);
- Ok(())
-}
-```
-
-Agent ids must match `^[a-z0-9][a-z0-9_-]{0,63}$`. Avoid the built-in ids such as `orchestrator`.
-
-The access tier is the main safety control:
-
-- `Access::readonly()` observes only.
-- `Access::supervised()` can act, but risky operations wait for a human decision. It turns the autonomy policy on for that agent, so an unattended process stalls at the first approval until the ten-minute timeout denies it.
-- `Access::full()` acts autonomously with real shell and file access under `action_dir`. Point it at a directory you are willing to have changed. Credential stores such as `~/.ssh` stay blocked regardless.
-
-`action_dir` is the agent's read and write root. `.trust(path, access)` grants a directory outside it.
-
-MCP servers and skills are per agent. They need the `mcp` and `skills` features, and the runtime must have those domains enabled because agents can only narrow the runtime's set:
-
-```rust
-use openhuman_embed::McpServer;
-
-let spec = AgentSpec::new("triage")
- .mcp(McpServer::stdio("github", "gh-mcp", ["stdio"]).deny_tools(["delete_repo"]))
- .skills_dir("./skills/triage");
-```
-
-A server declared on one agent is invisible to the others. Skill bundles are copied into `<workspace>/agents/<id>/skills/`, and the operator's `~/.openhuman/skills` stays hidden unless you call `.include_user_skills(true)`. Narrowing which tools an MCP server exposes with `.allow_tools` or `.deny_tools` matters for large servers, because every exposed tool costs prompt budget.
-
-The [`two_agents` example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/two_agents.rs) runs a analyst and a writer end to end.
-
-## Step 5: multi-turn sessions and streaming
-
-`agent.turn(message)` returns a builder. Each outcome carries a `session_id`; pass it back with `.session(..)` to continue the conversation. Without it, a new session is started.
-
-```rust
-let first = writer.run("Run the tests.").await?;
-let again = writer
- .turn("Now fix the failures.")
- .session(&first.session_id)
- .send()
- .await?;
-```
-
-Transcripts are keyed by agent id, and a turn resumes only its own thread. With `Workspace::Ephemeral` sessions do not survive the process; use `Workspace::dir(..)` for that.
-
-To watch a turn as it runs, attach a channel with `.on_progress(tx)`:
-
-```rust
-let (tx, mut rx) = tokio::sync::mpsc::channel(256);
-let printer = tokio::spawn(async move {
- while let Some(progress) = rx.recv().await {
- eprintln!("[progress] {progress:?}");
- }
-});
-let outcome = writer.turn("go").on_progress(tx).send().await?;
-let _ = tokio::time::timeout(std::time::Duration::from_secs(30), printer).await;
-```
-
-The core awaits every send, so a receiver that stops draining stalls the turn. The timeout covers detached sub-agents that can hold a clone of the sender after `send()` returns. Other per-turn options are `.model(id)`, `.temperature(t)`, `.cwd(dir)` and `.origin(..)`.
-
-## Step 6: managed inference with one API key
-
-Instead of a provider key for each agent, you can give the runtime one TinyHumans API key. Agents that name no `Provider` then run on managed inference, and backend features such as integrations and search use the same key. See [One TinyHumans API key](tinyhumans-api-key.md) for what it unlocks.
-
-`openhuman-embed` alone installs no backend transport, so hosted surfaces answer `BACKEND_UNAVAILABLE:`. To boot connected, use the `RuntimeBuilder` from `openhuman-tinyhumans`, which mirrors the embed builder and installs the transport on `build()`:
-
-```toml
-openhuman-tinyhumans = { git = "https://github.com/tinyhumansai/openhuman", package = "openhuman-tinyhumans" }
-```
-
-```rust
-use openhuman_tinyhumans::{embed::{Access, AgentSpec, Workspace}, RuntimeBuilder};
-
-let runtime = RuntimeBuilder::new()
- .workspace(Workspace::Ephemeral)
- .api_key(std::env::var("TINYHUMANS_API_KEY")?)
- .build()
- .await?;
-
-let agent = runtime.agent(AgentSpec::new("helper").access(Access::readonly()))?;
-let reply = agent.run("Hello.").await?;
-println!("{}", reply.reply);
-```
-
-For a headless process that boots the core itself, set `OPENHUMAN_BACKEND_API_KEY` before startup instead. An agent that names its own `Provider` never uses the key.
-
-## Step 7: going to scale
-
-A few rules keep a large fleet small and predictable:
-
-- Run one `Runtime` per process. A second `build()` returns `RuntimeError::AlreadyRunning`, because the keyring, event bus and domain subscribers are process-wide. Add agents, not runtimes.
-- Build narrow. A headless build with `--no-default-features --features "skills,flows"` is about 60 MiB stripped. With every gate on it is 115.9 MiB unstripped. The recipe is in [`docs/library-minimal-recipe.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/library-minimal-recipe.md).
-- Narrow each agent. `.tool_groups(..)`, `.domains(..)`, `ToolScopeSpec::Named(..)` and `.disallow_tools(..)` cut prompt size and the surface an agent can reach.
-- Pick a sandbox mode per agent through `AgentDefinitionSpec`: `SandboxModeSpec::None`, `ReadOnly` (write and execute tools are removed) or `Sandboxed` (commands run in the platform jail or Docker).
-- For a cloud host serving many users from one process, use `Workspace::stateless()` with a `SessionStoreProvider` so conversations live in your own database. The embed crate README covers it under "Conversations in a host store".
-
-To measure your own numbers, the scripts and method are in [openhuman-benchmarks](https://github.com/tinyhumansai/openhuman-benchmarks) ([`profile/docs/library-benchmarking.md`](https://github.com/tinyhumansai/openhuman-benchmarks/blob/main/profile/docs/library-benchmarking.md)), alongside the public benchmark results and rig.
-
-## Other ways in
-
-You do not have to embed the library to use the core.
-
-The JSON-RPC server runs the same core behind HTTP. Start it with `openhuman-core serve`. `GET /schema` lists every method, `GET /health` reports liveness and `GET /events` streams events. The server lives in [`crates/openhuman-rpc`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-rpc/README.md).
-
-The CLI is the `openhuman-core` binary. It exposes the same controllers as subcommands and is documented in [`crates/openhuman-cli`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-cli/README.md).
-
-The terminal client is `openhuman-tui`, a ratatui front end that boots the core in its own process and drives the same chat surface as the desktop app. See [`crates/openhuman-tui`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-tui/README.md).
-
-## Next steps
-
-- [Embedding OpenHuman](embedding.md) is the full reference for `AgentSpec`, `Access`, workspaces, MCP, skills and the examples.
-- [Architecture](architecture.md) and the [agent harness](architecture/agent-harness.md) explain how a turn runs.
-- [Loadable modules](loadable-modules.md) covers the module contracts the core composes.
-- [Pluggable engines](engines.md) covers the inference, memory and search backends an agent chooses by config.
-- [Performance and footprint](performance.md) has the measured density, cold-start and binary-size numbers.
diff --git a/gitbooks/developing/release-policy.md b/gitbooks/developing/release-policy.md
deleted file mode 100644
index 96f8208d28..0000000000
--- a/gitbooks/developing/release-policy.md
+++ /dev/null
@@ -1,153 +0,0 @@
----
-description: How OpenHuman ships a release, with the branch model, CI lanes, minimum-version gate and key rotation.
-icon: ship
----
-
-# Release policy
-
-This runbook covers how releases ship. It also explains how we stop users from completing OAuth (including Gmail) on an outdated desktop installer when the latest release is the supported flow.
-
-## Distribution
-
-- GitHub Releases for [tinyhumansai/openhuman](https://github.com/tinyhumansai/openhuman/releases) are the primary source for desktop builds.
-- The Tauri updater endpoint (see `scripts/prepareTauriConfig.js` and the release workflows) should point users at the current release artifacts.
-- To retire old stable artifacts when you drop a release line:
- - Remove or hide the obsolete installer assets on GitHub Releases.
- - Point website and CDN download links at `releases/latest`.
- - Refresh the updater manifest (for example a Gist or `latest.json`) so it does not point at deprecated builds.
- - Check that old direct URLs redirect or return 404 or 410. Try known-old asset URLs from docs or bookmarks and confirm they no longer deliver a primary install path.
-
-## Minimum app version for OAuth
-
-Production web builds embed a minimum supported app version at build time, so OAuth deep links cannot complete on deprecated binaries. Each installer carries the floor that was set when that build was made. Raising the floor for users who never upgrade needs a new release that they install, or an in-app update.
-
-| Variable | Purpose |
-| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
-| `VITE_MINIMUM_SUPPORTED_APP_VERSION` | For example `0.51.0`. The desktop app must be at least this version to finish `openhuman://oauth/success`. |
-| `VITE_LATEST_APP_DOWNLOAD_URL` | Optional; defaults to `https://github.com/tinyhumansai/openhuman/releases/latest`. Opened when the gate blocks OAuth. |
-
-Configure these as GitHub Actions variables. Set them on both the standalone `pnpm build` step and the `tauri-apps/tauri-action` step in `.github/workflows/build-desktop.yml` (the reusable matrix that `release-production.yml` and `release-staging.yml` call), so the Vite bundle in shipped installers includes the gate. Leave `VITE_MINIMUM_SUPPORTED_APP_VERSION` unset for local development, which disables the gate.
-
-The code is in `app/src/utils/oauthAppVersionGate.ts`, `app/src/utils/desktopDeepLinkListener.ts`.
-
-## Gmail / Google Cloud OAuth
-
-- Redirect URIs in Google Cloud Console must match the current backend + tunnel callback paths.
-- The desktop scheme (`openhuman://`) is stable. When `VITE_MINIMUM_SUPPORTED_APP_VERSION` is set, the installed binary must meet the minimum version.
-
-## Release checklist
-
-1. Bump `app/package.json` and `crates/openhuman-app/tauri.conf.json` (and root `Cargo.toml` / core) per existing version workflows.
-2. When dropping support for older installs, set `VITE_MINIMUM_SUPPORTED_APP_VERSION` to the new floor before or with that release (repo Actions variables + both workflow steps above).
-3. Remove, redirect, or retire older stable installers and stale updater entries from user-facing surfaces (GitHub Release assets, website, CDN, updater feed). Confirm deprecated artifacts are not reachable from default install/update flows.
-4. Smoke-test Gmail connect on a fresh install from releases/latest.
-5. Complete the [manual smoke checklist](https://github.com/tinyhumansai/openhuman/blob/main/docs/RELEASE-MANUAL-SMOKE.md). Then paste the completed sign-off block, verbatim with every checked item left checked, as a GitHub commit comment on the `v<version>-staging` tagged commit that QA validated. The promotion flow has no release PR. Before approving the production run, the `Release-Approval` reviewer checks two things. First, the sign-off comment exists on the staging-tagged commit. Second, the production run targets that validated content: either pass the staging-tagged SHA as `commit_sha`, or confirm that only `[skip ci]` version-bump commits separate it from the run's target. Anything more is new content QA never smoked, so re-run staging first.
-
-## Branch model and CI lanes
-
-Two long-lived branches, two CI lanes:
-
-- `main`: where all feature and fix PRs land. Every PR runs CI Fast ([`ci-fast.yml`](https://github.com/tinyhumansai/openhuman/blob/main/.github/workflows/ci-fast.yml)), with quality checks and full unit-test suites for changed areas, gated at 80% diff coverage or more.
-- `release`: a maintainer-promoted snapshot of `main` that releases are cut from. PRs targeting `release` and every push to `release` run CI Full ([`ci-full.yml`](https://github.com/tinyhumansai/openhuman/blob/main/.github/workflows/ci-full.yml)): complete unit suites, Rust mock-backend E2E, Playwright web E2E, and desktop E2E on Linux. macOS and Windows desktop E2E are manual dispatches that default to off until a native driver exists for each, so cross-platform desktop signal is opt-in. The `CI Full Gate` check aggregates every lane except the Playwright spec run. That run is non-blocking for now (`continue-on-error`, because it is flaky under CI contention), so a green gate does not prove the Playwright specs passed. Check that lane's result before cutting. Only the Playwright artifact build is gated.
-
-The cycle:
-
-1. A maintainer dispatches [`promote-main-to-release.yml`](https://github.com/tinyhumansai/openhuman/blob/main/.github/workflows/promote-main-to-release.yml), which pushes a merge commit from `main` into `release` with no PR. Re-dispatching refreshes `release` with the latest `main` and keeps fix commits already on `release`. If `release` already contains `main`, it does nothing.
-2. CI Full runs on the promotion push. If it finds breakage, anyone with write access opens a fix PR directly against `release`. Fix PRs run both lanes: CI Fast for quick lint and coverage feedback, and CI Full as the merge-blocking `CI Full Gate` check. The post-merge push re-runs CI Full on the merge result.
-3. Once CI Full is green on `release` HEAD, cut production with `release-production.yml`. You can dispatch staging from `main` instead when QA needs to validate `main` before promotion. The release workflows do not check the `CI Full Gate`, so operators must verify the CI evidence before cutting.
-4. A cut from `release` back-merges `release` into `main` with `scripts/release/merge-release-into-main.sh`. It fast-forwards when it can, and otherwise makes a versioned merge commit such as `chore(release): merge release v1.2.4 back into main`. Bump and fix commits flow back that way. A staging cut from `main` needs no back-merge. Version-bump commits carry `[skip ci]`.
-
-Required GitHub settings for this model (repo Settings > Rules): `main` requires the `PR CI Gate` status check on PRs; `release` requires PRs for non-bypass actors with the `CI Full Gate` status check required (it runs on PRs targeting release); the release GitHub App is on the bypass list of both rulesets so the promote and release workflows can push directly.
-
-## Workflows: staging and production
-
-There is one GitHub Actions workflow per environment. Pick by intent instead of toggling a flag. Staging follows the selected `main` or `release` dispatch ref; production always checks out `release`, regardless of the dispatch ref shown by GitHub's workflow UI.
-
-| Workflow | Branch | Bumps | Tags pushed | Concurrency group | Use when |
-| -------------------------------------------------------------------------- | ------------------- | -------------------------------------------------- | -------------------- | -------------------- | --------------------------------------------------------------------------------------- |
-| [`release-staging.yml`](https://github.com/tinyhumansai/openhuman/blob/main/.github/workflows/release-staging.yml) | `main` or `release` | `patch` only | `v<version>-staging` | `release-staging` | Cutting a staging build for QA from the selected branch. |
-| [`release-production.yml`](https://github.com/tinyhumansai/openhuman/blob/main/.github/workflows/release-production.yml) | `release` | `patch` / `minor` / `major` (`release_type` input) | `v<version>` | `release-production` | Shipping a production release from validated `release` HEAD (or a pinned `commit_sha`). |
-
-The build, sign, Sentry debug-file and artifact-upload pipeline that both flows use lives in [`.github/workflows/build-desktop.yml`](https://github.com/tinyhumansai/openhuman/blob/main/.github/workflows/build-desktop.yml) as a reusable `workflow_call` workflow. The two workflows above own ref resolution, version bumping, tagging, and publish and cleanup. The build itself is shared.
-
-### Android / Google Play
-
-Android releases are handled by the separate [`.github/workflows/android-compile.yml`](https://github.com/tinyhumansai/openhuman/blob/main/.github/workflows/android-compile.yml) workflow. It builds a release Android App Bundle (`.aab`), signs it with the Play upload key, and uploads it to Google Play when publishing is enabled. The unsigned and signed AABs stay as Actions artifacts for audit and debugging.
-
-Manual Android uploads use the same workflow:
-
-```bash
-pnpm --dir app release:android:play -- --track internal
-pnpm --dir app release:android:play -- --ref main --track production --status draft
-```
-
-Required GitHub Actions secrets:
-
-| Secret | Purpose |
-| ---------------------------------- | ------------------------------------------------------------------------------------------------- |
-| `ANDROID_UPLOAD_KEYSTORE_BASE64` | Base64-encoded Play upload keystore (`.jks`). Use the upload key, not the Google app signing key. |
-| `ANDROID_UPLOAD_KEY_ALIAS` | Keystore alias for the upload key. |
-| `ANDROID_UPLOAD_KEYSTORE_PASSWORD` | Keystore password. |
-| `ANDROID_UPLOAD_KEY_PASSWORD` | Key password. |
-| `GOOGLE_PLAY_SERVICE_ACCOUNT_JSON` | Raw JSON for the Play Console service account with release permissions for `com.openhuman.app`. |
-
-Optional GitHub Actions variables:
-
-| Variable | Default | Purpose |
-| --------------------- | ----------- | ----------------------------------------------------------------------- |
-| `ANDROID_PLAY_TRACK` | `internal` | Play track to upload to (`internal`, `alpha`, `beta`, or `production`). |
-| `ANDROID_PLAY_STATUS` | `completed` | Play release status (`completed`, `draft`, `inProgress`, `halted`). |
-
-Google Play requires each upload to use a higher Android `versionCode` than the last. The release bump scripts update `app/src-tauri-mobile/tauri.conf.json`, `app/src-tauri-mobile/Cargo.toml` and `app/src-tauri-mobile/Cargo.lock` with the desktop files, so the generated Android `tauri.properties` moves with each release.
-
-### Cutting a staging build
-
-1. Run Release (Staging) via `workflow_dispatch` from `release` (optionally pinning a release-reachable `commit_sha`). `create_tag = false` bumps and commits without tagging or building.
-2. The workflow bumps `patch` on `release`, commits `chore(staging): vX.Y.Z [skip ci]`, pushes, and creates an immutable `vX.Y.Z-staging` tag at that commit.
-3. The build matrix runs from the tag, not `release` HEAD, so reruns rebuild identical content even if `release` has moved on.
-4. The bump commit (and anything else on `release`) is merged back into `main`.
-5. On failure the staging tag is deleted automatically. The bump commit on `release` stays, so the next cut continues from `vX.Y.(Z+1)`.
-
-There is no separate `staging` branch. Staging cuts and production releases both live on `release`, and only the tag suffix (`-staging` or none) and the workflow that made the tag tell them apart.
-
-### Shipping a production release
-
-1. Run Release Production via `workflow_dispatch` with the desired `release_type` (`patch` / `minor` / `major`), from `release` HEAD or a pinned release-reachable `commit_sha`.
-2. The run first waits on the `review-approval` job (`environment: Release-Approval`). A [required reviewer](#release-app-token-approval-gate-and-rotation) must approve before anything is pushed. Then `prepare-build` bumps the version on `release`, commits `chore(release): vX.Y.Z [skip ci]`, pushes, tags `vX.Y.Z`, builds and publishes.
-3. `release` is merged back into `main` right after the cut.
-
-### Tag policy and rollback
-
-- Naming: staging tags use the SemVer pre-release suffix `-staging` (`v1.2.4-staging`), so they sort before the matching production tag.
-- Collisions: both workflows fail fast if the target tag already exists locally or on `origin`. Delete the stale tag (org maintainers only) or bump past it.
-- Production rollback: a failed build matrix triggers `cleanup-failed-release`, which deletes the draft GitHub Release and the `v<version>` tag.
-- Staging rollback: a failed staging build deletes the `v<version>-staging` tag. The bump commit on the source branch stays. The next staging cut continues from the new patch number, which leaves a small gap in patch numbers instead of racing concurrent merges.
-- Deleting tags: you need the same write access as `main`. Workflow cleanup runs with the workflow's token through `actions/github-script`. The GitHub App token is used only by `prepare-build` for the bump commit and tag push. Manual deletes (`git push --delete origin <tag>`) need equivalent maintainer permissions.
-
-## Release App token: approval gate and rotation
-
-`release-production.yml` bumps the version, commits to `release` and back-merges into `main`, pushing those commits and the tag with a GitHub App token (`secrets.XGITHUB_APP_ID` / `secrets.XGITHUB_APP_PRIVATE_KEY`) that bypasses branch protection. The same App pushes staging bumps to the selected `main` or `release` source (`release-staging.yml`) and promotion merge commits (`promote-main-to-release.yml`). A leaked private key (through a log, a compromised action or a misconfigured runner) would let an attacker push arbitrary commits to protected branches ([CWE-250](https://cwe.mitre.org/data/definitions/250.html)). Two controls limit the damage.
-
-### Manual approval gate
-
-The `review-approval` job runs before `prepare-build` and parks every production run on the `Release-Approval` GitHub environment, so a human must approve before any push happens.
-
-One-time setup (repo Settings > Environments):
-
-1. Create an environment named `Release-Approval` (the exact name, because the workflow references it verbatim).
-2. Under Deployment protection rules, enable Required reviewers and add the maintainers allowed to authorize a production push to `main`. A reviewer cannot approve their own run unless Prevent self-review is off. For a release gate, keep it on so a second person approves.
-3. Optionally set the wait timer to 0. The gate is a human decision, not a delay.
-
-When a production run starts, the `review-approval` job shows "Waiting". An approver opens the run and clicks Review deployments > Approve. Rejecting or cancelling skips `prepare-build`, so nothing is pushed.
-
-### Quarterly key rotation
-
-Rotate `XGITHUB_APP_PRIVATE_KEY` every quarter (and immediately on any suspected exposure). Do it at the end of March, June, September and December.
-
-1. In the GitHub App settings (Org > Settings > Developer settings > GitHub Apps > the release App), under Private keys click Generate a private key. Download the new `.pem`.
-2. Update the repo secret: Settings > Secrets and variables > Actions > `XGITHUB_APP_PRIVATE_KEY`, then paste the full new key (including the `-----BEGIN/END-----` lines). `XGITHUB_APP_ID` is unchanged.
-3. Trigger a low-risk verification run, such as Release (Staging), and confirm the Generate GitHub App token step succeeds and the push authenticates. Do not use Release Production for this unless you mean to cut a real bump commit. Even with `create_release = false`, `prepare-build` still bumps the version and commits to `release`. Staging with `create_tag = false` also commits but skips the tag and build, so it is the lower-risk probe.
-4. Back in the App settings under Private keys, delete the old key so only the freshly-issued one remains valid.
-5. Record the rotation date in the PR description or the ops log so the next owner can see when it last happened.
-
-Rotating invalidates any leaked copy of the old key, which caps the exposure window at one quarter.
diff --git a/gitbooks/developing/saas-profiles.md b/gitbooks/developing/saas-profiles.md
deleted file mode 100644
index c6636bbc73..0000000000
--- a/gitbooks/developing/saas-profiles.md
+++ /dev/null
@@ -1,252 +0,0 @@
----
-description: >-
- Running OpenHuman as a multi-user service: one profile per user, behind a
- trusted gateway, on one node or a cluster with leased profiles.
-icon: users
----
-
-# SaaS profiles
-
-The OpenHuman core can serve many users from one process. Each user is one
-**profile**: their own config, credential, workspace, sandbox and threads,
-laid out like the desktop app's `users/<id>/` directory. A trusted gateway in
-front of the core authenticates users and calls the core on their behalf. The
-core never sees a user's password or login; it trusts the gateway's service
-token and the user id the gateway names.
-
-This page covers deploying that service. The in-process variant, for a Rust
-server that wants the same isolation without a gateway, is
-[`ProfileRuntime`](embed/concepts/profiles-saas.md).
-The internals are in
-[`profiles/README.md`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/profiles/README.md).
-
-## What a user gets
-
-- **One profile per user.** It is opened on the user's first request, kept
- while in use, and closed after `idle_evict_secs` of idleness (or when
- `max_profiles_open` is reached and it is the least recently used idle one).
-- **One thread per conversation, per interface.** Web chat threads are named
- by the user (`t1`, `work-notes`); a message the gateway relays from a
- hosted platform (Telegram, iMessage, Discord) lands on that user's
- `channel:<platform>/<sender>/<chat>` thread. Thread ids are unique per
- profile, so two users' `t1` never meet.
-- **A reviewed surface.** A user's requests reach only the user methods:
- their threads, web chat (start, cancel, queue control), the channel relay,
- and reads and writes of their own memory. Everything else answers as an
- unknown method.
-- **Their own events.** `GET /events?client_id=` streams only that user's
- chat progress, final replies and relayed `channel_outbound` replies.
-- **Closed host tools.** The standalone SaaS CLI exposes no file or shell
- tools, even when `host_files` or `host_shell` is in `tool_allowlist`.
- Embedding hosts can supply profile tool adapters; the allowlist limits
- which host tool groups those adapters may expose.
-
-## Operator config
-
-The core runs in SaaS mode from the operator's own TOML file, never from a
-user's `config.toml`:
-
-```bash
-openhuman-core run --mode saas --saas-config /etc/openhuman/saas.toml
-```
-
-```toml
-root = "/srv/openhuman" # absolute, existing, not world-writable
-# service_token_file = "/srv/openhuman/service.token" # the default
-max_profiles_open = 256 # profiles open at once on this node
-idle_evict_secs = 1800 # close a profile idle this long
-profile_ids = "raw" # or "hashed"
-require_user_signature = true # X-OpenHuman-User-Sig on every user request
-tool_allowlist = [] # admission only; CLI has no host-tool adapter
-shared_backend_api_key = true # let every user ride OPENHUMAN_BACKEND_API_KEY
-custom_definitions = false
-
-# Cluster settings (see below)
-# storage_url = "mongodb://db.internal/openhuman" # OPENHUMAN_STORAGE_URL wins
-# node_id = "node-a" # else OPENHUMAN_NODE_ID, else random
-# advertise_url = "http://10.0.0.11:7788" # marks the node as clustered
-# lease_ttl_secs = 30
-# operator_dir = "/var/lib/openhuman/node-a" # default <root>/operator
-
-[sandbox] # policy for host_shell supplied by an embedding host
-image = "alpine:3.20"
-network = "none"
-memory_limit_mb = 512
-cpu_limit = 1.0
-```
-
-`tool_allowlist` is an admission policy, not a tool installer. Its recognized
-groups are `host_files` and `host_shell`. To expose those tools, use an
-embedding host with profile tool adapters and a permission callback. Adding
-either group to the standalone CLI configuration does not make those tools
-available. The `host_shell` Docker boot check still applies when that group is
-allowlisted.
-
-Unknown keys are refused. The boot guard refuses to start, listing every
-problem at once, when the root is relative, missing, world-writable or inside
-`~/.openhuman`; when the service token is missing, readable by others or
-shorter than 32 bytes; when single-user variables are set
-(`OPENHUMAN_WORKSPACE`, `OPENHUMAN_CORE_TOKEN`, `OPENHUMAN_DEV_CONNECT`,
-`OPENHUMAN_BACKEND_SESSION_TOKEN`) or a protection is switched off
-(`OPENHUMAN_APPROVAL_GATE`, `OPENHUMAN_SANDBOX`); when `host_shell` is
-allowlisted without a working Docker; and when a clustered node has no
-storage backend that can keep leases exclusive.
-
-Write the service token once, owner-only:
-
-```bash
-openssl rand -hex 32 > /srv/openhuman/service.token
-chmod 600 /srv/openhuman/service.token
-```
-
-## The gateway contract
-
-Every request carries the service token. A request for a user also names the
-user and signs that name:
-
-```text
-Authorization: Bearer <service token>
-X-OpenHuman-User: <your user id>
-X-OpenHuman-User-Sig: t=<unix secs>,v1=<hex hmac-sha256(service token, "<t>.<user id>")>
-```
-
-- Without `X-OpenHuman-User` the request runs on the **operator plane**:
- `profiles.provision`, `deprovision`, `list`, `status`, `set_credential`,
- `clear_credential` and `release` (`openhuman.profiles_*` over JSON-RPC).
-- With it, the core checks, in order: the bearer (`401`), a duplicate or
- unreadable user header (`400`), the signature, which must be within 60
- seconds of the core's clock (`401`), and the user's profile, which must
- already be provisioned (`403`). A full node or a storage failure answers
- `503`.
-- The user's TinyHumans credential (session JWT or API key) goes in once
- through `profiles.set_credential`; the core uses it for that user's
- inference and backend calls and never validates or echoes it.
-
-A minimal signer:
-
-```python
-import hashlib, hmac, time
-
-def sign(service_token: str, user_id: str) -> str:
- t = int(time.time())
- tag = hmac.new(service_token.encode(), f"{t}.{user_id}".encode(), hashlib.sha256)
- return f"t={t},v1={tag.hexdigest()}"
-```
-
-### Profile ids
-
-With `profile_ids = "raw"`, a user id matching `^[a-z0-9][a-z0-9_-]{0,63}$`
-is the profile id as is (`local`, `operator` and `h-*` are reserved); any
-other id becomes `h-<32 hex of sha256(user id)>`. `"hashed"` hashes every id,
-which keeps your user ids out of paths and logs. Changing the mode maps users
-onto new, empty profiles.
-
-### Relaying hosted chat platforms
-
-The gateway owns each platform's webhook and the user's account link. For
-each inbound message it calls, as that user:
-
-```json
-{"method": "openhuman.channel_relay_inbound",
- "params": {"channel": "telegram", "chat_id": "777", "sender_id": "555",
- "sender_name": "Alice", "message_id": "tg-1", "text": "hello",
- "client_id": "channel-relay"}}
-```
-
-The answer comes at once (`accepted`, `thread_id`, `request_id`); a
-`message_id` already recorded answers `duplicate: true` and runs nothing, so
-retries are safe. The reply arrives on the user's
-`/events?client_id=channel-relay` stream as a `channel_outbound` event
-carrying `full_response` and the `channel` and `chat_id` to deliver it to.
-
-## One node
-
-On a single node, leave `storage_url` and `advertise_url` unset. The profile
-registry is `profile.toml` files under `<root>/users/`, and each profile's
-lease is a file lock on `<root>/users/<id>/.lease`, which also keeps a
-second process on the same root from opening the same profile.
-
-## A cluster
-
-Several nodes can serve one user base. Each profile is hosted by exactly one
-node at a time, enforced by a **lease** in a shared storage backend; any node
-can host any profile.
-
-1. **One storage backend.** Set `storage_url` (or `OPENHUMAN_STORAGE_URL`) to
- a driver whose compare-and-swap is atomic across processes: MongoDB
- (`mongodb://…/<db>`, the `storage-mongodb` build feature) for nodes on
- several hosts, or SQLite (`sqlite:<path>`, `storage-sqlite`) for several
- processes on one host. Do not put SQLite on a network filesystem. It holds the
- profile registry, the leases, the session store, and each profile's
- records (secrets, auth profiles, approvals, cron, flows) under scope
- `profile:<id>`.
-2. **One shared volume for `root`.** Thread files, the cost and run ledgers,
- background completions and each user's `sandbox/` are still files under
- `<root>/users/<id>/`. Mount `root` on a read-write-many volume (NFS, EFS,
- CephFS) on every node. Keep memory on a remote engine: profiles use the
- hosted TinyHumans memory engine, which needs no volume.
-3. **A unique, stable `node_id` per node,** and an `advertise_url` the gateway
- can reach it on. Setting `advertise_url` marks the node as clustered; the
- boot guard then insists on a cross-process backend. A stable node id lets
- a restarted node take its own profiles back at once.
-4. **Its own `operator_dir` per node,** so nodes sharing a root do not share
- the operator workspace and keyring.
-
-### Routing and the 409
-
-Route users stickily: hash the user id onto a node (consistent hashing keeps
-most users in place when nodes come and go). Stickiness is only for speed;
-the lease is what makes it correct. When a request reaches a node while
-another node holds that user's profile, the core answers:
-
-```text
-HTTP/1.1 409 Conflict
-X-OpenHuman-Profile-Owner: node-b
-
-{"error": "profile_held", "owner": "node-b",
- "endpoint": "http://10.0.0.12:7788", "retry_after_ms": 21500}
-```
-
-The gateway should forward the request to `endpoint` (and update its routing
-for that user), or, when `endpoint` is null or unreachable, retry after
-`retry_after_ms`. The `409` comes only after the bearer check, so an
-unauthenticated caller learns nothing about which users exist.
-
-To move a user deliberately (draining a node, rebalancing), call
-`profiles.release {"profile_id": ...}` on the node that holds it. It refuses
-while the profile is in use; retry shortly.
-
-### Failover and recovery
-
-- A holder renews each lease every third of `lease_ttl_secs`. A node that
- crashes or loses the backend stops renewing, and its profiles become
- available to other nodes once their leases expire (at most
- `lease_ttl_secs`, 30 seconds by default).
-- The node that takes over a lease that was never released recovers the
- profile before serving it: turns that were in flight are marked
- interrupted and orphaned run-ledger rows are settled. A clean hand-over
- (idle eviction, release, shutdown) recovers nothing.
-- A node that finds its lease changed under it (another node took over, or
- an operator released it) fences the profile: it stops that profile's
- running turns and starts no new ones.
-- On a clean shutdown a node releases the leases of its idle profiles at
- once; a profile still busy keeps its lease, so its next holder recovers its
- turns.
-
-Known limit: storage writes carry no epoch fence, so a node that is
-partitioned from the backend but still running could write briefly after its
-lease expired. Keep `lease_ttl_secs` well above network hiccups, and treat
-the fence check before each turn and the turn cancellation on loss as the
-mitigation.
-
-## Checklist
-
-- `root` absolute, not world-writable, on a shared RWX volume (cluster).
-- `service.token` mode `0600`, at least 32 bytes, shared with the gateway only.
-- Gateway signs `X-OpenHuman-User` and keeps clocks in sync (±60 s).
-- `storage_url` on MongoDB (or SQLite for processes on one host), with the
- matching build feature (cluster).
-- `node_id`, `advertise_url` and `operator_dir` unique per node (cluster).
-- Load balancer hashes users stickily and honours `409` redirects.
-- Provision a user (`profiles.provision`) and install their credential
- (`profiles.set_credential`) before their first request.
diff --git a/gitbooks/developing/testing-strategy.md b/gitbooks/developing/testing-strategy.md
deleted file mode 100644
index 6cc75d9c21..0000000000
--- a/gitbooks/developing/testing-strategy.md
+++ /dev/null
@@ -1,234 +0,0 @@
----
-description: How OpenHuman tests its product with Vitest, cargo test and WDIO E2E, and where each kind of test goes.
-icon: vial
----
-
-# Testing strategy
-
-This page answers "where does my test go?". It is the companion to [`TEST-COVERAGE-MATRIX.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/TEST-COVERAGE-MATRIX.md).
-
----
-
-## Layers
-
-| Layer | Where it lives | What it tests | Driver |
-| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
-| Rust unit | Sibling `<module>_tests.rs` files beside the module under `crates/openhuman-core/src/<domain>/`, or a `tests/` subdir under a domain (e.g. `crates/openhuman-core/src/channels/tests/`); inline `#[cfg(test)] mod` blocks and files named `tests.rs`/`test.rs` fail `pnpm rust:layout` | Pure domain logic, schemas, RPC handler shape, in-memory state machines | `cargo test` |
-| Rust integration | `tests/*.rs` at repo root, each an explicit `[[test]]` target in `crates/openhuman-cli/Cargo.toml` (`autotests = false`); `tests/raw_coverage/*.rs` is globbed by `build.rs` into the single `raw_coverage_all` target | Full domain wiring with real Tokio runtime, mock external services, JSON-RPC end-to-end (`tests/json_rpc_e2e.rs`), domain × domain interactions | `pnpm test:rust` (which calls `bash scripts/test-rust-with-mock.sh`) |
-| Vitest unit | Co-located as `*.test.ts(x)` next to source under `app/src/**`, or under `app/src/**/__tests__/` | React components, hooks, store slices, pure utilities, service-layer adapters | `pnpm test` (root) or `pnpm --filter openhuman-app test:unit` |
-| WDIO E2E | `app/test/e2e/specs/*.spec.ts` | Full desktop flow: UI → Tauri → in-process core → JSON-RPC; user-visible behavior | All platforms: Linux CI drives the Wry-based debug build (macOS and Windows desktop E2E is disabled until a native driver exists). See [E2E testing](e2e-testing.md). |
-| Manual smoke | [`docs/RELEASE-MANUAL-SMOKE.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/RELEASE-MANUAL-SMOKE.md) | OS-level surfaces drivers cannot assert: TCC permission prompts, Gatekeeper, code signing, DMG install, OS-native toasts | Human at release-cut; the completed sign-off block is pasted as a GitHub commit comment on the `v<version>-staging` tagged commit QA validated. The promotion flow has no release PR. See [Release policy](release-policy.md) |
-
----
-
-## Where does my test go?
-
-```text
-Is the change behind the JSON-RPC boundary (in `crates/openhuman-core/src/`, `crates/openhuman-rpc/`, or `crates/openhuman-embed/`)?
-├─ YES - does it cross domains or talk to external services?
-│ ├─ YES → Rust integration (tests/*.rs)
-│ └─ NO → Rust unit (next to source)
-└─ NO - change is in `app/`
- ├─ Is it a pure function, hook, slice, or component in isolation?
- │ └─ YES → Vitest unit (*.test.tsx co-located)
- └─ Is it user-visible AND it crosses UI ⇄ Tauri ⇄ embedded core ⇄ JSON-RPC?
- ├─ YES → WDIO E2E (app/test/e2e/specs/*.spec.ts)
- └─ Is it OS-level (TCC, Gatekeeper, install, OS toasts)?
- └─ YES → Manual smoke checklist
-```
-
-If a change touches more than one layer, write a test in each layer it touches. Do not substitute one for another.
-
----
-
-## Failure-path requirement
-
-Every feature in the coverage matrix needs at least one failure or edge assertion as well as the happy path. Examples:
-
-- File-write tool: happy = wrote bytes; failure = path-restriction denial.
-- OAuth flow: happy = token issued; edge = expired refresh token recovery.
-- Memory store: happy = stored + recalled; edge = forget-then-recall returns nothing.
-
-A spec that asserts only the happy path is incomplete.
-
----
-
-## Property-test regressions
-
-Core proptests set `failure_persistence: None` in their `ProptestConfig`; they do not write seed files. When a property fails, preserve the minimized input shown in the failure report to reproduce it, then promote that input to a named unit test beside the property test. Confirm that the explicit case fails against the faulty implementation and passes with the fix before shipping it.
-
-For example, the lease model retains the expired-holder reacquisition case as `reacquiring_at_expiry_advances_epoch_and_marks_previous_holder_unclean`, with two nodes and the steps `Acquire(0), Advance(1000), Acquire(0)`.
-
----
-
-## Mock policy
-
-- Use no real network in unit, integration or E2E tests. Use the shared mock backend (`scripts/mock-api-core.mjs`, `scripts/mock-api-server.mjs`, `app/test/e2e/mock-server.ts`).
-- Admin endpoints for tests: `GET /__admin/health`, `POST /__admin/reset`, `POST /__admin/behavior`, `GET /__admin/requests`.
-- External services (Telegram, Slack, Gmail, Notion, Ollama, OpenAI and others) are stubbed at the mock backend level; tests assert the request shape via `getRequestLog()`.
-- The only acceptable exception is a documented release-cut manual smoke step.
-
----
-
-## Determinism rules
-
-- No wall-clock waits. Use the `waitForApp`, `waitForAppReady` and `waitForWebView` helpers, or explicit element-readiness checks.
-- No shared filesystem state. Every E2E spec runs in an isolated `OPENHUMAN_WORKSPACE`, created and cleaned by `app/scripts/e2e-run-spec.sh`.
-- No order-dependent specs. Each spec must pass when run alone.
-- No reliance on absolute coordinates or animation timing.
-- Prefer synthesizing keyboard input with `browser.execute(...)` over `browser.keys()`. See `command-palette.spec.ts` for the pattern.
-
----
-
-## What the existing harness gives you
-
-- Mock backend: `startMockServer` and `stopMockServer` in `app/test/e2e/mock-server.ts`.
-- Auth shortcut: `triggerAuthDeepLink` and `triggerAuthDeepLinkBypass` in `helpers/deep-link-helpers.ts` skip real OAuth.
-- Element helpers: `clickNativeButton`, `waitForWebView` and `clickToggle` in `helpers/element-helpers.ts`. Use these instead of raw `XCUIElementType*` selectors.
-- Shared flows: `completeOnboardingIfVisible`, `navigateViaHash`, `navigateToSkills` and `walkOnboarding` in `helpers/shared-flows.ts`.
-- Core RPC from a spec: `callOpenhumanRpc` in `helpers/core-rpc.ts` drives the embedded core directly when a UI step would be brittle.
-- Platform guards: `isTauriDriver` and `supportsExecuteScript` in `helpers/platform.ts`. Desktop E2E runs the debug binary under Xvfb through `tauri-driver` on Linux. macOS and Windows have no automated desktop session yet.
-- Artifact capture on failure: `captureFailureArtifacts` runs from `wdio.conf.ts`, and screenshots and DOM dumps land under `app/test/e2e/artifacts/`.
-
----
-
-## Naming and structure
-
-- WDIO specs: `<feature-area>-flow.spec.ts` for end-to-end product flows; `<feature>.spec.ts` for narrower surfaces.
-- Vitest co-location: prefer `Component.tsx` + `Component.test.tsx` siblings; use `__tests__/` only when grouping multiple related tests.
-- Rust integration tests: snake_case file matching the surface, `<feature>_e2e.rs` for JSON-RPC-driven flows, `<feature>_integration.rs` for cross-domain.
-- Each `describe` block maps to a feature-list ID range. Link the matrix row in a comment if the mapping is not obvious.
-
----
-
-## Pre-merge gates
-
-Run these before opening a PR. CI runs the same set, but local runs are faster:
-
-```bash
-# Rust core
-cargo fmt --check
-cargo check --manifest-path Cargo.toml # covers openhuman-core, openhuman-embed, openhuman-rpc, openhuman-tui
-cargo clippy --manifest-path Cargo.toml -- -D warnings
-cargo test --manifest-path Cargo.toml
-
-# Tauri shell
-cargo check --manifest-path crates/openhuman-app/Cargo.toml
-
-# Frontend
-pnpm typecheck
-pnpm lint
-pnpm format:check
-pnpm test # vitest, via the app workspace
-
-# Rust integration with mock backend
-pnpm test:rust
-
-# E2E (slow, run when behavior changes visibly to users)
-pnpm --filter openhuman-app test:e2e:build
-bash app/scripts/e2e-run-spec.sh test/e2e/specs/<your-spec>.spec.ts <id>
-```
-
----
-
-## Manual smoke checks
-
-WDIO and Appium cannot drive some surfaces, because they cross OS-level trust boundaries or hardware paths. [`docs/RELEASE-MANUAL-SMOKE.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/RELEASE-MANUAL-SMOKE.md) holds the full checklist and sign-off block. It is the source of truth for what to verify per release. It covers items such as:
-
-- macOS TCC permission prompts (Accessibility, Input Monitoring, Microphone)
-- Gatekeeper signature validation on first launch
-- Code-sign integrity (`codesign --verify --deep --strict`)
-- DMG install and drag-to-Applications flow
-- Auto-update download and relaunch
-- OS-native notification toasts on Linux (the driver sees no display server beyond Xvfb)
-
-If a feature has no automated coverage and is not on the manual smoke list, treat it as untested and open a coverage gap.
-
----
-
-## Coverage matrix as the contract
-
-Every feature leaf in the [coverage matrix](https://github.com/tinyhumansai/openhuman/blob/main/docs/TEST-COVERAGE-MATRIX.md) maps to:
-
-1. One or more test paths, or
-2. A justified `🚫` with a manual-smoke entry.
-
-When you add, remove or rename a feature, update its matrix row in the same PR.
-
----
-
-## A red Rust suite locally is usually not a defect
-
-Most local Rust failures here come from the environment, and they look exactly like product bugs. Work down this list before you conclude anything. Each step is one command. Each carries the failure you see without it, so you can check in thirty seconds whether it still holds.
-
-Do not trust a note that tells you the cause. A line saying "these fail locally, it is provisioning" ends the investigation before it starts. Once it sent a worker hunting for a provisioning gap when the real cause was a product defect (`agent definition \`harness\` was not found`). Use the steps, not folklore.
-
-### 1. Did anything compile?
-
-`cargo` exits 101 in at least three cases that look identical from the shell: nothing compiled, a test asserted false, or the process aborted.
-
-```bash
-grep -c "^test result" run.log # 0 = nothing ran
-```
-
-Zero `test result` lines means the problem is compilation or an abort, not a failing test. Read the first error line:
-
-- `failed to load source for dependency <x>` or `No such file or directory` means a submodule is not checked out.
-- `fatal runtime error: stack overflow` with `signal: 6, SIGABRT` and no `test result` line means the process aborted. See step 3.
-
-### 2. Are the submodules there, at every depth?
-
-Some crates depend on submodules nested inside other submodules. `openhuman-tinyhumans` is the clearest case. It needs `vendor/tinyhumans-sdk` (top level) and `vendor/tinyagents/vendor/tinytools` (nested). A plain `git submodule update --init` fetches the first and silently skips the second, so you get a compile failure that reads like a test failure.
-
-```bash
-git submodule update --init
-git -C vendor/tinyagents submodule update --init --recursive
-```
-
-Without the nested module, `cargo test -p openhuman-tinyhumans` fails with no `test result` line:
-
-```text
-error: failed to get `tinytools` as a dependency of package `openhuman-cli v0.63.31`
- failed to load source for dependency `tinytools`
- No such file or directory (os error 2)
-```
-
-Check content, not status. `git submodule status` prints `-` only for unregistered modules, and registration happens before checkout. A half-finished init can therefore look ready while every working tree is empty. Seen mid-init: 13 `+`, 3 blank, zero `-`, while `du -sh vendor` said 120K and `ls vendor/tinychannels` was empty.
-
-```bash
-du -sh vendor # 120K = empty; a real checkout is GBs
-ls vendor/<module> | wc -l # 0 = empty, whatever status says
-```
-
-### 3. Is your feature set the one CI uses?
-
-`cargo test -p openhuman --lib` on default features builds a smaller product than CI does, and the difference changes test outcomes, not just which tests exist. A feature flag can gate a tool's registration. A test can compare a static allowlist with what it finds by inspecting the built binary. The flag then moves the result silently, and the failure names a product concept, such as "agents that carry tools but whose prompt names none of them", with no mention of a feature.
-
-In one comparison, `openhuman --lib` failed 5 tests on default features and 3 under CI's set. The two that differed were profile artifacts: `every_prompt_names_at_least_one_tool_it_can_call` depends on its default registry, and `the_withheld_block_renders_for_a_renamed_session_with_a_filter` needs `documents`. Reproduce CI exactly before you assert anything:
-
-```bash
-RUST_MIN_STACK=67108864 cargo test -p openhuman --lib \
- --features "$(bash scripts/ci/product-features.sh)"
-```
-
-`RUST_MIN_STACK` is per suite, not universal. Removing it from `openhuman-tinyhumans` still gives `183 passed; 0 failed`, so that crate does not need it. For `openhuman --lib`, `web_chat` is reported to abort with `fatal runtime error: stack overflow` without it, which is why the CI lane exports it. That abort has not been reproduced locally, so re-verify before relying on it elsewhere.
-
-Two crates, one variable, opposite answers. Do not add a prerequisite by reflex. An unneeded one teaches contributors that the docs are unreliable.
-
-### 4. Only now suspect a defect, and make the silence speak
-
-If it compiled, the submodules are present and the feature set matches CI, a failure may be real. The trap at this stage is a layer that correctly discards detail, such as a sanitizer, scrubber or redactor. The symptom is a generic message where a specific one was produced.
-
-Patch the discarding line to print what it drops, run once, and read the underlying error. In one case a sanitized `hosted agent invocation was rejected by policy` hid `Validation("agent definition \`harness\` was not found")`, which named the defect outright.
-
-### Why this order
-
-The cheap checks come first because a wrong answer early is invisible later. A suite that never compiled reports the same exit code as one that failed, and a plausible but wrong explanation gets confirmed instead of tested. Running CI's literal command is the surest way to avoid that.
-
----
-
-## When in doubt
-
-- Put the test as low in the stack as you can (Rust unit, then Rust integration, then Vitest, then WDIO). Lower layers are faster, more deterministic and cheaper.
-- Use WDIO only for behavior that really crosses UI, Tauri, the embedded core and JSON-RPC. Do not drive a unit-testable concern through WDIO just because the UI exists.
-- A failing happy path is a regression. A missing failure-path test is a gap. Both are bugs.
diff --git a/gitbooks/developing/theming.md b/gitbooks/developing/theming.md
deleted file mode 100644
index fc1f6bb416..0000000000
--- a/gitbooks/developing/theming.md
+++ /dev/null
@@ -1,84 +0,0 @@
----
-description: >-
- The CSS token system behind every theme: how tokens are defined, how
- Tailwind uses them and how to write components that follow it.
-icon: palette
----
-
-# Theming and design tokens
-
-You can re-skin OpenHuman at runtime. CSS variables (the "tokens") drive colors and fonts, so a theme is a set of values for those variables. This page is the contributor reference for the token system.
-
-## How it works
-
-1. Tokens: `app/src/styles/tokens.css` defines every themeable color as a space-separated RGB channel triple (for example `--surface: 255 255 255;`), plus font-role variables (`--font-title/heading/body/mono/serif`). The light palette lives in `:root` and the dark palette in `:root.dark`.
-
-2. Tailwind wiring: the app runs Tailwind v4, so there is no `tailwind.config.js`. The `@theme` block in `app/src/index.css` exposes each token as a utility color (`--color-surface: rgb(var(--surface));` and so on). Tailwind's opacity modifiers then handle `bg-surface/50` and `bg-primary-500/10` with no extra work. This only works because tokens are RGB triples. A hex string cannot be combined with an opacity modifier this way.
-
-3. Runtime application: `app/src/providers/ThemeProvider.tsx` resolves the active `Theme` and writes its overrides as inline `--token` and `--font-<role>` variables on `<html>`. It toggles `.dark` from `theme.isDark`. Variables a theme does not override fall back to the `tokens.css` defaults. Variables left over from a previous theme are removed on switch.
-
-4. State: `app/src/store/themeSlice.ts` holds `activeThemeId` and `customThemes`. Built-in presets live in `app/src/lib/theme/presets.ts`. Users edit themes in Settings > Theme Studio (`app/src/components/settings/panels/ThemeStudioPanel.tsx`).
-
-## Token taxonomy
-
-| Group | Tokens | Tailwind utilities |
-| -------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
-| Surfaces | `surface`, `surface-canvas`, `surface-muted`, `surface-subtle`, `surface-strong`, `surface-hover`, `surface-overlay` | `bg-surface`, `bg-surface-muted`, ... |
-| Text | `content`, `content-secondary`, `content-muted`, `content-faint`, `content-inverted` | `text-content`, `text-content-muted`, ... |
-| Borders | `line`, `line-strong`, `line-subtle` | `border-line`, `border-line-strong`, ... |
-| Accents | `primary-*`, `sage-*`, `amber-*`, `coral-*` (shades 50 to 950) | `bg-primary-500`, `text-coral-600`, ... (backed by variables, themeable) |
-| Fonts | `font-title`, `font-heading`, `font-body`, `font-mono`, `font-serif` | `font-title`, `font-heading`, `font-body`, ... |
-
-The legacy `--cmd-*` and `--color-*` variable sets are thin aliases over these tokens. Do not add new colors there.
-
-## Authoring components
-
-- Use semantic utilities (`bg-surface`, `text-content`, `border-line`) for neutral surfaces, text and borders instead of `bg-white dark:bg-neutral-900`. You rarely need `dark:` variants, because the token flips for you.
-- Use the accent palettes (`primary`, `sage`, `amber`, `coral`) for semantic color. They are themeable with no extra work.
-- Avoid hardcoded hex in `className` or inline `style`. It bypasses theming.
-
-## Color as identity: the four-ramp ceiling
-
-Some lookup tables answer "which thing is this?" with a color. Examples are a skill category, an event-log domain, a notification provider and a catalogue source. Stock Tailwind ramps keep creeping back into these tables, because a table with nine rows wants nine hues and the app ships four.
-
-There are exactly four themeable ramps: `primary`, `sage`, `amber` and `coral`. Everything else in Tailwind's default palette (`emerald`, `violet`, `sky`, `teal`, `indigo`, `cyan`, `rose`, `pink`, `purple` and more) resolves to a fixed oklch value that ignores the active theme. A table built on those hues looks fine in the default skin and falls apart in every other one.
-
-### The rule
-
-1. Map a stock ramp to its themeable equivalent at the same shade step: `red` to `coral`, `green` and `emerald` to `sage`, `orange` to `amber`, `blue` to `primary`. `bg-emerald-50 text-emerald-700` becomes `bg-sage-50 text-sage-700`.
-
-2. Hues with no equivalent do not get one. `violet`, `teal`, `sky`, `cyan`, `indigo`, `pink` and `purple` are not "nearly primary" or "nearly sage". Do not invent a fifth ramp, do not duplicate an existing one under a new name, and do not reach for `--accent-lavender` and similar. Those are fixed hexes, not ramps.
-
-3. When a table needs more than four distinct hues, send the surplus rows to the neutral pair the table already defines (`bg-surface-subtle text-content-secondary`, or whatever its "unknown" or "other" row uses). Never let two rows share a ramp. Two domains that render identically destroy the distinction the table exists to show, which is worse than rendering one of them in neutral.
-
-4. Decide which rows keep a hue by which distinction a reader acts on. The badge usually prints its own label, so color is a scanning aid, not the information. Spend the four ramps on the readings that change what someone does, and let the rest go neutral. Keep the meaning honest: `coral` reads as failure, so an ordinary row painted coral makes routine state look broken. Leaving a ramp unassigned is fine.
-
-Worked examples in the tree:
-
-| Table | Rows | Kept a hue | Why |
-| --------------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
-| `skills/skillIcons.tsx` `CATEGORY_META` | 9 | `Built-in` (primary), `Productivity` (sage), `Social` (coral), `Tools & Automation` (amber) | `Channels`, `Chat` and `Platform` share the neutral tone of `All` / `Other` |
-| `skills/SkillsExplorerTab.tsx` `SOURCE_COLORS` | 6 | `built-in` (sage), `optional` (primary) | The four remote catalogues print their own name; provenance tier is the distinction that matters |
-| `skills/SkillsExplorerTab.tsx` `FORMAT_MAP` | 5 rows, 3 tones | Hermes family (primary), ClawHub family (sage), `legacy` (amber) | Three tones fit under the ceiling, so nothing is lost |
-| `settings/panels/EventLogPanel.tsx` `DOMAIN_BADGE_COLORS` | 11 | `tool` (primary), `agent` (sage), `approval` (amber) | Who acted, and what waits on a human. Coral stays unassigned, because no domain means failure |
-| `notifications/NotificationCard.tsx` provider badge | 6 | none | The importance badge in the same row already spends coral/amber/sage on high/medium/low; a coral provider would read as a failed notification |
-
-### Brand tints are a separate question
-
-A few plates use a third party's brand color, not an app hue: Telegram's `#249CD8`, Discord's `#5865F2` and iMessage's `#34C759` in `skills/skillIcons.tsx`. Flattening them to `bg-surface-subtle` would erase them into the generic badge beside them, so they stay as hex on purpose. Giving them a themeable home means adding brand tokens, which is a product decision, not a cleanup. The same goes for the provider badges in `NotificationCard.tsx`: reaching for a stock ramp is not the fix.
-
-### Do not repaint a primitive's variant
-
-`<Button variant="primary" className="bg-violet-500">` is the same bug. The variant already paints the accent ramp, and the override freezes the color and breaks the hover, focus and disabled states. Drop the override and retint the surface around the button instead.
-
-## The migration codemod
-
-`scripts/theme-codemod/` collapses audited light and `dark:` Tailwind pairings into the semantic utilities. It is idempotent and runs as a dry run by default:
-
-```bash
-node scripts/theme-codemod/migrate.mjs # dry-run + report
-node scripts/theme-codemod/migrate.mjs --write # apply
-node scripts/theme-codemod/migrate.mjs --selftest # fixture assertions
-```
-
-It only rewrites adjacent pairs and never touches opacity-suffixed utilities or test files. The mapping table is `scripts/theme-codemod/map.mjs`.
diff --git a/gitbooks/developing/tinycomputer-docker.md b/gitbooks/developing/tinycomputer-docker.md
deleted file mode 100644
index fb3f39d974..0000000000
--- a/gitbooks/developing/tinycomputer-docker.md
+++ /dev/null
@@ -1,173 +0,0 @@
----
-description: Run the TinyComputer browser headless in a Linux container, with a locally built module and unattended automation.
----
-
-# TinyComputer browser on Linux and Docker
-
-The `browser` tool drives Chromium through the TinyComputer module
-(`libtinycomputer.so`). The compiled module registry pins TinyComputer
-releases only for the platforms they are published for. When none is pinned
-for your Linux host, or you need the module built from the exact
-`vendor/tinycomputer` gitlink your core was built from, build it yourself and
-point the core at it with a module override.
-
-This page covers the container recipe, the loader's directory rules, the
-browser settings a headless research agent needs, and how to let cron-driven
-turns click and type without an interactive approval.
-
-{% hint style="warning" %}
-A local build is the operator's own artifact. Never copy its SHA-256 into
-`crates/openhuman-core/src/modules/registry/` as a release pin: pins come
-only from a published release.
-{% endhint %}
-
-## 1. Build the module in a builder stage
-
-`vendor/tinycomputer/scripts/build-module` does everything the loader needs.
-It runs `cargo build --locked --release -p tinycomputer --lib` and installs
-`libtinycomputer.so` into `TINYCOMPUTER_MODULE_DIR` (mode `644`, directory
-`755`). It writes a `modules.toml` beside the library naming its SHA-256, then
-walks every parent directory and fails early if the loader would refuse one.
-
-Initialize the nested submodules first (`git submodule update --init
---recursive vendor/tinycomputer`). TinyComputer vendors its own TinyBus,
-agent-browser and agent-desktop. Build from the same checkout as the core:
-the host refuses a module whose TinyComputer contract version is incompatible
-with its own.
-
-```dockerfile
-# Builds libtinycomputer.so from the gitlink this checkout records.
-FROM rust:1.96.1-bookworm AS tinycomputer
-RUN apt-get update && apt-get install -y --no-install-recommends \
- build-essential pkg-config ca-certificates \
- libasound2-dev libxdo-dev libxtst-dev libx11-dev \
- && rm -rf /var/lib/apt/lists/*
-WORKDIR /src/tinycomputer
-COPY vendor/tinycomputer/ ./
-# Root-owned, 755 all the way up: what the loader accepts.
-ENV TINYCOMPUTER_MODULE_DIR=/opt/tinycomputer
-RUN scripts/build-module
-```
-
-Then add it to the runtime stage of the repository `Dockerfile` (which
-already carries the `libasound2`, `libxdo3`, `libxtst6` and `libx11-6`
-runtime libraries the module links), together with Chromium:
-
-```dockerfile
-RUN apt-get update && apt-get install -y --no-install-recommends \
- chromium fonts-liberation \
- && rm -rf /var/lib/apt/lists/*
-# Copy the library and its modules.toml attestation together.
-COPY --from=tinycomputer /opt/tinycomputer/ /opt/tinycomputer/
-RUN chown -R root:root /opt/tinycomputer \
- && chmod 755 /opt/tinycomputer \
- && chmod 644 /opt/tinycomputer/libtinycomputer.so /opt/tinycomputer/modules.toml
-```
-
-### What the loader checks
-
-The TinyBus loader (`vendor/tinybus/crates/tinybus/src/module/host.rs`)
-refuses the artifact unless all of these hold:
-
-- **Every directory from `/` down to the module's own** is owned by root or
- by the user the core runs as (uid `10001` in the image). None may be group-
- or world-writable unless it carries the sticky bit. A symlinked path
- component is refused, and the library itself is opened with `O_NOFOLLOW`.
- Do not put the module on a bind mount or named volume: those are usually
- owned by another user or writable by a group.
-- **The file** is a regular `.so` under 512 MiB.
-- **`modules.toml` beside it**, when present, names the library's exact
- SHA-256. A mismatch is a refusal, so a rebuilt library needs the
- `modules.toml` that `build-module` regenerated. Keep the two together.
- Without that attestation the module still loads but is not an attested
- recipient, so confidential calls such as `StartTask` (the `task` action) are
- not delivered to it.
-
-A refused or faulted module stays refused until the core restarts.
-
-## 2. Load it with a module override
-
-```toml
-[modules]
-overrides = [{ id = "tinycomputer", path = "/opt/tinycomputer/libtinycomputer.so" }]
-```
-
-`id` is the registry id (`tinycomputer`) and `path` an absolute path to the
-library. An override is checked before the search path and the release
-cache, and bypasses the compiled release digest, which is why only the
-operator's own config can name one (`config/schema/modules.rs`,
-`modules::ops::local_override`). `[modules] enabled` must stay `true` (the
-default).
-
-## 3. Browser settings for a headless research agent
-
-```toml
-[browser]
-enabled = true
-headless = true
-chrome_path = "/usr/bin/chromium"
-# Keep cookies and logins across sessions and restarts.
-profile_mode = "persistent"
-profile_path = "/home/openhuman/.openhuman/browser-profile"
-download_dir = "/home/openhuman/.openhuman/browser-downloads"
-# Opt-in: see "Unattended actions" below.
-unattended_actions = ["click", "press"]
-
-[http_request]
-# The browser shares this list; "*" is stripped for the browser.
-allowed_domains = ["example.com", "docs.example.org"]
-```
-
-- `chrome_path` is passed to the module as the browser executable. Debian's
- `chromium` package installs `/usr/bin/chromium`.
-- `profile_mode = "persistent"` requires an **absolute** `profile_path`, and
- `download_dir` must be absolute too. The session is refused otherwise. Put
- both under the workspace volume (`/home/openhuman/.openhuman` in the
- image), which the entrypoint chowns to the core's user, so they survive
- container restarts.
-- Navigation obeys `[http_request].allowed_domains`. An empty list refuses
- every session. To let the browser go anywhere, set
- `OPENHUMAN_BROWSER_ALLOW_ALL=1` in the container environment instead of
- adding `"*"`.
-- agent-browser adds `--no-sandbox` and `--disable-dev-shm-usage` by itself
- when it detects a container, a root user or a small `/dev/shm`.
-
-## 4. Unattended actions
-
-By default, every click, double-click, fill, type, key press, select and
-check goes through the forced host approval gate. So does a browser task
-paused at `needs_approval`. The forced gate parks only for a live WebChat
-turn and denies everything else, so without the setting below a cron job can
-open and read pages but never follow a "next page" link.
-
-`[browser] unattended_actions` names the action kinds a **trusted unattended
-turn** may take without that approval:
-
-| Name | Covers |
-| ----------------------- | ----------------------------------------------------------------------------------------------------------- |
-| `click`, `double_click` | Clicking an element, including `find` with `find_action = "click"` |
-| `fill`, `type` | Writing text into a field |
-| `press` | A key press such as `Enter` |
-| `select`, `check` | Choosing an option, ticking a box |
-| `task_step` | A browser `task` paused at `needs_approval` before an irreversible step, approved through `confirm_pending` |
-
-- The tool reads the turn origin from the per-turn `CoreContext` that the
- cron, background-job and workflow entry points scope around their turn.
-- **Only** turns whose origin is `TrustedAutomation` with source `Cron`,
- `Background`, or `Workflow { require_approval: false }` qualify.
-- WebChat, external channels (Telegram, Slack, …), CLI and direct chat,
- unlabelled turns, and workflows with `require_approval = true` keep the
- forced gate exactly as before, even for a listed action.
-- The default is an empty list, which changes nothing.
-- An unknown name allows nothing. At load the core logs a warning with the
- number of unknown entries (never their text) and the list of known names.
-- Each allowed action is logged at `info` with the action kind, the first 12
- hex characters of its digest and the origin class. Selectors, typed values,
- page content and the job id are never logged. Grep for
- `[browser] unattended action allowed`.
-- Payment checkpoints are not `needs_approval` pauses. A task still stops
- there whatever this list says.
-
-`task_step` waves through steps the task controller itself marks
-irreversible, such as sending, submitting or deleting. List it only for jobs
-whose prompt and allowed websites you control.
diff --git a/gitbooks/developing/tinyhumans-api-key.md b/gitbooks/developing/tinyhumans-api-key.md
deleted file mode 100644
index ea60a82d27..0000000000
--- a/gitbooks/developing/tinyhumans-api-key.md
+++ /dev/null
@@ -1,49 +0,0 @@
----
-description: >-
- What one TinyHumans API key unlocks, how to use it and how OpenHuman stores
- and sends it.
-icon: key
----
-
-# One TinyHumans API key
-
-One TinyHumans credential unlocks every managed backend service: chat inference over the OpenRouter model catalogue, web search, embeddings, media generation, integrations, voice and the Jev ranker. There is no separate key per service. The desktop app gets the credential when you sign in. A library host or a headless process supplies it directly.
-
-## How to get one
-
-All managed services sit behind one TinyHumans account. Sign in through the desktop app to get a session credential, or generate an API key (`th_...`) for library and headless use.
-
-## Using it
-
-Desktop app: sign in with a TinyHumans account. The app stores a session credential in the OS-backed auth-profile store. The core resolves it the same way it resolves an API key, through `security::credentials::api_key` and `session_support::resolve_backend_credential`.
-
-Library: pass the key to `RuntimeBuilder` and it boots connected:
-
-```rust
-use openhuman_tinyhumans::{embed::Workspace, RuntimeBuilder};
-
-let runtime = RuntimeBuilder::new()
- .workspace(Workspace::Ephemeral)
- .api_key("th_...")
- .build()
- .await?;
-```
-
-`openhuman_tinyhumans::RuntimeBuilder` mirrors `openhuman_embed::RuntimeBuilder` method for method. On `build()` it installs the SDK-backed transport and binds it to the runtime.
-
-Headless: set `OPENHUMAN_BACKEND_API_KEY` before the core boots. The boot sequence (`crates/openhuman-core/src/security/credentials/ops/boot_env.rs`) installs it on a fresh credential store and never overwrites a credential that is already there.
-
-## Where it is stored and how it is sent
-
-The key lives in the same auth-profile store as an app session, under its own provider id (`api-key`). It is never written to `config.toml` and never logged. It is the only credential a library embedder holds. There is no login-token exchange, no session JWT and no `/auth/me` round trip.
-
-The key is sent in one of two forms, depending on the endpoint:
-
-- Managed inference (`{api_url}/openai/v1`): `Authorization: Bearer <key>`. `OpenHumanBackendModel::resolve_bearer` prefers the stored API key over an app session when both exist.
-- Backend REST (`BackendClient`, `IntegrationClient`): `x-api-key: <key>`.
-
-`crates/openhuman-core/src/security/credentials/api_key.rs` owns storage and retrieval (`store_api_key`, `get_api_key`, `has_api_key`, `clear_api_key`). `session_support::BackendCredential` turns either credential form into the right header at request time.
-
-## Bring your own key still works
-
-The API key covers the managed path. You can still point any workload at your own provider: chat and reasoning at a bring-your-own-key LLM slug, embeddings at Voyage, OpenAI or Cohere directly, and search at Brave, Exa or Tavily directly. See [Pluggable engines](engines.md) for the full list and the config key for each. Running everything with your own keys needs no TinyHumans key. Running anything through the managed backend does.
diff --git a/gitbooks/features/approval-gate.md b/gitbooks/features/approval-gate.md
deleted file mode 100644
index c4a939d909..0000000000
--- a/gitbooks/features/approval-gate.md
+++ /dev/null
@@ -1,160 +0,0 @@
----
-description: >-
- The agent asks before it does anything risky. When the autonomy policy is
- on, risky actions wait for your approval and are denied if you don't answer.
-icon: shield-check
----
-
-# Approval gate
-
-The approval gate sits between the agent and the outside world. When the agent wants to do something your autonomy tier says needs a check, the gate stops the call, shows you what is about to happen, and waits for your decision. Actions your tier already allows run without a prompt. On the `full` tier, for example, a write is never prompted.
-
-{% hint style="warning" %}
-The autonomy policy is off by default, and the gate is part of it. With `[autonomy] enabled = false`, command classification, the tier table, the allowlist, the hourly action budget, `workspace_only` and `forbidden_paths` do nothing, and acting tool calls run without a prompt. The exceptions are the forced approvals below.
-
-This is deliberate. Agents are expected to run inside a container, a platform jail or a Docker sandbox that already provides isolation, and a shell that refuses ordinary shell syntax is not a usable shell. To turn the policy on, set `[autonomy] enabled = true` in `config.toml`.
-{% endhint %}
-
-## What still holds with the policy off
-
-Three protections do not depend on `[autonomy] enabled`:
-
-- Credential stores and system roots stay unreachable. `~/.ssh`, `~/.gnupg`, `~/.aws` and system roots are always refused, as are `..` traversal and null bytes in a path.
-- Hard blocks inside the tools themselves, including the tool-policy middleware, always run.
-- Sandboxing is separate. The platform jail and the Docker backend are chosen by `[runtime]` and the session's origin, not by the autonomy tier. See [Privacy and security](privacy-and-security.md).
-
-Everything below describes the policy with `[autonomy] enabled = true`.
-
-## What triggers a prompt
-
-The agent classifies every acting tool call into a command class. Your autonomy tier then decides whether that class runs, prompts or is blocked.
-
-| Command class | What it covers |
-| ------------- | ----------------------------------------------------------------- |
-| Read | Provably read-only or observational (a curated allowlist) |
-| Write | Changes state. This is the default for anything unrecognized |
-| Network | Reaches the network (curl, wget, ssh, scp, and so on) |
-| Install | Installs an OS or global language package |
-| Destructive | Catastrophic, irreversible or privilege-escalating |
-
-You pick the tier in **Settings > Permissions** (`[autonomy].level`):
-
-| Tier | Read | Write | Network, Install, Destructive |
-| ---------------------------------------------- | ----- | ------ | ----------------------------- |
-| `readonly` | Allow | Block | Block |
-| `supervised` (default when the policy is on) | Allow | Prompt | Prompt |
-| `full` | Allow | Allow | Prompt |
-
-A call that lands on Prompt waits at the gate. A call that lands on Block is refused, and no approval can override it.
-
-Classification fails closed. A command that is not provably read-only counts as at least a write. In a piped command the highest class wins, so `ls | curl ...` is Network. A quoted heredoc body (`<< 'EOF' ... EOF`) is treated as data and not scanned. An unquoted one (`<< EOF`) is expanded and scanned.
-
-## How a request flows
-
-```text
-agent wants to act
- │
- ▼
- classify command ──► Block ──► refused
- │
- Prompt
- │
- ▼
- on "Always allow" list? ──► yes ──► run immediately
- │ no
- ▼
- park call · persist pending row · emit approval_request
- │
- ▼
- ┌──────────────┬───────────────┬────────────┐
- ▼ ▼ ▼ ▼
-Approve Always allow Deny 10-min TTL
-(once) (+ allowlist) │
- │ │ │ ▼
- ▼ ▼ ▼ Deny
- run run refused (fail closed)
-```
-
-A parked call shows an approval card above the chat composer. The card has the tool name, a one-line summary of the action and the redacted command. You have three choices:
-
-- **Approve** runs this one call.
-- **Always allow** runs it and adds the tool to your `auto_approve` list, so it skips the prompt next time.
-- **Deny** refuses the call.
-
-You can also type "yes" or "no" in chat, and the reply goes to the parked request.
-
-## Always allow
-
-Choosing **Always allow** saves the tool name to `[autonomy].auto_approve` and reloads the policy. The gate then lets that tool through on later turns. To be prompted again, remove the entry in **Settings > Agent access**.
-
-The default list is `file_read`, `memory_search`, `memory_list`, `get_time`, `list_dir`, `glob` and `grep`. Four of those names no longer match a registered tool. Memory is now one tool called `memory`, the clock is `current_time`, and directory listing is `list`. So only `file_read`, `glob` and `grep` have any effect.
-
-## auto_approve_all
-
-`[autonomy].auto_approve_all` approves every call without asking. Before you enable it, know three things:
-
-- A call from an unlabelled call site is still denied, and the hard blocks inside the tools still apply.
-- It skips parking, not just the prompt. A triage dispatch from a connector or webhook payload normally parks and writes an audit row. With this flag it runs at once and writes no audit row, so those dispatches leave no approval trail.
-- It does not override a forced approval.
-
-## Forced approvals
-
-Browser page interactions cannot be pre-authorized. Every `click`, `double_click`, `fill`, `type`, `press`, `select` and `check` goes through a forced approval, which works differently:
-
-- Every shortcut is skipped. `auto_approve_all`, the `auto_approve` list and per-flow tool trust are ignored. The call parks even with `[autonomy] enabled = false`.
-- The decision is one-time. **Always allow** is refused, so you can only approve once or deny.
-- It needs a live chat. A turn that is not a web-chat turn is denied instead of parked, so a cron job, channel message or flow cannot drive your browser.
-
-The card names the action, the page origin and a SHA-256 digest that ties the action to that URL. If the page navigates while you decide, the approved action is refused and not replayed on the new page.
-
-## Fail-closed behavior
-
-Every path that is not an approval ends in a denial:
-
-- A parked request lives for 10 minutes. If you have not decided by then, it is denied.
-- If saving the request fails or the channel drops, the call is denied.
-- On timeout the gate re-reads the stored decision first, so an approval that landed at the last moment still wins.
-
-Pending requests are stored in SQLite (`{workspace_dir}/approval/approval.db`) and survive a core restart. After an approved tool finishes, the gate records the outcome (success or error) as an audit trail. Error text is sanitized and capped. Everything stored or broadcast is redacted first: personal data and chat content are scrubbed and home paths are stripped.
-
-## What the turn's origin decides
-
-The gate is interactive, so a parked call needs a surface that can answer it. The turn's origin decides what gets parked and what passes straight through:
-
-| Turn origin | At the gate |
-| --- | --- |
-| Cron and internal background jobs | Allowed, no row, no event |
-| A saved flow's pre-declared action | Allowed, no row, no event |
-| CLI, a delegated sub-agent, and a triage dispatch started on your own machine | Allowed, no row, no event |
-| Web chat | Parks for your decision |
-| A triage dispatch from a connector or webhook payload | Parks and writes a pending-approval row |
-| An external channel turn (Telegram, Slack and so on) | Parks and writes a row |
-| An unlabelled call site | Denied |
-
-A triage dispatch that your own machine started keeps the authority its caller already had. One steered by an outside payload parks and leaves an audit row. No surface can decide a background park yet, so it expires at the timeout. You get the audit trail, not a working escalation, and `auto_approve_all` gives up even that.
-
-The browser's consequential actions (click, fill, type, key press, select, check, and a task's `needs_approval` step) are the exception. They use the **forced** gate, which ignores auto-approval and denies every turn that is not a routable WebChat chat, cron included. An operator opts specific action kinds back in for cron, background and approval-free workflow turns with `[browser] unattended_actions`. See [TinyComputer browser on Linux and Docker](../developing/tinycomputer-docker.md#4-unattended-actions).
-
-An external channel turn parks because remote input is untrusted. The row is written, and you can still decide on the thread card before the timeout.
-
-## Configuration and RPC
-
-- `[autonomy].enabled` is the master switch for the policy. It is `false` by default. Forced approvals and the always-forbidden floor work without it.
-- `OPENHUMAN_APPROVAL_GATE` set to `0` or `false` skips installing the gate even with the policy on. With no gate, Prompt-class calls run unprompted.
-- `[autonomy].level` and `[autonomy].auto_approve` set the tier and the allowlist. Change them with the `config.update_autonomy_settings` RPC or in the settings panels.
-
-The `approval` controller exposes three JSON-RPC methods:
-
-| Method | Purpose |
-| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
-| `openhuman.approval_list_pending` | The live queue of parked requests. |
-| `openhuman.approval_list_recent_decisions` | Decided and executed audit rows (`limit` 1 to 500, default 50), shown in **Settings > Approval history**. |
-| `openhuman.approval_decide` | Applies a decision (`approve_once`, `approve_always_for_tool` or `deny`). |
-
-The two list methods return an empty list, not an error, when no gate is installed. `decide` returns an error when the gate is absent or the request is unknown or already decided.
-
-## See also
-
-- [Privacy and security](privacy-and-security.md): what leaves the machine, and the layers underneath this one.
-- [Security architecture](../developing/architecture/security.md): command classification and policy internals.
-- [Agent access settings](settings.md): where the tier, the trusted roots and the allowlist are edited.
diff --git a/gitbooks/features/billing-and-usage.md b/gitbooks/features/billing-and-usage.md
deleted file mode 100644
index d66e8d604c..0000000000
--- a/gitbooks/features/billing-and-usage.md
+++ /dev/null
@@ -1,102 +0,0 @@
----
-description: >-
- Plans, credits and saved cards paid through Stripe or Coinbase, plus a local
- dashboard for token usage and cost estimates.
-icon: credit-card
----
-
-# Billing, cost and usage
-
-OpenHuman keeps two separate ledgers. Billing is what you pay the hosted backend: plans, credit top-ups, saved cards and coupons, settled through Stripe or Coinbase. Cost and usage is what the agent spends on your behalf, tracked locally for each provider call so you can see estimated token costs.
-
-Billing lives in the cloud. Cost and usage never leaves your workspace.
-
-## Billing and payments
-
-The `billing` domain holds no payment logic or state of its own. Each operation forwards an authenticated HTTPS call to the hosted backend (`/payments/*`, `/coupons/*`) using your stored app session and returns the backend's JSON response as is. The backend enforces authorization, plan ownership and payment policy. A missing or invalid session gets the backend's `401` or `403` directly. Tokens and card data are never logged.
-
-Before sending anything, the adapter checks only the basics: plan, coupon and payment-method ids are not empty, `amountUsd` is a positive number, and the gateway is `stripe` or `coinbase`.
-
-### Plans
-
-There are three tiers, each with a monthly and an annual price.
-
-| Tier | Monthly | Annual | Per-call discount vs pay-as-you-go |
-| ----- | ------- | --------- | ---------------------------------- |
-| Free | $0 | $0 | None (the pay-as-you-go baseline) |
-| Basic | $19.99 | $199 | 50% cheaper per call |
-| Pro | $199.99 | $1,799.99 | 90% cheaper per call |
-
-Higher tiers do not unlock features. Every tier has access to everything. You are buying cheaper inference.
-
-### Payment providers
-
-Two gateways are supported:
-
-- Stripe handles plan purchases (Checkout sessions), the customer billing portal, credit top-ups, saved cards (SetupIntents) and auto-recharge.
-- Coinbase Commerce handles crypto charges for credit top-ups and annual billing.
-
-`top_up_credits` and `create_coinbase_charge` default to the `stripe` gateway and the `annual` interval. An empty gateway becomes Stripe.
-
-### Credits, top-ups and auto-recharge
-
-Besides a subscription, you can hold a USD credit balance. You can read the balance, page through transaction history, and top up through either gateway. Auto-recharge (Stripe only) refills credits from a saved card when the balance runs low. You can read and change its settings, and list, add, update and delete saved cards. Adding a card creates a Stripe SetupIntent. Deleting one is treated as a dangerous operation.
-
-### Coupons
-
-You can redeem a coupon code (`POST /coupons/redeem`) and list the coupons on your account (`GET /coupons/me`).
-
-### Where billing lives in the app
-
-The **Billing** button on the desktop Accounts page opens the hosted billing dashboard. There you manage plans, top-ups, coupons, cards and invoices. Other clients can reach the same operations through the RPC controllers below. They are not exposed as agent tools.
-
-### RPC surface
-
-The namespace is `billing`, exposed as `openhuman.billing_*`.
-
-| Area | Methods |
-| --- | --- |
-| Plan and summary | `billing_get_summary`, `billing_get_current_plan`, `billing_purchase_plan`, `billing_create_portal_session` |
-| Credits | `billing_get_balance`, `billing_top_up`, `billing_create_coinbase_charge`, `billing_get_transactions` |
-| Auto-recharge | `billing_get_auto_recharge`, `billing_update_auto_recharge` |
-| Saved cards | `billing_get_cards`, `billing_create_setup_intent`, `billing_update_card`, `billing_delete_card` |
-| Coupons | `billing_redeem_coupon`, `billing_get_coupons` |
-
-## Cost and usage dashboard
-
-The `cost` domain is entirely local. It records the token usage and USD cost of every provider call to an append-only file (`<workspace>/state/costs.jsonl`), keeps daily and monthly totals in memory, and serves a 7-day dashboard over JSON-RPC. One tracker is shared by the agent loop and the dashboard, so each call is saved exactly once.
-
-### How cost is computed
-
-Cost per call comes from token counts and per-million-token prices. Non-finite or negative prices count as zero. If the provider reports the amount it charged (`charged_amount_usd`), that value wins. Otherwise OpenHuman uses a built-in price list of known models. Usage is bucketed by UTC day and keyed by model, and the provider comes from the `provider/model` prefix. Calls with all-zero usage are skipped, so providers that do not report usage do not inflate the request count.
-
-### Usage views
-
-The `[cost] monthly_limit_usd` setting is a display target, not a cap. The core does not refuse requests when estimated cost passes it. The backend enforces hosted credit limits separately, so the Usage view shows no budget gauge or limit status.
-
-**Settings > Usage** shows the last seven UTC days of recorded cost and token activity, a projection of the month's pace, and a per-model breakdown. Costs are estimates when the provider did not return a charged amount. The dashboard refreshes about every 10 seconds.
-
-The **Usage log** tab lists local provider-call records for a rolling period. It loads at most the 1,000 newest rows and lets you filter them by category, provider, cost source, and model or session. The row count and cost shown cover the filtered rows that were loaded, not a full billing total.
-
-### RPC surface
-
-The namespace is `cost`, exposed as `openhuman.cost_*`.
-
-| Method | Inputs | Output |
-| ------------------------ | ------------------------------------- | ------------------------------------------------------------------------- |
-| `cost_get_dashboard` | none | 7-day buckets, summary metrics, budget fields, per-model breakdown |
-| `cost_get_daily_history` | `days?` (default 7, clamped 1 to 366) | Daily entries, oldest first, gaps filled with zero |
-| `cost_get_summary` | none | Live session, daily and monthly cost summary |
-| `cost_get_usage_log` | `days?`, `limit?` | Newest local provider-call records and category totals, up to 1,000 rows |
-
-These are also read-only agent tools, on by default, so the agent can check its own spend.
-
-## Lowering cost
-
-Cost follows real token counts, so anything that shrinks the prompt lowers spend. [Token compression](token-compression.md) cuts the tokens sent on each call, and [model routing](model-routing/README.md) sends work to the cheapest model that can handle it. Both show up as lower costs in the dashboard.
-
-## See also
-
-- [Token compression](token-compression.md): fewer tokens on each call.
-- [Model routing](model-routing/README.md): the cheapest capable model for each task.
-- [Privacy and security](privacy-and-security.md): what is logged, and what never is.
diff --git a/gitbooks/features/channels.md b/gitbooks/features/channels.md
deleted file mode 100644
index 2352b1df65..0000000000
--- a/gitbooks/features/channels.md
+++ /dev/null
@@ -1,86 +0,0 @@
----
-description: >-
- Messaging apps OpenHuman talks back to you on: how messages reach the agent,
- how replies and proactive messages go out, and how each channel signs in.
-icon: messages-square
----
-
-# Messaging channels
-
-A channel is a messaging app the agent uses to talk to you. You message the agent on a platform you already use, and it replies there. A channel is the opposite of an [integration](integrations/README.md). An integration is mostly something the agent reads from, such as your inbox, calendar or CRM. A channel is a two-way conversation.
-
-Every channel follows the same small contract: one path to send messages and one to listen. That is why the same agent loop can serve Telegram, Discord, the built-in web chat and a dozen others without per-platform code.
-
-## What a channel does
-
-A channel handles two directions.
-
-**Inbound.** When a message arrives, the channel turns it into a standard message (sender, reply target, content, optional thread id) and hands it to the dispatch loop. Dispatch starts or resumes an agent run, limits its tools, and the agent works on the request. Some platforms support `/models` and `/model` to switch the model for that sender's session. Telegram also supports remote-control commands.
-
-**Outbound.** The agent's reply goes back through the same channel to your reply target, in a thread when the platform supports it. A channel can also send proactively, with no incoming message, when a [trigger](integrations/triggers.md) or a cron job fires. A channel receives proactive messages only if it has a default delivery target. Channels without one are skipped.
-
-Where the platform allows it, channels can show a typing indicator, stream draft updates, post threaded replies and add emoji reactions. Each channel declares what it supports.
-
-## Supported channels
-
-OpenHuman has 15 channel providers. 14 are built into the shipped desktop app. WhatsApp Web sits behind the `whatsapp-web` build feature, which the shipped app does not enable, so you can't switch it on. The in-app Web chat is built in and is not a provider. A separate `cli` channel serves the `openhuman-core` terminal binary. Eight channels have a setup flow in the app: Telegram, Discord, Web, iMessage, Lark/Feishu, DingTalk, Email and 元宝 (Yuanbao). You turn on the rest by hand in `config.toml`.
-
-Matrix is no longer supported. The config parser still accepts a `[channels.matrix]` section, but the provider was removed, so it is logged and skipped.
-
-| Channel | Direction | Inbound transport | Credentials | In Settings UI |
-| ------------------ | ------------- | ---------------------------- | ------------------------------------------------------------------ | -------------- |
-| Telegram | Two-way | Bot API long-poll | Connect via OpenHuman (managed DM) or your own BotFather token | Yes |
-| Discord | Two-way | Gateway | Your own bot token, OAuth install, or managed account link | Yes |
-| Web | Two-way | In-app | Built in, no setup (local) | Yes |
-| iMessage | Two-way | macOS Messages (AppleScript) | Local only, no credentials (needs Full Disk Access) | Yes |
-| Lark / Feishu | Two-way | WebSocket or webhook | Your own app id and secret | Yes |
-| DingTalk | Two-way | Stream Mode WebSocket | Your own client id and secret | Yes |
-| 元宝 (Yuanbao) | Two-way | WebSocket | Your own AppID and AppSecret | Yes |
-| Slack | Two-way | Events/socket | Your own bot token | `config.toml` |
-| WhatsApp | Two-way | Meta Cloud webhook | Your own access token | `config.toml` |
-| IRC | Two-way | Persistent socket | Your own server and nick | `config.toml` |
-| Signal | Two-way | signal-cli REST events | Your own linked signal-cli account | `config.toml` |
-| Mattermost | Two-way | WebSocket | Your own bot token | `config.toml` |
-| QQ | Two-way | WebSocket | Your own bot credentials | `config.toml` |
-| Linq | Two-way (SMS) | Webhook | Your own API token | `config.toml` |
-| Email | Two-way | IMAP IDLE and SMTP | Your own mailbox credentials | Yes |
-
-WhatsApp also has an experimental peer-to-peer variant behind the `whatsapp-web` feature. Channels that use a webhook receive messages by HTTP push, so they need an HTTPS endpoint that the provider can reach.
-
-Telegram has the most features. It supports typing indicators and live draft updates, and it is the only channel with its own approval surface, so approval prompts can be answered inline. Discord adds native threaded replies, and Lark threads too. Web supports rich text and stays entirely local.
-
-### Email
-
-Email is a native, self-hosted connector with no third-party broker. Inbound mail arrives over IMAP IDLE push, so new mail reaches the agent in seconds. The connection refreshes about every 29 minutes, as the RFC requires. Replies go out over SMTP with full attachment support, from your own address on any provider you configure.
-
-An `allowed_senders` list controls who can reach the agent by email. Set it to the addresses you trust. In `config.toml`, an empty list denies everyone. The Connections UI is different: a blank field becomes `["*"]`, which allows any sender. Don't leave it blank if strangers should not be able to prompt your agent.
-
-## Credential modes
-
-Channels sign in one of three ways.
-
-- **Connect via OpenHuman (managed).** A one-click encrypted connection brokered by the OpenHuman backend. It covers Telegram (message the managed bot directly) and Discord (link your account or install through OAuth). No tokens are stored on your machine.
-- **Your own credentials.** You supply a bot token, API key and secret, or app credentials. Telegram (BotFather token), Discord, Slack, WhatsApp, Lark/Feishu, DingTalk, Yuanbao, Signal, Mattermost, QQ, Linq, IRC and Email all support this. You get the most control, and you own the platform account, rate limits and any webhook endpoint.
-- **Local, no credentials.** Web chat and iMessage need no tokens. Web runs inside the desktop app. iMessage drives the local macOS Messages app through AppleScript, so grant Full Disk Access. Both keep messages on your machine.
-
-Secrets for any mode go through OpenHuman's credential layer and are encrypted at rest (see [Privacy and security](privacy-and-security.md)). Channels managed in the UI never write secrets to `config.toml` in plaintext.
-
-## Where to connect a channel
-
-Set up channels under **Connections > Channels** in the left sidebar, not under Settings. Open that tab, pick a platform tile and follow its setup card:
-
-- **Discord.** Choose Connect via OpenHuman (link your account or install the bot through OAuth), or paste your own bot token.
-- **Telegram.** Message the managed OpenHuman bot to link, or paste a BotFather token.
-
-Slack is connected as an app under **Connections > OAuth** so the agent can read and act in Slack. It is not set up as a talk-back channel in the Channels tab.
-
-## Choosing the default channel
-
-In **Connections > Channels** you can pick the active route, which is the channel used for proactive messages with no recipient, such as cron jobs and triggers. The default is the in-app Web chat. A new default takes effect immediately, with no restart, and the panel shows which channel is active. Replies to inbound messages always go back on the channel they came from, whatever the default is.
-
-## See also
-
-- [Integrations](integrations/README.md): the catalog the agent pulls context from.
-- [Triggers](integrations/triggers.md): live events that fire proactive channel messages.
-- [Privacy and security](privacy-and-security.md): where credentials live and the backend boundary.
-- [OS keyring and secret storage](os-keyring-and-secret-storage.md): at-rest protection for channel secrets.
diff --git a/gitbooks/features/chat.md b/gitbooks/features/chat.md
deleted file mode 100644
index f96968081f..0000000000
--- a/gitbooks/features/chat.md
+++ /dev/null
@@ -1,97 +0,0 @@
----
-description: >-
- The chat screen: composer, slash commands, mentions, model and effort
- pickers, the context ring, the tool timeline, approvals, sub-agent cards,
- files and threads.
-icon: comments
----
-
-# Chat
-
-Chat is where almost everything happens. A turn here can call tools, spawn sub-agents, stop to ask you a question, wait for your approval, produce files and track its own cost. The transcript shows all of it in order.
-
-Open it from **Chat** in the sidebar, or press `⌘N` for a new conversation.
-
-## The composer
-
-The input is a rich text field. That is how a `/` becomes a command chip and a popover follows your cursor as you type. Around it you have:
-
-- **Attach**. Images, PDFs, Office documents and archives are saved in the working folder. The model gets them natively when both the model and the route support that type. Otherwise it gets extracted text, a short readout, or an archive listing.
-- **Model** and **thinking effort**. Both apply to this conversation only, not globally.
-- **Context ring**. It shows how full the context window is for this thread. Click it for a breakdown with the cost of each sub-agent.
-- **Voice**. Tap to speak, or hand the turn to the live voice agent. See [Voice](native-tools/voice.md).
-- **Mascot button**. When the box is empty, it opens the full-screen [mascot](mascot/README.md) stage.
-
-### Slash commands
-
-Typing `/` lists the built-in commands (`/new`, `/clear`, `/stop`, `/plan`, `/build`), the core's own commands, and your installed skills and workflows.
-
-### Mentions
-
-Typing `@` offers your memory, searched as you type, and the files this thread has already produced. A mention becomes a chip, so the agent gets the exact reference and does not have to guess.
-
-## Reading a turn
-
-Each assistant turn puts its reasoning and tool calls in one block, in the order they happened.
-
-- Tool calls render by tool. A search shows its queries and sources. A shell call shows its command and exit code. A failed call shows the reason, not a stack trace. Every tool runs in the core, never in the browser.
-- Sources appear as badges under an answer: up to four, then a count.
-- Timing and cost are shown on the turn. The context ring attributes spend to the sub-agents that caused it.
-- **Find in conversation** (`⌘F`) searches this thread only. The rail on the right edge jumps between turns.
-
-An assistant turn has copy, regenerate, thumbs up or down (remembered), read aloud, and export as Markdown. On your own turns you can edit and resend. That branches the conversation, and the branch picker switches between versions.
-
-## When the agent needs you
-
-The agent can stop for four reasons, all shown inline:
-
-| Stop | What you see |
-| --- | --- |
-| Approval | A card naming the tool and a redacted one-line summary. Approve once, always allow that tool, or deny. See [Approval gate](approval-gate.md). |
-| Permission | A connector or provider needs authorizing. The card asks for exactly the fields that provider needs. |
-| Clarification | The agent asks a direct question and waits. |
-| Plan review | A proposed plan. Approve it, reject it, or ask for a revision with feedback. |
-
-A background or scheduled turn has nobody to ask. Approvals raised outside a live chat collect in a deck you can decide later. Undecided requests are denied after ten minutes.
-
-## Sub-agents
-
-When a turn delegates work, each child gets its own card. The card has a nested transcript, a status, a reply box if the child is waiting on you, and a cancel button. Delegation is asynchronous, so the parent keeps working while the card fills in. Detached background agents, scheduled runs and memory syncs collect in a separate inbox card so they don't interrupt the thread.
-
-## Files the agent makes
-
-Anything the agent produces for you, such as a document, a deck, an image or a render, becomes an artifact. A chip above the composer opens a panel where you can download it, reveal it in its folder, or delete it. Only finished artifacts survive a restart. A failed one offers a retry.
-
-## Workflow proposals
-
-If you ask for an automation, the agent proposes a graph. The proposal is validate-only. It arrives as a card with the node list and three choices: save and enable, dismiss, or open on the canvas. That card is the only way to turn a proposal into a saved automation. See [Workflows](workflows.md).
-
-## Threads
-
-The sidebar lists your conversations. You can create, select, rename and delete them (delete asks for confirmation). Turns on different threads run at the same time, so a slow task in one conversation does not block another.
-
-A thread can carry a goal and a to-do list that the agent sets. They show as a pinned list and a banner with the token budget. The agent maintains them. You can't edit them in the UI yet.
-
-A long conversation is compacted, not truncated. Compaction seals what came before and starts a new generation that points back to the sealed one. Nothing is deleted on disk, though the model reads only the latest generation. There is no UI for browsing older generations yet.
-
-## Keyboard
-
-| Shortcut | Action |
-| --- | --- |
-| `⌘K` / `⌘P` | Command palette |
-| `⌘N` | New conversation |
-| `⌘F` | Find in this conversation |
-| `⌘B` | Toggle the sidebar |
-| `⌘,` | Settings |
-| `⌘/` or `?` | Shortcut sheet |
-
-## Not here yet
-
-So you don't go looking: the sidebar has no thread search, pinning, folders or archiving. There is no UI to set a thread goal or tick a to-do, and no browser for compaction generations. Follow-up suggestion chips exist in the UI but nothing produces them yet, so that row stays empty.
-
-## See also
-
-- [Memory](memory.md): what the agent recalls before it answers, and what it writes after.
-- [The Orchestrator](orchestration.md): how delegation is planned.
-- [Available tools](native-tools/README.md): what those tool cards are calling.
-- [Notifications and activity](notifications-and-activity.md): what happens when a turn finishes while you are elsewhere.
diff --git a/gitbooks/features/cloud-deploy.md b/gitbooks/features/cloud-deploy.md
deleted file mode 100644
index eb37cce52c..0000000000
--- a/gitbooks/features/cloud-deploy.md
+++ /dev/null
@@ -1,792 +0,0 @@
----
-description: >-
- Run the headless openhuman-core on a server: DigitalOcean App Platform, Fly.io,
- Docker Compose on any VPS, or an Oracle Cloud Terraform stack, with the bearer
- token, workspace volume and secret storage each one needs.
-icon: cloud
----
-
-# Cloud deploy
-
-This page is for operators who want to run the core as a server process. Desktop users never need it, because the desktop app already runs a core in-process.
-
-OpenHuman is a desktop app, but its Rust core (`openhuman-core`) is also a headless JSON-RPC server that you can host in the cloud. Hosting the core separately is useful for:
-
-- Reaching the same core from several devices.
-- Internal testers without a local Rust toolchain.
-- Long-running cron jobs and webhooks that should outlive a laptop session.
-
-This guide covers five deploy paths, easiest first:
-
-1. [DigitalOcean App Platform: one-click](#1-digitalocean-app-platform-one-click)
-2. [DigitalOcean App Platform: manual via doctl](#2-digitalocean-app-platform-manual-via-doctl)
-3. [Any VPS via Docker Compose](#3-any-vps-via-docker-compose)
-4. [Fly.io](#4-flyio)
-5. [Oracle Cloud Infrastructure: Terraform on Always Free](#5-oracle-cloud-infrastructure-terraform-on-always-free)
-
-Every path deploys a single container running `openhuman-core serve` on port `7788`. Public hosts should sit behind the provider's TLS, for example `https://core.example.com/rpc`. Private-only hosts on localhost, RFC1918 networks or tailnets such as Tailscale can use plain HTTP, for example `http://100.x.x.x:7788/rpc`, when the core is not reachable from the public internet. The desktop app can talk to a remote core directly. **Settings > Core connection** saves the RPC URL and bearer token, so you don't need an environment file on the desktop.
-
----
-
-## Remote UI choices
-
-The supported remote setup is core remote, UI local. Run `openhuman-core` on a Linux server and point a desktop client at its RPC URL. The deployed core does not serve the full UI as a production web app yet. Desktop-only features still need the desktop app: tray controls, native deep links, the native iMessage scanner, OS keychain integration and window and screen features.
-
-For a browser UI on a private server today, use the Vite web build as a development and preview surface against the remote core:
-
-```bash
-# On the server, run the core with an explicit token.
-export OPENHUMAN_CORE_HOST=0.0.0.0
-export OPENHUMAN_CORE_PORT=7788
-export OPENHUMAN_CORE_TOKEN="$(openssl rand -hex 32)"
-openhuman-core serve
-
-# In another shell on the server, serve the UI only on loopback.
-pnpm --dir app dev -- --host 127.0.0.1 --port 1420
-```
-
-Then tunnel both ports from your workstation:
-
-```bash
-ssh -L 1420:127.0.0.1:1420 -L 7788:127.0.0.1:7788 user@server
-```
-
-Open `http://127.0.0.1:1420`, choose the remote/core option on the first-run
-screen, and enter `http://127.0.0.1:7788/rpc` plus the
-`OPENHUMAN_CORE_TOKEN` value from the server.
-
-If you serve the browser UI from a non-loopback origin, add that exact origin to
-the core's CORS allowlist:
-
-```bash
-export OPENHUMAN_CORE_ALLOWED_ORIGINS="https://openhuman-ui.example.com"
-```
-
-Loopback Vite origins such as `http://127.0.0.1:1420` and
-`http://localhost:1420` are allowed automatically. Public `http://` origins are
-not recommended because every RPC call carries the bearer token.
-
----
-
-## The bearer token
-
-Every `/rpc` call carries `Authorization: Bearer <token>`. The core can load that token in two ways at startup:
-
-1. **`OPENHUMAN_CORE_TOKEN` environment variable**: pre-seeded by the caller
- (Tauri shell, Docker, App Platform, systemd unit, …). The core uses this
- value as-is and **never** writes a file.
-2. **`{workspace}/core.token` file**: generated by the core on first boot
- _only when `OPENHUMAN_CORE_TOKEN` is unset_. Standalone `openhuman-core run`
- uses this so CLI clients can `cat` the file.
-
-For any remote or Docker deploy, always set `OPENHUMAN_CORE_TOKEN`. Do not rely on `core.token` in a container. Ephemeral filesystems lose it on redeploy, and a client reading the file from outside the container gets a stale or empty value. The two paths are mutually exclusive on purpose. Mixing them is the most common cause of "the dashboard gets 401 after I redeployed".
-
-To check what the running core is using, run [`scripts/print-core-token.sh`](https://github.com/tinyhumansai/openhuman/blob/main/scripts/print-core-token.sh)
-on the host (or inside the container with `docker compose exec`):
-
-```bash
-scripts/print-core-token.sh --where # prints 'env' or 'file:/path'
-scripts/print-core-token.sh --redact # first 8 hex chars + '…' (safe for logs)
-scripts/print-core-token.sh # full value (pipe straight into a client)
-```
-
-The desktop app's first-run picker and **Settings > Core connection** both have a **Test connection** button next to the Core RPC URL and token fields. It sends `core.ping` to the URL you typed with the token you typed, and reports one of three results before anything is saved: connected, auth failed or unreachable.
-
----
-
-## What you need before you start
-
-| Setting | Required | Notes |
-| ----------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `OPENHUMAN_CORE_TOKEN` | yes | Bearer token clients send to `/rpc`. Generate with `openssl rand -hex 32`. **Anyone with this token can drive the core.** |
-| `BACKEND_URL` | yes | Tinyhumans backend the core talks to (`https://api.tinyhumans.ai` for prod). |
-| `OPENHUMAN_APP_ENV` | no | `production` or `staging`. Defaults to `production`. |
-| `OPENHUMAN_KEYRING_MASTER_KEY` | yes, if no OS keychain | 64 hex characters (`openssl rand -hex 32`). The `encrypted_file` keyring is now the default even when `OPENHUMAN_APP_ENV` is unset. Inject the key from your secret manager; **losing it orphans every stored secret.** |
-| `OPENHUMAN_KEYRING_MASTER_KEY_FILE` | alternative | Path to a file holding the same value, for Docker/Kubernetes secret mounts. Set one of the two, not both. Without either, `encrypted_file` needs an OS keychain. |
-| `OPENHUMAN_CORE_HOST` | no | Defaults to `0.0.0.0` in the container. |
-| `OPENHUMAN_CORE_PORT` | no | Defaults to `7788`. |
-| `RUST_LOG` | no | `info` is fine; `debug` for triage. |
-
-The running container exposes these endpoints:
-
-| Endpoint | Auth |
-| --- | --- |
-| `GET /health` | None. The liveness probe every deploy path's healthcheck uses. |
-| `GET /` | None. Info page naming the other routes. |
-| `GET /schema` | None. Read-only schema discovery. |
-| `POST /rpc` | The bearer token. This is the executable surface. |
-| `GET /events` | Exempt from the header check, because a browser `EventSource` cannot set headers, but the handler enforces its own credential. Not an open stream. |
-| `GET /ws/dictation` | The bearer token, as a header or `?token=`, checked before the WebSocket upgrade. |
-| `GET /oauth/mcp/callback` | Exempt from the bearer middleware: an external authorization server posts back here with no bearer. The one-time `state`, minted in `oauth_begin`, is the guard. |
-| `GET /dev/connect` | Exempt from the middleware, guarded in the handler instead: a debug build or an explicit opt-in, a loopback `app` origin and `Host`, and no cross-site navigation. It should not be reachable on a deployed core. |
-| `POST /v1/chat/completions`, `GET /v1/models` | The OpenAI-compatible surface, behind core's `http-server` gate. These accept the core bearer or an external provider key, so they are executable too, not just `/rpc`. |
-
-Only `/health`, `/` and `/schema` are truly unauthenticated. `/events`, `/oauth/mcp/callback` and `/dev/connect` skip the header check but each has its own guard. The two executable surfaces are `/rpc` and `/v1/*`.
-
-The `OPENHUMAN_WORKSPACE` directory (`/home/openhuman/.openhuman` inside the
-container) holds the core's config, SQLite databases and skill state. Mount it on a persistent volume in every production deploy, or you will lose data on restart.
-
----
-
-## 1. DigitalOcean App Platform: one-click
-
-Click the button below to create an App Platform application from this repository's [`.do/app.yaml`](https://github.com/tinyhumansai/openhuman/blob/main/.do/app.yaml):
-
-[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/tinyhumansai/openhuman/tree/main)
-
-Then, in the App Platform UI, **before the first deploy completes**:
-
-1. Open the **Settings > App-Level Environment Variables** tab.
-2. Replace the placeholder `OPENHUMAN_CORE_TOKEN` value with a strong secret
- (`openssl rand -hex 32`). Mark it encrypted.
-3. If you are deploying staging, change `OPENHUMAN_APP_ENV` to `staging` and
- `BACKEND_URL` to `https://staging-api.tinyhumans.ai`.
-4. Hit **Save**. App Platform redeploys with the new secret.
-
-App Platform handles TLS, restart-on-crash, log streaming, and rolling
-redeploys on `git push` (set `deploy_on_push: true` in `.do/app.yaml` to
-opt-in).
-
-> **Persistence:** App Platform Basic has no block storage. The core's workspace lives in the container's ephemeral filesystem and is lost on redeploy. For durable storage, attach a managed database or upgrade to a tier that supports volumes. The [Compose path](#3-any-vps-via-docker-compose) gives you persistent volumes out of the box.
-
----
-
-## 2. DigitalOcean App Platform: manual via doctl
-
-If you prefer not to click through the UI:
-
-```bash
-# One-time: install doctl and authenticate.
-doctl auth init
-
-# Edit .do/app.yaml - set OPENHUMAN_CORE_TOKEN to a real value (or pass it in
-# at create time via --spec with envsubst). Then:
-doctl apps create --spec .do/app.yaml
-
-# Watch the build:
-doctl apps list
-doctl apps logs <app-id> --type build --follow
-```
-
-Update an existing app after editing the spec:
-
-```bash
-doctl apps update <app-id> --spec .do/app.yaml
-```
-
----
-
-## 3. Any VPS via Docker Compose
-
-Works on any host with Docker Engine ≥ 24 and the Compose plugin.
-DigitalOcean Droplet, Hetzner, Linode, EC2, a home server.
-
-Each production release publishes a multi-tagged image to GHCR:
-
-```bash
-docker pull ghcr.io/tinyhumansai/openhuman-core:latest # tracks the latest prod cut
-docker pull ghcr.io/tinyhumansai/openhuman-core:v<version> # pinned by GitHub Release tag
-docker pull ghcr.io/tinyhumansai/openhuman-core:<version> # pinned by SemVer
-```
-
-Take `<version>` from the [latest release](https://github.com/tinyhumansai/openhuman/releases/latest).
-The two pinned tags are immutable and pushed per release; `:latest` is promoted
-only after the release publishes, so it never points at a cut that was rolled
-back (`.github/workflows/release-production.yml`).
-
-The image is `linux/amd64`. arm64 hosts pull the standalone tarball
-attached to the same GitHub Release (`openhuman-core-<version>-aarch64-unknown-linux-gnu.tar.gz`)
-or build the image from source on an arm64 builder.
-
-If you wrap a release tarball in your own image, match the builder it came
-from. The release matrix builds `aarch64` on `ubuntu-24.04-arm` and `x86_64` on
-`ubuntu-22.04` (`.github/workflows/release-production.yml`), so the `aarch64`
-binary needs glibc 2.39 or newer: `ubuntu:24.04` works, while
-`debian:bookworm-slim` ships 2.36 and fails at exec with
-`GLIBC_2.39' not found`. For `x86_64`, Ubuntu 22.04 or Debian 12 and newer.
-
-Quick run with a published image:
-
-```bash
-docker run -d --name openhuman-core -p 7788:7788 \
- -e OPENHUMAN_CORE_TOKEN="$(openssl rand -hex 32)" \
- -e BACKEND_URL=https://api.tinyhumans.ai \
- -e OPENHUMAN_APP_ENV=production \
- -v openhuman-workspace:/home/openhuman/.openhuman \
- ghcr.io/tinyhumansai/openhuman-core:latest
-```
-
-Or use the in-repo Compose file, which builds the image locally from
-`Dockerfile`. To consume the published image instead, replace the service's
-`build:` block in `docker-compose.yml` with
-`image: ghcr.io/tinyhumansai/openhuman-core:latest`; leaving `build:` in place
-keeps building from source and merely retags the result.
-
-```bash
-# On the server:
-git clone https://github.com/tinyhumansai/openhuman.git
-cd openhuman
-
-# Configure secrets:
-cp .env.example .env
-# Edit .env - at minimum:
-# BACKEND_URL=https://api.tinyhumans.ai
-# OPENHUMAN_CORE_TOKEN=<openssl rand -hex 32>
-# OPENHUMAN_APP_ENV=production
-
-# Build and start:
-docker compose up -d
-
-# Verify:
-docker compose ps
-curl -fsS http://localhost:7788/health
-```
-
-### Headless install without Docker
-
-If you can't run Docker on the host, grab the standalone CLI tarball
-attached to the latest [GitHub Release](https://github.com/tinyhumansai/openhuman/releases/latest):
-
-```bash
-# Pick the tarball that matches your host arch.
-ARCH="$(uname -m)"
-case "$ARCH" in
- x86_64) TARGET=x86_64-unknown-linux-gnu ;;
- aarch64) TARGET=aarch64-unknown-linux-gnu ;;
- *) echo "Unsupported arch: $ARCH"; exit 1 ;;
-esac
-VERSION=<version> # the release you want, from the Releases page
-curl -fsSL "https://github.com/tinyhumansai/openhuman/releases/download/v${VERSION}/openhuman-core-${VERSION}-${TARGET}.tar.gz" \
- | tar -xz -C /usr/local/bin
-openhuman-core --version
-```
-
-Then run `openhuman-core serve` under your service manager of choice
-(systemd, supervisord, …) with the same environment variables documented
-above.
-
-The tarballs are dynamically linked, so the host's glibc has to be at least as
-new as the builder's: `aarch64` needs 2.39 or newer (Ubuntu 24.04, Debian 13),
-`x86_64` wants Ubuntu 22.04 or Debian 12 and newer. Check with `ldd --version`
-on the host.
-
-### Headless self-update contract
-
-Headless deployments should treat `openhuman.update_apply` as the safe primitive:
-it downloads the release asset, writes it atomically next to the current binary,
-and returns. Nothing exits automatically.
-
-`openhuman.update_run` follows `config.update.restart_strategy`:
-
-- `self_replace` (default): stage the binary, publish an in-process restart request, and let the running core respawn itself.
-- `supervisor`: stage the binary and return `restart_requested=false`. Your outer service manager must restart the process.
-
-For long-running Linux services, set:
-
-```toml
-[update]
-restart_strategy = "supervisor"
-rpc_mutations_enabled = false
-```
-
-or the equivalent env vars:
-
-```bash
-OPENHUMAN_AUTO_UPDATE_RESTART_STRATEGY=supervisor
-OPENHUMAN_AUTO_UPDATE_RPC_MUTATIONS_ENABLED=false
-```
-
-Recommended `systemd` stance:
-
-```ini
-Restart=always
-ExecReload=/bin/kill -HUP $MAINPID
-```
-
-Operator flow:
-
-1. Call `openhuman.update_check` to discover a release.
-2. Configure `restart_strategy = "supervisor"` under `[update]` in the core's
- `config.toml` (or set
- `OPENHUMAN_AUTO_UPDATE_RESTART_STRATEGY=supervisor`) so the core stages the
- new binary without trying to re-exec itself, then call
- `openhuman.update_apply` or `openhuman.update_run`. `restart_strategy` is a
- configuration setting, not an RPC parameter.
-3. Restart the unit explicitly: `systemctl restart openhuman`.
-
-If download or staging fails, the running binary is left in place and no
-restart is requested. If a staged binary proves bad after restart, roll back by
-restoring the previous binary from your package manager, image tag, or release
-artifact and restarting the supervisor again.
-
-The Compose file ([`docker-compose.yml`](https://github.com/tinyhumansai/openhuman/blob/main/docker-compose.yml)) maps the core
-on `:7788`, mounts a named volume `openhuman-workspace` for persistence, and
-sets `restart: unless-stopped` so the core comes back after host reboots.
-
-### Updating
-
-```bash
-git pull
-docker compose build
-docker compose up -d
-```
-
-For RPC-exposed production deployments, prefer leaving mutating update RPCs
-disabled (`OPENHUMAN_AUTO_UPDATE_RPC_MUTATIONS_ENABLED=false`) and perform
-rollouts through your existing image tag or package-management flow instead.
-
-### Logs
-
-```bash
-docker compose logs -f openhuman-core
-```
-
-### Rotating the bearer token
-
-`OPENHUMAN_CORE_TOKEN` is the only thing standing between the public internet
-and full RPC access. Rotate it on a schedule and after any suspected leak:
-
-```bash
-# 1. Generate a new token and update the server-side .env.
-openssl rand -hex 32 > /tmp/new-token
-sed -i.bak "s|^OPENHUMAN_CORE_TOKEN=.*|OPENHUMAN_CORE_TOKEN=$(cat /tmp/new-token)|" .env
-rm /tmp/new-token .env.bak
-
-# 2. Restart the container so the new value reaches the core process.
-docker compose up -d --force-recreate openhuman-core
-
-# 3. Confirm the running container is using the new token (redacted).
-docker compose exec openhuman-core /bin/sh -c \
- 'echo -n "$OPENHUMAN_CORE_TOKEN" | head -c 8; echo "…"'
-
-# 4. Re-paste the new token on every desktop client, in
-# Settings > Core connection. Clients that still hold the old token get
-# HTTP 401 on the next /rpc call, which is expected rather than a regression.
-```
-
-For App Platform, do the same in **Settings > App-Level Environment Variables**. Edit the `OPENHUMAN_CORE_TOKEN` secret and let App Platform redeploy. There is no token file to delete. The environment variable is the only state.
-
-### Putting it behind TLS
-
-Use Caddy, nginx, or Traefik as a reverse proxy in front of `:7788`. A minimal
-`Caddyfile`:
-
-```caddy
-core.example.com {
- reverse_proxy localhost:7788
-}
-```
-
----
-
-## Pointing the desktop app at a hosted core
-
-Set this up in the app, not in a file. **Settings > Core connection** takes the core's RPC URL and bearer token. It has a **Test connection** button that sends `core.ping` with the values you typed, and it shows live reachability for the active core. The first-run picker accepts the same two fields.
-
-Enter the server's URL and the token you set on it:
-
-| Deployment | URL to enter |
-| --- | --- |
-| Public host behind TLS | `https://core.example.com/rpc` |
-| Private tailnet-only VM | `http://100.x.x.x:7788/rpc` |
-
-Saving stores the choice and restarts the app, so the normal startup checks run against the new core. A URL with no path is treated as the core's base, and `/rpc` is added for you. A `user:pass@host` URL is rejected, because the token field is the only way to give a credential.
-
-Plain `http://` is accepted without a warning only for loopback and private-network hosts, including RFC1918 ranges and the Tailscale `100.64.0.0/10` range. A public `http://` host still saves, but the panel warns you.
-
-{% hint style="warning" %}
-A private address is not encryption. Over plain `http://`, every `/rpc`
-request carries the bearer token in cleartext, and that token is the only
-credential the core checks. Anyone who can observe the link can read it and
-replay it, and "private" covers a shared office LAN, a hotel network and a
-coffee-shop Wi-Fi subnet as readily as it covers your own machine. Treat plain
-HTTP as safe only on a link you control end to end, such as loopback or an
-encrypted overlay like Tailscale or WireGuard. Use HTTPS for anything else.
-{% endhint %}
-
-`VITE_OPENHUMAN_CORE_RPC_URL` in `app/.env.local` is only a build-time fallback. The saved panel value outranks it, so setting it will not move a desktop client onto a remote core.
-
-### Troubleshooting: sign-in fails after OAuth on a cloud runtime
-
-The symptom: OAuth in the browser completes ("close this and return to the app"), but the desktop then shows a sign-in error, while the same account signs in fine on the local (embedded) runtime.
-
-The desktop app checks the fresh session token against the backend (`GET /auth/me`) itself and only then hands the credential to the core (`auth.set_credential`). On a cloud runtime that handoff goes to your server. The usual causes are:
-
-- **Wrong RPC token or URL.** A token mismatch shows up as HTTP 401 on `/rpc`. Paste the token again (see "Rotating the bearer token") and check the URL.
-- **Outdated core.** Older cores do not have `auth.set_credential`. The desktop still sends the older `auth_store_session` name through an alias, but a core older than that alias rejects the call. Update the server to a current release.
-- **`BACKEND_URL` unset or wrong on the server.** The remote core no longer validates the session, but every backend call it makes for you (billing, teams, managed inference) still goes there. It must be `https://api.tinyhumans.ai` for production, or the staging URL.
-
-Check the desktop log for `[session]` lines and the remote core log for `[credentials][set-credential]`. For these cases the desktop shows a specific message instead of a generic "try again".
-
-### Headless sign-in
-
-A cloud core has no browser to complete OAuth in. Get a credential elsewhere and hand it to the core at startup:
-
-- `OPENHUMAN_BACKEND_API_KEY=<key>`: a TinyHumans API key. This is the recommended option. It has no user identity and nothing to expire.
-- `OPENHUMAN_BACKEND_SESSION_TOKEN=<jwt>`: a session JWT with a subject claim.
-
-Either one installs the credential only when the store has none of that kind. To rotate, clear it first (`openhuman-core auth clear_credential --kind api-key`).
-The same operation is available over RPC as `openhuman.auth_clear_credential`.
-
-### Headless without a TinyHumans account
-
-Custom cloud providers (`inference_url` and `api_key`, or an entry in `cloud_providers`) are built only when a backend session or TinyHumans API key exists. Without one, every turn fails with a `SESSION_EXPIRED: backend session not active` error. Runtimes you supply yourself are exempt, and `local-openai` is one of them. So any hosted OpenAI-compatible endpoint can run a headless core with no account:
-
-1. Set `LOCAL_OPENAI_URL=https://<your endpoint>/v1` in the core's environment
- (`OPENHUMAN_LOCAL_INFERENCE_URL` also works and overrides it).
-2. Store the endpoint's bearer key with `openhuman.config_update_local_ai_settings`
- (`runtime_enabled: true`, `opt_in_confirmed: true`, `api_key: "<key>"`).
-3. Pin the workloads with `openhuman.config_update_model_settings`:
- `chat_provider`, `reasoning_provider`, `agentic_provider`, `coding_provider`
- (and `vision_provider`, `memory_provider`, `embeddings_provider` if you want
- them off the managed route) to `local-openai:<model-id>`, plus
- `default_model: "<model-id>"`. Those are the whole set the controller
- accepts.
-
-`openhuman.inference_agent_chat_simple` is the quickest end-to-end check. Managed features (integrations, teams, hosted voice) still need a TinyHumans credential. See [Local models and bring your own key](model-routing/local-and-byok-models.md).
-
-### Secret storage in containers
-
-The keyring backend is `encrypted_file` unless `OPENHUMAN_APP_ENV=dev`/`development` or an explicit backend override selects plaintext. Its master key comes from the OS keychain by default. A container normally has no keychain, so a provider-key write fails with `Failed to encrypt api_key` (`[keyring] set error ... master key unavailable`) until you supply `OPENHUMAN_KEYRING_MASTER_KEY` (64 hex characters) or `OPENHUMAN_KEYRING_MASTER_KEY_FILE` (a secret mount). Keep that key stable across restarts; losing it makes stored secrets unreadable. Older releases without these variables supported `OPENHUMAN_KEYRING_BACKEND=file`, which stored plaintext in `$OPENHUMAN_WORKSPACE/dev-keychain.json` (mode `0600`). On upgrade, the encrypted backend writes and reads back `secrets.enc` before removing that plaintext file. It also removes older `dev-keychain.json.migrated` copies when their entries match the decrypted store. Copies with different or unreadable contents remain for manual recovery; inspect them before removal.
-
-Mount the key file without group or world write permission. The core rejects group-writable and world-writable files. Read-only group or world access may be accepted for container secret mounts, but any process that can read the file can decrypt the whole keyring. Restrict the mode where the mount is declared:
-
-- Kubernetes: Secret volumes are root-owned, and `runAsUser` does not change
- the owner of a projected Secret. For a non-root core, use an init container
- running as root to copy the Secret into an `emptyDir`, `chown` the copy to
- the core UID, and `chmod 0400` it before the core starts. Mount the original
- Secret read-only in the init container and the `emptyDir` read-only in the
- core container. For example:
-
- ```yaml
- volumes:
- - name: master-key-secret
- secret:
- secretName: openhuman-master-key
- defaultMode: 0400
- - name: master-key
- emptyDir: {}
- initContainers:
- - name: prepare-master-key
- image: busybox:1.36
- command: ["sh", "-c", "cp /source/master.key /target/master.key && chown 10001:10001 /target/master.key && chmod 0400 /target/master.key"]
- volumeMounts:
- - name: master-key-secret
- mountPath: /source
- readOnly: true
- - name: master-key
- mountPath: /target
- containers:
- - name: openhuman
- securityContext:
- runAsUser: 10001
- runAsGroup: 10001
- runAsNonRoot: true
- env:
- - name: OPENHUMAN_KEYRING_MASTER_KEY_FILE
- value: /run/openhuman-master-key/master.key
- volumeMounts:
- - name: master-key
- mountPath: /run/openhuman-master-key
- readOnly: true
- ```
-
- Set the `emptyDir` medium and the core UID/GID to match the ownership applied
- by the init container. The `defaultMode: 0400` setting is important. For a
- direct non-root mount, also provide `fsGroup` (or equivalent group access)
- matching the core's group so kubelet can make the file readable; the resulting
- read-only `0440` mode is accepted. The init-container recipe above instead
- grants access by changing the copied file's owner. An equivalent setup is a
- secret volume whose `defaultMode` is `0400` and whose file is mounted with
- ownership matching the core's `runAsUser`/`runAsGroup`.
-- Docker Swarm: set `mode: 0400` (with `uid`/`gid` for a non-root user) on the
- service's secret.
-- A plain file: `chmod 600` it, owned by the user the core runs as.
-
----
-
-## Named-volume ownership and the Docker entrypoint
-
-Docker creates named volumes owned by `root:root`. The core runs as the non-root `openhuman` user (UID 10001), so its first write into `$OPENHUMAN_WORKSPACE` would fail with `Permission denied (os error 13)` if nothing fixed the ownership first.
-
-The image ships a dedicated entrypoint at
-`/usr/local/bin/docker-entrypoint-core.sh` that:
-
-1. Starts as `root`.
-2. Runs `mkdir -p` + `chown openhuman:openhuman` on both `$OPENHUMAN_WORKSPACE`
- and `$HOME/.openhuman` (the directory `core.token` is written to when
- `OPENHUMAN_CORE_TOKEN` is unset).
-3. Calls `exec gosu openhuman openhuman-core "$@"` to drop privileges and
- hand off to the binary.
-
-This is idempotent. On a new volume the chown fixes the root-owned directory. On a volume that was already fixed, it does nothing. You don't need to run `docker volume rm` when upgrading from an older image.
-
-The entrypoint is used only by the root `Dockerfile`. The E2E image (`e2e/docker-entrypoint.sh`) is unaffected.
-
----
-
-## 4. Fly.io
-
-[Fly.io](https://fly.io) suits `openhuman-core`. It handles TLS automatically, supports persistent volumes on all tiers, and can stop idle machines to cut costs.
-
-### Prerequisites
-
-- [flyctl](https://fly.io/docs/flyctl/install/) installed and authenticated (`fly auth login`)
-- A Fly.io account
-
-### Step 1: Launch the app
-
-```bash
-fly launch --no-deploy --config .fly/fly.toml
-```
-
-Fly.io finds the `Dockerfile` automatically. Choose a region close to your users and skip the first deploy when prompted. This generates a config file.
-
-### Step 2: Configure `.fly/fly.toml`
-
-The repo ships a template at [`.fly/fly.toml`](https://github.com/tinyhumansai/openhuman/blob/main/.fly/fly.toml). Fill in
-`<your-app-name>` and `<your-region>` with the values you chose during
-`fly launch`:
-
-```toml
-app = '<your-app-name>'
-primary_region = '<your-region>'
-
-[build]
- dockerfile = "Dockerfile"
-
-[env]
- OPENHUMAN_CORE_HOST = "0.0.0.0"
- OPENHUMAN_CORE_PORT = "7788"
- OPENHUMAN_WORKSPACE = "/home/openhuman/.openhuman"
- RUST_LOG = "info"
-
-[[mounts]]
- source = "openhuman_workspace"
- destination = "/home/openhuman/.openhuman"
-
-[http_service]
- internal_port = 7788
- force_https = true
- auto_stop_machines = 'stop'
- auto_start_machines = true
- # min_machines_running = 0 fully stops the machine when idle (cheapest), but
- # the first request after idle pays a cold-start penalty (container boot +
- # Rust binary init, several seconds). Set to 1 to keep one machine warm.
- min_machines_running = 0
- processes = ['app']
-
- [[http_service.checks]]
- interval = "30s"
- timeout = "5s"
- grace_period = "10s"
- method = "GET"
- path = "/health"
-
-[[vm]]
- memory = '1gb'
- cpus = 1
-```
-
-### Step 3: Create a persistent volume
-
-```bash
-fly volumes create openhuman_workspace --size 5 --region <your-region> --config .fly/fly.toml
-```
-
-Mount the workspace on a persistent volume, or data is lost on every redeploy.
-
-### Step 4: Set secrets
-
-```bash
-# Required
-fly secrets set OPENHUMAN_CORE_TOKEN="$(openssl rand -hex 32)"
-fly secrets set BACKEND_URL="https://api.tinyhumans.ai"
-fly secrets set OPENHUMAN_APP_ENV="production"
-
-# Recommended for any publicly-reachable deployment:
-fly secrets set OPENHUMAN_AUTO_UPDATE_RPC_MUTATIONS_ENABLED="false"
-fly secrets set OPENHUMAN_AUTO_UPDATE_RESTART_STRATEGY="supervisor"
-
-# Optional: error reporting and analytics:
-fly secrets set OPENHUMAN_CORE_SENTRY_DSN="https://<key>@o<org>.ingest.sentry.io/<project>"
-fly secrets set OPENHUMAN_ANALYTICS_ENABLED="true"
-```
-
-Save the value of `OPENHUMAN_CORE_TOKEN`. You need it to connect the desktop app later. Anyone with this token can drive the core, so treat it like a password and rotate it with `fly secrets set OPENHUMAN_CORE_TOKEN="$(openssl rand -hex 32)"`
-after any suspected leak.
-
-### Step 5: Deploy
-
-```bash
-fly deploy --config .fly/fly.toml
-```
-
-Verify the core is healthy:
-
-```bash
-curl -fsS https://<your-app-name>.fly.dev/health
-```
-
-### Step 6: Point the desktop app at the hosted core
-
-In the desktop app, open **Settings > Core connection**, switch it to the remote core, and enter:
-
-- URL: `https://<your-app-name>.fly.dev/rpc`
-- Token: the value you set in Step 4
-
-Press **Test connection** to confirm before saving. The first-run picker takes
-the same two fields. See
-[Pointing the desktop app at a hosted core](#pointing-the-desktop-app-at-a-hosted-core).
-
-### Continuous deployment
-
-To redeploy automatically on every push to `main`, add a workflow file at
-`.github/workflows/fly-deploy.yml`:
-
-```yaml
-name: Fly Deploy
-on:
- push:
- branches:
- - main
- paths:
- - "src/**"
- - "Cargo.toml"
- - "Cargo.lock"
- - "Dockerfile"
- - ".fly/fly.toml"
- - "scripts/docker-entrypoint-core.sh"
-jobs:
- deploy:
- name: Deploy openhuman-core
- runs-on: ubuntu-latest
- concurrency: deploy-group
- steps:
- - uses: actions/checkout@v4
- # Pin the Fly action to a tagged release (or a full commit SHA) rather
- # than `@master`. Tracking a moving branch trusts every future commit
- # pushed there, including any made by a compromised maintainer account.
- - uses: superfly/flyctl-actions/[email protected]
- - run: flyctl deploy --remote-only --config .fly/fly.toml
- env:
- FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
-```
-
-Generate a deploy token with `fly tokens create deploy` and add it as a
-repository secret named `FLY_API_TOKEN`.
-
-### Updating
-
-```bash
-fly deploy --config .fly/fly.toml
-```
-
-For version-pinned deployments, update the image tag in `.fly/fly.toml` and
-redeploy:
-
-```toml
-[build]
- image = "ghcr.io/tinyhumansai/openhuman-core:v<version>"
-```
-
-### Logs
-
-```bash
-fly logs --config .fly/fly.toml
-```
-
-### Known issue: user ID mismatch on volumes
-
-If you switch between building from the `Dockerfile` (which creates the `openhuman` user at UID 10001) and pulling the pre-built GHCR image (which uses UID 1000), files already on the persistent volume belong to the old UID. The core then fails at startup with `Permission denied (os error 13)`.
-
-The same thing happens to a Docker named volume that outlives an image upgrade, and to any workspace that a root `docker exec` wrote into. `docker exec` does not run the entrypoint, so it runs as root and leaves a `root:root` `config.toml` behind. The core writes that file with mode 0600, so the runtime user then cannot open it at all.
-
-`scripts/docker-entrypoint-core.sh` repairs this automatically. On every start it recursively chowns the workspace and skips entries that already have the right owner. If the repair cannot run (for example `cap_drop: ALL` without `cap_add: CHOWN`), the entrypoint refuses to start and prints the exact `chown` to run. Otherwise you would get a container that answers `/health` with 200 while every config RPC returns `Permission denied (os error 13)`. Look for `[docker-entrypoint] pre-heal` and `FATAL` lines in the container log.
-
-To fix an older container, SSH in and re-own the workspace:
-
-```bash
-fly ssh console --config .fly/fly.toml
-chown -R openhuman:openhuman /home/openhuman/.openhuman/
-exit
-fly machine restart --config .fly/fly.toml
-```
-
-The Docker equivalent derives the ids from the container instead of hard-coding them, so it stays correct whichever image you run:
-
-```bash
-docker exec -u 0 openhuman-core sh -c \
- 'chown -Rh "$(id -u openhuman):$(id -g openhuman)" /home/openhuman/.openhuman'
-docker restart openhuman-core
-```
-
-To see which UID owns what before repairing, ask about the runtime user explicitly. `docker exec` defaults to root, so a bare `id` would be misleading:
-
-```bash
-docker exec openhuman-core sh -c 'id openhuman; ls -ln /home/openhuman/.openhuman/config.toml'
-```
-
----
-
-## Smoke test
-
-Two smoke checks cover the cloud deploy path:
-
-- `docker-image` sets `OPENHUMAN_CORE_TOKEN` and mounts no volume. It covers the DigitalOcean App Platform path (`.do/app.yaml`), where the token is always set and no persistent volume is used.
-- `docker-volume-permissions` omits `OPENHUMAN_CORE_TOKEN` and mounts a fresh anonymous volume at `/home/openhuman/.openhuman`. It reproduces the volume ownership failure and asserts that `/health` returns 200 and that `Permission denied (os error 13)` is absent from the logs.
-
-Run the smoke check locally:
-
-```bash
-docker build -t openhuman-core:smoke .
-
-# Optional: tune build profile and Cargo parallelism.
-# Keep CARGO_BUILD_JOBS=1 on constrained builders; raise it on larger machines.
-docker build --build-arg CARGO_PROFILE=release --build-arg CARGO_BUILD_JOBS=4 -t openhuman-core:release .
-
-# Token-set path (App Platform):
-docker run -d --name oh-smoke -p 7788:7788 \
- -e OPENHUMAN_CORE_TOKEN=smoke-test-token \
- openhuman-core:smoke
-curl -fsS http://localhost:7788/health
-docker rm -f oh-smoke
-
-# Fresh-volume / no-token path (Docker Compose, VPS):
-docker volume create oh-vol-test
-docker run -d --name oh-vol-smoke -p 7789:7788 \
- -v oh-vol-test:/home/openhuman/.openhuman \
- openhuman-core:smoke
-curl -fsS http://localhost:7789/health
-docker rm -f oh-vol-smoke
-docker volume rm oh-vol-test
-```
-
----
-
-## 5. Oracle Cloud Infrastructure: Terraform on Always Free
-
-A community-maintained Terraform stack runs the headless core on OCI's Always
-Free tier: an Ampere A1 VM in a private subnet running the release binary in a
-container, a flexible load balancer that forwards only `/rpc`, `/health` and
-`/events`, secrets in OCI Vault read by the VM's instance principal, OCI
-Generative AI as the model provider through the `local-openai` route above, and
-an Autonomous Database that agents reach through Oracle's managed Database
-Tools MCP Server once an operator registers a user access token for that server
-(the stack's post-apply step; the MCP server authenticates users, not the VM's
-instance principal).
-
-Repository and run book: <https://github.com/kamelhar/openhuman-oci>. Like the
-Fly and DigitalOcean recipes, it sets `OPENHUMAN_CORE_TOKEN`, mounts the
-workspace on persistent storage, and keeps the core off the public internet
-except through the load balancer.
-
----
-
-## See also
-
-- [Privacy and security](privacy-and-security.md): the trust model a server-hosted core inherits.
-- [OS keyring and secret storage](os-keyring-and-secret-storage.md): why a container needs a keyring master key.
-- [Local models and bring your own key](model-routing/local-and-byok-models.md): running a headless core with no TinyHumans account.
-- [Building the Rust core](../developing/building-rust-core.md): compiling the binary a non-Docker host runs.
-- [Architecture](../developing/architecture.md): what the core owns versus the shell.
diff --git a/gitbooks/features/connections.md b/gitbooks/features/connections.md
deleted file mode 100644
index 4092ae4de6..0000000000
--- a/gitbooks/features/connections.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-description: >-
- One page for everything the agent plugs into: apps, channels, MCP servers,
- skills, memory, tools, the computer, the wallet, and every API key.
-icon: plug
----
-
-# Connections
-
-Connections is the hub. Almost every setting that changes what the agent can do, as opposed to how the app looks, lives here. The left rail splits it into two groups. Old addresses such as `/skills` and `/channels` redirect here, so bookmarks still work.
-
-## Integrations
-
-| Tab | What it holds |
-| --- | --- |
-| OAuth | The OAuth connectors. Pick a toolkit, authorize it in a browser window, and choose its scope (read, write or admin) and which triggers may fire. See [Third-party integrations](integrations/README.md). |
-| Channels | The channels the agent talks to you on: Telegram, Discord, the in-app web chat, Lark/Feishu, DingTalk, iMessage, email over IMAP and SMTP, and 元宝. See [Messaging channels](channels.md). |
-| MCP Servers | Model Context Protocol servers, in four views: your servers, client config, the raw `mcp.json` (the only place a server is actually added), and a browsable registry. It also has a playground for calling one tool by hand. |
-| Skills | Installed skill bundles, a registry to browse and install from, and a runner. See [MCP servers and skills](integrations/mcp-and-skills.md). |
-| Brain | [Memory](memory.md): the engine, ask, explorer, learnings, conversations, the shared brain, background jobs and recall settings. |
-| Agent tools | Which tools the agent may use, and the policy for each. |
-| Browser Control | Desktop and browser control, the decision model and the planner. See [Browser and computer control](native-tools/browser-and-computer.md). |
-| Wallet | Balances, send and receive, and the recovery phrase. See [Wallet](wallet.md). |
-
-## API keys
-
-The second group has mostly one tab per engine family. Each works the same way: use the managed TinyHumans route, or paste your own key. The exception is Usage, which reports spending and background activity and configures nothing.
-
-| Tab | Covers |
-| --- | --- |
-| LLM | Model providers: the managed route, your own keys for 26 built-in providers, and local servers (Ollama, LM Studio, MLX, any OpenAI-compatible endpoint). See [Model routing](model-routing/README.md). |
-| Composio | Your own connector-platform key, if you prefer it to the managed route. |
-| Voice agents | Speech-to-text and text-to-speech providers, routing per workload, and the dictation hotkey. |
-| Embeddings | The embedding provider behind memory and tool search. |
-| Search | Web search providers. Two have a managed route. The rest need your own key. See [Web search](native-tools/web-search.md). |
-| Usage | What you have spent, by day and by model, plus the background activity log. See [Billing, cost and usage](billing-and-usage.md). |
-
-## Why one page
-
-Connecting Gmail is an integration, a memory source, a trigger source and a set of agent tools all at once. GitHub is the same. Keeping them together means the thing you are setting up stays in front of you while you configure the parts that live in other systems.
-
-Settings that change how the app behaves, such as appearance, personality, security, keychain and autonomy, stay in [Settings](settings.md).
-
-## See also
-
-- [Getting started](../overview/getting-started.md): the first-run path through this page.
-- [Memory](memory.md), [Messaging channels](channels.md), [Third-party integrations](integrations/README.md): the three tabs with the most behind them.
-- [Privacy and security](privacy-and-security.md): what each connection means for what leaves your machine.
diff --git a/gitbooks/features/goals-and-todos.md b/gitbooks/features/goals-and-todos.md
deleted file mode 100644
index 5c031df83a..0000000000
--- a/gitbooks/features/goals-and-todos.md
+++ /dev/null
@@ -1,33 +0,0 @@
----
-description: >-
- The agent's session to-do list and per-thread goals: work state the chat
- pane shows you, not a task board you manage.
-icon: target
----
-
-# Goals and to-dos
-
-The agent tracks its own work in two places. A session to-do list holds the steps of the request it is handling. A per-thread goal holds the objective that thread is trying to finish.
-
-## How the agent uses them
-
-While it works on a multi-step request, the agent keeps a session to-do list in the same shape that Claude Code and Codex use. One `todo` tool call writes the whole list. Each item has `content` and a state: `pending`, `in_progress` or `completed`. The list belongs to the agent session and stays in memory while the process runs.
-
-Thread goals are the completion contract for a thread. The agent sets, reads and completes them with `goal_set`, `goal_get` and `goal_complete`.
-
-Neither is a kanban board. There is no per-thread task board, no cards to edit, and no `thread_goals`, `todos` or `threads_task_board` RPC endpoint. Conversation threads are still the chat container.
-
-## In the chat pane
-
-Both show above the composer while the agent works. They are read-only. The agent owns them and the pane reflects them.
-
-- The to-do checklist lists every step with its state. Completed items are struck through and stay in the list. The `in_progress` item is marked, and the header counts how many are done. You can collapse it to the header.
-- The goal banner shows the objective, its status (active, paused, budget reached or complete), and tokens used against the budget if one was set.
-
-Neither has an RPC of its own. Each tool call returns its state as JSON, and the pane reads the newest `todo` or `goal_*` result in the thread, across the live turn and earlier turns. That is why a goal stays on screen for many turns after the one that set it.
-
-## See also
-
-- [Memory](memory.md): durable preferences and facts live there as learnings. Goals and to-dos last only for the session.
-- [Native tools](native-tools/README.md): where the `todo` and `goal_*` tool calls sit among the rest.
-- [Agent harness](../developing/architecture/agent-harness.md): the stores behind both.
diff --git a/gitbooks/features/hosting.md b/gitbooks/features/hosting.md
deleted file mode 100644
index bdc4f7fcc0..0000000000
--- a/gitbooks/features/hosting.md
+++ /dev/null
@@ -1,59 +0,0 @@
----
-description: >-
- Put a workspace folder on the internet: deploy a site, set up a database,
- set environment variables, attach a domain, and roll back.
-icon: cloud-arrow-up
----
-
-# Hosting
-
-The agent can take a folder in your workspace and make it a live site, with a database behind it if the app needs one. Ask for it in chat. The deploy is a tool call like any other, and an irreversible one goes through the [approval gate](approval-gate.md).
-
-{% hint style="info" %}
-Vercel is the only provider today. The design is provider-neutral, and Railway, Cloudflare and a self-hosted target are planned, but nothing else works yet.
-{% endhint %}
-
-## What the agent can do
-
-| Tool | Effect |
-| --- | --- |
-| `hosting_launch_site` | Deploys a workspace directory as a live site. It can also set up a database and connect it, set environment variables, and attach domains. |
-| `hosting_deployment_status` | Whether a build has finished. |
-| `hosting_list_deployments` | A site's recent deployments, newest first, with status and target. |
-| `hosting_deployment_logs` | A deployment's build and runtime log events. |
-| `hosting_rollback` | Points production back at an earlier deployment that already built. |
-| `hosting_list_sites` | The sites on the account. |
-| `hosting_set_env` | Sets environment variables on an existing site. |
-| `hosting_add_domain` | Attaches a custom domain. |
-| `hosting_domain_status` | Whether a site's domains are verified and serving. |
-| `hosting_analytics` | Traffic over the last N days. |
-
-A launch runs five steps in the only order that works: create the site, create the database, connect the database before the build, set the environment, then build. A framework that reads its environment at build time breaks in any other order. The call returns while the build is still running, so the agent polls `hosting_deployment_status` and does not block.
-
-There is a rollback but no separate promote, because a rollback is promoting an older deployment. It refuses a deployment that never finished building. Promoting a failed build would take the site down while you try to bring it back.
-
-## What it will not do
-
-- **Read a secret.** The provider puts a managed database's connection string into the site's environment. OpenHuman learns the variable names and never their values. That is why a launch reports `DATABASE_URL` and not a URL.
-- **Deploy something you did not name.** The directory check refuses an absolute path, a `..` escape and anything that is not a directory. It is the one place that decides what may leave your machine, and a deployment uploads every byte under the folder it is given.
-
-## Setting it up
-
-```toml
-[hosting]
-provider = "vercel"
-api_key = "" # leave blank to read the provider's own env var
-team = "" # blank means your personal account
-```
-
-With `api_key` blank, the credential comes from `TINYHOSTS_VERCEL_TOKEN`, then `VERCEL_TOKEN`. A team account also reads `TINYHOSTS_VERCEL_TEAM_ID` or `VERCEL_TEAM_ID`.
-
-`[components] hosting` is `true` by default and is the only on/off switch; a legacy `[hosting] enabled = false` is migrated once to `[components] hosting = false` (see [Components](../developing/components.md)). When it is off, or when no credential can be found, the ten tools are not registered at all. A tool that is present but cannot work is worse than a missing one, because the model keeps retrying it.
-
-A misconfigured section is logged as an error and not skipped silently. That means an unknown provider name, or a key that is blank after trimming. Leaving `api_key = ""` is the supported way to defer to the provider's environment variable and is not a misconfiguration.
-
-## See also
-
-- [Cloud deploy](cloud-deploy.md): hosting the OpenHuman core itself, which is a different thing.
-- [Approval gate](approval-gate.md): how a deploy gets your yes.
-- [Coder](native-tools/coder.md): building the thing before you ship it.
diff --git a/gitbooks/features/integrations/README.md b/gitbooks/features/integrations/README.md
deleted file mode 100644
index 6ec2d4bbde..0000000000
--- a/gitbooks/features/integrations/README.md
+++ /dev/null
@@ -1,93 +0,0 @@
----
-description: >-
- Managed OAuth into Gmail, Notion, GitHub, Slack, Stripe, Calendar and more,
- with one-click sign-in and no API keys.
-icon: plug
----
-
-# Third-party integrations
-
-OpenHuman gives you managed access to 119 toolkits. Connecting one is a one-click OAuth flow inside the app. You don't wire up API keys or browse a plugin marketplace.
-
-The 119 is the catalog the app ships. What you can connect is whatever the backend's allowlist returns when the page loads. The actions for each toolkit are fetched live, so no fixed number bounds the total.
-
-The connector layer is powered by [Composio](https://composio.dev). In the default managed mode, OpenHuman's backend owns the Composio API key, OAuth token handling, rate limits and trigger webhooks. In direct mode, the core talks to Composio with your own API key. Synchronous tool calls work in that mode, but you must set up your own webhook infrastructure for real-time triggers.
-
-Once a service is connected, it shows up in three places:
-
-1. As an agent tool, which the model can call directly.
-2. As a profile signal. Your activity across services feeds your personalization.
-3. As a trigger source. Live events (a new email, a new charge, an inbound DM) flow into the [triggers](triggers.md) pipeline and can fire agent actions automatically.
-
-## What is in the catalog
-
-The catalog spans productivity, business, social, messaging and Google. Here is a sample:
-
-| Category | Examples |
-| ----------------------- | ---------------------------------------------------- |
-| Email and calendar | Gmail, Outlook, Google Calendar, Apple Calendar |
-| Docs and storage | Google Docs, Google Drive, Notion, Dropbox, Airtable |
-| Code and dev | GitHub, Linear, Jira, Figma |
-| Comms | Slack, Discord, Microsoft Teams, Telegram, WhatsApp |
-| CRM and sales | Salesforce, HubSpot |
-| Commerce and payments | Stripe, Shopify |
-| Project management | Asana, Trello |
-| Social | Twitter / X, Spotify, YouTube |
-
-## Native and proxied
-
-Some services have native providers. These are Rust modules that load the service straight into memory, such as Gmail's native ingest. Others are proxied tools only: the agent can call them, but nothing is ingested automatically. Native providers are added over time.
-
-## How connections work
-
-Click **Connect** on any integration. A browser window opens for OAuth. Once you sign in, the connection is active, and you can add it as a [memory source](../memory.md) to sync on a schedule.
-
-Each integration shows its status:
-
-- **Not connected**: it has not been set up.
-- **Connected**: it is active and syncing.
-- **Manage**: it is active, with options to reconfigure or disconnect.
-
-You can revoke any connection at any time from the **Connections** page.
-
-## Messaging channels
-
-Some integrations are not just something to read from. OpenHuman also uses them to talk back to you. Eight channels have a setup flow in the app, and more can be enabled by hand in `config.toml`. The three to start with:
-
-- **Telegram** is the usual first choice. It is two-way, with a managed one-click connection or your own bot token.
-- **Discord** is two-way, through OAuth or your own bot token, with a server and channel picker.
-- **Web** is the chat inside the desktop app. Messages stay entirely local.
-
-Set your default under **Connections > Channels**. [Messaging channels](../channels.md) lists them all and what each can do.
-
-## Beyond the curated catalog
-
-The managed OAuth connectors are the curated path. Two more routes open up the wider ecosystem:
-
-- **MCP servers.** A built-in registry browses thousands of [Model Context Protocol](https://modelcontextprotocol.io) servers (Smithery and the official registry) and installs them locally as new agent tools.
-- **Skills.** A browsable catalog of `SKILL.md` capability bundles from several public registries, installed from the **Connections > Skills** tab. A skill runs as its own agent session with the interpreters it declares. It is not code inside the app.
-
-See [MCP servers and skills](mcp-and-skills.md) for more.
-
-## Native voice and tools
-
-Two capabilities are built in rather than offered as integrations, because the desktop experience depends on them:
-
-- [Voice](../native-tools/voice.md): speech in, speech out, and a live voice agent you can interrupt mid-sentence.
-- [Native tools](../native-tools/README.md): built-in web search, a web-fetch scraper, and a full coder toolset (filesystem, git, lint, test and grep).
-
-## Privacy boundary
-
-In managed mode, OpenHuman's core never calls a third-party API directly. Requests go through the OpenHuman backend, which handles OAuth tokens and rate limits. Your tokens are never stored in plaintext on your machine, and the agent sees only the results of tool calls, not the credentials.
-
-In direct mode that boundary changes. Your local core uses your own Composio API key, and you are responsible for the Composio account, its rate limits and billing, and any webhook endpoint needed for triggers.
-
-See [Privacy and security](../privacy-and-security.md) for the full boundary.
-
-## See also
-
-- [Triggers](triggers.md): live events from connected integrations, and how they fire agent actions.
-- [Memory](../memory.md)
-- [MCP servers and skills](mcp-and-skills.md): the open tooling path beyond the curated catalog.
-- [Integrations domain](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/integrations/README.md): the Rust side of this page.
-- [Architecture](../../developing/architecture/README.md): how the backend proxy fits the core.
diff --git a/gitbooks/features/integrations/mcp-and-skills.md b/gitbooks/features/integrations/mcp-and-skills.md
deleted file mode 100644
index 5d0948a03b..0000000000
--- a/gitbooks/features/integrations/mcp-and-skills.md
+++ /dev/null
@@ -1,40 +0,0 @@
----
-description: >-
- Go beyond the curated OAuth connectors: browse thousands of MCP servers and
- a catalog of about 90,000 skills, and let OpenHuman act as an MCP server.
-icon: blocks
----
-
-# MCP servers and skills
-
-The [one-click OAuth integrations](README.md) are the curated path. Beyond them, OpenHuman opens up the wider tooling ecosystem in two ways: the Model Context Protocol (MCP) registry and the skills catalog. OpenHuman can also act as an MCP server for other clients.
-
-## MCP servers
-
-A built-in registry browses the open MCP ecosystem and installs servers locally as new tools for the agent.
-
-- **Two registries, merged.** Search queries [Smithery.ai](https://smithery.ai) and the official [MCP registry](https://registry.modelcontextprotocol.io) in parallel and merges the results. Together they hold thousands of servers.
-- **Search, install, connect.** Search the catalog, open a server's details and install it. A local install runs the server as a stdio subprocess. Deployed servers connect over HTTP.
-- **Supervised connections.** Installed servers are saved in a local SQLite store (`mcp_clients/mcp_clients.db`) with their command, arguments and transport. A supervisor keeps enabled servers connected. It probes about every 60 seconds and backs off per server after failures. Unusual probe results (a slow answer, a dropped transport, a reconnect that worked or failed) appear in **Settings > Developer > Event Log** under the `mcp` badge. A healthy probe is silent. You get a notification when a server stays down, comes back after failing, or cannot start because its launcher runtime is missing.
-
-Once connected, an MCP server's tools work for the agent exactly like built-in tools. The catalogs grow on their own, so there is no fixed list baked into OpenHuman.
-
-### OpenHuman as an MCP server
-
-It also works the other way. `openhuman-core mcp` exposes OpenHuman over stdio as an MCP server for clients such as Claude Desktop. It offers memory tools (recall with citations, fetch, list, learn and forget) and optional web search. See [MCP server](../../developing/mcp-server.md) for setup.
-
-## Skills
-
-Skills are a large, browsable catalog of `SKILL.md` capability bundles, gathered from several public sources such as HermesHub, ClawHub and LobeHub.
-
-- **One catalog.** It comes from HermesHub, and you can point to another source with `OPENHUMAN_SKILL_REGISTRY_CATALOG_URL`. It holds roughly 90,000 entries. Each entry has an id, name, description, source, author, version, tags, platforms, a download URL and a license.
-- **Paged and cached.** The `tinyskills` skill registry serves the catalog. The app asks for one page at a time (25 rows, filtered and ranked by the core), and opening an entry loads its full detail. The catalog loads in the background at startup without blocking it, and is saved at `~/.openhuman/skill-registry/hermes.json` (`OPENHUMAN_SKILL_REGISTRY_CACHE_DIR` moves it). While a refresh runs, or when the registry cannot be reached, the tab keeps showing the saved catalog, says so, and offers Retry. After a failed refresh the registry waits 45 seconds (longer if the upstream asks) before trying again, so a Retry inside that window shows the saved catalog without a new download.
-- **Guarded downloads.** Installs fetch `SKILL.md` over HTTPS only, refuse non-public addresses and re-check every redirect. Entries without a `SKILL.md` (LobeHub agents, portal pages) show "Not installable" with a link to their source page. `OPENHUMAN_SKILL_REGISTRY_DOWNLOAD_BASE_URL` serves every `SKILL.md` from a mirror, and `OPENHUMAN_SKILL_INSTALL_ALLOW_LOCAL_HTTP=1` allows a loopback `http` mirror for local fixtures.
-- **Security scan before install.** Every downloaded `SKILL.md`, from the catalog or a pasted URL, is scanned for supply-chain red flags such as invisible characters and hard-coded credentials. If the scan blocks it, or the download fails, OpenHuman fetches and scans it once more. If it still blocks, nothing is installed and the app shows the findings with two choices: **Block install** (the default) or **Install anyway**. Install anyway installs exactly the document you reviewed: if it changed in the meantime, it is scanned again and you are asked again. Only you can choose Install anyway. An agent that tries to install a blocked skill is told to ask you to do it from the Skills page.
-- **Metadata first.** Skills are a catalog you browse and install from the **Connections > Skills** tab. They are not code running inside the app. Availability varies by entry: some offer a direct `SKILL.md` download, and others point to external hosting.
-
-## See also
-
-- [Third-party integrations](README.md): the curated OAuth connectors.
-- [MCP server](../../developing/mcp-server.md): running OpenHuman as an MCP server.
-- [Available tools](../native-tools/README.md): the built-in tools.
diff --git a/gitbooks/features/integrations/triggers.md b/gitbooks/features/integrations/triggers.md
deleted file mode 100644
index d85a640d9b..0000000000
--- a/gitbooks/features/integrations/triggers.md
+++ /dev/null
@@ -1,124 +0,0 @@
----
-description: >-
- Live events from connected apps (a new Gmail message, a Notion edit, a Stripe
- charge) arrive as triggers, get sorted by a triage agent, and can start agent
- actions automatically.
-icon: bolt
----
-
-# Triggers
-
-A connected integration is more than a place the agent can read from on demand. It is also a source of live events. When someone emails you, edits a Notion page, opens a GitHub issue on your repo, charges a card on Stripe or DMs you on Slack, OpenHuman gets the event within moments and decides whether to act on it.
-
-This page covers how triggers arrive, how they are sorted, and how one can turn into a full agent action without you typing anything.
-
-## What a trigger is
-
-A trigger is an external event published by an integration you have connected. Some examples:
-
-| Integration | Example trigger |
-| ----------- | ----------------------------------------------------------------- |
-| Gmail | `GMAIL_NEW_GMAIL_MESSAGE`, new mail in your inbox |
-| Slack | `SLACK_NEW_MESSAGE`, a channel or DM message that mentions you |
-| Notion | `NOTION_PAGE_UPDATED`, a tracked page changed |
-| GitHub | `GITHUB_ISSUE_OPENED`, `GITHUB_PULL_REQUEST_OPENED` on your repos |
-| Stripe | `STRIPE_CHARGE_SUCCEEDED`, a successful charge on your account |
-| Calendar | `GOOGLE_CALENDAR_EVENT_CREATED`, a new event on your calendar |
-
-The full set comes from the [Composio](https://composio.dev) connector layer behind [third-party integrations](README.md). When a connection is active, the matching trigger subscriptions are set up for you.
-
-### Gmail OAuth scopes
-
-Gmail triggers need message-read access on the connected Google account. New Gmail authorizations request `https://www.googleapis.com/auth/gmail.readonly`, so `GMAIL_NEW_GMAIL_MESSAGE` can be enabled and the native Gmail sync can read new message metadata. If you connected Gmail before this scope was requested, reconnect it from Settings before enabling Gmail triggers.
-
-## How a trigger reaches the agent
-
-```text
-┌────────────────────┐
-│ third-party API │ Gmail / Slack / Notion / GitHub / ...
-└─────────┬──────────┘
- │ webhook
- ▼
-┌────────────────────┐
-│ OpenHuman backend │ verifies the webhook signature, cleans up the payload
-└─────────┬──────────┘
- │ Socket.IO event ("composio:trigger")
- ▼
-┌────────────────────┐
-│ Rust core │ publishes a trigger-received event
-│ (your computer) │ on the in-process event bus
-└─────────┬──────────┘
- │
- ▼
-┌────────────────────┐
-│ Trigger triage │ drop / acknowledge / react / escalate
-└─────────┬──────────┘
- │
- ▼
-┌────────────────────┐
-│ One of: │
-│ - nothing │ ← drop
-│ - memory note │ ← acknowledge
-│ - Trigger reactor │ ← react (1-2 tool calls)
-│ - Orchestrator │ ← escalate (full multi-step planning)
-└────────────────────┘
-```
-
-The raw webhook never reaches your machine. The backend holds the OAuth token and receives the webhook from the third party. It verifies the HMAC signature, cleans up the payload and forwards it to your core over the existing authenticated socket. Your computer only sees a validated event.
-
-## The triage step
-
-Before anything runs, the `trigger_triage` agent looks at every trigger. Its only job is to decide what happens next. It picks exactly one of four actions:
-
-| Action | What happens | When it is used |
-| ------------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `drop` | Nothing. The trigger is logged and discarded. | Spam, duplicates and noise. This is the default for things you don't care about. |
-| `acknowledge` | A short memory note is saved. No agent runs. | Passive notices worth remembering, such as "a new page was created in archive". |
-| `react` | The `trigger_reactor` agent runs with one or two tool calls. | A small one-step effect: store a memory entry, post a quick acknowledgement, mark a thread read. |
-| `escalate` | The full orchestrator agent takes over and plans. | Anything that needs reasoning or several steps: drafting a reply, updating several Notion pages, deciding how to handle an inbound issue. |
-
-The triage agent has the same memory and workspace context as the rest of the agent. It can tell whether a trigger relates to what you are working on, who is involved, and whether you have asked OpenHuman to act on this kind of thing before.
-
-## When a trigger becomes an agent action
-
-This is what separates "OpenHuman has a Gmail integration" from "OpenHuman is on call for your inbox".
-
-**React** is the cheap path. The trigger reactor is a narrow specialist with a hard budget of a couple of tool calls. It suits writing a one-line memory note ("saw a new Stripe charge for $84, customer X"), marking a Slack message handled because it is the same automated alert you have already triaged twice this week, or storing a structured record of an event you might look up later.
-
-**Escalate** is the heavy path. When triage decides a trigger needs real work, it hands the orchestrator a self-contained task description. The orchestrator has your full set of skills, tools and memory. It might:
-
-- Draft a reply to an important email and queue it for your approval.
-- Pull the relevant Notion, Linear or Drive context for an inbound issue and write a structured comment.
-- Update three connected systems from one event, such as a customer's plan changing in Stripe, which updates HubSpot, posts in #revenue and adds a note to their Notion file.
-
-Either way, the action runs on your machine, against your configured memory engine, with the same model routing and tools as the rest of the agent.
-
-## Why triage exists
-
-You could pipe every trigger straight into the orchestrator. That would be a mistake for two reasons.
-
-1. Most triggers are noise. A connected Gmail account fires dozens of triggers an hour, and you care about few of them. Running the orchestrator on each would burn budget and create a constant stream of background activity.
-2. Triggers deserve different budgets. An automated Stripe receipt and a personal Slack DM should not cost the same number of tokens. Triage keeps the cheap path cheap and saves the orchestrator for events that earn it.
-
-Triage runs on the fast model tier (see [Model routing](../model-routing/README.md)), so classification takes well under a second.
-
-## Configuration and opt-out
-
-- **On by default.** Once an integration is connected, its triggers feed the pipeline automatically.
-- **Opt out.** Set the `OPENHUMAN_TRIGGER_TRIAGE_DISABLED` environment variable to `1`, `true` or `yes`. Agent classification turns off and triggers are only logged. The integration stays connected. Only the automatic actions stop.
-- **Per-trigger settings.** Choose which integrations and event types are evaluated under **Settings**. The RPC methods are `get_composio_trigger_settings` and `update_composio_trigger_settings`.
-- **Audit log.** Every trigger is written to the trigger history, whatever the decision, so you can see what arrived, what triage decided and what ran. Decisions and escalations are also published as `TriggerEvaluated` and `TriggerEscalated` events on the in-process bus, so anything inside the core can subscribe.
-
-## Privacy boundary
-
-Triggers follow the same boundary as the rest of the product (see [Privacy and security](../privacy-and-security.md)):
-
-- The third-party token lives on the backend and never on your computer.
-- The backend verifies the webhook signature before anything reaches your machine.
-- Your local core processes the payload. Classification and any reaction run on your machine, against your configured memory engine.
-- Notes written by the acknowledge, react and escalate paths are stored as learnings in your memory engine when memory is on.
-
-## See also
-
-- [Third-party integrations](README.md): the catalog of services triggers come from.
-- [Memory sources](../memory.md): the polling counterpart, which pulls source data into memory on a schedule.
diff --git a/gitbooks/features/ios-companion.md b/gitbooks/features/ios-companion.md
deleted file mode 100644
index 94af8ba2de..0000000000
--- a/gitbooks/features/ios-companion.md
+++ /dev/null
@@ -1,97 +0,0 @@
----
-description: >-
- Pair an iOS companion app with your desktop OpenHuman over an end-to-end
- encrypted tunnel, set up by scanning a QR code.
-icon: mobile-screen
----
-
-# iOS companion
-
-The iOS companion lets you reach your desktop OpenHuman from your phone. You scan a QR code shown on the desktop, the two devices agree on a shared key, and from then on the phone talks to the desktop core over an encrypted channel.
-
-{% hint style="warning" %}
-Experimental and not shipping. The iOS client is in progress and is not part of the shipped desktop product. APIs, wire formats and the pairing flow can change without notice, and an upgrade may force you to pair again. Treat everything below as a developer preview.
-{% endhint %}
-
-The desktop core is always the source of truth. The phone is a thin client. It does not run its own agent. It relays requests to the core and shows the results.
-
-The experimental part is the client, not the core. The core's pairing code is complete: it registers the channel, derives the keys, saves the device and tracks whether the peer is online. Two gaps remain. There is no desktop screen for managing paired devices, and revoking a device only takes effect locally.
-
-## How pairing works
-
-The core's `devices` domain handles pairing. The core registers a pairing channel with the backend's `tunnel:*` Socket.IO relay, generates a fresh X25519 keypair and shows a QR code. The phone scans it, generates its own X25519 keypair and connects back over the same relay. The backend only forwards frames. It relays opaque data and never sees plaintext.
-
-Pairing and revocation are core RPCs, not a desktop screen. The old **Settings > Devices** page was removed, and its address now redirects to **Settings > Account**. Nothing in the desktop frontend calls the `devices_*` methods yet, so listing or revoking a paired device means calling the core directly.
-
-## Pairing with a QR code
-
-```text
-Desktop core Backend relay iOS app
- | | |
- |-- devices_create_pairing RPC | |
- |-- tunnel:register ----------------->| |
- |<-- channel_id, expires_at ----------| |
- |-- generate X25519 keypair | |
- |-- tunnel:connect (role: core) ----->| |
- | | |
- | shows QR: | |
- | cid, pt, cpk, rpc?, exp | |
- |.................. scan QR ......................> |
- | | generate device |
- | | X25519 keypair |
- | |<-- tunnel:connect ------|
- | | (role: client) |
- |<------ tunnel:frame (handshake) ----|------------------------|
- |-- X25519 DH + derive session keys | |
- |-- persist PairedDevice | |
- |-- publish DevicePaired event | |
- | devices_list now returns it | |
-```
-
-The QR code carries an `openhuman://pair?...` deep link with these fields:
-
-- `cid`: the channel id.
-- `pt`: a single-use pairing token.
-- `cpk`: the core's public key.
-- `rpc`: an optional LAN URL.
-- `exp`: the expiry.
-
-The phone rejects the QR once `exp` has passed. The core does not choose the expiry. It stores and republishes whatever `pairingExpiresAt` the backend returns when the channel is registered, so the real lifetime is the backend's.
-
-## The end-to-end tunnel
-
-Confidentiality and integrity are handled entirely by the two endpoints. The primitives are:
-
-- **Key agreement:** X25519 Diffie-Hellman. Each side has a long-term static keypair (the core's is in the QR code, and the device's is created at scan time) plus an ephemeral keypair for each session, for forward secrecy.
-- **Session keys:** HKDF-SHA256 over the static and ephemeral shared secrets, salted with both ephemeral public keys. It expands two directional 32-byte keys with different labels (`openhuman-tunnel/v1/c2s` and `openhuman-tunnel/v1/s2c`). A frame one side seals can therefore never be opened by the same side, which blocks reflection attacks.
-- **Frame cipher:** XChaCha20-Poly1305 with a 192-bit nonce. A frame is `version(0x02) || nonce(24) || ciphertext+tag`, with a random nonce each time.
-- **Replay protection:** a sliding window over the last 128 nonces seen by each receiver.
-
-The static exchange authenticates the peer through the QR code. The ephemeral exchange means a later leak of a static key cannot decrypt past traffic. The old single-key `version=0x01` frame is rejected with a "re-pair required" error, so peers must pair again after an upgrade. Outbound frames are capped at 64 KB.
-
-## Transport strategies
-
-The phone can reach the core in three ways. `TransportManager` picks one based on the saved connection profile. For a paired device it races the LAN against the tunnel (with a 2 second LAN timeout) and uses whichever answers `openhuman.ping` first.
-
-| Strategy | What it does | When it is used | Trade-offs |
-| --- | --- | --- | --- |
-| LAN HTTP (`LanHttpTransport`) | Direct HTTP to the core's LAN `rpc_url` | Phone and desktop on the same network | Fastest. Needs the same LAN, and this layer does not encrypt it, so it relies on trust in the local network. |
-| Tunnel (`TunnelTransport`) | Encrypted frames over the backend Socket.IO relay | Anywhere with internet. The default fallback. | Works across networks and is encrypted end to end. Slower because it is relayed, and it depends on the backend being up. |
-| Cloud HTTP (`CloudHttpTransport`) | HTTP to a cloud-hosted core endpoint | Profile `kind: "cloud"`, when LAN and tunnel are unreachable | Reachable from anywhere. Needs a hosted core and its own auth. |
-
-## Device management and revocation
-
-The core saves paired devices in SQLite (`{workspace_dir}/devices/devices.db`, table `paired_devices`). Each record has the channel id, a label, the device's public key, a SHA-256 hash of the core session token, and timestamps. The core's X25519 private key is encrypted at rest through the OS keyring, so handshakes survive a restart.
-
-- **Create:** `devices_create_pairing` registers the channel, creates and saves the keypair, and returns the QR fields.
-- **List:** `devices_list` returns devices that are not revoked, with a live `peer_online` flag from `tunnel:peer-status`. Online status is never saved.
-- **Revoke:** `devices_revoke` soft-deletes the device, clears all in-memory and tunnel state for the channel, and publishes a `DeviceRevoked` event. Revocation is local only. The backend channel is left to expire with its pairing-token lifetime.
-
-All three are available over JSON-RPC as `openhuman.devices_create_pairing`, `openhuman.devices_list` and `openhuman.devices_revoke`. On the CLI, use `openhuman-core devices create_pairing`, `openhuman-core devices list` and `openhuman-core devices revoke --channel_id <id>`.
-
-## See also
-
-- [Privacy and security](privacy-and-security.md): how OpenHuman handles your data and keys.
-- [Voice](native-tools/voice.md): push-to-talk and dictation, the main use for a phone companion.
-- [Architecture](../developing/architecture.md): where the iOS client sits relative to the core.
-- [OS keyring and secret storage](os-keyring-and-secret-storage.md): where the core's X25519 private key is kept.
diff --git a/gitbooks/features/mascot/README.md b/gitbooks/features/mascot/README.md
deleted file mode 100644
index 2604c632f4..0000000000
--- a/gitbooks/features/mascot/README.md
+++ /dev/null
@@ -1,50 +0,0 @@
----
-description: >-
- The face of OpenHuman: an on-screen mascot that speaks, reacts, and shows
- when the agent is working, even while you aren't looking.
-icon: face-smile
----
-
-# The mascot
-
-OpenHuman has a face. The mascot is an animated character on your desktop that shows what the agent is saying, what it is thinking about, whether it is idle or busy, and when it has something to tell you.
-
-It is more than decoration. The mascot is wired into the same parts as the rest of the agent: [voice](../native-tools/voice.md), [memory](../memory.md) and [scheduled runs](../native-tools/cron.md). When the agent talks, the mascot talks. When the agent thinks, the mascot thinks.
-
-## What it does
-
-### It speaks and lip-syncs
-
-When the agent replies, a hosted text-to-speech model generates the audio and streams it to your speakers. The mascot maps the audio to mouth shapes so its lips match the words. There is no separate talking-head video. The audio you hear is the same stream that drives the animation.
-
-See [Voice](../native-tools/voice.md) for the speech-to-text and text-to-speech behind it.
-
-### It reacts
-
-The mascot has moods: idle, thinking, listening, talking and surprised. It moves between them based on what the agent is doing. It shifts into a listening pose when you start typing, shows when the model is reasoning, reacts when a tool returns something noteworthy, and drifts into idle when you stop interacting.
-
-After a turn finishes, the mascot also reads the conversation-level cue that comes with the chat result. A success cue gets a short happy acknowledgement. Uncertainty gets a confused one. Warnings and failures get a concerned one. With no strong cue, it keeps the calm default and goes back to idle.
-
-### It remembers you
-
-Behind the mascot is an agent with [memory](../memory.md). It remembers what you have talked about, what you prefer, what is in your documents and what you decided, across the sources you have added. When it greets you in the morning, it isn't starting from zero. That memory keeps its personality consistent over weeks and months.
-
-### It works while you are away
-
-Work can continue when you stop typing. [Scheduled routines](../native-tools/cron.md) run on a cron expression, [triggers](../integrations/triggers.md) fire on inbound events, and [workflows](../workflows.md) run durable graphs with approval steps. When you come back, the mascot may have already drafted the email, refreshed the dashboard, or queued the question it needs to ask you.
-
-## Why have a mascot
-
-Most assistants are a blinking text box. That works for a tool. It works less well for something that stays with you all day, remembers your life and acts for you. The mascot helps in three ways:
-
-- A face you can glance at shows in one frame whether the agent is busy, idle or asking for attention.
-- A character that lip-syncs its own speech makes talking feel like a conversation.
-- A consistent character is easier to trust, talk to and forgive than a faceless API.
-
-## See also
-
-- [Voice](../native-tools/voice.md): the speech-to-text and text-to-speech behind the mascot.
-- [Memory](../memory.md): what the mascot remembers, and how.
-- [Themes and Theme Studio](../theming.md): where the mascot's color, shape and voice are set.
-- [Chat](../chat.md) and [Notifications and activity](../notifications-and-activity.md): where the mascot's cues show up.
-- [Voice domain](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/voice/README.md): the Rust side of speech.
diff --git a/gitbooks/features/memory.md b/gitbooks/features/memory.md
deleted file mode 100644
index 9755482e09..0000000000
--- a/gitbooks/features/memory.md
+++ /dev/null
@@ -1,115 +0,0 @@
----
-description: >-
- Memory: a pluggable engine that stores your documents, conversations and
- learnings, refreshes context in the background, and answers questions
- with citations.
-icon: brain
----
-
-# Memory
-
-Memory lets the agent remember you across chats: what you are working on, what you prefer, what is in your documents. It is a feature of the app, not a hidden database. You choose who stores it, see what is stored, and delete anything.
-
-Open it from **Connections > Memory**. It has eight tabs: Engine, Ask, Explorer, Learnings, Conversations, Brain, Background and Settings. The old `/brain` and `/settings/memory-engine` addresses redirect there.
-
-## How the agent uses memory
-
-Memory works around every turn, and the agent does not have to ask for it.
-
-- **Before the model answers**, OpenHuman takes a completed *memory pack* from its short-lived cache, when one is available, and starts logging your message and refreshing memory in the background. The first turn can have no pack. A cached pack can hold learnings, beliefs, documents and earlier conversations from a previous lookup; it is labelled as cached context, so the agent can use explicit recall when it needs a current answer. The pack is added to requests for that turn only and never written into the chat.
-- **After the answer**, the reply is logged in the background with a one-line result for each tool it used.
-- **When a long chat is compacted**, OpenHuman can add completed cached memory to the summary and starts refreshing recall of the folded-away turns. Memory reads never hold up the summary.
-- **In the background**, every few minutes, the engine builds beliefs from what was stored, such as "the user prefers short answers" or "deploys happen on Fridays".
-
-Memory chips on an answer show which stored items the pack cited. To see what a turn would get, open **Ask > Pack preview**.
-
-## Engines
-
-An engine stores your memory and answers questions about it. There are two.
-
-| Engine | What it is | Needs |
-| --- | --- | --- |
-| TinyHumans | Hosted CortexDB run by TinyHumans, reached through the TinyHumans backend | You are signed in, or the host supplies a TinyHumans API key (headless and library hosts) |
-| CortexDB | Your own CortexDB, called directly (managed `api-v1.cortexdb.ai` or self-hosted) | A CortexDB API key (kept in the OS keychain), and an endpoint if it is not the managed one |
-
-With either engine, committed memory items live in CortexDB. OpenHuman also keeps scrubbed pending agent writes in a private local queue until they are delivered, plus job and sync bookkeeping. Cached packs stay in process memory for a short time. See [Where your memory is stored](privacy-and-security.md#where-your-memory-is-stored).
-
-Pick an engine on the **Engine** tab. If you are signed out and have neither a CortexDB key nor a host-supplied TinyHumans API key, memory is off. The agent has no memory tool, nothing is stored, and the Memory page tells you why.
-
-## What the engine does
-
-- **Recall** answers a question in plain language and cites the stored items it used.
-- **Fetch** is a raw search over stored items with metadata filters (folder, repo, thread, source, time window). Both engines support hybrid search only.
-- **Store** takes three kinds of items: documents, conversations and learnings.
-
-## What gets stored
-
-### The brain: documents
-
-The **Brain** tab holds documents that every agent shares, filed by source type: `pdf`, `markdown`, `notion`, `github`, `web`, and one per other source (`gmail`, `docx` and so on). It shows how many documents each source holds. You can search them, add one (pasted text or a file from your computer), and forget a whole source.
-
-Below that, synced sources keep the brain up to date. A source is one of:
-
-| Kind | Target | Filed under |
-| --- | --- | --- |
-| `folder` | A folder on your computer | `pdf`, `web` (HTML) or `markdown`, by file type |
-| `file` | A single file | Same as a folder |
-| `link` | A web page | `web` |
-| `github` | A repository (`owner/repo`) | `github` |
-| `rss` | A feed URL | `web` |
-
-Sources sync when you press sync and on a schedule you set for each source. An unchanged file that syncs again is not stored twice. Removing a source can also forget the items it produced.
-
-### Conversations
-
-Turn logging runs in the background: your message is queued before the model runs, and the reply after it commits. A slow or unavailable memory engine does not delay the answer. Each agent's turns are kept apart. Tool calls are stored by name and id with a one-line result, never their arguments. You can switch turn logging off on the **Conversations** tab, which also lists each agent's stored turns.
-
-### Learnings
-
-A learning is one lasting statement: a preference, fact, procedure or correction. The agent queues them with its `memory` tool (the `learn` action), and you can add or delete them on the **Learnings** tab. A tool acknowledgement saying "queued; not yet saved to memory" confirms local acceptance, not a completed save by the engine. Beliefs the engine built are listed there too, marked "Built belief".
-
-Everything is scrubbed for secrets and personal identifiers before it leaves your machine.
-
-### Past conversations
-
-Chats from before turn logging are not in memory until you sync them. The **Conversations** tab shows how many chats and turns are still unsynced. **Sync past conversations** uploads them after you confirm, in the same form as new turns and without tool arguments. You can close the page while it runs, and syncing again later sends only what is new.
-
-## Exploring what memory holds
-
-The **Explorer** tab shows everything your memory holds, grouped by one property at a time: type, memory node, source, workspace, folder, file, language, repository, link, thread, agent, tool or tag. Each value shows how many items carry it. Click a value to narrow to those items, then group by another property. The breadcrumb at the top takes you back up. The items at each step are listed below. **Open** shows one in full with all its details and a **Forget** button.
-
-On a very large memory, the counts may cover only the items scanned so far. The tab says so when that happens.
-
-## Each agent's own memory
-
-Memory is organized the way a team works:
-
-- **Shared by every agent:** learnings and the brain.
-- **Each agent's own:** its conversations. An agent's pack leads with its own history, and other agents' turns appear only briefly.
-- **Teams and tenants:** an agent team gets its own memory below its own root (`team:<id>`), apart from everyone else's.
-
-By default an agent's memory id is its definition id. In `config.toml`, `[memory.agents.<id>]` can give a definition another memory id (`agent_id`), another root (`root`), or turn off its per-turn pack (`recall = false`).
-
-A host that runs OpenHuman agents as part of something larger, such as an AI company or a multi-agent product, can bind each agent to its own memory. Use `[memory] agent_id` and `root` on that agent's config, or `AgentSpec::memory(MemoryBinding::new("employee-7").root("team:acme"))` through the [embedding library](../developing/embedding.md).
-
-## The agent's memory tool
-
-The agent has one tool, `memory`, with four actions: `recall`, `fetch`, `learn` and `forget`. Explicit reads have a deadline and a shared budget for the current run; when memory is too slow, the agent gets an error and continues without retrying it in that run. Agent `learn` and `forget` requests are queued locally and delivered in the background, so their acknowledgements do not confirm a remote save or deletion. OpenHuman's own [MCP server](../developing/mcp-server.md) offers the same abilities to other apps as `memory.recall`, `memory.fetch`, `memory.list`, `memory.learn` and `memory.forget`.
-
-## Settings and background work
-
-The **Settings** tab sets the shape of the pack: on or off, its size in tokens, how many learnings, documents and turns it holds, and how often beliefs are built. The **Background** tab lists queued belief builds and recent runs, with a **Run now** button. With the TinyHumans engine, beliefs are built on the service's own schedule.
-
-## Importing your previous memory
-
-If OpenHuman finds memory from the earlier (v1) version, the Memory page offers a one-time import. It uploads that data to the engine you selected, so it starts only after you consent. It resumes if interrupted. Data v1 pulled in from connected apps (Gmail, Slack, Notion, Linear, GitHub, ClickUp and the like) is not imported: reconnect the app and it syncs again. Your conversations, memory sources, learnings and profile come across.
-
-## What is not here
-
-The current memory has no memory tree, graph view, goals list, people and contacts, learning profile, `MEMORY.md` or `PROFILE.md` files, or Obsidian vault. Other memory engines (Supermemory, Mem0, Cognee, agentMemory and the local TinyCortex engine) are gone, and so is migrating between engines. The per-turn memory pack replaces the old compiled `context.md` brief.
-
-## See also
-
-- [Memory architecture](../developing/architecture/memory.md)
-- [Pluggable engines](../developing/engines.md)
-- [Privacy and security](privacy-and-security.md)
diff --git a/gitbooks/features/model-routing/README.md b/gitbooks/features/model-routing/README.md
deleted file mode 100644
index 06b3928b66..0000000000
--- a/gitbooks/features/model-routing/README.md
+++ /dev/null
@@ -1,101 +0,0 @@
----
-description: >-
- One subscription, many models. Each task picks its model with a hint:
- reasoning goes to a strong model, quick work to a fast one, images to a
- vision model.
-icon: route
----
-
-# Automatic model routing
-
-Different parts of an agent want different models. Long reasoning wants a frontier model. A quick "fix this typo" wants a fast, cheap one. Images want a vision model. OpenHuman has a built-in router that picks for you.
-
-## How a request is routed
-
-The model parameter on a chat call takes one of two forms:
-
-- **A concrete model name**, such as `anthropic/claude-sonnet-4`. It goes to the default provider with that exact model.
-- **A hint prefix**, such as `hint:reasoning`. The router looks the hint up in the route table and resolves it to a provider and model.
-
-That is the whole rule. The router strips a `hint:` prefix, looks up the rest in the route table, and falls through to the default provider with the name unchanged if there is no entry. A name without the prefix is never rewritten.
-
-The route table is `[[model_routes]]` in `config.toml`, with one entry per hint. `[[embedding_routes]]` does the same for embeddings. You can remap hints at runtime without restarting the core.
-
-## Common hints
-
-| Hint | Typical target | When it is used |
-| ---------------- | --------------------------------- | ----------------------------------------------------- |
-| `hint:reasoning` | A strong reasoning model | Multi-step planning, math, code-heavy turns |
-| `hint:fast` | A fast, cheap model | UI helpers, autocomplete, small classification calls |
-| `hint:vision` | A vision-capable model | Screenshots, image attachments, OCR |
-| `hint:summarize` | A model good at compression | Background summarization |
-| `hint:code` | A code-tuned model | Native coder turns |
-| `hint:burst` | A high-throughput, low-cost model | Cheap, latency-tolerant work for high-fanout agents |
-
-The mappings are configurable, and the defaults ship with sensible per-provider routes.
-
-## One subscription, or your own
-
-By default, routing happens behind a single OpenHuman subscription. You don't hold separate API keys for Anthropic, OpenAI or Google. The backend brokers access and the router picks the right model for each task.
-
-The subscription is a default, not a requirement. The same router works with your own provider key or a local model on a runtime you run yourself (Ollama, LM Studio, MLX, or any OpenAI-compatible server). You choose per workload and can mix all three. See [Local models and bring your own key](local-and-byok-models.md) for setup and for what each route supports for chat, vision and embeddings.
-
-## Overriding routes
-
-- **Globally:** `[[model_routes]]` in `config.toml` sets the route table at startup.
-- **Per call:** pass a concrete model name with no `hint:` prefix. The router falls through to the default provider with that exact model.
-- **For a skill:** a skill can pin a hint or a model in its manifest.
-- **Per agent:** an agent definition can pin its own provider and model, which wins over the table.
-
-## Default model
-
-**Settings > Connections > LLM > Routing** has a **Default model** row. It sets a model from the managed catalog that every managed chat turn runs on, instead of the anonymous chat tier. It opens on DeepSeek V4 Flash. The model pill in the composer can still override it for one conversation. The specialized tiers (reasoning, coding, vision and summarization) keep their own routing. The rows below it send each workload to Managed, a BYOK provider, a local runtime or Claude Code.
-
-## Per-agent model pins
-
-Sub-agents can pin an exact model without turning off automatic routing for the rest of the app. This helps when an orchestrator or team lead needs a stronger model while high-volume leaf agents stay on a cheaper one.
-
-An inline pin wins for a single delegation:
-
-```json
-{
- "agent_id": "presentation_agent",
- "model": "anthropic/claude-sonnet-4",
- "prompt": "Build a five-slide deck from the Q3 report."
-}
-```
-
-Lasting defaults go in `config.toml`:
-
-```toml
-[orchestrator]
-model = "anthropic/claude-sonnet-4"
-
-[teams.planner]
-lead_model = "openai/gpt-5.1"
-agent_model = "groq/llama-3.1-8b-instant"
-
-[teams.image]
-agent_model = "openai/gpt-5.1"
-```
-
-The router picks the model in this order:
-
-1. The inline `model` on `spawn_subagent` or an archetype delegation call.
-2. `[orchestrator].model`, or `[teams.<agent_id>]`, or the alias without `_agent` (`[teams.image]` for `image_agent`).
-3. The archetype's own model hint and the normal route table.
-
-For `[teams.*]`, `lead_model` applies to agents that can delegate, and `agent_model` applies to leaf workers. If only one is set, it is used for both roles.
-
-## Why this is more than a model switcher
-
-Routing is not a dropdown. The agent loop itself picks a hint based on what it is about to do. You don't pick the model, the task does. That is the difference between multi-model and smart routing.
-
-## See also
-
-- [Token compression](../token-compression.md): what makes large reasoning calls affordable.
-- [Native tools](../native-tools/README.md): different tool calls hint at different routes.
-- [Local models and bring your own key](local-and-byok-models.md): run on your own key or fully on-device.
-- [Local AI](local-ai.md): add your own local runtime as a provider. Lightweight chat hints can run on-device.
-- [Pluggable engines](../../developing/engines.md): how config chooses the provider layers.
-- [One TinyHumans API key](../../developing/tinyhumans-api-key.md): the single key behind managed routing.
diff --git a/gitbooks/features/model-routing/local-ai.md b/gitbooks/features/model-routing/local-ai.md
deleted file mode 100644
index c97a810940..0000000000
--- a/gitbooks/features/model-routing/local-ai.md
+++ /dev/null
@@ -1,136 +0,0 @@
----
-description: >-
- Use a model runtime you run yourself (Ollama, LM Studio, MLX, OMLX, or any
- OpenAI-compatible server) as an OpenHuman provider. OpenHuman does not install
- the runtime or download models.
-icon: microchip
----
-
-# Local AI (optional)
-
-OpenHuman can send any workload to a model running on your own machine: chat, reasoning, agentic turns, coding, vision and embeddings. Local AI is opt-in and off by default.
-
-OpenHuman does not install, start, stop or update a local runtime, and it does not download model weights. You do three things:
-
-1. Install and run the runtime yourself (Ollama, LM Studio, MLX, OMLX, or another OpenAI-compatible server).
-2. Pull or load the models you want with that runtime's own tools, for example `ollama pull bge-m3`.
-3. Add the runtime's endpoint to OpenHuman as a provider and route workloads to it.
-
-If a workload names a model the runtime does not have, the request fails with the runtime's error. Pull the model and retry. OpenHuman will not fetch it for you.
-
-## Supported runtimes
-
-OpenHuman reaches every local runtime over its OpenAI-compatible HTTP API. The prefix of the provider string decides which runtime a workload uses.
-
-| Runtime | Provider string | Default endpoint | Endpoint overrides (highest first) |
-| -------------------------------- | ---------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------- |
-| [Ollama](https://ollama.com) | `ollama:<model>` | `http://127.0.0.1:11434` | `local_ai.base_url`, then `OPENHUMAN_OLLAMA_BASE_URL`, then `OLLAMA_HOST`. OpenHuman appends `/v1` for chat. |
-| [LM Studio](https://lmstudio.ai) | `lmstudio:<model>` | `http://localhost:1234/v1` | `OPENHUMAN_LM_STUDIO_BASE_URL`, then `LM_STUDIO_BASE_URL`, then `local_ai.base_url` |
-| MLX (`mlx_lm.server`) | `mlx:<model>` | `http://127.0.0.1:8080/v1` | `OPENHUMAN_LOCAL_INFERENCE_URL`, then `MLX_SERVER_URL`, then `local_ai.base_url` |
-| OMLX | `omlx:<model>` | `http://127.0.0.1:8000/v1` | `OPENHUMAN_LOCAL_INFERENCE_URL`, then `OMLX_SERVER_URL`, then `local_ai.base_url` |
-| Any OpenAI-compatible server | `local-openai:<model>` | `http://127.0.0.1:8080/v1` | `OPENHUMAN_LOCAL_INFERENCE_URL`, then `LOCAL_OPENAI_URL`, then `local_ai.base_url` |
-
-LM Studio, OMLX and `local-openai` send `local_ai.api_key` as a Bearer token when one is set. Ollama and MLX send no auth. Local runtimes do not need an OpenHuman account.
-
-The model part of the provider string goes to the runtime unchanged, so it must match the runtime's own model id. For Ollama, that is the name you pulled, including the tag. An optional `@<temperature>` suffix pins a temperature, for example `ollama:qwen2.5:[email protected]`.
-
-## Multiple self-hosted servers
-
-If you run several OpenAI-compatible model servers, a gateway can expose one endpoint and use named model ids to pick the upstream server. See [Use multiple local LLM servers](../../guides/multiple-local-llm-servers.md) for an optional community example with a Mac mini and a Linux GPU PC. OpenHuman does not bundle or supervise the gateway.
-
-## Adding a local runtime in the app
-
-1. Start the runtime and make sure its server is listening. For Ollama, `curl http://localhost:11434/api/tags` should return JSON.
-2. Pull or load the models you plan to use (see [Use OpenHuman with a local model](../../guides/local-model.md)).
-3. Open **Connections > LLM**, choose **Add a provider**, and pick the runtime under **Local runtimes** (Ollama, LM Studio, OMLX). For MLX or another server, use **Add a custom provider** with its OpenAI-compatible endpoint.
-4. Confirm or edit the endpoint. On save, OpenHuman writes `local_ai.base_url` and `local_ai.provider`, turns on `local_ai.runtime_enabled`, and lists the endpoint's models. If the runtime is not reachable, the provider is not saved.
-5. Route workloads to it with **Custom routing**, choosing from the models the runtime reports.
-
-The model list comes from the runtime. A model you have not pulled does not appear. Pull it in the runtime and reopen the picker.
-
-## Configuration
-
-Here is the same setup by hand in `config.toml`:
-
-```toml
-[local_ai]
-runtime_enabled = true # needed for the background local features below
-provider = "ollama" # "ollama", "lm_studio", or "omlx"
-base_url = "http://localhost:11434" # optional; omit to use the default
-chat_model_id = "gemma3:4b-it-qat" # model used by local summary-tree building
-embedding_model_id = "bge-m3"
-vision_model_id = "gemma3:4b-it-qat" # leave empty for no local vision
-```
-
-Workload routing sits at the top level of `config.toml`. Each field takes a provider string:
-
-```toml
-chat_provider = "ollama:gemma3:4b-it-qat"
-reasoning_provider = "ollama:qwen2.5:14b"
-embeddings_provider = "ollama:bge-m3"
-```
-
-The workload fields are `chat_provider`, `reasoning_provider`, `agentic_provider`, `coding_provider`, `vision_provider`, `memory_provider` and `embeddings_provider`. A field that is unset, blank or `cloud` stays on the default route. For background workloads, a workload counts as local only when its field is `ollama:<model>`.
-
-The older `local_ai.usage.*` booleans remain only so older configs migrate. They do not override the workload fields.
-
-## What the local runtime is used for
-
-| Workload | Configured by | Notes |
-| -------------------------------- | --------------------------------------------- | ------------------------------------------------------------------ |
-| Chat, reasoning, coding, agentic | `chat_provider`, `reasoning_provider`, ... | Any local prefix from the table above. |
-| Vision | `vision_provider`, `local_ai.vision_model_id` | Must be a vision-capable model. See [Local vision](#local-vision). |
-
-For lightweight chat hints (`hint:reaction`, `hint:classify`, `hint:format`, `hint:sentiment`, `hint:summarize`, `hint:medium`, `hint:tool_lite`), the [router](README.md) prefers the local provider when `local_ai.runtime_enabled = true` and the runtime is reachable. Heavy hints (`hint:reasoning`, `hint:agentic`, `hint:coding`) stay on the default route unless the matching workload field points at a local provider.
-
-## What stays in the cloud by default
-
-| Workload | Why |
-| ---------- | -------------------------------------------------------------------------------------------------------------------- |
-| STT | Transcription goes through the backend or a third-party key. There is no local speech-to-text engine. |
-| TTS | [Text-to-speech](../native-tools/voice.md) is hosted by default. Local Piper works if you install it and set `PIPER_BIN`. |
-| Web search | Backend proxy, or your own search provider key. |
-
-Any workload you have not pointed at a local provider keeps using the default route.
-
-### Local text-to-speech with Piper
-
-Setting `local_ai.tts_provider = "piper"` runs [Piper](https://github.com/rhasspy/piper) for spoken replies. OpenHuman does not ship or install Piper or its voices. Install the Piper binary and a voice model yourself, and point the `PIPER_BIN` environment variable at the binary.
-
-## Privacy
-
-[Privacy mode](../privacy-mode.md) set to `local_only` refuses every non-local chat provider and permits only the local prefixes above. It does not start a runtime or fetch models. With privacy mode on and no reachable local runtime, workloads fail instead of falling back to the cloud.
-
-Without privacy mode, a lightweight hint routed to an unreachable local provider falls back to the remote provider. Use privacy mode if strict locality matters.
-
-OpenHuman also keeps local and hosted endpoints apart. If `api_url` looks like a local model server (a loopback or private host on a common runner port such as 11434, 1234, 8000 or 8080, or a `/v1/chat/completions` path), backend requests ignore it and go to the hosted API. Set local endpoints through a provider or `local_ai.base_url`, not `api_url`.
-
-## Local vision
-
-Vision is separate from chat, and most small local models cannot do it. Ollama does not reject an image sent to a text-only model. It drops the image and answers from the prompt text, so you get a description of something the model never saw. OpenHuman checks the vision model's capabilities and refuses to route a vision request to a known chat-only model.
-
-- `vision_provider` and `local_ai.vision_model_id` must name a vision-capable model that you have pulled. `moondream:1.8b-v2-q4_K_S` (about 1.7 GB) is a small option. `gemma3:4b-it-qat` handles chat and vision with one set of weights.
-- Gemma 3 is text-only at 270M and 1B, and multimodal from 4B up. Gemma 3n is a different model and is text-only at every size.
-- Leaving `vision_model_id` empty is a valid "no local vision" setup.
-- To attach an image to a chat turn, the model also needs its vision flag set in the model registry. See [Local models and bring your own key](local-and-byok-models.md#attaching-images-in-chat-needs-one-more-flag).
-
-## What you need
-
-- The runtime installed and running. OpenHuman does not manage it.
-- The models pulled or loaded in that runtime.
-- Enough disk and RAM for the models you chose. As a rough guide, `bge-m3` is about 1.2 GB on disk and a 4B chat model about 4 GB. Plan for 8 GB or more of RAM, and 16 GB or more for larger models.
-
-## Troubleshooting
-
-- **The provider will not save, or the model list is empty.** The runtime is not reachable at the endpoint. Start it and check the port. For Ollama, run `curl http://localhost:11434/api/tags`.
-- **The runtime says the model is missing.** The model is not pulled or loaded. Run `ollama pull <model>`, or load it in LM Studio, then retry.
-- **LM Studio runs on a different port.** Set `local_ai.base_url` or `OPENHUMAN_LM_STUDIO_BASE_URL`. Load the model in LM Studio before OpenHuman calls it.
-- **Ollama's context is too small for agent turns.** Set `local_ai.num_ctx` to send `options.num_ctx` with each Ollama chat request.
-
-## See also
-
-- [Use OpenHuman with a local model](../../guides/local-model.md): step-by-step setup.
-- [Local models and bring your own key](local-and-byok-models.md): per-model capability table and BYOK setup.
-- [Memory](../memory.md): memory is stored by its engine, not by a local model.
-- [Model routing](README.md): how lightweight chat hints prefer the local provider.
-- [Privacy mode](../privacy-mode.md): enforcing local-only inference.
diff --git a/gitbooks/features/model-routing/local-and-byok-models.md b/gitbooks/features/model-routing/local-and-byok-models.md
deleted file mode 100644
index 5bcecc9214..0000000000
--- a/gitbooks/features/model-routing/local-and-byok-models.md
+++ /dev/null
@@ -1,180 +0,0 @@
----
-description: >-
- Three ways to power OpenHuman: the managed subscription, your own provider key
- (BYOK), or local models on a runtime you run yourself. What each one supports
- for chat, vision and embeddings, and how to set it up.
-icon: sliders
----
-
-# Local models and bring your own key
-
-The OpenHuman subscription is the default, not a requirement. Inference can come from any of three places, and you can mix them for each workload. For example, you can run embeddings locally, chat on your own Anthropic key, and leave vision on the managed route.
-
-This page covers how to set up the two self-owned options and what each one can actually do. Not every local model can see images. Picking a chat-only model for vision work is the most common way to end up with a setup that looks configured but quietly does the wrong thing.
-
-## The three routes at a glance
-
-| | Managed (default) | BYOK cloud | Local (runtime you run) |
-| -------------------------------------- | ----------------------------- | ------------------------------------------- | ----------------------------------------- |
-| **Chat and reasoning** | Included | Your key, your billing | Yes, quality scales with model size |
-| **Vision** | Included | Your key, if the model supports images | Yes, but only with a vision-capable model |
-| **Embeddings** | Included | Your key, if the provider serves embeddings | Yes, `bge-m3` recommended |
-| **Speech to text** | Included | Your own key, via a voice provider slug | No local STT engine |
-| **Text to speech** | Included | Your own key, via a voice provider slug | Piper, if you install it (`PIPER_BIN`) |
-| **Web search** | Included, no key needed | Bring your own Exa key | Not applicable |
-| **Inference data leaves your machine** | Yes, to the OpenHuman backend | Yes, to your chosen provider | No |
-| **API keys to manage** | None | One per provider | None |
-
-Speech is configured separately from the LLM workload fields, and the two halves are easy to confuse. `voice_providers` holds the third-party provider definitions (slug, endpoint, key, default model or voice). Editing one does not change which provider is used. The active route is set separately:
-
-- STT reads `stt_provider`, then the older `local_ai.stt_provider`, then `voice_server.stt_engine` when neither names a provider.
-- TTS reads `tts_provider`, then the older `local_ai.tts_provider`, then `cloud`.
-
-There is no local STT engine. Speech-to-text is either the hosted proxy or a third-party API with your own key. TTS has a local option in Piper. OpenHuman does not install Piper. Install the binary and a voice yourself, set `PIPER_BIN`, and set `tts_provider = "piper"`.
-
-The last row of the table is about inference data only. Sign-in, managed integration OAuth, billing, and hosted features such as media generation and managed web search still use the OpenHuman backend even when inference is entirely yours. Running local models is not by itself a guarantee that nothing leaves the machine. If you need that guarantee, use [Privacy mode](../privacy-mode.md), which enforces the local-only path in the Rust core instead of relying on configuration alone.
-
-## Route A: local models
-
-OpenHuman does not install a runtime or download model weights. You run the runtime (Ollama, LM Studio, MLX, OMLX, or another OpenAI-compatible server), you pull the models, and OpenHuman calls the endpoint. The examples below use Ollama.
-
-### 1. Install Ollama and pull a model
-
-Install [Ollama](https://ollama.com), then pull what you need. Every model named on this page is in the public Ollama library.
-
-```bash
-ollama pull gemma3:1b-it-qat # small chat model
-ollama pull bge-m3 # embeddings
-ollama pull moondream:1.8b-v2-q4_K_S # vision, small
-```
-
-### 2. Know what each model supports
-
-A text-only model on Ollama still accepts an image request. It silently drops the image and answers from the prompt text alone, which reads as a confident but invented description. OpenHuman refuses to route a vision request to a chat-only model, but it helps to know which is which.
-
-| Model | Size | Chat | Vision | Embeddings |
-| -------------------------- | -------- | ------- | ------- | ---------------------------------- |
-| `gemma3:270m-it-qat` | 0.2 GB | Yes | No | No |
-| `gemma3:1b-it-qat` | 1.0 GB | Yes | No | No |
-| `gemma3:4b-it-qat` | 4.0 GB | Yes | Yes | No |
-| `gemma3n:e4b-it-q8_0` | 9.5 GB | Yes | No | No |
-| `gemma4:e4b-it-q8_0` | 11.6 GB | Yes | Yes | No |
-| `moondream:1.8b-v2-q4_K_S` | 1.7 GB | Minimal | Yes | No |
-| `llava:7b` | 4.7 GB | Minimal | Yes | No |
-| `bge-m3` | 1.2 GB | No | No | Yes, 1024 dimensions |
-| `all-minilm:latest` | 0.05 GB | No | No | 384 dimensions |
-
-Two traps:
-
-- Gemma 3 is split by size. The 270M and 1B builds are text-only. Vision starts at 4B. If you pick `gemma3:1b-it-qat` for vision, you get a text-only model.
-- `gemma3n` is not `gemma3`. Despite the name, Gemma 3n is a separate, text-only model on Ollama. It is a fine chat model and a bad vision model.
-
-For embeddings, prefer `bge-m3` (1024 dimensions). An `embeddings_provider` of `ollama:bge-m3` routes OpenHuman's own embedding calls to your machine. It does not move memory, because the memory engine embeds on its own side, so recall still runs wherever the engine runs. Three separate settings are involved. This field routes OpenHuman's embeddings. [Privacy mode](../privacy-mode.md) enforces where inference may go. The memory engine you choose decides where memory lives.
-
-### 3. Point OpenHuman at it
-
-In the desktop app, open **Connections > LLM > Add a provider** and pick Ollama (or LM Studio or OMLX) under **Local runtimes**, or add a custom OpenAI-compatible endpoint. OpenHuman saves the endpoint, turns on the local runtime, and lists the models the runtime reports. Models you have not pulled do not appear. See [Local AI](local-ai.md#adding-a-local-runtime-in-the-app).
-
-To configure by hand, use the `[local_ai]` section of `config.toml`:
-
-```toml
-[local_ai]
-runtime_enabled = true
-opt_in_confirmed = true
-provider = "ollama" # or "lm_studio"
-chat_model_id = "gemma3:4b-it-qat"
-vision_model_id = "gemma3:4b-it-qat" # must be vision-capable
-embedding_model_id = "bge-m3"
-```
-
-Every model you name must already be pulled. Leaving `vision_model_id` empty means "no local vision", which is a valid setup.
-
-### 4. Route workloads to it
-
-Adding a local provider does not move everything on-device. You choose for each workload with a provider string such as `ollama:<model>` (or `lmstudio:`, `mlx:`, `omlx:`, `local-openai:`):
-
-```toml
-chat_provider = "ollama:gemma3:4b-it-qat"
-vision_provider = "ollama:gemma3:4b-it-qat"
-embeddings_provider = "ollama:bge-m3"
-```
-
-The workload fields are `chat_provider`, `reasoning_provider`, `agentic_provider`, `coding_provider`, `vision_provider`, `memory_provider`, `embeddings_provider` and `learning_provider`. A field that is unset, blank or `cloud` stays on the default route.
-
-#### Attaching images in chat needs one more flag
-
-`vision_provider` routes the vision workload: image summaries and the OCR and description path. It does not by itself let you attach an image to a chat or agent turn.
-
-A turn passes image attachments through only when the chat model is known to accept them. For a local model, that knowledge comes from the per-model registry, not from `vision_provider`. Set the model's vision flag in **Settings > AI** (the custom-model dialog), which records it in `model_registry`:
-
-```toml
-[[model_registry]]
-id = "gemma3:4b-it-qat"
-provider = "ollama"
-vision = true
-```
-
-Without that flag, images are stripped before the request is sent. The model answers from the text alone, fluently, with no sign that it never saw the picture.
-
-See [Local AI](local-ai.md) for endpoint overrides, the other runtimes and troubleshooting.
-
-## Route B: bring your own key
-
-BYOK keeps the routing, memory, tools and agent harness exactly as they are, and changes only who serves the tokens. It is your key, your account and your billing, with no OpenHuman inference charges.
-
-### 1. Add the provider
-
-Add your key in the desktop app under the LLM settings. It is stored in the OS keyring, not in plain config. OpenHuman ships presets for these slugs, so you don't need to supply an endpoint:
-
-`openai`, `anthropic`, `google`, `openrouter`, `orcarouter`, `groq`, `mistral`, `deepseek`, `together`, `fireworks`, `cerebras`, `xai`, `moonshot`, `gmi`, `huggingface`, `nvidia`, `zai`, `minimax`, `stepfun`, `kilocode`, `deepinfra`, `novita`, `venice`, `vercel-ai-gateway`, `sumopod`, `modelscope`
-
-Anything else that speaks the OpenAI-compatible API also works. Register it with your own slug and endpoint, and it routes the same way.
-
-For an HTTPS endpoint signed by a private or corporate CA, upload its PEM CA certificate in the custom provider editor. OpenHuman trusts that certificate for this provider's model listing and inference requests. You can also install the CA in the operating system's trust store; on macOS and Linux, `SSL_CERT_FILE` supplies a PEM bundle to the core process.
-
-On a headless core (`openhuman-core serve`), custom cloud providers are built only when a backend session or TinyHumans API key is present. If you run the core with no account, set the endpoint up as the `local-openai` runtime instead: set `LOCAL_OPENAI_URL`, put the key in `local_ai.api_key`, and pin workloads to `local-openai:<model>`. See [Headless without a TinyHumans account](../cloud-deploy.md#headless-without-a-tinyhumans-account).
-
-### 2. Route workloads to it
-
-Provider strings follow `<slug>:<model>` and use the same workload fields as the local route:
-
-```toml
-chat_provider = "anthropic:claude-sonnet-4"
-reasoning_provider = "openai:gpt-5.1"
-coding_provider = "deepseek:deepseek-coder"
-vision_provider = "openai:gpt-5.1"
-```
-
-To make one provider the default for everything that is not pinned, set `primary_cloud` to its slug. Every workload left on `cloud` then goes to that provider and not to the OpenHuman backend.
-
-### 3. Check that the model supports the workload
-
-BYOK gets your provider's capabilities, not OpenHuman's. Before you pin `vision_provider`, confirm the model accepts image input. Before you pin `embeddings_provider`, confirm the provider serves an embeddings endpoint. Not every chat provider does.
-
-## Mixing routes
-
-The workload fields are independent. A common privacy-minded setup keeps recurring background work on-device and saves a strong cloud model for the turns that need it:
-
-```toml
-# On-device: everything that runs constantly over personal data
-embeddings_provider = "ollama:bge-m3"
-memory_provider = "ollama:gemma3:1b-it-qat"
-learning_provider = "ollama:gemma3:1b-it-qat"
-
-# Your own key: the turns where quality matters
-chat_provider = "anthropic:claude-sonnet-4"
-reasoning_provider = "anthropic:claude-sonnet-4"
-```
-
-## Troubleshooting
-
-**The model you want is not offered, or a request says the model is missing.** The runtime does not have it. Run `ollama pull <model>` (or load it in LM Studio), then retry. OpenHuman does not pull models.
-
-**Vision answers look plausible but describe the wrong image.** You are almost certainly on a chat-only model. Check `vision_model_id` against the capability table above. Current builds refuse this routing and fall back to a vision-capable model, so this points to an older build or a provider outside the local path.
-
-## See also
-
-- [Local AI](local-ai.md): supported runtimes, endpoints and the opt-in flags.
-- [Model routing](README.md): how hints pick a model for each task.
-- [Privacy mode](../privacy-mode.md): enforcing local-only inference in the core.
-- [Privacy and security](../privacy-and-security.md): what moves on-device when you opt in.
diff --git a/gitbooks/features/native-tools/README.md b/gitbooks/features/native-tools/README.md
deleted file mode 100644
index d9e25bdeba..0000000000
--- a/gitbooks/features/native-tools/README.md
+++ /dev/null
@@ -1,46 +0,0 @@
----
-description: >-
- The toolset OpenHuman's agent has out of the box: research, code, control
- your machine, schedule jobs, talk back to you, and call your connected
- services.
-icon: toolbox
----
-
-# Native tools
-
-The agent comes with a full set of tools the moment you install it. There is no plugin marketplace, no API keys to wire up and no MCP servers to register.
-
-This page is the index. Each subpage covers one family of tools.
-
-## Why built in
-
-A plugin-only model puts tools in separate processes, behind RPC, each with its own auth and packaging. That suits open-ended extensions. For the core tools every agent needs (read a file, search the web, edit code, set a reminder, drive a browser), running in-process gives you:
-
-- Consistent error handling.
-- Nothing to install.
-- Output that passes through [token compression](../token-compression.md) for free.
-- A predictable security boundary. File tools respect workspace scoping. Network tools use the managed OpenHuman proxy by default unless you opt into a self-hosted path such as SearXNG.
-
-## The toolbelt
-
-| Family | What it covers |
-| --- | --- |
-| [Web search](web-search.md) | Search the live web through the managed proxy (powered by Exa), backend-proxied Parallel, your own Exa, Brave, Querit or Tavily key, or self-hosted SearXNG. |
-| [Web scraper](web-scraper.md) | Pull clean text out of any URL: articles, docs, READMEs. |
-| [Coder](coder.md) | Read, write, edit and patch files; glob, grep, git, lint, test. |
-| [Documents](documents.md) | Write `.docx` and `.pptx`, and read PDF, Word, PowerPoint and Excel files. |
-| [Browser and computer control](browser-and-computer.md) | Open URLs, inspect DOM snapshots, click, type, move the mouse. |
-| [Cron and scheduling](cron.md) | Recurring jobs, one-off reminders, scheduled agent runs. |
-| [Voice](voice.md) | Speech-to-text in, text-to-speech out, and a live voice agent you can interrupt. |
-| [Memory tools](memory-tools.md) | Recall, fetch, learn and forget through the single `memory` tool. |
-| [Third-party integrations](integrations.md) | The agent's view of your [connected services](../integrations/README.md). |
-| [Agent coordination](agent-coordination.md) | Spawn subagents, delegate to skills, plan, ask the user. |
-| [System and utilities](system-and-utilities.md) | Shell, node, SQL, current time, push notifications, LSP. |
-
-## See also
-
-- [Token compression](../token-compression.md): what keeps tool output costs bounded.
-- [Third-party integrations](../integrations/README.md): the OAuth flow for the managed catalog.
-- [Privacy and security](../privacy-and-security.md): the boundary every tool runs inside.
-- [Tools domain](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/tools/README.md): the Rust module that registers these tools.
-- [Agent harness](../../developing/architecture/agent-harness.md): how tool calls run inside a turn.
diff --git a/gitbooks/features/native-tools/agent-coordination.md b/gitbooks/features/native-tools/agent-coordination.md
deleted file mode 100644
index 46d88efb56..0000000000
--- a/gitbooks/features/native-tools/agent-coordination.md
+++ /dev/null
@@ -1,43 +0,0 @@
----
-description: Tools the agent uses to plan, delegate and ask for help.
-icon: sitemap
----
-
-# Agent coordination
-
-Besides doing the work, the agent has tools for organizing it: planning multi-step jobs, delegating to specialists, spawning sub-agents, and pausing to ask you when something is genuinely unclear.
-
-## Tools in this family
-
-| Tool | What it does |
-| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
-| `todo` | Rewrites the session to-do list across a long task. The chat shows it as a checklist that ticks off as work progresses. |
-| `spawn_subagent` | Delegates to a reusable async specialist. It creates a fresh worker only when the work is incompatible or you ask. |
-| `spawn_async_subagent` | A lower-level reusable async delegation tool with the same durable session identity. |
-| `steer_subagent`, `wait_subagent` | Message or collect a running worker by durable `subagent_session_id` or transient `task_id`. |
-| `list_subagents`, `close_subagent` | Inspect the reusable workers for the parent thread, or retire one. |
-| `spawn_worker_thread` | Explicit background work tracked as a separate worker thread. |
-| `delegate` | Hands a task to a specialist, such as an archetype with different prompts, tools or permissions. |
-| `spawn_parallel_agents` | Fans one task out to several specialists at once and merges what they return. |
-| `use_skill` | Loads an inline skill's playbook and tools (coding, web3, system, scheduling, docs, mcp) so the agent can call them. |
-| `ask_user_clarification` | Pauses and asks you a precise question instead of guessing. |
-| `plan_exit` | Leaves the planning phase and starts executing. |
-
-`spawn_subagent` and archetype delegation calls accept an optional `model` field to pin an exact model for one call. If you leave it out, the harness uses per-agent pins from config when present, and otherwise falls back to normal model-routing hints. Model, sandbox mode, parent thread, action root and task key all affect whether a sub-agent can be reused, so materially different work gets its own worker.
-
-Reusable delegation returns a transient `task_id` and a durable `subagent_session_id`. Use the durable id for follow-ups in later turns. Pass `fresh: true` only when you or the task needs a clean worker. Pass `blocking: true` only when the parent must wait for the child's result.
-
-## Why these are tools
-
-Long tasks fall apart when an agent tries to hold everything in one head. Splitting work with to-dos and sub-agents helps in three ways:
-
-- Each sub-agent keeps useful local context for the same job instead of being respawned every turn.
-- The main thread keeps a high-level view of progress.
-- A failure in one branch does not spoil the rest.
-
-Asking for clarification is a tool on purpose. It makes "I should ask the user" a visible decision the agent can be steered toward, instead of something that only happens by chance.
-
-## See also
-
-- [Coder](coder.md): the coding tools, most of them loaded through the `coding` skill.
-- [Cron and scheduling](cron.md): how background agent runs are scheduled.
diff --git a/gitbooks/features/native-tools/browser-and-computer.md b/gitbooks/features/native-tools/browser-and-computer.md
deleted file mode 100644
index 7f9f578fcc..0000000000
--- a/gitbooks/features/native-tools/browser-and-computer.md
+++ /dev/null
@@ -1,105 +0,0 @@
----
-description: >-
- Read and drive a real browser and a real desktop: accessibility snapshots,
- element references, bounded tasks that stop at a payment page, and a small
- decision model that picks each step.
-icon: display
----
-
-# Browser and computer control
-
-When the agent needs to use a computer the way a person would, by opening a page, reading the screen, clicking a button or typing a phrase, these tools do it. Desktop and browser control both come from one loadable module, TinyComputer. It downloads on first use.
-
-## Two surfaces, one model
-
-Desktop and browser produce the same kind of "screen": a compact list of things a person could interact with. Each item has a role, a name, a value, its states, the actions it supports, and the labels of the boxes it sits in. The list is capped at 254 controls. Both surfaces offer the same short list of actions (click, type, check, uncheck, expand, collapse, scroll, wait, press), so the agent learns one vocabulary.
-
-Elements are addressed by reference, never by coordinates or CSS selectors. A desktop reference like `@s8f3k2p9:e1` is tied to the snapshot that produced it. Acting on it either reaches the element that was described or fails with a stale-reference error telling the agent to look again. It never clicks whatever has moved into that spot since. Browser references survive a redraw, because they are marks that last as long as the element is on the page.
-
-## Browser
-
-The browser is a real Chrome or Chromium, driven over the Chrome DevTools Protocol by a library built into the module. Chrome runs as its own process, but nothing sits between it and the module: no driver binary, no local HTTP bridge and no second OpenHuman process.
-
-- **Open** a session. You can launch a fresh browser (headless or headed) or attach to the Chrome you already have running. Attaching matters because many sites turn away a fresh automated browser but serve a person's own. When a task ends, an attached browser is only disconnected, never closed.
-- **Snapshot** the page. The default mode, `sight`, runs a small in-page script that reads the page the way a person sees it: real links, buttons and fields, plus anything with a pointer cursor, a click handler or a tab stop. It drops hidden, zero-size, transparent and disabled items. It marks items below the fold as offscreen and items behind a dialog as covered. It falls back to the accessibility tree when it can't read a page, and `perception: "tree"` forces the tree.
-- **Act**: click (optionally into a new tab), fill, type, press, select, check, hover, scroll, wait, read and go back.
-- **Read** the page as text, Markdown or serialized DOM, and **evaluate** JavaScript.
-- **Downloads**: list the browser's download events and wait for a completed file. A page snapshot alone doesn't prove a file finished.
-
-Screenshots are never returned inline. A reply carries a handle that the agent reads in chunks and releases when done.
-
-Clicks, typing, key presses and other consequential actions ask for your approval in the chat first. A scheduled job has nobody to ask, so by default it can only open and read pages. An operator can let cron, background and approval-free workflow turns take specific actions with `[browser] unattended_actions`. See [TinyComputer browser on Linux and Docker](../../developing/tinycomputer-docker.md#4-unattended-actions).
-
-Sessions are bounded. The module allows up to 8 at once. OpenHuman keeps at most 6 per conversation thread with a 30-minute idle timeout, so a long chat reuses one browser and doesn't open a new one every turn. A session can be restricted to a set of origins.
-
-## Desktop
-
-Desktop control reads the operating system's accessibility tree, the same interface a screen reader uses. It covers running apps, windows, displays, Notification Center entries, the clipboard and screenshots.
-
-Actions go through the accessibility API and not through synthesized input. By default they don't steal focus, move your cursor or touch the clipboard, so a run can continue while you use the machine. A headed mode and real mouse and key events exist for apps that need them, but they are the exception.
-
-For dense apps, a skeleton snapshot stops at three levels and returns structure without leaf detail. That is the difference between tens of thousands of tokens and a few hundred.
-
-## Tasks
-
-Above these basics sits a bounded task loop. You describe the outcome, the module plans the steps, and a small decision model ([Jev](../../developing/jev.md)) picks every click. A task starts and returns at once with a status, which the agent polls and answers:
-
-| Status | What it means |
-| ------------------------------- | ----------------------------------------------------------------- |
-| `running` | Working. |
-| `needs_input` | A field it can't fill without you. |
-| `needs_approval` | An irreversible step. Only an explicit approval releases it. |
-| `needs_human` | A captcha, OTP, 2FA or login. No model can get past it. |
-| `needs_plan` | Plain language with no planner configured. |
-| `checkpoint` | Stopped on purpose, with the page left open. |
-| `done`, `failed`, `cancelled` | Final states. |
-
-Two rules hold for every task:
-
-- **Reaching a payment page always stops the task.** It becomes a checkpoint that can't be continued, with the page left open for a person. The agent does not pay.
-- **Secret values never reach a model.** Facts you mark secret are shared as `${name}` templates. The planner, the decision model and the rescue model see only the name, and the value is typed locally into the field.
-
-Page and screen text is treated as data, never as instructions. The safety rules are plain code, not model judgment.
-
-## Agent tools
-
-| Tool | What it does |
-| --- | --- |
-| `browser` | Everything above through one `action` argument: `open`, `snapshot`, `read_page`, `click`, `fill`, `type`, `get_text`, `get_title`, `get_url`, `wait`, `press`, `hover`, `scroll`, `is_visible`, `find`, `task`, `task_continue`, `task_cancel`, `confirm_pending`, `list_downloads`, `wait_download`, `close`. |
-| `browser_open` | Opens a URL and returns a session. |
-| `desktop_list_apps`, `desktop_list_windows` | What is running and where. |
-| `desktop_launch` | Starts an app. |
-| `desktop_snapshot`, `desktop_find` | Reads the screen, or looks for one thing on it. |
-| `desktop_goal`, `desktop_continue_goal` | Runs a desktop task and answers its stops. |
-
-Irreversible steps go through OpenHuman's [approval gate](../approval-gate.md), tied to a digest of the exact action and URL. If no approval gate is installed, the action is denied.
-
-## Platform support
-
-| Platform | Desktop | Browser |
-| --- | --- | --- |
-| macOS | Yes. Needs Accessibility permission, plus Screen Recording for screenshots and Automation for the Notification Center opener. | Yes |
-| Windows | Yes | Yes |
-| Linux | No | No |
-
-A permission check runs before the first read. An accessibility API called by an unauthorized process usually returns an empty tree, not an error, and that looks the same as an app with no buttons. A missing permission produces a named refusal that says which setting to change.
-
-Linux is not supported. The module registry publishes no Linux build, so neither desktop control nor browser automation is available there, even though the browser engine itself would run.
-
-## Settings
-
-**Connections > Computer Control** holds all of it: the module's status and contract version, the decision model (Jev, OpenJEV or Levanto Sage) and which route it bills through, the planner and rescue models, and the browser section (executable path, perception mode and allowed domains).
-
-`[desktop] approvals_enabled` defaults to `false`. It governs one narrow thing: the module's own confirmation stop in the middle of a desktop goal. When it is off, the core continues automatically after the module re-observes and re-validates the exact target. When it is `true`, that stop shows as an approval card. It does not weaken the [approval gate](../approval-gate.md). An irreversible step still needs approval, and with no gate installed it is denied. Desktop goal confirmations are single-use and expire after 10 minutes.
-
-## What it is good for
-
-- Driving sites that have no API and no [native integration](../integrations/README.md).
-- Multi-step UI flows where each snapshot shows the next element to act on.
-- Automating a local app from inside a chat.
-
-## See also
-
-- [Web scraper](web-scraper.md): when you only need the article, not the whole page.
-- [Jev](../../developing/jev.md): the decision model that picks each step.
-- [Approval gate](../approval-gate.md): what gets parked, and what happens with no gate installed.
diff --git a/gitbooks/features/native-tools/coder.md b/gitbooks/features/native-tools/coder.md
deleted file mode 100644
index 5cc62ebf09..0000000000
--- a/gitbooks/features/native-tools/coder.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-description: >-
- A complete toolset for working on real codebases: read, write, edit, search,
- git, lint and test.
-icon: code
----
-
-# Coder
-
-The coder tools make OpenHuman a real coding partner and not a chat window that only pretends to know your codebase.
-
-## Tools in this family
-
-| Tool | What it does |
-| ---------------- | --------------------------------------------------------------------- |
-| `file_read` | Reads a file, with line numbers like `cat -n`. |
-| `file_write` | Writes a new file. |
-| `edit` | Makes targeted edits by match and replace, with strict uniqueness checks. |
-| `apply_patch` | Applies a unified diff. |
-| `glob` | Finds files by glob pattern. |
-| `grep` | Searches the tree, ripgrep style. |
-| `list` | Walks a directory tree. |
-| `read_diff` | Shows the diff between two files or revisions. |
-| `git_operations` | Status, diff, log, blame, branch and commit. |
-| `run_linter` | Runs the project's linter. |
-| `run_tests` | Runs the project's test command. |
-| `csv_export` | Exports query results as CSV. |
-
-## Why these are native
-
-A shell tool plus `cat`, `sed` and `awk` could technically do all of this. The native tools exist because:
-
-- Edits go through a uniqueness check, so the agent can't clobber the wrong line.
-- Reads come back with line numbers the agent can refer to in follow-ups.
-- Git output is parsed into structured data, so the agent doesn't scrape porcelain output.
-- Lint and test runs use the project's real commands, not generic guesses.
-
-## Workspace scoping
-
-File tools act inside the agent's working folder (`action_dir`). The workspace directory holds internal state and is never a tool target.
-
-With the autonomy policy on, `workspace_only` confines the tools to the working folder, and anything outside it needs an explicit trusted root. With the policy off (the default), that confinement is not enforced. One floor holds either way: credential stores (`~/.ssh`, `~/.gnupg`, `~/.aws`) and system roots are unreachable, as are `..` traversal and null bytes in a path. See [Approval gate](../approval-gate.md).
-
-## See also
-
-- [System and utilities](system-and-utilities.md): `shell` for the rest of the dev loop, including Node.js, npm and Python commands available on the host's `PATH`.
-- [Agent coordination](agent-coordination.md): `todo` and `spawn_subagent` for larger refactors.
diff --git a/gitbooks/features/native-tools/cron.md b/gitbooks/features/native-tools/cron.md
deleted file mode 100644
index ee90b01f5b..0000000000
--- a/gitbooks/features/native-tools/cron.md
+++ /dev/null
@@ -1,39 +0,0 @@
----
-description: Recurring jobs, one-off reminders and scheduled agent runs.
-icon: clock
----
-
-# Cron and scheduling
-
-Scheduling is a built-in capability. The agent can set up recurring jobs ("every weekday at 9am, summarize my inbox"), one-off reminders ("nudge me about this in three hours") and any agent run on a cron schedule.
-
-## Tools in this family
-
-| Tool | What it does |
-| ------------- | --------------------------------------------------------------------- |
-| `cron_add` | Creates a scheduled job from a cron expression and an agent prompt. |
-| `cron_list` | Lists existing jobs and their next run times. |
-| `cron_update` | Edits a job: its schedule, prompt or enabled state. |
-| `cron_remove` | Deletes a job. |
-| `cron_run` | Runs a job once, right now, whatever its schedule. |
-| `cron_runs` | Shows recent run history: when, how long and what it produced. |
-
-For "do this once at time T" cases that don't need a recurring entry, there is also a one-shot `schedule` tool in [System and utilities](system-and-utilities.md).
-
-Agent jobs run a full model turn each time they fire, so they must be at least five minutes apart. `cron_add` and `cron_update` reject a tighter cron expression or `every_ms` for an agent job, and they say which two runs would be too close. For example, `*/7 * * * *` fires at :56 and again at :00. Shell jobs have no such limit.
-
-## What it is good for
-
-- Daily or weekly digests delivered to your messaging channel.
-- Polling a slow integration that doesn't push events.
-- Reminders the agent owns, such as "remind me Thursday to follow up with Alice".
-- Recurring research, such as "every Monday, check what's new on this topic and write me a brief".
-
-## How it fits with the rest
-
-A cron run is a normal agent run, so it can use any other tool: search the web, query [memory](../memory.md), call a [third-party integration](../integrations/README.md), or send a message. Run history is recorded so you can see what each run produced.
-
-## See also
-
-- [System and utilities](system-and-utilities.md): the one-shot `schedule` tool.
-- [Agent coordination](agent-coordination.md): for jobs that fan out into sub-agents.
diff --git a/gitbooks/features/native-tools/documents.md b/gitbooks/features/native-tools/documents.md
deleted file mode 100644
index fab356d907..0000000000
--- a/gitbooks/features/native-tools/documents.md
+++ /dev/null
@@ -1,64 +0,0 @@
----
-description: >-
- Write .docx and .pptx files, and read PDF, Word, PowerPoint and Excel files
- back in, with every limit stated up front.
-icon: file-lines
----
-
-# Documents
-
-Two tools write files a person can open, and the ingest path reads the common office formats back in. Both run in a separate loadable module, not in the app itself.
-
-## Writing
-
-| Tool | Produces |
-| --- | --- |
-| `generate_document` | A `.docx` from a structured spec: title, author, headings, paragraphs and bullet lists. |
-| `generate_presentation` | A `.pptx` from slides: titles, bullets and images. |
-
-The spec is checked before anything is written. The limits are part of the contract:
-
-| `.docx` | Limit |
-| --- | --- |
-| Sections | 128 |
-| Paragraphs per section | 200 |
-| Bullets per section | 200 |
-| Characters per title, author or heading | 2,000 |
-| Characters per paragraph | 20,000 |
-| Characters in total | 2,000,000 |
-
-| `.pptx` | Limit |
-| --- | --- |
-| Slides | 64 |
-| Bullets per slide | 32 |
-| Characters per text field | 2,000 |
-| Images per slide | 6 |
-| Images per deck | 8 |
-| Bytes per image | 5 MiB |
-
-The total character cap is the one that matters most. Without it, sections times paragraphs times characters per paragraph would allow a spec that no reader could open.
-
-The finished file arrives as an [artifact](../chat.md). It appears in the thread's files panel with download and reveal-in-folder.
-
-## Reading
-
-Attach a file, or point a [memory source](../memory.md) at one, and the ingest path extracts its text. Each piece of text keeps its origin: a page number for a PDF, or the part path for an Office file.
-
-| Format | Notes |
-| --- | --- |
-| PDF | Up to 4,096 source pages. A page with no text layer is kept and flagged as a scan candidate. That flag suggests using vision. It does not claim OCR is needed. |
-| DOCX, PPTX, XLSX | Slide and sheet order comes from the file's own manifest, so an unreferenced slide is left out and not guessed from its filename. Spreadsheets read shared and inline strings and use cached cell values. Formulas are never evaluated. |
-
-The bounds are 64 MiB in, 256 result sections and 200,000 bytes of text out. The result says whether it was truncated. Text is never cut mid-character. Rendering PDF pages to images is opt-in for each page, with at most 8 pages per call and 2,048 pixels on the longest edge.
-
-Nothing is written to disk during extraction, no office application is launched, and there is no network OCR.
-
-## Where it runs
-
-Document work happens in the `tinydocs` module. It is a signed native library that downloads on first use and is checked against a SHA-256 pinned in OpenHuman. The document writers, PDF and Office readers, and image inspection are not part of the app's own code in any build. With the `documents` feature off, the generation tools are absent and PDF/Office extraction and image inspection are unavailable.
-
-## See also
-
-- [Image and video generation](media-generation.md): the other tools that produce a file.
-- [Memory](../memory.md): where a document ends up if you add it as a source.
-- [Loadable modules](../../developing/loadable-modules.md): how a module is pinned and loaded.
diff --git a/gitbooks/features/native-tools/image-tools.md b/gitbooks/features/native-tools/image-tools.md
deleted file mode 100644
index 01929cf1e1..0000000000
--- a/gitbooks/features/native-tools/image-tools.md
+++ /dev/null
@@ -1,43 +0,0 @@
----
-description: >-
- Show the agent an image: attachments the model can see, local image
- metadata, and which model handles vision.
-icon: image
----
-
-# Image tools
-
-This page is about getting an image into a turn so the model can look at it. To make images instead, see [Image and video generation](media-generation.md).
-
-## Attaching an image
-
-Attach a file in the composer, or point the agent at a path. What happens next depends on the model and the route, not on a setting.
-
-- If the model accepts images and the transport supports them, the image goes up natively as image content.
-- If not, it degrades instead of failing. The agent gets a bounded readout, or a reference to the file with its path and metadata. It can still reason about the file and tell you what it cannot see.
-
-Uploads stay in the acting workspace across a restart. The ordered references stay in the transcript, so a later turn can still refer to "the second screenshot".
-
-## `image_info`
-
-`image_info` is a read-only tool. It reads a local image's metadata (format, dimensions, size) and can return the bytes as base64 text for a model that wants them inline. Use it when the question is "what is this file". It does not need a vision model.
-
-## Which model sees it
-
-Vision has its own provider slot, so you can route it separately from chat:
-
-```toml
-vision_provider = "…" # a provider id, or leave unset to use the chat provider
-```
-
-If a configured vision model turns out to be chat-only, the call returns a named error. It never silently swaps in another model. There is no default local vision model, so a local setup has to name one. [Local models and BYOK](../model-routing/local-and-byok-models.md) lists the ones worth trying.
-
-## Delegation
-
-When a turn needs to look at several images, or study one closely, the agent usually hands it to the built-in vision sub-agent. That keeps the main conversation from carrying every pixel of context. The agent decides this itself. You do not have to ask.
-
-## See also
-
-- [Image and video generation](media-generation.md): making images and video.
-- [Chat](../chat.md): where attachments live in the UI.
-- [Automatic model routing](../model-routing/README.md): how the vision slot is resolved.
diff --git a/gitbooks/features/native-tools/integrations.md b/gitbooks/features/native-tools/integrations.md
deleted file mode 100644
index cb26a6c16b..0000000000
--- a/gitbooks/features/native-tools/integrations.md
+++ /dev/null
@@ -1,35 +0,0 @@
----
-description: How the agent uses your connected third-party services as tools.
-icon: plug
----
-
-# Third-party integrations
-
-The agent can call the [services you connect](../integrations/README.md), such as Gmail, Notion, GitHub, Slack, Lark/Feishu, Stripe and Calendar, through one proxied tool surface.
-
-## How the agent sees them
-
-Once you connect a service with OAuth, its actions become callable tools. The agent does not need to know whether a tool talks to Gmail or a local file. It calls the tool, the proxy routes the request through the OpenHuman backend with your token, and the result comes back like any other tool output.
-
-Some examples of what you can ask:
-
-- "Send a message to #engineering on Slack."
-- "Create an issue in the openhuman repo."
-- "What's on my calendar tomorrow?"
-- "Pull the last 20 Stripe charges over $1000."
-
-## Native and proxied services
-
-Some services have a native provider. That is a Rust module that ingests the service into [memory](../memory.md) directly, such as Gmail's native ingest path. Other services are proxied tools only. The agent can call them, but nothing is ingested automatically yet.
-
-Lark/Feishu has two surfaces. One is a native real-time channel for sending and receiving messages. The other is a Composio-proxied workspace toolkit for chat, docs, wiki and meeting actions, available when the backend allowlist exposes it. Backfilling old Lark chat and docs into memory is not a native provider yet.
-
-## Privacy boundary
-
-For Composio-proxied integrations, the core never calls a third-party API directly. Requests go through the OpenHuman backend, which handles OAuth tokens and rate limiting. Your tokens never sit on your disk in plaintext, and the agent only sees the results of tool calls, never the credentials. Native channels such as Lark/Feishu use their own local configuration, so review them separately from the Composio OAuth boundary.
-
-## See also
-
-- [Third-party integrations catalog](../integrations/README.md): the OAuth flow and connection management.
-- [Memory](../memory.md): how connected services become memory sources.
-- [Privacy and security](../privacy-and-security.md): the full boundary.
diff --git a/gitbooks/features/native-tools/media-generation.md b/gitbooks/features/native-tools/media-generation.md
deleted file mode 100644
index 48b9f66329..0000000000
--- a/gitbooks/features/native-tools/media-generation.md
+++ /dev/null
@@ -1,34 +0,0 @@
----
-description: >-
- Ask for an image or a video and dedicated media agents generate it, with
- image editing and animation of a reference image, saved into your workspace.
-icon: clapperboard
----
-
-# Image and video generation
-
-OpenHuman can make media, not just read it. Ask for "an image of…", "edit this screenshot to…" or "animate this photo into a short clip", and a dedicated media sub-agent takes over. You need no plugin, no API key and no separate billing.
-
-## What it can do
-
-- **Image generation and editing.** Text-to-image and image editing through hosted GMI models (Seedream for generation, SeedEdit for edits).
-- **Video generation.** Text-to-video, or animate a reference image into a clip (Seedance or Veo). Video is asynchronous. The agent starts the render and collects the clip when it is done.
-- **Model discovery.** The agent can list the media models available now and pick the right one.
-
-## How it works
-
-The `media_generation` domain (`crates/openhuman-core/src/media/generation/`) gives the agent three tools: generate image, generate video and list models. They use the OpenHuman backend's media-generation provider. The backend owns the provider keys, billing and rate limiting, and your subscription covers it like any other model call.
-
-The tools submit a job and then poll every 4 seconds, for up to 180 seconds for images and 420 seconds for video. You and the agent see live progress instead of a hung call. Finished files are downloaded into the `generated-media/` folder of your workspace and returned as local file paths, ready to attach, post or edit further.
-
-## Privacy
-
-Prompts and reference media go to the OpenHuman backend and on to the hosted media provider. The in-app capability catalog discloses this (`intelligence.image_generation` and `intelligence.video_generation`, both Beta).
-
-[Privacy mode](../privacy-mode.md) local-only enforcement covers inference providers only. The media tools still call the backend, so avoid them if you need strict no-egress today.
-
-## See also
-
-- [Image tools](image-tools.md): attachments, image metadata and the vision model slot.
-- [Native tools](README.md): the full toolbelt.
-- [Billing, cost and usage](../billing-and-usage.md): how media jobs are metered.
diff --git a/gitbooks/features/native-tools/memory-tools.md b/gitbooks/features/native-tools/memory-tools.md
deleted file mode 100644
index b35535060c..0000000000
--- a/gitbooks/features/native-tools/memory-tools.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-description: How the agent recalls, fetches, learns and forgets with its single memory tool.
-icon: brain
----
-
-# Memory tools
-
-[Memory](../memory.md) is OpenHuman's knowledge base. The agent uses it through one tool, `memory`, whose `action` is one of these:
-
-| Action | What it does |
-| --- | --- |
-| `recall` | Ask a question. Returns an answer and the citations it rests on. |
-| `fetch` | Raw hybrid search over stored items, optionally filtered by metadata. Returns hits. |
-| `learn` | Queue one durable learning: a preference, fact, procedure or correction. |
-| `forget` | Queue removal of items by id. |
-
-The tool is registered only when a memory engine is usable. With none selected, memory is off and the agent never sees the tool. Every learning is shared with all agents under the same memory root. It is tagged with the workspace, thread, agent and tool call that produced it.
-
-## The tool and the per-turn pack
-
-A turn can receive a completed cached [memory pack](../memory.md#how-the-agent-uses-memory) (`<memory-context>`). A cold cache supplies none. The pack is labelled as context from an earlier background lookup and can be incomplete or unrelated to the current question. Automatic refresh and turn logging never wait on the remote engine before the model runs.
-
-Use explicit `recall` or `fetch` when a current answer is needed, or to go further than the pack. The agent can ask a question the pack does not cover ("what do I know about the Stripe webhook?"), search with metadata filters, or save something worth remembering next time.
-
-## Deadlines and queued writes
-
-Agent memory calls have a 15-second per-call deadline, a shared 30-second budget and at most eight attempts per tracked run. Concurrent calls reserve from the same budget. If a read times out or the budget is exhausted, the tool tells the agent to continue without memory and not retry it in that run. A new run has a fresh budget.
-
-`learn` and `forget` persist a validated, scrubbed request in a private local outbox and start background delivery. The statuses "queued; not yet saved to memory" and "queued; not yet removed from memory" confirm local acceptance only. The agent must not describe them as completed remote saves or deletions, or repeat them to force indexing. Pending delivery can resume after a restart, sign-in or background tick. Queue admission can fail when its limits are reached.
-
-These agent-tool limits do not replace the behavior of explicit Memory-page or RPC workflows.
-
-External MCP clients get the same abilities from OpenHuman's [MCP server](../../developing/mcp-server.md) as `memory.recall`, `memory.fetch`, `memory.list`, `memory.learn` and `memory.forget`.
-
-## See also
-
-- [Memory](../memory.md)
diff --git a/gitbooks/features/native-tools/system-and-utilities.md b/gitbooks/features/native-tools/system-and-utilities.md
deleted file mode 100644
index 88d339c54d..0000000000
--- a/gitbooks/features/native-tools/system-and-utilities.md
+++ /dev/null
@@ -1,35 +0,0 @@
----
-description: Shell, node, Python, current time and push notifications, the small tools that round out the toolbelt.
-icon: gear
----
-
-# System and utilities
-
-These are small tools the agent uses to finish a task.
-
-Use the `shell` tool for Node.js, npm, and Python commands. OpenHuman uses the host's `node` and `python3` executables on `PATH`; install them with the platform package manager when needed.
-
-## Tools in the family
-
-| Tool | What it does |
-| --- | --- |
-| `shell` | Run a shell command. Output is bounded and the exit code is captured. |
-| `current_time` | Get the current time in any timezone, with formatting options. |
-| `schedule` | Do something once at a given time. For recurring jobs see [Cron](cron.md). |
-| `pushover` | Send a push notification to your devices. |
-| `lsp` | Query a language server for definitions, references and diagnostics. |
-| `read_workspace_state` | Inspect the current working folder: open files, recent edits, environment. |
-| `proxy_config` | Read or change proxy configuration for outbound requests. |
-| `tool_stats` | Show which tools were used in this session and how often. |
-
-## What they are good for
-
-- The parts of a workflow that do not fit a richer tool family.
-- "Just run this command and tell me what it printed."
-- Time-aware behavior ("what time is it for the user right now?") without baking timezone assumptions into prompts.
-- Notifying you when a long-running job is done.
-
-## See also
-
-- [Coder](coder.md): for file-heavy work, prefer the dedicated tools over `shell`.
-- [Cron and scheduling](cron.md): for anything recurring.
diff --git a/gitbooks/features/native-tools/voice.md b/gitbooks/features/native-tools/voice.md
deleted file mode 100644
index 7eca75a802..0000000000
--- a/gitbooks/features/native-tools/voice.md
+++ /dev/null
@@ -1,57 +0,0 @@
----
-description: >-
- Speech-to-text in, text-to-speech out, mascot lip-sync, and a live voice
- agent you can interrupt mid-sentence.
-icon: microphone
----
-
-# Voice
-
-You can talk to OpenHuman instead of typing. Dictation, spoken replies and the live voice agent are part of the core, not a plugin.
-
-## Speech-to-text
-
-- **Hotkey.** Push-to-talk and toggle modes.
-- **Audio capture.** Cross-platform mic capture with voice-activity detection.
-- **Streaming transcription.** Words appear as you speak.
-- **Hallucination filter.** Strips known artifacts such as "Thanks for watching" and phrases invented from silence.
-- **Postprocessing.** Punctuation, capitalization and dictation cleanup.
-
-Dictation can replace the active text input on your desktop, or go straight into a chat with the agent.
-
-## Text-to-speech
-
-Replies are spoken through a hosted TTS model. The agent can speak back in a voice you pick, with natural timing. Voice selection is set per user, and the mascot lip-syncs to the audio through a viseme map.
-
-## Talk to Tiny live
-
-Click Tiny, the mascot in the chat composer, and talk. Tiny listens and answers out loud in real time, and you can cut in mid-sentence. It uses the same tools as typed chat under the same tool policy, and anything that needs your approval asks in the conversation. What you both say is saved to the open conversation, and Tiny knows what you were just typing about.
-
-Choose how Tiny's voice runs under **Connections → Voice agents**:
-
-| Provider | Setup | Notes |
-| --- | --- | --- |
-| Gemini Live (TinyHumans) | None (default) | One model that hears and speaks. Billed through your TinyHumans balance. |
-| ElevenLabs Agent (TinyHumans) | None | Hosted ElevenLabs voice with OpenHuman as its brain. |
-| Gemini Live (Google API key) | Your Google AI Studio key | Talks to Google directly. |
-| Sarvam AI | Your Sarvam key | Indian languages (Hindi, Tamil, Bengali and more, or automatic detection). Sarvam's speech recognition, chat model and voices work together. |
-
-Each card has a **Test** button that opens a short session to check the provider. You can also pick the voice, and the language where the provider supports it.
-
-## Privacy
-
-- Audio capture is local. Where the audio goes next depends on the provider you picked. Managed routes send it to the OpenHuman backend. A bring-your-own-key provider such as Gemini Live on a Google API key talks to that vendor directly. Either way, no recording is kept beyond the live transcript.
-- TTS audio is streamed and discarded. Nothing is stored.
-- What you and the agent say in a live session is saved to the open conversation. When memory is on, it reaches your memory engine on the same terms as typed chat.
-
-There is no local speech-to-text engine. Speech-to-text is either the hosted route or a third-party API you bring a key for. Text-to-speech still has a local option (Piper).
-
-## Google Meet
-
-The live Google Meet agent has been removed. Nothing in the shipped build joins a meeting. The second mascot and its per-mascot voice remain as [mascot](../mascot/README.md) settings.
-
-## See also
-
-- [The mascot](../mascot/README.md): the face that lip-syncs to this audio.
-- [Memory](../memory.md): where a spoken conversation ends up.
-- [Automatic model routing](../model-routing/README.md): live turns want `hint:fast`.
diff --git a/gitbooks/features/native-tools/web-scraper.md b/gitbooks/features/native-tools/web-scraper.md
deleted file mode 100644
index 1534876ec9..0000000000
--- a/gitbooks/features/native-tools/web-scraper.md
+++ /dev/null
@@ -1,66 +0,0 @@
----
-description: >-
- The `web_fetch` tool reads a web page and returns it as Markdown instead of
- raw HTML, behind an allowlist and an SSRF guard.
-icon: globe
----
-
-# Web scraper
-
-`web_fetch` is the agent's tool for reading a page. It is separate from `http_request` and `curl` because the agent rarely wants the markup. It wants the page. HTML comes back as Markdown, with links kept and scripts dropped.
-
-Use `http_request` when you need POST, custom headers or richer HTTP behavior. Use `curl` to stream a file to disk.
-
-## Arguments
-
-| Argument | Required | Effect |
-| --- | --- | --- |
-| `url` | Yes | An absolute `http` or `https` URL. |
-| `max_bytes` | No | Truncate the body at this many bytes instead of the configured cap. |
-| `raw` | No | Skip the Markdown conversion and return the body as served. This does not bypass the limits. The response cap and any `max_bytes` still truncate, and the result still carries the truncation marker. |
-| `summary_focus` | No | Steers the [TokenJuice](../token-compression.md) summary toward a topic. |
-
-The tool is read-only and never asks for approval. Parallel `web_fetch` calls are safe, because a GET is idempotent.
-
-Conversion follows the response `Content-Type`, and falls back to content sniffing when the header is missing. A response that is explicitly not HTML is returned as is.
-
-## Limits
-
-| Limit | Value | Where it comes from |
-| --- | --- | --- |
-| Body cap | 1,000,000 bytes | `[http_request].max_response_size` |
-| Request timeout | 30 seconds | `[http_request].timeout_secs` |
-| Text handed to the model in one result | 24,000 characters | `max_result_size_chars` in `web_fetch.rs` |
-| Redirects followed | None | `redirect::Policy::none()` |
-
-The first two are the shipped defaults in `crates/openhuman-core/src/config/schema/tools/http.rs`, shared with `http_request`. A `0` in either key counts as unset and falls back to the default, so a stale zero cannot disable every fetch.
-
-- **Oversize pages are truncated, not dropped.** The body is cut at a character boundary, and the result header records `download_capped_at=<N>B` so the agent knows the page is partial. The cap bounds what reaches the model, not what is downloaded, because the response is read before it is trimmed. Streaming with a hard download ceiling is `curl`'s job.
-- **Past 24,000 characters the rest is kept.** The full extracted page is saved as an artifact, and the result carries the `file_read` call that pages through it.
-
-Redirects are never followed. A redirect target can sit on a host the allowlist would refuse, so a 3xx returns a result naming its `Location` and leaves the decision to the agent. Calling `web_fetch` again with that URL runs the whole guard from scratch.
-
-## The allowlist and the URL guard
-
-Every fetch passes the URL guard in `tinytools-std` (`vendor/tinyagents/vendor/tinytools/crates/tinytools-std/src/url_guard/`) before any connection is made. `http_request` and `curl` use the same gate.
-
-**Shape.** Only `http` and `https` are accepted. URLs with whitespace, a backslash, userinfo (`user:pass@`), a percent-encoded authority or an IPv6 literal host are rejected.
-
-**Allowed websites.** `[http_request].allowed_domains` ships as `["*"]`, so research works out of the box. An exact host also matches its subdomains. `"*"` allows all public sites, and an empty list blocks all web access. If every entry is malformed, the list fails closed. To narrow it, use the allowed-websites setting described in [Web search](web-search.md#settings), which writes the same key.
-
-**Address checks.** The guard resolves the hostname and refuses the fetch if any resolved address is non-global. That covers loopback, RFC1918 private, link-local (including the cloud metadata address `169.254.169.254`), CGNAT, unspecified and broadcast ranges, and the IPv6 equivalents including unique-local, link-local and IPv4-mapped forms. Hostnames such as `localhost`, anything ending in `.localhost` and anything under a `.local` TLD are refused by name. These checks apply even under `"*"`, so the wildcard opens public hosts and never the private network.
-
-Under privacy mode's local-only setting, the fetch is refused before validation or DNS, so a blocked destination is never looked up. Rate limiting applies, and the egress disclosure records the destination host before the request leaves.
-
-## What it is good for
-
-- Reading articles, documentation pages and GitHub READMEs without the surrounding noise.
-- Following up on a [web search](web-search.md) result.
-- Summarizing a single known page on demand.
-
-## See also
-
-- [Web search](web-search.md): finds the URLs to feed this tool, and owns the allowed-websites list.
-- [Token compression](../token-compression.md): what trims a long page before it reaches the model.
-- [Browser and computer control](browser-and-computer.md): for pages that need clicking rather than reading.
-- [Privacy and security](../privacy-and-security.md): the local-only mode and egress disclosure behind the guard.
diff --git a/gitbooks/features/native-tools/web-search.md b/gitbooks/features/native-tools/web-search.md
deleted file mode 100644
index e42129a734..0000000000
--- a/gitbooks/features/native-tools/web-search.md
+++ /dev/null
@@ -1,131 +0,0 @@
----
-description: >-
- Native web search, grounded answers and page reading for the agent. Exa and
- Gemini are included with TinyHumans; more providers work with your own key.
-icon: magnifying-glass
----
-
-# Web search
-
-The agent can search the live web, get a grounded answer with citations, and read pages on its own. Out of the box it runs on providers included with TinyHumans: [Exa](https://exa.ai) for search and page contents, and [Gemini](https://ai.google.dev) with Google Search grounding for answers. You do not need a search API key for either. You can add more providers with your own key, and several can be on at once.
-
-## What it is good for
-
-- Research: "what's the latest on X".
-- Citation hunting: "find me three sources for Y".
-- Fact-checking before answering: the agent runs a quick search if it isn't confident.
-- Reading a page the agent or you already found.
-
-## Roles: one tool per job
-
-The agent sees one tool per capability role, whichever providers are on:
-
-| Role | Agent tool | What it returns |
-| ------------ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Search | `web_search_tool` | Ranked results: title, URL, publish date and an excerpt. |
-| Answer | `web_answer_tool` | A written answer grounded in web sources, with citations. With `depth: "deep"` it runs Gemini Deep Research instead, which needs your own Gemini key. |
-| Contents | `web_contents_tool` | The extracted text of the URLs it is given. |
-
-Each role has an ordered provider list. The first usable provider serves the call. If it fails, the next one is tried, and so on. The result says which provider answered and which were skipped, for example `Answer for: … (via Gemini, after Exa)`, and the chat card shows the same "via Gemini, after Exa" note under the answer and its sources. A role with no usable provider has no tool at all, so the agent never sees a tool that cannot run.
-
-The default order is:
-
-| Role | Default providers, in order |
-| -------- | ------------------------------------------------------------------ |
-| Search | Exa, Brave, Tavily, Parallel, Querit, Seltz, SearXNG, TinyFish |
-| Answer | Gemini, Exa, Parallel |
-| Contents | Exa, Tavily, Parallel, TinyFish |
-
-Providers that are off are skipped, so with the defaults only Exa and Gemini serve.
-
-## Providers and routes
-
-Every provider has a route:
-
-- Included with TinyHumans (`managed`): the call goes through the TinyHumans backend and is billed to your TinyHumans balance. It needs a signed-in session. No key is stored on your machine.
-- Own key (`direct`): the call goes straight from your machine to the provider with your API key.
-
-| Provider | Routes | Roles | Notes |
-| -------- | ------------------ | ------------------------- | ----------------------------------------------------------------------------------------------------- |
-| Exa | Included, own key | Search, answer, contents | On by default (included). |
-| Gemini | Included, own key | Answer | On by default (included). A key of your own also unlocks Deep Research, even on the included route. |
-| TinyFish | Own key | Search, contents | Off by default. There is no included TinyFish route; the managed backend does not proxy it. |
-| Parallel | Own key | Search, answer, contents | Off by default. There is no included Parallel route; bring your own [Parallel](https://parallel.ai) key. Deep answers never use Parallel. |
-| Brave | Own key | Search | Off by default. |
-| Tavily | Own key | Search, contents | Off by default. |
-| Querit | Own key | Search | Off by default. |
-| Seltz | Own key | Search | Off by default. |
-| SearXNG | Own instance | Search | Off by default. Uses the URL of your own [SearXNG](https://docs.searxng.org/) instance, not a key. |
-
-A provider is usable when it is on, its route is available (you are signed in for the included route, or a key is saved for the own-key route), and search as a whole is on. The settings page shows this as a badge on each provider: Ready, Needs key, Sign in required or Off.
-
-If you use OpenHuman without signing in (a local session), the included route is unavailable. Turn on a provider with your own key to keep web search working.
-
-When your TinyHumans balance runs out, included providers stop answering and the failed tool call in chat says so. Top up, or switch a provider to your own key.
-
-## Settings
-
-Everything is under **Connections → Search**:
-
-- Web search: one switch turns every search tool on or off.
-- Providers: one card per provider with an on/off switch, the route choice (for providers that support both), the API key field for the own-key route, and the instance URL for SearXNG. Gemini always shows its key field, since the key is what enables Deep Research.
-- Roles: the provider order for Search, Answer and Contents, with which provider currently serves each role. Move providers up or down, remove fallbacks, add a provider back, or reset a role to its default order.
-- Allowed websites: which sites the assistant may open and read through web fetch and the browser tool. This list does not restrict web search.
-- Advanced → Expose each provider's own tools**: gives the agent each usable provider's own tools (for example Brave news or image search, or Exa's find-similar) rather than one tool per role. This uses more of the context window.
-
-Keys are stored in `config.toml`. When secret encryption is on, OpenHuman stores them as ciphertext. The OS keyring protects the master encryption key, not the provider keys themselves.
-
-### Configuration file and environment
-
-The same settings live under `[search]` in `config.toml`:
-
-```toml
-[search]
-enabled = true
-
-[search.providers.exa]
-enabled = true
-route = "managed"
-
-[search.providers.brave]
-enabled = true
-route = "direct"
-
-[search.roles]
-search = ["brave", "exa"]
-
-[search.brave]
-api_key = "your-brave-api-key"
-```
-
-Do not commit a plaintext API key. A key entered directly in `config.toml` stays plaintext until OpenHuman next saves the configuration with secret encryption on.
-
-Environment overrides:
-
-| Variable | Effect |
-| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
-| `OPENHUMAN_SEARCH_ENABLED` | Turns search on or off. |
-| `OPENHUMAN_SEARCH_PROVIDERS` | Replaces the provider set, for example `exa:managed,gemini,brave`. |
-| `OPENHUMAN_SEARCH_ROUTES` | Changes routes, for example `exa=direct,gemini=managed`. |
-| `OPENHUMAN_SEARCH_ROLES` | Sets role orders, for example `search=brave\|exa;answer=gemini`. |
-| `OPENHUMAN_EXA_API_KEY`, `OPENHUMAN_GEMINI_API_KEY`, `OPENHUMAN_BRAVE_API_KEY`, `OPENHUMAN_TAVILY_API_KEY`, `OPENHUMAN_QUERIT_API_KEY`, `OPENHUMAN_PARALLEL_API_KEY`, `OPENHUMAN_SELTZ_API_KEY` | Provider keys. The unprefixed names (`EXA_API_KEY`, `GEMINI_API_KEY`, …) work too. |
-
-Treat environment-provided keys as secrets.
-
-## SearXNG over RPC and MCP
-
-Besides serving the Search role, an enabled SearXNG instance is exposed to RPC and MCP clients as `openhuman.tools_searxng_search` (`searxng_search` in the MCP catalog), which pins the call to SearXNG. Its `[searxng]` section in `config.toml` and the `OPENHUMAN_SEARXNG_*` variables (`ENABLED`, `BASE_URL`, `MAX_RESULTS`, `DEFAULT_LANGUAGE`, `TIMEOUT_SECONDS`) configure the instance.
-
-## Parallel is own-key only
-
-Parallel works only with your own Parallel key. A Parallel key saved before this change carries over on upgrade, and Parallel stays first for search if it was your chosen engine. A setup that used the included Parallel route without a key moves to the included Exa and Gemini providers. `OPENHUMAN_PARALLEL_ROUTE` is ignored.
-
-## How it differs from generic HTTP
-
-A plain `http_request` tool can fetch a URL but cannot find one. Web search finds the right URLs, and the Contents role (or the [web scraper](web-scraper.md)) reads them.
-
-## See also
-
-- [MCP Server](../../developing/mcp-server.md): how `searxng_search` appears to MCP clients.
-- [Web scraper](web-scraper.md): fetch and clean a specific URL.
-- [Token compression](../token-compression.md): search snippets are compressed before they reach the model.
diff --git a/gitbooks/features/notifications-and-activity.md b/gitbooks/features/notifications-and-activity.md
deleted file mode 100644
index 53b3cc027e..0000000000
--- a/gitbooks/features/notifications-and-activity.md
+++ /dev/null
@@ -1,82 +0,0 @@
----
-description: >-
- The notification center, the notice tray, and where background work shows
- up: what OpenHuman tells you about, and what it does while you are away.
-icon: bell
----
-
-# Notifications and activity
-
-OpenHuman shows two kinds of "what is happening". Notifications are things you should look at, like an important Slack message, a failed webhook or a high-priority email. Activity is a record of what the agent did on its own while you were not watching.
-
-Both live on the Notifications page. There is no Activity hub or Routines screen. `/activity` redirects to **Settings → Account**, and `/routines` redirects to [Workflows](workflows.md). The scheduler lives under Workflows → Schedules.
-
-## Notification center
-
-Two independent streams feed the notification center. They show as two stacked sections on the Notifications page.
-
-### Integration notifications
-
-Notifications from connected accounts (Gmail, Slack, WhatsApp, Discord and others) come in through the `notification.ingest` RPC. They are saved to a per-workspace SQLite store, then triaged by a local LLM in the background. Ingest returns immediately. Triage runs in a spawned task and fills in the score a moment later, so a new item can briefly show as unscored.
-
-Triage gives each notification an action, which maps to a fixed importance score from 0.0 to 1.0:
-
-| Triage action | Score | What it means |
-| --- | --- | --- |
-| `drop` | 0.10 | Noise, not worth surfacing |
-| `acknowledge` | 0.35 | Low value, informational |
-| `react` | 0.65 | Worth a follow-up |
-| `escalate` | 0.90 | High priority, hand to the agent |
-
-Only `react` and `escalate` are routed. `drop` and `acknowledge` stay quiet. Each item carries a one-sentence `triage_reason` explaining the call, and a status that moves from unread to read to acted to dismissed. Duplicate content received within 60 seconds collapses into one entry.
-
-### System notifications
-
-The second stream turns selected internal events into short alerts and pushes them over the socket bridge as they happen. They are saved before they are sent, so anything fired while the app was closed syncs on the next open. Each has a category and an in-app deep link:
-
-| Source event | Category | Shows when |
-| --- | --- | --- |
-| Cron job completed | Agents | Always (success or failure) |
-| Webhook processed | System | Only on failure. Successes are silent. |
-| Sub-agent finished | Agents | Always |
-| Sub-agent failed | Agents | Always |
-| Notification triaged | Agents | Only when routed (`escalate` or `react`) |
-| API key rejected | System | Always. Links to the LLM settings tab. |
-
-The categories are messages, agents, skills, system, meetings, reminders and important. The page shows filter chips only for categories present in the current feed, plus **Mark all read** and **Clear**. Clicking a notification marks it read and follows its deep link. Some system notifications have action buttons and are pinned to the top. The feed holds the most recent 200 items.
-
-### Per-provider routing and thresholds
-
-Each provider has its own settings (`notification.settings_set`), so you can tune the noise per source:
-
-| Setting | Effect |
-| --- | --- |
-| `enabled` | When off, that provider's notifications are not ingested at all. |
-| `importance_threshold` | Minimum score (0.0 to 1.0) to display. `0.0` shows everything. |
-| `route_to_orchestrator` | When on, high-importance (`react` or `escalate`) items are forwarded to the agent. |
-
-Auto-routing re-reads the provider's settings just before it escalates, so a change takes effect immediately. A notification goes to the agent only when its score clears the provider threshold and `route_to_orchestrator` is on.
-
-These per-provider settings have no UI today. Set them through the RPC or by hand. They gate ingest, not just display, so keep that in mind before changing one.
-
-## The notice tray
-
-A quiet tray in the bottom-right corner collects things you can act on: a rejected provider key, a reached plan limit, a keyring consent prompt. Repeats of the same problem bump a count instead of stacking. The tray lives in memory, so it clears on restart.
-
-Product announcements arrive separately, as a modal shown once per signed-in session. OpenHuman remembers the ids you have already seen.
-
-## Where background work shows up
-
-| Kind of background work | Where to look |
-| --- | --- |
-| Scheduled jobs and their run history | **Workflows → Schedules**. See [Cron and scheduling](native-tools/cron.md). |
-| Workflow runs | **Workflows → Runs** |
-| Memory belief builds and source syncs | **Connections → Memory → Background** |
-| Detached sub-agents and async delegation | The background inbox card in the thread that started them. See [Chat](chat.md). |
-| All of the above, as notifications | The Notifications page, Agents category |
-
-## See also
-
-- [Cron and scheduling](native-tools/cron.md): the scheduling engine and the agent tools behind the Schedules view.
-- [Triggers](integrations/triggers.md): webhooks and inbound events that can raise a notification.
-- [Chat](chat.md): where an approval or a sub-agent result lands when you are in the conversation.
diff --git a/gitbooks/features/orchestration.md b/gitbooks/features/orchestration.md
deleted file mode 100644
index 0bdc1982cb..0000000000
--- a/gitbooks/features/orchestration.md
+++ /dev/null
@@ -1,57 +0,0 @@
----
-description: >-
- OpenHuman is an orchestrator, not a chatbot: durable agent graphs, visual
- workflows, sub-agent fleets and an always-on two-agent layer.
-icon: sitemap
----
-
-# The orchestrator
-
-<figure><img src="../.gitbook/assets/orchestration.png" alt=""><figcaption><p>OpenHuman orchestrating a fleet of agents.</p></figcaption></figure>
-
-Most harnesses run one agent in one loop. OpenHuman coordinates many agents over long stretches of time, across machines. It does this durably, visibly and under your control. Four layers make that work.
-
-## 1. Graphs, not loops
-
-Every agent turn runs on [tinyagents](https://github.com/tinyhumansai/tinyagents), our open-source graph engine. Multi-step work compiles to state-machine graphs with conditional routing:
-
-- `plan → execute ⇄ review → finalize` for delegation.
-- Phase DAGs for multi-agent workflow runs.
-- Map-reduce fan-out for parallel workers.
-
-All of it is checkpointed. A graph can pause mid-run, for your answer, an approval or a restart, and resume exactly where it stopped.
-
-## 2. Sub-agent fleets that do not get lost
-
-The orchestrator spawns specialized sub-agents, up to 3 levels deep. It reuses compatible idle workers instead of spawning new ones. It also routes each worker to the right model tier: heavy reasoning for the core, and a fast burst tier for low-context workers.
-
-Reliability is built in. A no-progress circuit breaker stops loops. A stuck child hands back a `question` (pause and resume on your answer) or an `Incomplete` root-cause summary, never silence. See the [agent harness](../developing/architecture/agent-harness.md).
-
-## 3. Workflows you can see
-
-[Workflows](workflows.md) move orchestration out of the chat. The agent proposes a typed graph of triggers, agents, tools and conditions. You review it on a canvas and save it. Runs are durable, gated by approvals and inspectable step by step. They run on the open-source [tinyflows](https://github.com/tinyhumansai/tinyflows) engine.
-
-## 4. An always-on two-agent layer
-
-Inbound traffic first reaches a fast reflex agent that triages in seconds. It hands a concise brief to a deeper reasoning core, which does the multi-step work and delegates to workers. You can steer a task mid-run, because input can be delivered into a live session. 20:1 compression keeps week-long sessions bounded.
-
-## What is next
-
-Agents writing control flow as small programs in a sandboxed REPL is not being built. The harness dropped that runtime and the tool no longer exists. Graphs with checkpointing under a trust model are the shape orchestration takes.
-
-Two items are on the [roadmap](../overview/roadmap.md): an agent-to-agent protocol so a graph can span instances, and durable swarm task graphs.
-
-## How it differs
-
-| | Single-agent harnesses (Claude Code, OpenClaw, Hermes) | OpenHuman |
-| --- | --- | --- |
-| Execution model | One loop, one context | Compiled graphs, conditional routing, checkpoint and resume |
-| Parallelism | Manual or plugin | Native sub-agent fleets, map-reduce fan-out, worker reuse |
-| Automation | Scripts and cron | Visual, durable, approval-gated workflows |
-| Always-on | None | Reflex agent plus reasoning core, mid-task steering |
-
-## See also
-
-- [Workflows](workflows.md)
-- [Agent harness](../developing/architecture/agent-harness.md): the developer deep dive on graphs, breakers and journals.
-- [Agent coordination tools](native-tools/agent-coordination.md): the spawn and delegate surface.
diff --git a/gitbooks/features/os-keyring-and-secret-storage.md b/gitbooks/features/os-keyring-and-secret-storage.md
deleted file mode 100644
index a09b27e57c..0000000000
--- a/gitbooks/features/os-keyring-and-secret-storage.md
+++ /dev/null
@@ -1,129 +0,0 @@
----
-description: >-
- How OpenHuman uses the OS keyring to protect local secrets, what stays
- encrypted on disk, and what the consent prompt asks.
-icon: key
----
-
-# OS keyring and secret storage
-
-The OpenHuman desktop app uses your operating system's secure credential store to protect the master key for local secrets:
-
-- **macOS:** Keychain
-- **Windows:** Credential Manager
-- **Linux:** Secret Service (libsecret)
-
-This is the root of trust for local secrets. OpenHuman does not keep user credentials in a plaintext `.env` file or a plaintext config file.
-
-## What goes into the keyring
-
-The keyring holds two kinds of secret.
-
-**Credential entries.** In the desktop app, locally stored provider API keys, session and bearer tokens, and wallet secret material use user-scoped credential slots. By default, these slots live in the encrypted `secrets.enc` file, protected by the master key in the OS keyring. The explicit `OPENHUMAN_KEYRING_BACKEND=os` setting stores the slots directly in the platform keyring, under OpenHuman's own namespace.
-
-**The master encryption key.** Some sensitive values must live inside local files, because the app's configuration is file-based. OpenHuman splits the storage. The secret value is stored on disk as encrypted ciphertext. The master key that decrypts it lives in the OS keyring. Your config and state files can hold encrypted values without the decryption key sitting next to them.
-
-## What stays encrypted on disk
-
-When OpenHuman saves a sensitive setting locally, it writes the ciphertext to disk and keeps the key in the keyring. That covers:
-
-- BYO API keys for supported providers.
-- Channel and webhook secrets stored in local config.
-- Other locally saved secret settings that desktop features need.
-
-The encryption is authenticated, so OpenHuman detects tampering instead of silently accepting changed ciphertext. In short: the key is in the keyring, the ciphertext is in the file, and plaintext exists only in memory when needed.
-
-## Why this beats plaintext config
-
-Plaintext secrets in config files are a risk if you have a workspace backup, a sync folder or a support bundle. With the keyring as the root secret store:
-
-- You can copy config files without exposing raw credentials.
-- Accidental log or file inspection is less likely to reveal secrets.
-- The decryption key belongs to the platform's credential system, not to a plaintext file the app manages.
-
-This does not replace full-disk encryption or OS account security. It is a narrower, stronger way to handle application secrets.
-
-## Managed integrations and local secrets
-
-In the default managed integration flow, the OpenHuman backend handles third-party OAuth tokens. Your app does not need to keep those provider tokens in plaintext on your machine.
-
-When you choose a bring-your-own-key or direct-mode path, OpenHuman treats those credentials as local secrets. It protects them with the OS keyring and encrypted local storage where needed.
-
-## Migrating from older installs
-
-Older versions could keep local encryption material in a file. Current desktop builds move that material into the OS keyring and keep the encrypted values on disk. You do not need to re-enter your secrets.
-
-## When the keyring is unavailable
-
-Sometimes the keyring cannot be reached. On Linux that can mean no Secret Service daemon. On macOS it can mean keychain access was denied. When that happens, OpenHuman stops and asks before it falls back to local encrypted storage.
-
-1. **Detection.** On startup the core probes the OS keychain. If the probe fails, it classifies the reason (no daemon, locked, denied) and reports a structured `KeyringStatus` through the `openhuman.keyring_consent_status` RPC and the app snapshot.
-2. **Consent prompt.** The first time a secret must be read or written without recorded consent, a modal explains what happened, what "store locally" means and the risks. You can choose:
- - **Use Local Encrypted Storage:** consent to ChaCha20-Poly1305 encrypted files. The master key is also on disk.
- - **Retry OS Keychain:** probe again, which helps after you grant OS permission.
- - **Skip:** decline local storage. Features that need secrets will be unavailable.
-3. **Saved choice.** Your choice is recorded in `app-state.json` (the `keyringConsent` field) and cached in the process. The app probes again on each launch and asks again if the keyring becomes available after a local-only session.
-4. **Settings.** **Settings → Security** shows the active storage mode, keychain availability and failure reason, with buttons to retry or change consent.
-
-### One fallback policy
-
-Auth profiles, config secrets, the wallet mnemonic and the `secrets.enc` backend all call `keyring_consent::policy::check_secret_access()` instead of checking `is_available()` directly. No code path switches storage modes silently.
-
-| Policy decision | Meaning |
-| --- | --- |
-| `Proceed` | The OS keyring is available, or you consented to local encrypted storage. |
-| `ConsentRequired` | The keyring is unavailable and there is no consent yet. Block and prompt. |
-| `Declined` | You refused local storage. Skip the secret operation. |
-
-## Embedded and server hosts
-
-Desktop, CLI and TUI hosts install the OS keychain providers through
-`openhuman-rpc`'s `os-keyring` feature before starting the core. The service
-name (`openhuman`) and master-key account (`app:master_key`) are unchanged,
-so existing desktop workspaces continue to decrypt with the same key.
-
-The core owns the platform-independent `security::secret_storage` module:
-user-scoped secret access, encrypted files, and master-key resolution. RPC owns
-`keyring`, the native OS providers, and installs them through core's `SecretBackend`
-and `MasterKeySource` contracts.
-
-The core and embedded library default to `MemoryBackend`: a thread-safe,
-unencrypted map held only in the process. It needs no OS keychain, master key,
-or secrets file. Secrets disappear when the process exits. Use it for ephemeral
-library runtimes; choose persistent storage when credentials must survive a restart.
-
-Embedders can install a provider before boot through
-`openhuman_embed::secret_storage::install_secret_backend(Arc::new(provider))`.
-The same facade exposes `MemoryBackend`, `EncryptedFileBackend`, `SecretBackend`
-and `SecretStorageError`. The provider is process-wide, matching the one-runtime
-contract; install it before building the runtime.
-
-CLI, desktop and TUI hosts explicitly retain encrypted-file storage by default.
-With native support enabled, its master key stays in the OS keychain. A host
-without that support creates `{workspace}/keyring/master.key` instead (Unix mode
-`0600`). Back up that key with the workspace.
-
-`OPENHUMAN_KEYRING_BACKEND=memory` selects the basic volatile backend explicitly;
-`file` selects the plaintext debug file, `encrypted_file` selects persistent
-encrypted storage, and `os` requires RPC's native provider. Installed providers
-win over environment selection.
-
-For encrypted storage, an operator can supply `OPENHUMAN_KEYRING_MASTER_KEY`
-(64 hex characters) or `OPENHUMAN_KEYRING_MASTER_KEY_FILE`. Set exactly one.
-Environment keys take precedence over a host source, then the workspace key file.
-An inaccessible host key never falls back to a newly created file key.
-
-### Moving a desktop workspace to a server
-
-A desktop workspace encrypted with an OS keychain key needs that same key
-when opened by a host without OS keychain support. Supply it through the
-master-key environment or file option before boot. A newly generated
-workspace key cannot decrypt the desktop ciphertext. Unreadable
-`secrets.enc` files are quarantined as `secrets.enc.corrupt.<timestamp>`
-for recovery rather than overwritten; keep the original key and backups.
-
-## See also
-
-- [Privacy and security](privacy-and-security.md)
-- [Third-party integrations](integrations/README.md)
-- [Local AI (optional)](model-routing/local-ai.md)
diff --git a/gitbooks/features/personalization.md b/gitbooks/features/personalization.md
deleted file mode 100644
index 346def258a..0000000000
--- a/gitbooks/features/personalization.md
+++ /dev/null
@@ -1,31 +0,0 @@
----
-description: >-
- How OpenHuman learns your preferences from everyday use: learnings in memory,
- the memory pack recalled for each turn, and your persona files.
-icon: brain
----
-
-# Personalization and self-learning
-
-OpenHuman gets to know you through [memory](memory.md), not a settings form. Three things shape how it treats you, and you can see and edit all of them.
-
-## Learnings
-
-A learning is one durable statement: a preference, fact, procedure or correction, such as "prefers pnpm" or "never schedule meetings before 10". The agent saves one with its `memory` tool (the `learn` action) when you state or correct something worth keeping. You can add your own on **Connections → Memory → Learnings**. Each learning records where it came from (workspace, thread, agent and tool call). Delete any learning there, or ask the agent to forget it.
-
-Learnings live in your selected memory engine, so memory has to be on (see [Engines](memory.md#engines)). Secrets and personal identifiers are scrubbed before storing.
-
-## The memory pack
-
-Before every turn, OpenHuman recalls a short, token-budgeted memory pack. It holds relevant learnings (and beliefs the engine built from them), documents from your brain, this agent's earlier conversations and, briefly, other agents' turns.
-
-The pack goes into that turn's model request only. It is never written into the chat. So the agent follows your preferences without being asked, and the prompt cache is unaffected. Preview the pack on **Connections → Memory → Ask**. See [How the agent uses memory](memory.md#how-the-agent-uses-memory).
-
-## Persona files
-
-How the agent presents itself is separate from memory. It comes from `SOUL.md`, `IDENTITY.md` and `ROLE.md` in your workspace. These are plain Markdown files you edit directly.
-
-## See also
-
-- [Memory](memory.md): the engines, sources and tabs behind all of this.
-- [Memory tools](native-tools/memory-tools.md): how the agent recalls and learns.
diff --git a/gitbooks/features/platform.md b/gitbooks/features/platform.md
deleted file mode 100644
index 2b6c4a011f..0000000000
--- a/gitbooks/features/platform.md
+++ /dev/null
@@ -1,81 +0,0 @@
----
-description: >-
- What OpenHuman ships as (a native desktop app with a Rust core), which
- platforms it supports, and how it behaves offline and when updating.
-icon: layer-plus
----
-
-# Platform and availability
-
-OpenHuman is a native desktop app. It is not a browser extension or an Electron wrapper. It is built on React and Tauri v2 with a Rust core, so it ships small, starts fast and stays out of the way.
-
-## Supported platforms
-
-| Platform | Architectures | Distribution |
-| --- | --- | --- |
-| macOS | Intel, Apple Silicon | `.dmg` installer, Homebrew cask (can lag a release) |
-| Windows | x64 | `.msi` or `.exe` installer |
-| Linux | x64, ARM64 | `.deb`, AppImage |
-
-Download from [tinyhumans.ai/openhuman](https://tinyhumans.ai/openhuman) or the [latest release](https://github.com/tinyhumansai/openhuman/releases/latest), or use the install scripts, which check the release's SHA-256. See [INSTALL.md](https://github.com/tinyhumansai/openhuman/blob/main/INSTALL.md).
-
-### Linux AppImage notes
-
-On Debian and Ubuntu the install script picks the `.deb`. Elsewhere it picks the AppImage. On newer distributions that tighten unprivileged user namespaces or AppArmor defaults, the AppImage can fail before OpenHuman reaches its own crash reporter. Known symptoms are:
-
-- `unshare: write failed /proc/self/uid_map: Operation not permitted`
-- `Interpreter not found!`
-- `cannot execute binary file`
-
-If that happens on Debian or Ubuntu, use the `.deb`. On Fedora, openSUSE and other distributions, include the distro version, kernel version, GPU and driver stack, and the exact AppImage filename when you report the problem. That helps maintainers tell host restrictions from a bad AppImage runtime.
-
-## Why native matters
-
-Native beats a web wrapper for three reasons.
-
-Small footprint. It is a fraction of the size of typical communication tools and uses little memory.
-
-Fast startup. There is no browser engine to initialize, so it accepts requests right away.
-
-OS-level security. Credentials live in your platform's secure keychain: macOS Keychain, Windows Credential Manager or Linux Secret Service. Sensitive data never sits in browser storage or plain text files. Memory items live in the engine you select.
-
-## Architecture at a glance
-
-```text
-┌────────────────────────────────────────────────────────┐
-│ Tauri shell (Wry) · windowing, OS integration, IPC │
-│ ┌──────────────────────────────────────────────────┐ │
-│ │ Rust core, in-process (no sidecar) │ │
-│ │ • Memory, integrations, source sync │ │
-│ │ • Model router, TokenJuice, native tools │ │
-│ │ • Voice (STT in, TTS out, live voice agent) │ │
-│ └──────────────────────────────────────────────────┘ │
-└────────────────────────────────────────────────────────┘
- ▲ JSON-RPC over loopback HTTP
- │
-┌────────────────────────────────────────────────────────┐
-│ React frontend · screens, navigation │
-└────────────────────────────────────────────────────────┘
-```
-
-The shell handles windowing, process lifecycle and IPC. All product logic lives in the Rust core, which runs as a tokio task inside the shell process, not as a separate binary. The React frontend talks to it over JSON-RPC on loopback. See [Architecture](../developing/architecture/README.md) for more.
-
-## Remote and headless use
-
-A Linux server can host the Rust core without a desktop session. In production, you run a remote `openhuman-core` JSON-RPC service and point a local desktop client at its URL with a bearer token.
-
-For development and preview, you can serve the Vite frontend as a private browser UI that points at the remote core. It does not replace the desktop shell. Native deep links, tray controls, OS keychain access, the native iMessage scanner, and screen and window integrations still need the Tauri app. See [Cloud deploy](cloud-deploy.md#remote-ui-choices) for the remote UI setup.
-
-## Real-time communication
-
-The desktop app keeps a persistent connection to the OpenHuman backend. Responses stream as they are generated, so output appears progressively. If the network drops, the app reconnects automatically with increasing backoff.
-
-## Offline behavior
-
-Your local state stays on your device. Preferences, settings and connected-source configurations remain available offline, and your workspace files stay readable. The [memory engine](memory.md) needs a connection unless you point CortexDB at a local endpoint.
-
-Source sync and live LLM calls need a connection. When the network returns, the next scheduled sync picks up where it left off.
-
-## Auto-update
-
-The desktop shell updates itself through Tauri's updater plugin, using a manifest published on GitHub Releases. The core is linked into the shell, so one update upgrades both. Details, including the retry policy and why a signature failure is never retried, are in [Auto-update](../overview/auto-update.md).
diff --git a/gitbooks/features/privacy-and-security.md b/gitbooks/features/privacy-and-security.md
deleted file mode 100644
index 9a3381b7d4..0000000000
--- a/gitbooks/features/privacy-and-security.md
+++ /dev/null
@@ -1,101 +0,0 @@
----
-description: >-
- Where your memory is stored, what stays on your machine, what the backend
- brokers, and which protections are on by default.
-icon: shield
----
-
-# Privacy and security
-
-Your workspace files, settings and audio buffers stay on your machine. Your memory does not. Memory items are stored in CortexDB, either the hosted CortexDB that TinyHumans runs for you or a CortexDB you point OpenHuman at. The OpenHuman backend brokers the rest of what has to leave the device: LLM calls, OAuth tokens, search proxying and hosted memory.
-
-## Privacy by design
-
-**You choose where memory lives.** [Memory](memory.md) is stored by the engine you select: hosted TinyHumans (CortexDB behind the OpenHuman backend, which needs sign-in) or your own CortexDB endpoint. With neither, memory is off and nothing is stored. Secrets and personal identifiers are scrubbed from every item before it is sent. Tool-call arguments are never stored. You can delete any item. See [Where your memory is stored](#where-your-memory-is-stored).
-
-**Integration tokens stay with the backend, not your laptop.** OAuth tokens are never written to your disk in plaintext. The OpenHuman backend brokers each integration request, and the core never talks to a third-party API directly.
-
-**OS-level credential storage.** Sensitive local secrets are rooted in your platform's secure keychain: macOS Keychain, Windows Credential Manager or Linux Secret Service. See [OS keyring and secret storage](os-keyring-and-secret-storage.md).
-
-**No training on your data.** Your conversations, memories and personal information are never used to train AI models or improve systems.
-
-**Optional [local AI](model-routing/local-ai.md).** To keep embeddings and summary-tree building on your machine, run a local runtime such as Ollama, pull the models yourself and add it as a provider. Learning and reflection passes, and chat if you choose, can move on-device the same way. OpenHuman does not install the runtime or download models.
-
-## What stays on your machine
-
-| Item | Where it lives |
-| --- | --- |
-| Committed memory items | Stored in CortexDB by your selected engine (see below). A CortexDB you host on your own machine keeps them there. Pending agent writes are held locally until delivery. |
-| Memory bookkeeping and pending writes | Local: scrubbed agent `learn`/`forget` requests await delivery in a private outbox under `<workspace>/memory/`, alongside job queues and sync, backfill and import progress. Sources are listed in `config.toml`; the CortexDB key is kept in the OS keychain. Automatic context packs stay in process memory briefly. |
-| Audio capture buffers | Local. Discarded after speech-to-text. |
-| Local model state | Local. |
-
-## Where your memory is stored
-
-Memory items are your brain documents, logged conversation turns, learnings, and the facts and beliefs the engine builds from them. They are stored in CortexDB, never in a database on your machine. Which CortexDB depends on the engine:
-
-| Engine | Path | Who can reach it |
-| --- | --- | --- |
-| TinyHumans (hosted) | The core sends each request over TLS to the TinyHumans backend's `/memory/*` routes, authenticated with your session or TinyHumans API key. The backend applies a per-user rate limit and billing, then forwards to a CortexDB proxy that places every scope under your own tenant root. | Only your account. The proxy derives the tenant from your credential, not from the request, so one user cannot read or write another's memory. TinyHumans operates the service. |
-| CortexDB (direct) | The core calls CortexDB itself (`api-v1.cortexdb.ai`, or a self-hosted endpoint) with your own CortexDB API key, kept in the OS keychain. It does not go through the TinyHumans backend. | Whoever holds that key, and the operator of that endpoint. |
-
-Inside either engine, memory sits below a root derived from the active config identity: `org:<id>` for a TinyHumans account, or `org:local-<digest>` for a local identity. On hosted memory this is the tenant root the backend pins, so paths read `org:<id>/ws:main/…`. That way memory can be listed, confined and erased as one tree. Your agents share learnings and the brain. Each agent's conversations are tagged with that agent.
-
-We claim only TLS in transit and per-user tenant isolation for hosted memory. These docs do not promise end-to-end or client-side encryption. The hosted service can read what it stores, which is how it answers recall.
-
-### Deleting memory
-
-- **One item:** use **Forget** in the Memory page's **Explorer**, on a memory chip under an answer, on the **Learnings** tab, or through the agent's `memory` tool (`forget`).
-- **One source:** use **Forget source** on the **Brain** tab, or tick **Also delete memory from this source** when you disconnect an integration.
-- **Everything:** call the `openhuman.memory_erase_all` RPC (`{"confirm": true}`). It erases all memory the selected engine holds, for good. On hosted memory it calls the backend's `DELETE /memory`, which erases your whole tenant. On a direct CortexDB it erases your own `org:<id>` tree (and the earlier `user:<id>` tree while it is still read). Memory written there before the per-user layout, which other accounts on a self-hosted CortexDB may share, is left for you to delete through your CortexDB account or endpoint. The **Settings** tab of the Memory page has an **Erase memory** card that calls the same RPC after you confirm.
-
-Signing out does not delete stored memory. Neither does disconnecting an integration, unless you tick that box.
-
-## What the OpenHuman backend handles
-
-| Area | What the backend does |
-| --- | --- |
-| LLM calls | Proxies them under one subscription, then forwards to the underlying provider (Anthropic, OpenAI, Google and others) per the [model router](model-routing/README.md). |
-| Web search proxy | The native [web search tool](native-tools/web-search.md) can use the backend proxy, so you do not carry a search API key. Only Exa and Gemini have a managed route. Brave, Querit, Tavily, Seltz, Parallel, TinyFish and Gemini Deep Research are bring-your-own-key and go directly to that provider. SearXNG goes to the instance you configured. With Tavily selected, the `tavily_extract` tool also sends extraction requests, including the URLs being extracted, directly to Tavily. |
-| Integration OAuth and tool proxy | Stores tokens and brokers rate-limited requests for [the connected integrations](integrations/README.md). |
-| TTS streaming | Streams hosted [text-to-speech](native-tools/voice.md) audio. Audio is generated and discarded, not kept. |
-
-## Permissions and access control
-
-OpenHuman accesses an integration only after you complete its OAuth flow. Each connection has its own scope, and you can revoke any of them at any time from the **Connections** page.
-
-[Memory sources](memory.md) sync on a schedule while they exist. Integration sync is bound by:
-
-- The OAuth scope you granted that integration.
-- A per-provider sync interval (for example, Gmail every 15 minutes by default).
-- A daily budget per connection that caps API usage.
-
-If you revoke a connection, the next sync stops. Items already stored in your memory engine remain until you forget them.
-
-## Why memory is scrubbed and scoped
-
-Memory only helps if it is safe to keep. Every item goes through secret and PII scrubbing before it is stored. Conversations record tool-call names and ids but never arguments. The agent only sees what a recall or fetch returns at the moment of a turn. You can inspect and delete items from **Connections → Memory** (see [Deleting memory](#deleting-memory)). Scrubbing and scoped retrieval together form the privacy architecture.
-
-## Security
-
-**Encrypted in transit.** All communication between the app and the OpenHuman backend uses TLS. So do hosted memory requests and direct calls to CortexDB's managed API. A self-hosted CortexDB endpoint is only as protected as the URL you configure.
-
-**Key in keyring, ciphertext on disk.** For local secrets that must be saved in app files, OpenHuman stores encrypted ciphertext on disk and keeps the master decryption key in the OS keyring. See [OS keyring and secret storage](os-keyring-and-secret-storage.md).
-
-**Sandboxed execution.** Shell commands and code the agent runs go through a sandbox backend chosen per session: none, the OS jail (Landlock on Linux, Seatbelt on macOS), or a Docker container with no network, dropped capabilities and a read-only root filesystem by default. Skills are not sandboxed separately. A skill runs as its own agent session under the same execution policy as any other turn.
-
-**Working-folder-scoped tools.** The native [filesystem tools](native-tools/coder.md) act inside the agent's working folder. That confinement is part of the autonomy policy, which is off by default. Until you set `[autonomy] enabled = true`, it is not enforced. What is enforced either way is the hard floor: credential stores and system roots. See [Approval gate](approval-gate.md).
-
-**Short-lived tokens.** Authentication tokens between the app and the backend are time-limited.
-
-## Trust and risk signals
-
-OpenHuman has an intelligence layer that helps you judge credibility, information quality and risk across your connected sources.
-
-- **Scam and impersonation signals.** Patterns associated with scams, impersonation or coordinated abuse can surface as warnings. Signals come from patterns, not from sharing individual message content.
-- **Contextual trust.** Trust is contextual. Credibility in one domain does not automatically carry over to another. OpenHuman represents trust through aggregated artifacts and historical accuracy rather than static scores.
-- **Advisory only.** Trust and risk outputs inform your judgment. OpenHuman does not ban users, remove messages or enforce moderation decisions.
-
-## Shared environments
-
-In team or community settings, privacy stays user-centric. Each user's connected sources are scoped to their account, and admins get no backdoor into other users' memory. Community-level intelligence comes from aggregated, anonymized signals, never from direct access to individual message content.
diff --git a/gitbooks/features/privacy-mode.md b/gitbooks/features/privacy-mode.md
deleted file mode 100644
index fdc84a3ad8..0000000000
--- a/gitbooks/features/privacy-mode.md
+++ /dev/null
@@ -1,60 +0,0 @@
----
-description: >-
- One switch, enforced in the Rust core. Local-only mode blocks cloud model
- calls, network tools, web search, integrations and cloud embeddings, and
- allows only on-device runtimes. Voice is the exception, because there is no
- local speech-to-text engine.
-icon: lock
----
-
-# Privacy mode
-
-Most assistants' privacy story is a paragraph in a system prompt. OpenHuman's is an enforcement point in the Rust core.
-
-The `[privacy]` config block defines three modes:
-
-| Mode | What it means |
-| --- | --- |
-| `standard` (default) | Normal operation. Managed cloud routing, BYO providers and local models are all available. |
-| `local_only` | No inference leaves the device. Every external chat provider is refused when it is built: the managed cloud, BYO cloud keys, even CLI delegates like Claude Code. Network tools, web search, integrations and cloud embeddings are refused at their egress points. Only local runtimes pass: Ollama, LM Studio, MLX and local OpenAI-compatible endpoints. Voice is the one exception, because no local speech-to-text engine exists. |
-| `sensitive` | The base for an upcoming PII-aware tier (detection, redaction, destination disclosure). Today it behaves like `standard`. |
-
-## Why enforcement matters
-
-Privacy mode is not a policy the model is asked to follow. The first check lives in the inference provider factory (`crates/openhuman-core/src/inference/provider/factory/`). Under `local_only`, the core refuses to build an external provider at all. The error names the blocked provider and tells you how to fix it: switch to a local model, or change the mode in Settings.
-
-That makes the guarantee independent of prompts, agents, tools or upstream bugs. If any code path tries to reach a cloud model in local-only mode, it cannot get a client.
-
-`local_only` is also enforced at the egress points where the agent sends your data anywhere else (`crates/openhuman-core/src/security/egress/enforce.rs`):
-
-| Egress point | Behavior under `local_only` |
-| --- | --- |
-| Network tools (`http_request`, `web_fetch`, `curl`) | Refused, with a policy-blocked message in the tool result |
-| Web search (Exa, Tavily) | Refused the same way |
-| Composio tool calls and integration requests | Refused with an error |
-| Cloud embeddings | Refused with an error |
-| Local runtimes (Ollama, LM Studio, MLX, local OpenAI-compatible) | Always permitted, nothing leaves the device |
-
-One deliberate exemption: backend control-plane round-trips keep flowing. These are sign-in, session, team, billing, and integration connection management and catalog reads. Blocking them breaks the app for no privacy gain. They carry auth tokens, ids and routing metadata, never user content.
-
-Voice is not covered. There is no local speech-to-text engine, so dictation and transcription still leave the device under `local_only`. They go to the hosted OpenHuman STT proxy, or to whichever third-party STT provider you configured. If that matters for your threat model, leave voice off.
-
-Privacy mode governs data egress. It is separate from the [autonomy tiers](approval-gate.md) (readonly, supervised, full), which govern what the agent may do. You can run a fully autonomous agent that never sends a byte of inference off-device.
-
-## Pairing it with local models
-
-Local-only mode works with [local AI](model-routing/local-ai.md). OpenHuman does not install runtimes or download models, so you set these up yourself before turning it on:
-
-- Chat and reasoning on a runtime you run (Ollama, LM Studio, MLX, OMLX, or another OpenAI-compatible server), with the models you pulled, added as a provider under **Connections → LLM**.
-- Piper text-to-speech, if you install the Piper binary and a voice yourself and set `PIPER_BIN`.
-- Memory on a CortexDB endpoint you run yourself. The hosted TinyHumans engine is a cloud call, so local-only mode blocks it.
-
-With local-only on, a workload routed to a runtime that is not running, or to a model you have not pulled, fails instead of falling back to the cloud.
-
-See [Use OpenHuman with a local model](../guides/local-model.md) for a full local setup, and [Keep sensitive data private](../guides/privacy-sensitive-data.md) for a broader privacy walkthrough.
-
-## See also
-
-- [Privacy and security](privacy-and-security.md): the full trust model (approval gate, sandboxing, path roots, command classification).
-- [OS keyring and secret storage](os-keyring-and-secret-storage.md): where credentials live.
-- [Local AI](model-routing/local-ai.md): the on-device model runtimes.
diff --git a/gitbooks/features/settings.md b/gitbooks/features/settings.md
deleted file mode 100644
index a021ca4266..0000000000
--- a/gitbooks/features/settings.md
+++ /dev/null
@@ -1,82 +0,0 @@
----
-description: >-
- What each Settings panel controls, where the autonomy tier lives, and which
- old addresses now redirect into Connections.
-icon: gear
----
-
-# Settings
-
-Settings is a two-pane screen with a grouped rail on the left and one panel on the right. It holds what changes how the app behaves. What the agent can reach lives in [Connections](connections.md), and most of the old settings addresses for those now redirect there.
-
-Open it with the gear in the sidebar header, or `⌘,`.
-
-## The groups
-
-### General
-
-| Panel | What it controls |
-| --- | --- |
-| Account | Who you are signed in as, your plan and usage, team, devices, notifications and language. |
-| Privacy | [Privacy mode](privacy-mode.md) and what may leave the machine. |
-| Migration | Moving your data folder, and importing from an earlier version. |
-| Core | Point the app at a core running somewhere else: its RPC URL, a bearer token and a live reachability check. |
-| Feedback | Send feedback from inside the app. |
-| About | Version, build, licenses and the capability catalog. |
-
-### Appearance
-
-| Panel | What it controls |
-| --- | --- |
-| Appearance | Font size (including a custom pixel value), layout corners and borders, and language. |
-| Theme Studio | Theme family and variant, per-token colors, per-role fonts, backdrop and your own saved themes. See [Themes](theming.md). |
-| Personality | The editable `SOUL.md` prompt and its companion identity file. See [Personalization](personalization.md). |
-| Face | Which mascot, its colors, a second "duo" mascot, a custom image and its voice. See [The mascot](mascot/README.md). |
-
-### Security
-
-| Panel | What it controls |
-| --- | --- |
-| Keychain | The OS keyring, consent, and what is encrypted at rest. See [OS keyring and secret storage](os-keyring-and-secret-storage.md). |
-| Agent access | Trusted roots and their read or write grant, the always-allow list, the blanket auto-approve switch, action and tool timeouts, the workspace-only switch and the tool-call dialect. |
-| Sandbox | Which sandbox backend a session gets, and its limits. |
-| Approval history | The audit trail of approval decisions and their outcomes. |
-
-## Where the autonomy tier is
-
-It is not in Agent access, which is where most people look first.
-
-The tier (`readonly`, `supervised` or `full`) has no control in the normal settings navigation. The panel with the radios is developer-only and reachable only as a hidden deep link, so it does not appear in the sidebar. Set the tier in `config.toml`:
-
-```toml
-[autonomy]
-enabled = true # off by default; nothing below applies until this is true
-level = "supervised"
-```
-
-`[autonomy] enabled` is `false` out of the box. Until you turn the policy on, the trusted roots, the always-allow list and the workspace-only switch in Agent access do nothing. [Approval gate](approval-gate.md) explains the whole model, including what stays enforced either way.
-
-## Redirects
-
-The panels moved into [Connections](connections.md), and the old addresses still work. Many more settings routes redirect than render. The main ones:
-
-| Old address | Now |
-| --- | --- |
-| `/settings/llm`, `/settings/embeddings`, `/settings/voice`, `/settings/search` | Connections, the matching API-keys tab |
-| `/settings/agents/*`, `/settings/tools` | Connections → Tools |
-| `/settings/memory-*`, `/settings/intelligence` | Connections → Memory |
-| `/settings/mcp-server`, `/settings/skills-runner` | Connections → MCP Servers, Connections → Skills |
-| `/settings/wallet-balances` | Connections → Wallet Balances |
-| `/settings/cron-jobs` | Workflows → Schedules |
-| `/settings/automations` | Workflows |
-| `/settings/team`, `/settings/billing`, `/settings/notifications`, `/settings/devices`, `/settings/language` | Settings → Account |
-
-## Not here yet
-
-Settings has no search. Notification categories gate which events are ingested, but the page that edited them is gone, so they are config-only today.
-
-## See also
-
-- [Connections](connections.md): everything the agent plugs into.
-- [Approval gate](approval-gate.md): the autonomy policy these panels configure.
-- [Privacy and security](privacy-and-security.md): the posture behind the privacy panel.
diff --git a/gitbooks/features/theming.md b/gitbooks/features/theming.md
deleted file mode 100644
index 50dd9e202e..0000000000
--- a/gitbooks/features/theming.md
+++ /dev/null
@@ -1,148 +0,0 @@
----
-description: >-
- Five theme families with light, dark and auto variants, a Theme Studio for
- colors, fonts and backdrops, and Appearance controls for text size, corner
- rounding and borders.
-icon: palette
----
-
-# Themes and Theme Studio
-
-You can re-skin OpenHuman at runtime. Every change applies instantly, is saved locally and needs no restart.
-
-The controls sit in two places:
-
-| Page | What you set there |
-| --- | --- |
-| Settings → Appearance (`/settings/appearance`) | Text size, corner rounding, border contrast, per-area borders |
-| Settings → Theme Studio (`/settings/theme`) | Theme family, light, dark or auto, every color token, fonts per role, the backdrop and custom-theme management |
-
-## Built-in themes
-
-Five families ship in `app/src/lib/theme/presets.ts`, each with a light and a dark variant:
-
-| Family | Feel | Default variant |
-| --- | --- | --- |
-| Classic | The default OpenHuman look. | Light |
-| Ocean | Cool blues. | Light |
-| Sepia | Warm and paper-like, set in a serif. | Light |
-| Matrix | High-contrast green on black, set in a monospace. | Dark |
-| HAL 9000 | Deep black with a red accent. | Dark |
-
-Each family is applied as Light, Dark or Auto. Auto follows your operating system's `prefers-color-scheme` and re-applies the moment you switch the OS between light and dark, with no reload.
-
-Classic has no color or font overrides of its own on purpose. It is the palette in `app/src/styles/tokens.css`, chosen by the light and dark switch alone.
-
-## Colors
-
-The Theme Studio exposes every color token, grouped as Surfaces, Text, Borders and Accent colors. The four accent ramps (primary, sage, amber, coral) show their `500` shade by default and expand to all eleven shades from `50` to `950`.
-
-Each token is stored as a space-separated RGB channel triple such as `255 255 255`, not a hex string. Tailwind wraps every token as `rgb(var(--token) / <alpha-value>)`, so opacity modifiers like `bg-surface/50` keep working. The reasoning is at the top of `app/src/styles/tokens.css`.
-
-A contrast warning appears when the luminance gap between `content` and `surface-canvas` falls under 0.2. It is advisory and does not block the change.
-
-## Fonts
-
-Each of five roles can take a different font family:
-
-| Role | Used for |
-| --- | --- |
-| `title` | Display and brand type |
-| `heading` | Section headings |
-| `body` | Everything else |
-| `mono` | Code and fixed-width output |
-| `serif` | Serif passages |
-
-All five pick from the same six choices in `app/src/lib/theme/tokens.ts` (`FONT_CHOICES`): Inter, Cabinet Grotesk, System UI, Newsreader (serif), Georgia (serif) and JetBrains Mono. A role whose stored stack matches no choice shows a disabled Current entry instead of silently switching to another font.
-
-Cabinet Grotesk is not bundled, so every stack naming it resolves to Inter. The name stays so the intended stack is still readable. See the note in `app/src/styles/tokens.css`.
-
-## Backdrop
-
-Three kinds, set in the Theme Studio's Background card:
-
-| Kind | What it paints |
-| --- | --- |
-| `solid` | Nothing of its own: the themed body colour shows through. The default. |
-| `mesh` | An animated, theme-tinted WebGL mesh gradient. |
-| `image` | A cover image from a URL you supply. |
-
-No built-in preset sets a backdrop, so every family starts on `solid` and the animated shader is opt-in.
-
-## Text size
-
-Four tiers, applied as an inline `font-size` on the root `<html>` element so everything rem-based scales with it:
-
-| Tier | Size |
-| --- | --- |
-| Small | 14px |
-| Medium | 16px (default) |
-| Large | 18px |
-| Extra large | 20px |
-
-A Custom size number field and slider take any whole pixel value. `clampFontSizePx` in `app/src/store/themeSlice.ts` clamps it to 12px to 28px, so you can go denser than Small or larger than Extra large. A non-finite value falls back to 16. Picking a tier clears the custom value.
-
-## Layout
-
-Three controls in `app/src/lib/theme/layout.ts`, all under Appearance, with a Reset layout button that restores every default.
-
-Corner rounding scales Tailwind's whole radius scale (`--radius-xs` through `--radius-5xl`) by one factor:
-
-| Option | Factor |
-| --- | --- |
-| None | 0 |
-| Subtle | 0.5 |
-| Default | 1 (the variables are removed, so the stylesheet wins) |
-| Round | 1.6 |
-
-Pills and avatars use `rounded-full` rather than a radius token, so they stay round at any setting.
-
-Border contrast adjusts `--line`, `--line-strong` and `--line-subtle`, and leaves `--line-chrome` to the theme. The tokens reset before each change, so levels never compound:
-
-| Option | Effect |
-| --- | --- |
-| Subtle | Mixes the line tokens 55 percent toward the surface |
-| Default | No change. The theme's own values stand |
-| Strong | Mixes the line tokens 30 percent toward the text colour |
-
-Per-area borders turn borders off for one area at a time. They set a `data-borders-<area>="off"` attribute that `app/src/styles/layout-overrides.css` acts on. There are four areas:
-
-| Area | Covers |
-| --- | --- |
-| Cards and panels | Settings cards, grouped sections and panels |
-| Form controls | Text fields, text boxes and dropdowns |
-| Row dividers | Hairlines between rows in lists |
-| Window frame | The edge around the main content area |
-
-## Custom themes
-
-Changing any color, font or backdrop on a built-in preset forks it into a new custom theme named `<Name> (custom)` and makes that active. The preset stays untouched, so you can start from Ocean, tweak it and keep both. Forking happens once per source theme.
-
-A custom theme also offers Reset overrides (back to the preset it was forked from, or empty if it was not forked) and Delete theme, which falls back to Classic.
-
-You share themes as JSON on the clipboard, not as a file. Copy JSON puts the whole theme object on your clipboard and also shows it in a read-only text box to copy by hand. Import is a paste field. The JSON needs a `colors` object whose values are all strings (an empty one is accepted). An unrecognized backdrop kind is dropped instead of failing the import. An imported theme gets a fresh id, so importing never overwrites what you have.
-
-## How a theme is applied
-
-A theme is a set of values for the tokens in `app/src/styles/tokens.css`. `applyTheme` in `app/src/providers/ThemeProvider.tsx` writes the active theme's colors and fonts as inline `--token` custom properties on the root `<html>` element. They override the stylesheet's light and dark blocks at runtime.
-
-Presets and fully custom themes use the same mechanism. There is no per-theme stylesheet class and no `data-theme` attribute. The only class involved is `.dark`, a light and dark base selector that also keeps Tailwind `dark:` utilities aligned. Any token a theme leaves out falls through to the stylesheet defaults. Tokens set by a previous theme are cleared on each switch, so nothing leaks.
-
-Theme state persists through `redux-persist` under the `theme` key in plain `localStorage`, not `userScopedStorage`. The theme is a pre-login, whole-app preference, so it survives switching users instead of being scoped to one.
-
-## Not wired
-
-Two fields in `app/src/store/themeSlice.ts` are persisted but do nothing. Neither has a UI control or a consumer:
-
-| Field | State |
-| --- | --- |
-| `developerMode` | Has a reducer and a `selectDeveloperMode` selector, but nothing dispatches or reads either. Its doc comment points at a `useDeveloperMode` hook that does not exist. Developer Options gates on core mode instead. |
-| `tabBarLabels` | Has a reducer and no selector, so nothing can read it. |
-
-Both are in the persist whitelist, so a stale default may sit in `localStorage`. Editing either by hand has no visible effect.
-
-## See also
-
-- [Theming (contributor reference)](../developing/theming.md): the token taxonomy, Tailwind wiring and component-authoring rules.
-- [The mascot](mascot/README.md): the other large piece of OpenHuman's personality.
-- [Platform and availability](platform.md): which desktop platforms the shell ships on.
diff --git a/gitbooks/features/token-compression.md b/gitbooks/features/token-compression.md
deleted file mode 100644
index 9ae26e57bf..0000000000
--- a/gitbooks/features/token-compression.md
+++ /dev/null
@@ -1,146 +0,0 @@
----
-description: >-
- TokenJuice compacts verbose tool output before it enters the model's
- context, and keeps the full original recoverable.
-icon: file-zipper
----
-
-# Token compression
-
-LLM tokens cost money, and verbose tool output wastes most of them. A `git status` in a busy repo, a `cargo build` log, a 600-message email thread and a `docker ps -a` against a real cluster can each fill a context window for almost no information.
-
-OpenHuman ships with TokenJuice, a compression router in the agent's tool-execution path. Before a tool result reaches a model, the compiled TinyJuice module classifies it, selects a compressor, stores recoverable originals in its CCR cache when needed, and returns the compacted result. The module owns compression, CCR retrieval and querying, HTML extraction, and the schemas and request/result types in `tinyjuice-bus`. OpenHuman supplies configuration, filesystem authorization, turn-bound model calls, and savings attribution. The command and log rules come from [vincentkoc/tokenjuice](https://github.com/vincentkoc/tokenjuice).
-
-## The pipeline
-
-Every tool result takes the same path through the TinyJuice module's router:
-
-```text
-raw tool result
- │
- ▼
-1. Size gate router enabled? input ≥ min_bytes_to_compress (2 KB)?
- │ yes
- ▼
-2. Detect kind Json · Diff · Html · Search · Code · Log · PlainText
- │
- ▼
-3. Select compressor one specialized compressor per kind (+ per-kind toggles)
- │
- ▼
-4. Compress run it; if it declines or grows the output, fall back / pass through
- │
- ▼
-5. CCR eligibility lossy AND ≥ ccr_min_tokens (≈500)? → offload original to cache
- │
- ▼
-6. Append marker ⟦tj:<hash>⟧ footer so the agent can retrieve the full original
- │
- ▼
-7. Record savings tokens + cost saved, by model and by compressor
- │
- ▼
- compact text → LLM context
-```
-
-1. **Size gate.** If the router is off or the input is below `min_bytes_to_compress` (default 2048 bytes), it passes through untouched. Tiny outputs are not worth compressing.
-2. **Content detection** (`detect/kind.rs`). The result is classified into one of seven kinds. The order of precedence is an explicit hint, then a MIME or extension tag, then a per-tool prior (for example `grep` means Search, `git_operations` means Diff, `run_tests` means Log), then cheap structural heuristics (JSON, Diff, HTML, Search, Code, Log, PlainText). There is no regex on the hot path.
-3. **Compressor selection.** Each kind goes to its own compressor, honoring per-kind toggles (`search_enabled`, `code_enabled`, `html_enabled`).
-4. **Compression.** The compressor runs. If it declines or its output is no smaller than the input, TokenJuice falls back to the generic compressor or passes the original through. It never makes things bigger.
-5. **CCR offload.** When a compression is lossy and the original is large enough (`ccr_min_tokens`, default about 500 tokens), the full original goes into the Compress-Cache-Retrieve (CCR) store, so nothing is lost for good.
-6. **Recovery marker.** A footer with the marker `⟦tj:<hash>⟧` is appended. It tells the agent the view is partial and how to fetch the rest.
-7. **Savings accounting.** Tokens saved and estimated cost saved are recorded by model and by compressor.
-
-## The compressors
-
-Each content kind has a purpose-built compressor (`vendor/tinyjuice/src/compressors/`):
-
-| Compressor | Kind | What it does |
-| --- | --- | --- |
-| SmartCrusher | JSON | Re-renders arrays of objects as a compact table. Past about 40 rows it keeps the head, the tail, error rows and numeric outliers. |
-| Code | Code | Keeps signatures and imports and collapses deep function bodies to `{ … N lines … }` (tree-sitter when available, a brace-depth heuristic otherwise). Preserves `TODO`, `FIXME`, `error`, `panic` and `unsafe` markers. |
-| Log | Log | For command output, uses the JSON rule engine (below). For other logs, keeps errors, warnings, stack traces and summaries and drops the noise. |
-| Search | Search | Groups grep and ripgrep `path:line:body` hits by file, ranks by query-term density, keeps the top matches per file and tallies `[+N more]`. |
-| Diff | Diff | Keeps changed lines and hunk headers and collapses long unchanged runs to an anchor. Lockfile hunks shrink to a one-line `+A/-B` summary. |
-| Html | HTML | Strips markup to readable text with sensible block-boundary newlines and entity decoding (allocation-light, no DOM). |
-| TextCrusher | PlainText | Deterministic salience compression that preserves sentence and paragraph boundaries. |
-| Generic | fallback | Head and tail summary for command output that no specific rule matched. It declines on structured results so they are preserved. |
-
-Multi-byte text (CJK, emoji, combining marks) is handled grapheme by grapheme and never split mid-character.
-
-## Handle preview and the juice tools (default)
-
-Compaction is on by default. For a result of at least `ccr_min_tokens`, the module stores the original in its CCR cache and shows the model a small preview instead of compressing to one blob:
-
-- a one-line stats description of the shape (estimated tokens, bytes, lines, JSON keys or a Markdown outline, never values),
-- the first 500 characters,
-- an extractive outline, and
-- a footer naming the handle (the CCR token).
-
-The model then queries the stored original with three read-only tools, none of which calls a model:
-
-| Tool | What it does |
-| --- | --- |
-| `juice_find` | `text`, `grep`, `regex`, `rank` (BM25), `sed`, `awk` and `jq` over the output, with a Python-style `scope` slice. |
-| `juice_extract` | Links or headings from HTML or Markdown output. |
-| `juice_summarize` | Size, outline or JSON shape, then head and tail, or the parts most relevant to a `hint`. |
-
-Answers are size-capped, and an unknown or evicted handle is an error. `juice_retrieve` still returns the whole original. A handle preview is built without a model call, so it also replaces the LLM summary for results big enough to get one. A slow summarizer cannot stall the turn. The three read-only tools are declared by `tinyjuice-bus` and registered for new sessions while this mode is on; resumed sessions keep the declarations recorded in their transcript. Their host adapters send typed queries to the module; they do not read the module cache or repeat its query algorithms locally. For an artifact path, OpenHuman first applies its normal path and size checks, then sends the authorized content to the module without sending the path.
-
-The model's tool catalogue is recorded with each conversation and stays frozen when that thread resumes. If the transcript contains Juice tools, OpenHuman restores their recorded names and schemas even when current settings would not create new handles. The restored tools still use current host path authorization and module policy. A disabled or unavailable module returns an explicit unavailable result for a query; OpenHuman does not substitute a local CCR store or query implementation. Optional output compaction keeps its existing fail-open behavior and returns the unmodified result when the module cannot compact it.
-
-To turn off the whole feature, set `context.compaction_enabled = false` or `OPENHUMAN_COMPACTION=0`. To keep compaction but go back to one-blob compression and `juice_retrieve`, set `tokenjuice.repl_handle_enabled = false` (`OPENHUMAN_TOKENJUICE_REPL_HANDLE_ENABLED=0`). Set `tokenjuice.repl_save_enabled = true` to also write each stored original to `<workspace>/.tokenjuice/repl/<handle>.txt` (mode 0600) so an agent can script over it. That puts raw tool output on disk, and nothing prunes it.
-
-## Nothing is lost: the CCR cache
-
-Lossy compression normally throws data away. TinyJuice instead stores the full original in the module-owned CCR store and leaves a breadcrumb.
-
-- **In-memory tier** (always on): the module's store is keyed by SHA-256 hash and bounded by entry count (`max_cache_entries`, default 256) and total bytes (`max_cache_bytes`, default 64 MiB), with FIFO eviction.
-- **On-disk tier** (optional): `<workspace>/.tokenjuice/ccr/`, enabled with `ccr_disk_enabled`. It survives memory eviction. Set an optional TTL with `ccr_ttl_secs`.
-- **The marker:** compacted output ends with a footer like `[compacted tool output: PARTIAL view; full original available via juice_retrieve with token "…"]` carrying the `⟦tj:<hash>⟧` token.
-- **Retrieval tool:** the agent calls the read-only `juice_retrieve` tool with that token (optionally a byte or line `range`) to get the full original or a slice. The token is an unguessable SHA-256 digest.
-
-The agent gets the cheap compacted view by default and can zoom in on the full text only when it needs it.
-
-## Savings tracking
-
-An OpenHuman savings callback meters every compression (`crates/openhuman-core/src/inference/tokenjuice/savings.rs`). TokenJuice reports events and token deltas. OpenHuman applies the configured default model's input pricing, aggregates `total`, `by_model` and `by_compressor`, and saves stats to `<workspace>/state/tokenjuice_savings.json`.
-
-Read them over RPC with `openhuman.tokenjuice_savings_stats`; clear them with `openhuman.tokenjuice_savings_reset`.
-
-## The rule overlay (command and log output)
-
-A three-layer JSON rule overlay powers the log and command compressor. Rules merge in order, and later layers override earlier ones:
-
-| Layer | Path | Purpose |
-| --- | --- | --- |
-| Builtin | shipped with the binary | About 96 vendored rules for git, npm, cargo, docker, kubectl, ls and more |
-| User | `~/.config/tokenjuice/rules/` | Personal overrides that apply everywhere |
-| Project | `.tokenjuice/rules/` | Repo-specific overrides, checked in and shared with the team |
-
-Each rule names a command or tool pattern and a reduction strategy: skip and keep filters, transforms like strip-ANSI and dedupe, head and tail summaries, named counters and canned messages. Rules are JSON. Add one and it applies with no recompile.
-
-## Configuration, RPC and tools
-
-Everything lives under the `[tokenjuice]` config block (`crates/openhuman-core/src/config/schema/tokenjuice.rs`) and can be changed live.
-
-- Master switches: `context.compaction_enabled` (default `true`; `OPENHUMAN_COMPACTION=0` opts out) and `router_enabled` (default `true`).
-- Handle preview: `repl_handle_enabled` (default `true`) and `repl_save_enabled` (default `false`).
-- Thresholds: `min_bytes_to_compress` and `ccr_min_tokens`.
-- CCR: `ccr_enabled`, `ccr_disk_enabled`, `max_cache_entries`, `max_cache_bytes` and `ccr_ttl_secs`.
-- Per kind: `search_enabled`, `code_enabled`, `html_enabled`.
-- RPC (`openhuman.tokenjuice_*`): `detect`, `compress` (dry-run the pipeline), `settings_get` and `settings_update` (live partial patch), `cache_stats`, `retrieve`, `savings_stats` and `savings_reset`.
-- Agent tools: `juice_retrieve` recovers a whole stored original. `juice_find`, `juice_extract` and `juice_summarize` query one by handle. All are read-only.
-- Debugging: start the core with `RUST_LOG=openhuman_core::inference::tokenjuice=debug` to watch detection, matching and how much each result is trimmed.
-
-## Why this matters
-
-An agent's context budget is its limit. One working session can fan out across dozens of tool calls: greps, builds, test runs, `git` output and large [web fetch](native-tools/web-scraper.md) results. TokenJuice compacts each result before it lands in context, so an agent can sweep a noisy repo or a long web page without filling the window. The savings add up across a session and are metered in dollars (see [Billing, cost and usage](billing-and-usage.md)).
-
-TokenJuice runs on the agent's tool results, not on [memory](memory.md) ingestion. Source sync converts documents itself and does not route payloads through TokenJuice.
-
-## See also
-
-- [Native tools](native-tools/README.md): most heavy tool output flows through TokenJuice.
-- [Memory](memory.md): ingestion has its own document conversion and scrubbing.
-- [Billing, cost and usage](billing-and-usage.md): where token savings show up as real money.
diff --git a/gitbooks/features/wallet.md b/gitbooks/features/wallet.md
deleted file mode 100644
index a7b5dcae56..0000000000
--- a/gitbooks/features/wallet.md
+++ /dev/null
@@ -1,99 +0,0 @@
----
-description: >-
- A local, non-custodial multi-chain crypto wallet the agent can read balances
- from and prepare transfers with. Keys stay in the core and never cross the
- wire.
-icon: wallet
----
-
-# Wallet
-
-The wallet is a basic, non-custodial multi-chain crypto wallet owned by the Rust core. It keeps one account per supported chain, all derived from a single recovery phrase. It reads balances and runs a strict prepare, confirm, execute flow for native sends and a small set of token transfers.
-
-It is minimal on purpose: key and account management, plus the primitive on-chain operations. Higher-level DeFi (swaps, bridges, generic contract and dapp calls) lives in a separate `web3` module and is not part of the wallet's agent or RPC surface.
-
-The key point: signing and broadcast happen entirely in the core, from the decrypted recovery phrase. No private key ever leaves the device or crosses the network. This is your money, so the wallet is conservative by design.
-
-## Supported chains and token standards
-
-Setup derives exactly one account per chain. The EVM account is reused across six networks. Only the standards below are supported for transfers. Anything else, such as swaps or arbitrary contract calls, is out of scope.
-
-| Chain | Networks | Native | Token standard | Notes |
-| --- | --- | --- | --- | --- |
-| EVM | Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain | ETH, BNB and others | ERC-20 (BEP-20 on BNB Chain) | One `Evm` account across all six. The network is chosen per request and defaults to Ethereum mainnet. EIP-1559 and typed-tx signing. |
-| Bitcoin | Mainnet | BTC | None | P2WPKH (native SegWit). Rejects token transfers. Esplora REST for balance and broadcast. |
-| Solana | Mainnet or devnet (per RPC) | SOL | SPL | ed25519 signing. Native and SPL token transfers. |
-| Tron | Mainnet | TRX | TRC-20 | TronGrid REST for native and TRC-20 transfers. |
-
-The built-in asset catalogs include the native asset plus common stablecoins per chain, for example USDC and USDT as ERC-20 or BEP-20, USDC as SPL on Solana, and USDT as TRC-20 on Tron.
-
-## Onboarding and the recovery phrase
-
-Setup is a single, all-or-nothing operation. It saves a consent flag, the mnemonic word count, the setup source, exactly one derived account per supported chain, and the encrypted recovery phrase. Valid BIP-39 word counts are 12, 15, 18, 21 and 24.
-
-The recovery phrase is the only secret. The wallet stores the per-chain account addresses (safe to show) apart from the secret material. Only the encrypted phrase can rebuild private keys.
-
-## Key custody and security
-
-The wallet is non-custodial and local. There is no server-side key escrow.
-
-- The recovery phrase is always encrypted at rest. The core `encryption` domain encrypts it before it is saved anywhere.
-- The preferred home is the OS keychain. The encrypted phrase lives there under the key `wallet.mnemonic`, scoped by a workspace-derived user id. The keyring consent policy gates access.
-- When the keychain is unavailable (for example on a headless machine), the encrypted phrase falls back to `{workspace_dir}/state/wallet-state.json`. When a keychain becomes available, any secret in that JSON is migrated into it and removed from the JSON.
-- Writes to `wallet-state.json` are atomic (temp file, fsync, persist) under a process-wide lock. Corrupt or invalid state files are quarantined, not trusted.
-- Chain signers decrypt the phrase in the core only when deriving a key to sign a confirmed transaction. Plaintext keys are never saved and never sent over the wire.
-
-See [OS keyring and secret storage](os-keyring-and-secret-storage.md) for how secrets are stored on each platform, and [Privacy and security](privacy-and-security.md) for the broader model.
-
-## Reading balances and chain info
-
-Read-only surfaces need no confirmation:
-
-- **Status:** onboarding state plus the safe per-chain account addresses.
-- **Balances:** native-asset balances per account. Only EVM balances read live today (Ethereum mainnet). BTC, Solana and Tron call their providers but fall back to a zero balance with a "provider missing" status on error.
-- **Network defaults and supported assets:** per-chain RPC and explorer URLs, capability flags and the built-in asset catalog.
-- **Chain status:** per-chain readiness and the active RPC URL.
-
-You can override RPC endpoints per chain and network with `OPENHUMAN_WALLET_RPC_*` environment variables. Logs redact URLs to scheme and host.
-
-## Sending transfers: prepare, confirm, execute
-
-Every write is a two-step, deliberate flow. The wallet never sends in one shot.
-
-1. **Prepare** (`prepare_transfer`) validates the amount, the destination address and (for tokens) the calldata, estimates fees, and returns a prepared quote with a `quoteId`. Quotes sit in an in-memory store with a 5-minute TTL, capped at 64. They are not kept across restarts.
-2. **Confirm and execute** (`execute_prepared`) needs `confirmed: true` and a valid `quoteId`. The quote is consumed atomically before broadcast, so concurrent confirmations cannot double-submit. On failure it is restored with a refreshed TTL, so you can retry.
-
-Each quote is bound to the chat thread that prepared it. Only that owner can execute it. A `quoteId` leaked into a shared channel returns the same "not found" error as an unknown id, so another session cannot hijack it.
-
-Transfers are limited to native sends and the token standards in the table above. Bitcoin rejects token transfers. Swaps, bridges and generic contract calls are not available here.
-
-## Transaction status tracking
-
-After broadcast, three read-only tools let the agent follow a transaction by hash:
-
-- `tx_status`: lifecycle state (pending, confirmed, failed or not found).
-- `tx_receipt`: receipt details (success, fee, block).
-- `lookup_tx`: the raw transaction payload.
-
-## Agent tools and approval safety
-
-The agent reaches the wallet through six tools:
-
-| Tool | Purpose |
-| --- | --- |
-| `wallet_status` | Onboarding status and account addresses. |
-| `wallet_chain_status` | Per-chain readiness and active RPC. |
-| `wallet_prepare_transfer` | Build a validated, fee-estimated quote. |
-| `wallet_tx_status` | Transaction lifecycle state by hash. |
-| `wallet_tx_receipt` | Transaction receipt by hash. |
-| `wallet_lookup_tx` | Raw transaction lookup by hash. |
-
-No agent tool executes a transfer. The agent can prepare a quote, but moving funds (`execute_prepared`) goes through the RPC surface, where it must be explicitly confirmed and pass the owner-binding check. Together with prepare-then-confirm and per-thread quote binding, this keeps the agent from spending funds silently.
-
-A quote is bound to the conversation that asked for it, expires after five minutes and is consumed when it executes. The [approval gate](approval-gate.md) is the second layer. It applies only once you turn on the autonomy policy, which is off by default. Treat every transfer as high-stakes and read that page before relying on the gate.
-
-## See also
-
-- [Approval gate](approval-gate.md)
-- [Privacy and security](privacy-and-security.md)
-- [OS keyring and secret storage](os-keyring-and-secret-storage.md)
diff --git a/gitbooks/features/workflows.md b/gitbooks/features/workflows.md
deleted file mode 100644
index c7281ab0ad..0000000000
--- a/gitbooks/features/workflows.md
+++ /dev/null
@@ -1,69 +0,0 @@
----
-description: >-
- Durable, visual automations. The agent proposes a workflow in chat, you
- review it on a canvas and save it, and it runs on schedules or live app
- events, pausing for your approval when it matters.
-icon: diagram-project
----
-
-# Workflows
-
-<figure><img src="../.gitbook/assets/workflows.png" alt=""><figcaption><p>A workflow on the visual canvas. The agent proposes the graph; you review each step and save.</p></figcaption></figure>
-
-Chat is good for one-off asks. Workflows are for things you want done every time: triage every new support email, file every Linear ticket that mentions your team, post a digest every Monday at 9.
-
-A workflow is a saved, typed graph of steps. You can see it on a canvas, and it runs without you. It is inspired by [n8n](https://n8n.io) and [Zapier](https://zapier.com), and it runs on the open-source [tinyflows](https://github.com/tinyhumansai/tinyflows) engine with the same trust and approval machinery as the rest of OpenHuman. The difference from n8n and Zapier is that you do not build the graph. The agent does.
-
-## The agent builds it, you approve it
-
-You do not drag boxes to get started. Describe the automation in chat, for example "whenever a new email arrives from a customer, summarize it and post to my Slack". The agent uses its `propose_workflow` tool to draft a full workflow graph. The proposal appears in chat as a Workflow Proposal Card with a plain-English summary of every step.
-
-Three guarantees keep this safe:
-
-- `propose_workflow` only validates and describes a candidate graph. It can never save or enable a flow.
-- Every authoring turn is propose-only by default. Normally you click **Save & enable** on the card, which calls the `flows_create` RPC from the app, not from the agent.
-- Nothing the agent can do turns a flow on. `flows_set_enabled` is not one of its tools.
-
-The agent can save in two explicit cases. `save_workflow` writes the built graph onto an existing flow. That is the case when you started the build: the Workflows page prompt bar creates the flow first and opens the copilot on it. When there is no flow yet and you explicitly ask for one ("create this and save it"), the agent may also use `create_workflow`, or `duplicate_flow` to clone a saved flow so you can edit the copy. Both are on the `workflow_builder` agent's tool list (`crates/openhuman-core/src/flows/agents/workflow_builder/agent.toml`), and both force the flow off at creation. `CreateWorkflowTool` calls `flows_set_enabled(.., false)` on anything `flows_create` left enabled. If that second write fails, it reports the flow's real state, not the intended one. So a flow the agent creates starts off and stays off until you enable it. A real test run of a saved flow always needs your confirmation first.
-
-## What a workflow is made of
-
-A workflow graph uses the engine's 22 node kinds: exactly one `trigger`, plus any mix of `agent` (a full agent turn with tools), `tool_call`, `http_request`, `code` (JavaScript or Python), `shell`, `condition`, `switch`, `transform`, `split_out`, `merge`, `output_parser`, `sub_workflow`, `memory`, `dedup`, `loop`, `spawn`, `gate`, `scatter`, `gather`, `approval` and `void`.
-
-The canvas palette offers fifteen of them today: `trigger`, `agent`, `tool_call`, `http_request`, `code`, `condition`, `switch`, `merge`, `split_out`, `transform`, `output_parser`, `sub_workflow`, `memory`, `dedup` and `loop`. You can reach the other seven by importing a graph. Two also have no host adapter wired yet. A `shell` node has no runner, and an `approval` node pauses the run for `flows_resume` instead of raising its own card.
-
-A graph is usually a straight line or a fan-out. It can also contain a bounded loop. A `loop` node emits on its `body` port until its `max_iterations` cap (or an optional `condition`) says stop, then emits on `done`. You close the loop by wiring the body's last node back to the `loop` node. The cap is always finite, and `on_exceeded` decides what reaching it means. `error` fails the run and names the loop. `continue` stops looping and carries the last pass's items out through `done`.
-
-These triggers are live today:
-
-- **Schedule:** cron-backed. The flow fires on its schedule and re-registers itself on every app boot.
-- **App event:** a live [trigger](integrations/triggers.md) from a connected integration (a new Gmail thread, a Notion change, a Linear ticket), matched by toolkit and trigger slug.
-- **Manual:** a Run button on the Workflows page, or the `flows_run` RPC.
-- **Resume:** continuing a run that paused at an approval gate.
-
-A per-flow dispatch lock means a schedule burst can never run the same flow twice at once.
-
-## Trust, approvals and human-in-the-loop
-
-Every flow run executes under a dedicated trust origin (`TrustedAutomation → Workflow`). The flow's actions, meaning which tools it calls and which URLs it hits, are static graph configuration you approved at save time. The runtime trigger payload (a webhook body, an inbound event) stays untrusted. It can feed arguments into those pre-declared actions, but it can never add a new action.
-
-Each flow also has a **Require approval for outbound actions** switch. With it on, every external-effect tool or HTTP call in the run waits at the [approval gate](approval-gate.md) for a real decision. The run's trust root does not auto-allow anything.
-
-When a run pauses, a Flow Approval Card appears in your notifications naming the flow and the pending steps. Approving resumes the run (through `flows_resume`) exactly where it stopped. Runs are durable and checkpointed, so "later today" is fine.
-
-## Watching it run
-
-- `/flows` is the Workflows hub. It shows every flow with its enabled toggle, last-run status (`completed`, `pending approval` or `failed`) and a Run button.
-- `/flows/:id` is a read-only canvas view of the workflow graph, drawn as nodes and edges, so you can see exactly what you approved.
-- The Run Inspector is a drawer that shows each run step by step (node label, emitted output and final status). It polls every 2 seconds until the run finishes.
-- Full run history is saved per flow: status, start and finish times, pending approvals, errors and rebuilt per-step output.
-
-## RPC surface (for developers)
-
-The `flows` domain (`crates/openhuman-core/src/flows/`) exposes 36 controllers under `openhuman.flows_*`. They cover definitions (`create`, `get`, `list`, `update`, `delete`, `set_enabled`, `duplicate`, `validate`, `import`), runs (`run`, `resume`, `cancel`, `list_runs`, `get_run`, history), drafts and the authoring copilot. See the [agent harness](../developing/architecture/agent-harness.md) page for how flow runs share the tinyagents execution stack.
-
-## See also
-
-- [Triggers](integrations/triggers.md): the live app events that fire `app_event` workflows.
-- [Approval gate](approval-gate.md): how pending approvals are surfaced and expire.
-- [Cron and scheduling](native-tools/cron.md): one-shot and recurring agent jobs. Workflows are the structured, multi-step upgrade.
diff --git a/gitbooks/guides/README.md b/gitbooks/guides/README.md
deleted file mode 100644
index f35ae653dd..0000000000
--- a/gitbooks/guides/README.md
+++ /dev/null
@@ -1,62 +0,0 @@
----
-description: >-
- Step-by-step guides for getting a result out of OpenHuman: set up an
- assistant, run local models, protect sensitive data, recover a broken install
- or move to a new machine.
-icon: list-check
----
-
-# Guides
-
-The rest of the docs explain how OpenHuman works. These guides are about what you want to get done. Each one starts from a concrete goal, such as "I want a private assistant", "my install is broken" or "I'm moving to a new laptop", and walks you to a working result. You do not need to read them in order or be technical.
-
-## Pick your goal
-
-| I want to | Guide |
-| --- | --- |
-| Set up a personal assistant from scratch | [Create my personal AI assistant](personal-assistant.md) |
-| Keep model inference on my own machine | [Use OpenHuman with a local model](local-model.md) |
-| Spread work across several model servers I run | [Use multiple local LLM servers](multiple-local-llm-servers.md) |
-| Understand what leaves my computer and what doesn't | [Keep sensitive data private](privacy-sensitive-data.md) |
-| Fix an install that won't start or finish | [Recover from a failed installation](recover-failed-installation.md) |
-| Move everything to a new computer | [Move OpenHuman to a new PC](move-to-new-pc.md) |
-| Let the agent tidy a folder of files | [Organize my project folders](organize-project-folders.md) |
-| Build a role-specific assistant, such as a clinical one | [Create a doctor-specific assistant](doctor-assistant.md) |
-| Set up a locked-down assistant for a child | [Create a safe companion for a child](child-safe-companion.md) |
-
-## How a guide is laid out
-
-Every guide has the same sections:
-
-- **Prerequisites**: what you need before you start.
-- **Privacy implications**: what stays on your machine and what goes to the OpenHuman backend or a model provider.
-- **Steps**: the path to follow.
-- **Success checks**: how to confirm it works.
-- **Common failures**: how the flow breaks, and what each symptom means.
-- **Recovery**: how to get unstuck without losing data.
-
-{% hint style="info" %}
-These guides describe the shipping desktop app, which is in active development. If a screen name and what you see disagree, trust the app and check the [release notes](https://github.com/tinyhumansai/openhuman/releases). Then tell us on [Discord](https://guild.tinyhumans.ai).
-{% endhint %}
-
-## Where your data lives
-
-OpenHuman keeps your settings, workspace files and secrets on your machine. Your memory is stored in CortexDB, either the hosted one TinyHumans runs behind your account or your own. The managed backend also handles sign-in, model routing, integration access, web-search proxying and some real-time integration triggers. That split is behind most of the privacy and recovery advice here. If you read one background page, read [Privacy and security](../features/privacy-and-security.md).
-
-On disk, everything lives in one folder:
-
-| Platform | Data folder |
-| --- | --- |
-| macOS and Linux | `~/.openhuman/` |
-| Windows | `%USERPROFILE%\.openhuman\` |
-
-Backups, recovery and migration all come back to that folder. Memory items are not in it, so backing up or deleting the folder neither copies nor erases them.
-
-## See also
-
-- [Privacy and security](../features/privacy-and-security.md): the trust model these guides assume.
-- [Local AI](../features/model-routing/local-ai.md): the config reference behind the local-model guides.
-- [Memory](../features/memory.md): what memory stores and where.
-- [Getting started](../overview/getting-started.md): install and first run.
-- [Troubleshooting sign-in](../overview/troubleshooting-sign-in.md): if you cannot get past login.
-- [Developing](../developing/README.md): building from source.
diff --git a/gitbooks/guides/child-safe-companion.md b/gitbooks/guides/child-safe-companion.md
deleted file mode 100644
index 10cb50e972..0000000000
--- a/gitbooks/guides/child-safe-companion.md
+++ /dev/null
@@ -1,92 +0,0 @@
----
-description: >-
- Combine OpenHuman's autonomy, approval and screening controls into a
- locked-down assistant for a child, with an honest account of the limits.
-icon: child
----
-
-# Create a safe companion for a child
-
-This guide sets up the most restricted, supervised version of OpenHuman you can build, for a child to use with an adult present.
-
-{% hint style="danger" %}
-OpenHuman has no dedicated child mode, no age verification, and no filter on what the model says. It is not a certified parental-control product. You can combine its existing safety controls into a tightly locked-down setup. That reduces risk, but it does not make an AI assistant safe for a child to use alone. Adult supervision is the control that matters most, so do not rely on software alone.
-{% endhint %}
-
-The guide stacks the controls that exist and says plainly what each one does and does not cover.
-
-## Prerequisites
-
-- OpenHuman set up on the machine the child will use. See [Create my personal AI assistant](personal-assistant.md).
-- An adult who owns the account and stays involved.
-
-## Privacy implications
-
-- Keep it local. Use a [local model](local-model.md) so conversations are not sent to a cloud provider, and connect no personal integrations.
-- Do not connect a child's accounts. The safest memory is minimal memory.
-
-## What each control does
-
-| Control | What it protects against | What it does not do |
-| --- | --- | --- |
-| `readonly` autonomy (needs the policy on) | The assistant taking any action: sending, writing files, running commands or reaching the network on its own | Filter what it says |
-| Approval Gate | A state-changing or network action going through without an adult's yes | Review conversation content |
-| Workspace-only and blocked system directories | The agent touching files outside a small folder, or any credential or system directory | Limit which topics come up |
-| Prompt-injection screening | Pasted text that tries to hijack the assistant's instructions | Moderate content in general |
-| No integrations connected | The assistant pulling in or acting on personal data | Nothing else. Not connecting is the whole control |
-
-None of these filter the model's language or subject matter. An adult in the room and persona instructions fill that gap, not a setting.
-
-## Steps
-
-### 1. Set the strictest autonomy tier
-
-Go to **Settings → Agents → Agent access**:
-
-- Set `[autonomy] enabled = true` with `level = "readonly"` in `config.toml`. The assistant can then talk and answer, but cannot act, write files or reach the network on its own. The policy is off by default, so this is the first thing to set.
-- Keep `workspace_only` on.
-- Leave the [Approval Gate](../features/approval-gate.md) installed as a second layer. At `readonly`, acting is blocked anyway.
-- Review the auto-approve list and remove anything you do not want running without a prompt.
-
-### 2. Keep inference and data local
-
-- Set up a [local model](local-model.md). You run the runtime and pull the model yourself. Then route chat and reasoning to the local provider so conversations stay on-device. Adding the provider alone does not move chat. It stays on the default cloud route until you point the chat and reasoning workloads at the local provider and confirm with a test message. Turning on `local_only` [Privacy mode](../features/privacy-mode.md) makes that guarantee firm.
-- Connect no integrations, and do not sign in the child's accounts.
-
-### 3. Write a protective persona
-
-Edit the behavior prompt (`SOUL.md`, on the **Brain** page at `/brain`) to set age-appropriate rules. For example: "You are talking with a child. Keep language simple and kind. Refuse and redirect anything violent, sexual, frightening or unsafe. Never give instructions that could cause harm. Encourage them to ask a parent." With no built-in filter, persona instructions are your main lever over content.
-
-### 4. Supervise, and test first
-
-- Sit with the child, at least at first.
-- Before handing it over, try to break it yourself. Ask it things a child might, and confirm the persona redirects well.
-
-## Success checks
-
-- [ ] `[autonomy] enabled = true`, `level = "readonly"`, and `workspace_only` is on.
-- [ ] No integrations are connected.
-- [ ] Inference is local (`ready`), so conversations do not go to a cloud provider.
-- [ ] In your own testing, the persona refuses and redirects unsafe prompts.
-- [ ] An adult is present during use. This is a check, not a nicety.
-
-## Common failures
-
-| Symptom | Cause | Fix |
-| --- | --- | --- |
-| It produced content you consider inappropriate | There is no content filter, and the persona alone governs tone | Strengthen the `SOUL.md` rules and supervise. This is a limit of the tool |
-| It tried to send, open or fetch something | The policy is off, or the tier is not `readonly` | Set `enabled = true` and `level = "readonly"` in `config.toml` |
-| Conversation went to the cloud | Chat is not routed to a local provider | Route chat to a [local model](local-model.md) and send a test message |
-| The child reached settings and changed things | OpenHuman has no separate child login | Use OS-level user accounts or parental controls to lock down the machine |
-
-## Recovery
-
-- **Lock down at once.** Set `enabled = true` and `level = "readonly"`, if either drifted. The level does nothing while `enabled` is `false`, so check both. Acting stops on the next turn.
-- **Reset the persona.** Revert your `SOUL.md` edits to the defaults if the customization misbehaves.
-- **Supervise.** If the experience is not right for the child, step in. No setting replaces that.
-
-## See also
-
-- [Keep sensitive data private](privacy-sensitive-data.md): the controls this guide stacks.
-- [Approval Gate](../features/approval-gate.md): the autonomy tiers and what each one blocks.
-- [Privacy and security](../features/privacy-and-security.md): what leaves the machine, and what does not.
diff --git a/gitbooks/guides/doctor-assistant.md b/gitbooks/guides/doctor-assistant.md
deleted file mode 100644
index 29ba9495f7..0000000000
--- a/gitbooks/guides/doctor-assistant.md
+++ /dev/null
@@ -1,85 +0,0 @@
----
-description: >-
- Shape OpenHuman into an assistant for clinical work, with a persona, tight
- data boundaries and clear limits.
-icon: user-doctor
----
-
-# Create a doctor-specific assistant
-
-This guide tailors OpenHuman to a clinician's workflow: a persona that speaks the part, memory limited to the right sources, and privacy settings suited to sensitive information.
-
-{% hint style="danger" %}
-OpenHuman is a general-purpose assistant. It is not a medical device and not a source of medical advice, and it can hallucinate. Nothing here makes it safe for diagnosis, treatment decisions, or handling protected health information under a regulation such as HIPAA or GDPR. You are responsible for compliance, clinical judgment and the data you let it touch. Treat its output as draft text that a qualified person must verify.
-{% endhint %}
-
-## Prerequisites
-
-- OpenHuman set up. See [Create my personal AI assistant](personal-assistant.md).
-- A clear decision about what data this assistant may and may not see. For anything sensitive, plan to keep inference [local](local-model.md).
-
-## Privacy implications
-
-- Decide early whether real patient data will ever be involved. If regulatory rules apply to your data, the safest setup is a local model, minimal integrations, and read-only or supervised autonomy.
-- OpenHuman keeps memory local and redacts secrets and personal data on save, but that is not a compliance guarantee. It is a general privacy design, not a certification for regulated health data.
-- By default, reasoning goes through the [OpenHuman backend](../features/privacy-and-security.md), which sends relevant snippets to the model provider on each turn. For sensitive material, turn on a [local model](local-model.md) so the work stays on your device.
-
-## Steps
-
-### 1. Lock down the boundaries before adding data
-
-In **Settings → Agents → Agent access**:
-
-- Turn the autonomy policy on and set its tier. In `config.toml`, set `[autonomy] enabled = true` with `level = "readonly"` (questions and drafting only) or `level = "supervised"` (drafting plus approved actions). Avoid `full` for clinical use. The policy is off until you set `enabled = true`.
-- Keep `workspace_only` on so the agent cannot wander your disk.
-- With the policy on, the [Approval Gate](../features/approval-gate.md) sits between the assistant and any acting call. At `readonly` the call is refused. At `supervised` the gate holds it for your yes, unless its tool is on the always-allow list. Clear that list in **Settings → Agent access** if you want every call reviewed. The gate covers actions, not network transport, so prompts and attachments can still be sent upstream for inference.
-
-### 2. Turn on local inference for sensitive work
-
-Follow [Use OpenHuman with a local model](local-model.md) and pick at least "memory + reflection", so embeddings and background summaries stay on your device. Confirm the status reads `ready`.
-
-### 3. Give it a clinical persona
-
-The assistant's tone and behavior come from an editable prompt (`SOUL.md`), with mission and values in `IDENTITY.md`. To make it clinical:
-
-- Set a display name and description in **Settings → Personality**.
-- Edit the behavior prompt on the **Brain** page (`/brain`) to describe the role. For example: "You assist a physician with documentation and literature summaries. You always flag uncertainty, cite sources, and never present output as a diagnosis or treatment recommendation. You remind the user to verify clinically."
-
-Put the caveats in the persona so they appear in every reply, not only in your memory.
-
-### 4. Connect only the sources that belong
-
-Add only the integrations the workflow needs, such as a reference or notes source. Do not connect anything with data you are not cleared to process. Every integration is a separate OAuth grant that you can revoke.
-
-### 5. Test with synthetic inputs
-
-Test with made-up cases, never real patient data, until you are satisfied with the tone, caution and citations.
-
-## Success checks
-
-- [ ] `[autonomy] enabled = true`, `level` is `readonly` or `supervised`, and `workspace_only` is on.
-- [ ] If you keep inference on-device, your local runtime is running, the models are pulled, and a turn routed to it answers.
-- [ ] The persona reliably adds uncertainty flags and "verify clinically" language to replies on synthetic prompts.
-- [ ] Only the intended sources are connected.
-- [ ] The assistant declines to present output as a diagnosis when tested.
-
-## Common failures
-
-| Symptom | Cause | Fix |
-| --- | --- | --- |
-| It states things with false confidence | The persona does not enforce caution | Strengthen `SOUL.md` to require uncertainty flags and citations |
-| Sensitive text went to the cloud | Inference is on the default route | Turn on a [local model](local-model.md) and confirm `ready` before using sensitive input |
-| It tried to act on its own | The policy is off, or the tier is too permissive | Set `enabled = true` and `level = "readonly"` |
-| It remembered something it should not have | A source with disallowed data was connected | Revoke the integration. Chunks already ingested are local and can be cleared from the workspace |
-
-## Recovery
-
-- **Stop acting at once.** Set `enabled = true` and `level = "readonly"` together. The level does nothing while the policy is off, so you need both. Acting stops on the next turn.
-- **Pull a source.** Revoke any integration in Settings, and future syncs stop immediately.
-- **Reset the persona.** The behavior lives in an editable file. Revert your edits to return to the default tone.
-
-## See also
-
-- [Keep sensitive data private](privacy-sensitive-data.md): the controls this guide combines.
-- [Use OpenHuman with a local model](local-model.md): keeping sensitive inference on your device.
-- [Approval Gate](../features/approval-gate.md): how actions are gated.
diff --git a/gitbooks/guides/local-model.md b/gitbooks/guides/local-model.md
deleted file mode 100644
index 87738902a0..0000000000
--- a/gitbooks/guides/local-model.md
+++ /dev/null
@@ -1,109 +0,0 @@
----
-description: >-
- Run a local model runtime yourself (Ollama, LM Studio, MLX or any
- OpenAI-compatible server), pull your own models, and add the endpoint to
- OpenHuman as a provider.
-icon: microchip
----
-
-# Use OpenHuman with a local model
-
-This guide moves some or all of OpenHuman's model work onto your own computer, so the data for those workloads never leaves the machine.
-
-OpenHuman does not install a runtime, start it or download models. You run the runtime and pull the models, and OpenHuman calls the endpoint you give it. Local AI is opt-in: adding a local provider reroutes nothing until you point workloads at it.
-
-For the config reference (provider strings, endpoint overrides and every workload field), see [Local AI](../features/model-routing/local-ai.md). This page is the task-oriented version.
-
-## Prerequisites
-
-- A local runtime you install and run yourself:
- - [Ollama](https://ollama.com), default address `http://localhost:11434`.
- - [LM Studio](https://lmstudio.ai) with its local server enabled, default `http://localhost:1234/v1`.
- - MLX (`mlx_lm.server`), OMLX, or any other OpenAI-compatible server.
-- Disk and RAM for the models you pick. A small chat model plus `bge-m3` for embeddings takes a few GB on disk. 8 GB of RAM is a sensible minimum.
-
-## Privacy implications
-
-- Workloads you route locally run on-device, and nothing about that work is sent out.
-- Anything you leave on the default route still goes through the OpenHuman [model router](../features/model-routing/README.md). Local AI changes only the workloads you move.
-- Without [Privacy mode](../features/privacy-mode.md), lightweight hints routed locally can fall back to the remote provider if the runtime is unreachable. Turn on `local_only` privacy mode if strict locality matters. An unreachable runtime then makes the request fail instead.
-
-## Steps
-
-### 1. Start the runtime
-
-Install and launch the runtime so its server is running. For Ollama, confirm from a terminal:
-
-```bash
-curl http://localhost:11434/api/tags
-```
-
-A JSON list of models, even an empty one, means the server is reachable. For LM Studio or another OpenAI-compatible server, `curl http://localhost:1234/v1/models` (adjust the port) should return a model list.
-
-### 2. Pull the models yourself
-
-OpenHuman never pulls models. Pull every model you plan to use before you configure it. For Ollama:
-
-```bash
-ollama pull gemma3:4b-it-qat # chat, and vision from 4B up
-ollama pull bge-m3 # memory embeddings (1024 dimensions)
-```
-
-In LM Studio, download the model in LM Studio and load it. For MLX or another server, start it with the model you want served.
-
-See [Local models and bring your own key](../features/model-routing/local-and-byok-models.md) for which models can do chat, vision and embeddings.
-
-### 3. Add the endpoint as a provider
-
-Open **Connections → LLM** and choose **Add a provider**:
-
-- For Ollama, LM Studio or OMLX, pick it under **Local runtimes**. The default endpoint is filled in. Change it if your runtime listens elsewhere.
-- For MLX or another server, choose **Add a custom provider** and enter its OpenAI-compatible endpoint, for example `http://127.0.0.1:8080/v1`.
-
-When you save, OpenHuman asks the endpoint for its model list. If the runtime is not reachable, the provider is not saved. Fix step 1 and try again.
-
-### 4. Route workloads to it
-
-Use **Custom routing** on the workloads you want local (chat, reasoning, vision and so on) and pick a model the runtime reported. Only models you have pulled or loaded appear.
-
-For memory embeddings, open **Connections → Embeddings** and choose Ollama with `bge-m3`, or set `embeddings_provider = "ollama:bge-m3"` in `config.toml`.
-
-### 5. Test that it answers
-
-Send a short message on a workload you routed locally, or use the model test in the LLM panel. A coherent reply means the path works end to end: the endpoint is reachable, the model is present and inference runs. For Ollama you can also watch `ollama ps` while the request runs.
-
-## Success checks
-
-Local AI is working when:
-
-- [ ] The local provider shows as connected under **Connections → LLM**, and its model list contains the models you pulled.
-- [ ] A turn routed to the local provider returns a real reply.
-- [ ] For embeddings, new summaries keep appearing in the Memory tab after the next memory sync, with the runtime running.
-
-## Common failures
-
-| What you see | Meaning | Fix |
-| --------------------------------------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
-| The provider will not save and the endpoint is reported unreachable | OpenHuman cannot reach the runtime at that address | Start the runtime, check the port with `curl`, and correct the endpoint |
-| The model you want is not in the picker | The runtime does not have it | `ollama pull <model>`, or download and load it in LM Studio, then reopen the picker |
-| A request fails saying the model is not found | The workload names a model the runtime no longer has | Pull it again, or route the workload to a model you have |
-| Ollama answers but every model call fails | Ollama's model runner is broken | Quit and relaunch Ollama, then retry |
-| Embeddings fail with a dimension error | The embedding model does not produce 1024-dimension vectors | Use `bge-m3` |
-| Agent turns lose context on Ollama | Ollama's default context window is small | Set `local_ai.num_ctx` (for example `8192`) |
-| Answers feel cloud-quality | The runtime was unreachable and a lightweight hint fell back to remote | Fix reachability. Use `local_only` privacy mode if fallback is unacceptable |
-
-## Recovery
-
-- **Back to cloud.** Set the routed workloads back to the default route in **Custom routing**, or remove the local provider. No data is lost.
-- **Stuck runtime.** Quit the runtime fully and relaunch it. OpenHuman reconnects on the next request.
-- **Disk pressure.** Model pulls happen in your runtime, not in OpenHuman. Free space and pull again with the runtime's own command.
-
-## What stays in the cloud anyway
-
-Some workloads use the backend unless you configure something else. Speech-to-text and web search go through the backend proxy. Text-to-speech uses the hosted voice unless you install Piper yourself and set `PIPER_BIN`. See [what stays in the cloud](../features/model-routing/local-ai.md#what-stays-in-the-cloud-by-default).
-
-## See also
-
-- [Local AI](../features/model-routing/local-ai.md): the config reference.
-- [Keep sensitive data private](privacy-sensitive-data.md): what stays local and what leaves.
-- [Automatic model routing](../features/model-routing/README.md): how tasks get matched to models.
diff --git a/gitbooks/guides/move-to-new-pc.md b/gitbooks/guides/move-to-new-pc.md
deleted file mode 100644
index f946aa0ff8..0000000000
--- a/gitbooks/guides/move-to-new-pc.md
+++ /dev/null
@@ -1,114 +0,0 @@
----
-description: >-
- Carry your OpenHuman persona, workspace and model config to a new computer,
- and learn which secrets travel and which you re-enter.
-icon: truck
----
-
-# Move OpenHuman to a new PC
-
-This guide sets up OpenHuman on a new machine so it picks up where the old one left off, with the same persona and settings and your memory reconnected. In short, copy one folder and sign back in. The details below cover what a folder copy does and does not carry.
-
-## Prerequisites
-
-- Both computers, or a backup of the old one's data folder.
-- Your OpenHuman sign-in credentials.
-- A way to move files between them, such as an external drive or a secure file transfer.
-
-## What lives where
-
-Everything OpenHuman keeps on disk is in one folder:
-
-| Platform | Data folder |
-| --- | --- |
-| macOS and Linux | `~/.openhuman/` |
-| Windows | `%USERPROFILE%\.openhuman\` |
-
-These are the parts you care about moving:
-
-| What | Where | Travels with a folder copy? |
-| --- | --- | --- |
-| Memory items | In your engine (TinyHumans or CortexDB) | No. Sign in again or re-enter the key |
-| Persona and behavior | `SOUL.md`, `IDENTITY.md`, `ROLE.md` | Yes |
-| Config (models, providers, routing, autonomy) | `config.toml` | Yes |
-| Session history | `sessions/`, `session_raw/` | Yes |
-| Approval history | `approval/approval.db` | Yes |
-| OS-stored secrets (session token, some local keys) | Your OS keychain, not this folder | No. Re-established on sign-in |
-| Integration access (Gmail, Slack, and so on) | Held by the backend against your account | No. Reconnects on sign-in |
-
-{% hint style="info" %}
-OpenHuman keeps secrets out of loose files on purpose. Your session token and some local secrets live in the operating system's secure store (Keychain, Credential Manager or Secret Service), and the backend holds your integration tokens against your account. The folder copy carries your data and persona, and signing in on the new machine restores the secrets and integrations. You never copy raw tokens by hand.
-{% endhint %}
-
-## Steps
-
-### 1. Quit OpenHuman on the old machine
-
-Close the app fully so nothing is mid-write to the database. A clean copy needs a quiet source.
-
-### 2. Copy the data folder
-
-Copy the entire data folder from the old machine to the same location on the new one:
-
-- macOS and Linux: copy `~/.openhuman/` to `~/.openhuman/`.
-- Windows: copy `%USERPROFILE%\.openhuman\` to `%USERPROFILE%\.openhuman\`.
-
-Copy the whole folder instead of picking files. That keeps persona, config and history consistent with each other.
-
-The data folder holds config but not the files the agent created or edited in its action sandbox. Also copy your projects folder, by default `~/OpenHuman/projects`, or wherever you pointed the action directory. Otherwise those project files stay on the old PC. That folder also holds `Files` (`~/OpenHuman/projects/Files`), where the agent saves the decks, documents, images and videos it delivers.
-
-{% hint style="warning" %}
-Copy it somewhere secure. The folder contains your personal data in readable form, so treat the transfer like moving personal documents.
-{% endhint %}
-
-### 3. Install OpenHuman on the new machine
-
-Install the current build from [tinyhumans.ai/openhuman](https://tinyhumans.ai/openhuman) or the [latest release](https://github.com/tinyhumansai/openhuman/releases/latest). If the data folder is already in place, the app finds it on launch. The order does not matter much. You can install first and copy after, as long as the app is not running during the copy.
-
-### 4. Launch and sign in
-
-Open the app and sign in with the same account. Signing in:
-
-- Re-establishes your session token in the new machine's OS keychain.
-- Reconnects your account, so integrations held by the backend come back.
-
-### 5. Reconnect anything tied to your account
-
-- **Integrations** (Gmail, Slack and so on): confirm they show as connected under **Settings**. If one needs a fresh OAuth approval, approve it again. It takes one click.
-- **Your own keys:** if you entered your own provider API key, a Composio direct key or similar local secrets, enter them again. They live in the OS keychain and do not travel in the folder.
-
-### 6. Re-check model and provider config
-
-Your `config.toml` came along, so model routing and provider choices should already match. If you used a [local model](local-model.md), remember that Ollama or LM Studio is separate software, and the model weights live in its own store, not in the OpenHuman data folder. Install the runtime on the new machine and pull the same models yourself, for example `ollama pull bge-m3`. OpenHuman does not download them.
-
-## Success checks
-
-The move worked when:
-
-- [ ] The Memory tab on the new machine shows your existing summaries.
-- [ ] The assistant replies in your configured style, and your display name and persona are intact.
-- [ ] Connected integrations show as connected under **Settings**. Reconnect any that do not.
-- [ ] Your autonomy tier and settings match what you had (check **Settings → Agents → Agent access**).
-- [ ] If you use local AI, the runtime is installed and running, you have pulled the models your workloads name, and a turn routed to the local provider answers.
-
-## Common failures
-
-| Symptom | Cause | Fix |
-| --- | --- | --- |
-| The new machine starts fresh with no memory | The data folder was in the wrong place, or the app was running during the copy | Quit the app, place the folder at `~/.openhuman/` (or `%USERPROFILE%\.openhuman\`), and relaunch |
-| Signed in but integrations are disconnected | Integration access is tied to your account, not the folder | Reconnect each integration in Settings. Each takes one OAuth click |
-| The local model does not work on the new PC | Ollama or LM Studio and the weights are not on the new machine | Install the runtime and pull the models yourself. See the [local model guide](local-model.md) |
-| The assistant lost its personality | `SOUL.md` and `IDENTITY.md` were not copied | Copy the whole data folder, not just the database |
-| Sign-in stalls on the new machine | An auth or handler issue unrelated to the move | See [Troubleshooting sign-in](../overview/troubleshooting-sign-in.md) |
-
-## Recovery
-
-- Keep the old machine's folder until you have verified the new one. Do not wipe the source until every success check passes.
-- If the new machine will not start at all, treat it as a fresh-install problem and follow [Recover from a failed installation](recover-failed-installation.md). Your copied folder is safe to move aside and restore.
-
-## See also
-
-- [Recover from a failed installation](recover-failed-installation.md): the same data folder, a different problem.
-- [Keep sensitive data private](privacy-sensitive-data.md): why secrets are stored the way they are.
-- [Use OpenHuman with a local model](local-model.md): setting up a runtime on the new machine.
-- [OS keyring and secret storage](../features/os-keyring-and-secret-storage.md): what the keychain holds instead of the folder.
diff --git a/gitbooks/guides/multiple-local-llm-servers.md b/gitbooks/guides/multiple-local-llm-servers.md
deleted file mode 100644
index 2da8fde28e..0000000000
--- a/gitbooks/guides/multiple-local-llm-servers.md
+++ /dev/null
@@ -1,146 +0,0 @@
----
-description: >-
- Send different OpenHuman workloads to models on different machines you own,
- behind one OpenAI-compatible gateway, with a Mac mini and Linux GPU PC
- example.
-icon: network-wired
----
-
-# Use multiple local LLM servers
-
-This guide shows how to keep a small, fast model and a large, slow one on separate machines you own, and send each OpenHuman workload to the right one.
-
-OpenHuman talks to one endpoint per provider string. If your models live on more than one machine, put a gateway in front of them. The gateway exposes a single OpenAI-compatible endpoint and uses a prefix on the model ID to pick the upstream. This guide uses [Model Router](https://github.com/tjm8874/model-router), an independent, MIT-licensed community project. OpenHuman does not bundle, install or supervise it, and any compatible gateway works the same way.
-
-The example puts the OpenHuman core, the gateway and a small model on a Mac mini, and a larger model server on a Linux GPU PC:
-
-```text
-OpenHuman core (Mac mini)
- └─ gateway, 127.0.0.1:18080/v1
- ├─ MacMini:small-model → local model server, 127.0.0.1:8080/v1
- └─ LinuxGPU:large-model → SSH tunnel → Linux PC, 127.0.0.1:8000/v1
-```
-
-## Prerequisites
-
-- A single-server local setup you already understand. Start with [Use OpenHuman with a local model](local-model.md) if you have not routed one workload locally yet.
-- An OpenAI-compatible model server on each machine. You install it, start it and load models yourself. Neither OpenHuman nor the gateway does that.
-- Enough memory and context room on each machine for your models, including KV cache and the concurrency you expect.
-- SSH access from the machine running the core to each remote machine.
-
-## Privacy implications
-
-- A gateway on loopback is not on-device inference. It listens on `127.0.0.1`, but it forwards prompts to whatever upstream its config names, which may be another machine.
-- OpenHuman treats the `local-openai:` prefix as a local runtime and does not inspect the gateway's upstreams. `local_only` privacy mode will not stop a prompt that the gateway relays off the box, so review those destinations yourself.
-- Keep authenticated remote inference behind SSH or HTTPS. Do not send bearer keys over plain HTTP across a network.
-- Changing inference destinations does not move the core's workspace, memory or project files.
-
-## Steps
-
-### 1. Start the model servers
-
-Run the small model on the Mac mini at `http://127.0.0.1:8080/v1`, for example under MLX or LM Studio. Run the larger model on the Linux PC at its own `http://127.0.0.1:8000/v1`, for example under vLLM. Follow each runtime's install and model-loading instructions.
-
-Then, on the Mac mini, forward the Linux endpoint over SSH and keep the tunnel up:
-
-```sh
-ssh -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=30 \
- -L 127.0.0.1:18000:127.0.0.1:8000 [email protected]
-```
-
-The Linux server is now reachable on the Mac mini as `http://127.0.0.1:18000/v1` on the Mac mini.
-
-### 2. Start the gateway
-
-Build and run the gateway following its README. The backend mapping for this example looks like this:
-
-```toml
-[server]
-host = "127.0.0.1"
-port = 18080
-
-[backends.MacMini]
-base_url = "http://127.0.0.1:8080/v1"
-endpoints = ["chat/completions"]
-
-[backends.LinuxGPU]
-base_url = "http://127.0.0.1:18000/v1"
-endpoints = ["chat/completions"]
-# For an authenticated upstream, name an environment variable the gateway reads:
-# api_key_env = "LINUX_LLM_API_KEY"
-```
-
-Check the config, start it, and read back the catalogue:
-
-```sh
-model-router --config router.toml --check-config
-model-router --config router.toml
-curl http://127.0.0.1:18080/v1/models
-```
-
-Use the binary's real path if it is not on `PATH`. A config check does not contact the upstreams, so read `router_errors` as well as `data`, because one reachable backend does not mean every backend is ready. The catalogue prefixes each upstream model ID with its backend name, so `org/model:4bit` on the Mac mini appears as `MacMini:org/model:4bit`. Colons and slashes inside the upstream ID are left alone.
-
-### 3. Point OpenHuman at the gateway
-
-Merge the following into the active user's `config.toml`, keeping your other settings. Replace the placeholder model IDs with exact IDs from the gateway catalogue. Keep the workload keys at the top level, before the `[local_ai]` table, or TOML reads them as part of it:
-
-```toml
-chat_provider = "local-openai:MacMini:your-small-model-id"
-memory_provider = "local-openai:MacMini:your-small-model-id"
-reasoning_provider = "local-openai:LinuxGPU:your-large-model-id"
-agentic_provider = "local-openai:LinuxGPU:your-large-model-id"
-coding_provider = "local-openai:LinuxGPU:your-large-model-id"
-
-[local_ai]
-runtime_enabled = true
-opt_in_confirmed = true
-provider = "lm_studio"
-base_url = "http://127.0.0.1:18080/v1"
-chat_model_id = "MacMini:your-small-model-id"
-vision_model_id = ""
-```
-
-Three keys need care:
-
-| Key | What it does here |
-| --- | --- |
-| `local-openai:` prefix | Selects OpenHuman's generic OpenAI-compatible runtime (`crates/openhuman-core/src/inference/provider/factory/local_runtime.rs`). The rest of the string is passed to the endpoint unchanged, so `MacMini:your-small-model-id` reaches the gateway intact and the gateway strips `MacMini:` before forwarding. |
-| `local_ai.base_url` | The endpoint every `local-openai:` route falls back to. This is what points OpenHuman at the gateway. |
-| `local_ai.provider` | Selects which runtime the Local AI settings page talks to. It does not affect a `local-openai:` route, where the prefix decides. `lm_studio` is simply the existing identifier for a local OpenAI-compatible server. |
-
-`OPENHUMAN_LOCAL_INFERENCE_URL` and `LOCAL_OPENAI_URL` in the core's environment both take priority over `local_ai.base_url`, in that order. Update or unset them when you change endpoints. The full precedence order is in [Local AI](../features/model-routing/local-ai.md#supported-runtimes).
-
-Assign vision only to a vision-capable model, through `vision_provider` and `local_ai.vision_model_id`. This example is text-only and leaves vision and embeddings on their existing routes. Embeddings and the memory engine are configured separately, and a gateway does not reroute them. A gateway can forward an embeddings path to a compatible service, but it does not translate between APIs or start anything. Any workload you do not assign keeps its route.
-
-### 4. Verify each route
-
-Send a short chat message, which should land on the small model. Then run a reasoning or agentic turn, which should land on the large one. Confirm the backend and model in the gateway logs and the reply in OpenHuman. Model discovery and a `/health` probe do not prove inference works. If your models support streaming and tool calls, test both.
-
-## Success checks
-
-- [ ] `curl http://127.0.0.1:18080/v1/models` lists models from every backend, with no entries in `router_errors`.
-- [ ] A chat turn answers, and the gateway log shows the Mac mini backend.
-- [ ] A reasoning or agentic turn answers, and the gateway log shows the Linux backend.
-- [ ] Killing the SSH tunnel makes the large-model workload fail instead of silently answering from somewhere else.
-
-## Common failures
-
-| What you see | Meaning | Fix |
-| --- | --- | --- |
-| The model is not found | The workload names an ID that is not in the gateway catalogue | Copy the exact prefixed ID from `/v1/models` |
-| Only one backend answers | The other upstream is down, or its tunnel dropped | Check `router_errors`, then restart the server or the tunnel |
-| Every local route hits the wrong endpoint | An environment override is still set | Unset `OPENHUMAN_LOCAL_INFERENCE_URL` and `LOCAL_OPENAI_URL`, or point them at the gateway |
-| Workload keys are ignored | They were written after `[local_ai]`, so TOML read them as part of that table | Move them above the table |
-
-## Keeping it up
-
-Run the gateway under a per-user LaunchAgent or a systemd user service if you need it always available, and supervise the SSH tunnel separately. Re-check the gateway config and restart it after every change. This gateway returns an error when an upstream fails. It has no automatic retry and no fallback, which is what you want when the alternative is a silent reroute.
-
-The gateway listens only on loopback and has no inbound authentication of its own. It keeps upstream keys separate from the core's `Authorization` header.
-
-## Next steps
-
-- [Use OpenHuman with a local model](local-model.md): the single-server version of this setup.
-- [Local AI](../features/model-routing/local-ai.md): provider strings, endpoint precedence and every `local_ai` field.
-- [Privacy mode](../features/privacy-mode.md): why `local_only` cannot vouch for a gateway's upstreams.
-- [Keep sensitive data private](privacy-sensitive-data.md): what leaves your machines.
diff --git a/gitbooks/guides/organize-project-folders.md b/gitbooks/guides/organize-project-folders.md
deleted file mode 100644
index 52af8d8b06..0000000000
--- a/gitbooks/guides/organize-project-folders.md
+++ /dev/null
@@ -1,89 +0,0 @@
----
-description: >-
- Let OpenHuman tidy, rename and restructure a folder inside a boundary you
- set, with changes held for your approval at the supervised tier.
-icon: folder-tree
----
-
-# Organize my project folders
-
-This guide points the assistant at a folder and has it clean up: sort files, rename them consistently and remove clutter. It cannot roam your whole disk, and it cannot make changes you did not see.
-
-The agent works inside a boundary you define. With the autonomy policy on at the `supervised` tier, any file change that is not provably read-only waits for your approval. At `full`, routine writes run on their own and only network, install and destructive actions stop to ask.
-
-## Prerequisites
-
-- OpenHuman set up. See [Create my personal AI assistant](personal-assistant.md).
-- A specific folder you want organized. If the contents are irreplaceable, copy the folder first.
-
-## Privacy implications
-
-- File organizing is local. Reading, moving and renaming files happens on your machine.
-- If you ask the agent to reason about file contents (for example, "group these by topic"), it may send relevant snippets to the model. Route inference to a [local model](local-model.md) if you want that reasoning on-device too.
-- The agent cannot touch system or credential folders (`~/.ssh`, `~/.gnupg`, `~/.aws`, OS directories). They are blocked regardless of settings.
-
-## Steps
-
-### 1. Decide where the agent may act
-
-{% hint style="warning" %}
-Everything in this step needs the autonomy policy switched on. It is off by default. Set `[autonomy] enabled = true` in `config.toml` (`~/.openhuman/config.toml`, or `%USERPROFILE%\.openhuman\config.toml` on Windows). Without it, trusted roots, `workspace_only` and the approval gate do nothing, and acting tool calls run unprompted. Credential stores and system roots stay blocked either way.
-{% endhint %}
-
-Confining the agent to its working folder needs two things: the policy enabled and `workspace_only` on. With both, the agent reads and writes only in its working folder and has no access to the rest of your disk. If either is off, the boundary is not enforced.
-
-A trusted root is a deliberate exception. It grants access to a folder outside the working folder and takes precedence over `workspace_only`. To let the agent work in a folder elsewhere, add it as a trusted root:
-
-1. Open **Settings → Agent access**.
-2. Add the target folder as a trusted root with read-write access.
-
-Keep the boundary as tight as the task. Grant the one folder, not your home directory.
-
-### 2. Set the autonomy tier
-
-In the same `[autonomy]` block, `level` decides how much runs without asking:
-
-- `supervised` (recommended): the agent proposes each change, and you approve moves, renames and deletes as they come, except for tools on the always-allow list.
-- `full`: routine file writes run automatically. Still keep the trusted root tight so "automatic" stays contained.
-
-Deleting and moving files change state, so at `supervised` the [Approval Gate](../features/approval-gate.md) holds them for your yes or no. If you answer **Always allow** to a prompt, that tool goes on the always-allow list and its calls run without a fresh approval. Remove it from the list in **Settings → Agent access** to review each call again.
-
-### 3. Ask for the reorganization
-
-Be concrete about the folder and the rules. For example:
-
-- "In my trusted `~/Documents/receipts` folder, rename every file to `YYYY-MM-DD-vendor.pdf` based on its contents, and move anything older than 2023 into an `archive/` subfolder."
-- "Group the loose files in this folder into subfolders by type, and show me the plan before doing anything."
-
-### 4. Review each proposed action
-
-When the agent wants to move, rename or delete, an Approval Request card shows the exact action. You can **Approve** it, **Always allow** a safe, repetitive one, or **Deny** it. You can also type "yes" or "no".
-
-## Success checks
-
-- [ ] The policy is enabled and `workspace_only` is on, so the folder boundary is enforced.
-- [ ] The agent touched only the folder you granted, and nothing outside your working folder and trusted roots changed.
-- [ ] Each move, rename and delete showed up as an approval prompt, unless you chose Always allow for that tool.
-- [ ] The folder matches the structure you asked for.
-- [ ] Files you did not mention are untouched.
-
-## Common failures
-
-| Symptom | Cause | Fix |
-| --- | --- | --- |
-| "I can't access that folder" | The folder is not a trusted root, or `workspace_only` is confining the agent | Add it in **Settings → Agent access** as a read-write trusted root |
-| It asks for approval on every file | The `supervised` tier gates each write | Use **Always allow** for the specific safe tool, or narrow the request so there are fewer actions |
-| It refuses to touch a path | The path is a blocked system or credential directory | This is by design. Choose a normal working folder |
-| It reorganized more than you wanted | The instruction was broad | Ask it to show the plan first, and approve selectively |
-
-## Recovery
-
-- At the `supervised` tier nothing runs without approval, apart from tools on your always-allow list. If a plan looks wrong, **Deny** it and it does not happen.
-- Undo is manual. OpenHuman does not roll back file operations, so work on a copy of anything precious, or keep the folder under version control such as `git`.
-- If the agent is doing too much, set both `enabled = true` and `level = "readonly"`. The level does nothing on its own, because with `enabled = false` the whole policy is off. With both set, the agent can still suggest a plan but cannot change files.
-
-## See also
-
-- [Approval Gate](../features/approval-gate.md): what gets held and why.
-- [Coder toolset](../features/native-tools/coder.md): the filesystem and git tools the agent uses here.
-- [Privacy and security](../features/privacy-and-security.md): workspace scoping and path hardening.
diff --git a/gitbooks/guides/personal-assistant.md b/gitbooks/guides/personal-assistant.md
deleted file mode 100644
index 15f7d0fd19..0000000000
--- a/gitbooks/guides/personal-assistant.md
+++ /dev/null
@@ -1,118 +0,0 @@
----
-description: >-
- Go from a fresh install to a personal assistant that knows your context,
- respects the boundaries you set, and acts only with your approval at the
- supervised tier.
-icon: robot
----
-
-# Create my personal AI assistant
-
-This is the start-here guide. By the end you have an assistant that remembers part of your world, replies in a style you like, and, on the supervised tier, takes no real-world action without your say-so. It assumes nothing beyond a downloaded app.
-
-## Prerequisites
-
-- OpenHuman installed on macOS, Windows, or Linux. If you have not installed yet, do [Getting started](../overview/getting-started.md) first, then come back.
-- 4 GB+ RAM (16 GB or more if you plan to connect very large mailboxes or run a [local model](local-model.md)).
-- An account to sign in with (social login works).
-- Optional: one account you'd like the assistant to know about (Gmail is the usual first one).
-
-## Privacy implications
-
-- Signing in does not grant ongoing access to anything. Every integration is a separate OAuth approval that you can revoke later.
-- Your memory is stored by the engine you choose: hosted TinyHumans or your own CortexDB. With neither, memory is off.
-- By default, chat and reasoning run through the OpenHuman-hosted [model router](../features/model-routing/README.md). If you want inference on-device instead, see [Use OpenHuman with a local model](local-model.md).
-- For the full picture, see [Keep sensitive data private](privacy-sensitive-data.md).
-
-## Steps
-
-### 1. Sign in
-
-Launch the app. The first screen is **Sign in! Let's Cook**. Choose a login option. An **Advanced** panel lets you point at a custom core, which most people can ignore.
-
-### 2. Choose how AI runs
-
-After sign-in you choose how AI runs:
-
-- **Cloud** takes one click, and the hosted model router handles inference. It is the fastest way to a working assistant.
-- **Custom** lets you choose your inference provider, voice, integrations (OAuth), web search and embeddings yourself.
-
-If you are not sure, pick Cloud. You can change any of this later in **Settings**.
-
-### 3. Give it something to remember
-
-An assistant with no memory is a chatbot. Connect at least one source so it has context:
-
-- Open **Settings** and connect an integration (Gmail is the common starting point). Each connection is a one-click OAuth approval.
-- Add folders, files or links as sources under **Connections → Memory** so they sync into [Memory](../features/memory.md) on a schedule.
-
-### 4. Set your boundaries
-
-Open `config.toml` in your data folder (`~/.openhuman/config.toml`, or `%USERPROFILE%\.openhuman\config.toml` on Windows) and turn the policy on:
-
-```toml
-[autonomy]
-enabled = true
-level = "supervised" # "readonly" | "supervised" | "full"
-```
-
-| Tier | What it means |
-| --- | --- |
-| `readonly` | The assistant can observe and answer, but never acts: no sending, no file writes, no commands. |
-| `supervised` | It can act, but any state-changing, network, install or destructive action waits for your approval first, unless its tool is on your always-allow list. |
-| `full` | Routine actions run automatically. Network, install and destructive actions still ask. |
-
-{% hint style="warning" %}
-The policy is off until you set `enabled = true`. There is no user-facing switch for the tier, because the panel that holds the radios is a developer-only deep link. Until you turn the policy on, acting tool calls run without a prompt. Credential stores (`~/.ssh`, `~/.gnupg`, `~/.aws`) and system roots stay blocked either way.
-{% endhint %}
-
-`supervised` is the right starting point. With it on, nothing with an external effect happens in a chat unless you say yes. That check is the [Approval Gate](../features/approval-gate.md). The one exception is a tool you add to the always-allow list by answering **Always allow** to a prompt. That tool then runs without a fresh approval. Remove it from the list in **Settings → Agent access** to get per-call review back.
-
-Once the policy is on, **Settings → Agent access** holds the rest of the boundary: the trusted roots, the always-allow list, the action timeout and the workspace-only switch.
-
-### 5. Shape its personality (optional)
-
-An editable prompt called `SOUL.md` defines how the assistant talks and behaves. Its mission and values live in a companion file, `IDENTITY.md`. Both ship with sensible defaults, so you do not have to touch them, but you can:
-
-- Set a display name and short description in **Settings → Personality**.
-- Edit the behavior on the **Brain** page (the raised center button in the bottom bar, `/brain`), where memory, goals and intelligence live.
-
-OpenHuman also learns lasting preferences from how you correct it. See [Personalization and self-learning](../features/personalization.md).
-
-### 6. Run your first real request
-
-Once a source has synced, try:
-
-- "What do I need to know from the last 12 hours?"
-- "What's waiting on me?"
-- "Summarize what I missed today."
-
-## Success checks
-
-You have a working assistant when all of these are true:
-
-- [ ] The app is signed in (you are past the welcome screen and in the chat or home view).
-- [ ] At least one integration shows as connected in Settings.
-- [ ] A briefing prompt ("what's waiting on me?") returns something drawn from your actual data, not a generic answer.
-- [ ] Connections → Memory → Brain shows your source with an item count after it syncs.
-- [ ] When you ask it to do something with an external effect (for example "draft and send an email"), an Approval Request card appears above the chat box instead of the assistant acting silently.
-
-## Common failures
-
-| Symptom | What it means | Fix |
-| ------------------------------------------------ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
-| Sign-in returns to the welcome screen | The OAuth callback did not reach the app | Follow [Troubleshooting sign-in](../overview/troubleshooting-sign-in.md) |
-| Connected a source but memory stays empty | Source not added or not synced yet, or the OAuth scope is too narrow | Press sync on the source; re-check the connection in Settings |
-| Assistant answers generically, ignores your data | It answered without recalling memory | Ask again and name the source ("from my email"). Confirm the source is connected |
-| It did something you did not expect | The autonomy policy is off, or `level` is `full` | Set `[autonomy] enabled = true` and `level = "supervised"` in `config.toml` |
-
-## Recovery
-
-- **Reset boundaries fast.** If the assistant is doing too much, set both `enabled = true` and `level = "readonly"` in `config.toml`. The level alone changes nothing while `enabled` is `false`, because the whole policy is off then. With both set, it takes effect on the next turn and blocks all acting.
-- **Nothing you connect is permanent.** Revoke any integration from Settings. Items already in your memory engine stay until you forget them, or until you tick **Also delete memory from this source** when disconnecting. The next sync stops pulling that source.
-- **If the app will not start,** see [Recover from a failed installation](recover-failed-installation.md). Your configuration is preserved by default.
-
-## Next steps
-
-- [Use OpenHuman with a local model](local-model.md): keep inference on-device.
-- [Keep sensitive data private](privacy-sensitive-data.md): see what leaves your machine.
diff --git a/gitbooks/guides/privacy-sensitive-data.md b/gitbooks/guides/privacy-sensitive-data.md
deleted file mode 100644
index d53e5fd5cb..0000000000
--- a/gitbooks/guides/privacy-sensitive-data.md
+++ /dev/null
@@ -1,95 +0,0 @@
----
-description: >-
- A plain-language map of what OpenHuman keeps on your computer and what it
- sends out, and the settings that keep sensitive work local.
-icon: lock
----
-
-# Keep sensitive data private
-
-This guide explains in everyday language what stays on your machine and what leaves it, so you can decide what OpenHuman should touch. For the engineering detail, read [Privacy and security](../features/privacy-and-security.md). This page is the version you can act on in five minutes.
-
-## The short version
-
-Your settings and local secrets stay on your computer. Your memory is stored in CortexDB, either hosted by TinyHumans for your account or your own. The OpenHuman backend handles what has to be brokered: signing you in, hosted memory, routing model requests, and talking to the services you connect.
-
-## What stays on your machine
-
-These never leave your computer as raw data:
-
-| Thing | Plain meaning |
-| --- | --- |
-| Audio you speak | Captured to transcribe, then discarded. |
-| Local model state | If you use [local AI](local-model.md), your runtime and its models stay on-device. |
-| Your persona and settings | The files that define how your assistant behaves and what it may do. |
-
-## Where your memory is stored
-
-When memory is on, documents, conversations, learnings and the beliefs built from them are stored in CortexDB. With TinyHumans-hosted memory they are not stored on your computer. A CortexDB you host yourself can keep them on your own machine. With no engine available, memory is off and nothing is stored.
-
-- **TinyHumans engine (the default when signed in).** Items are stored in the hosted CortexDB that TinyHumans runs, through the TinyHumans backend. Each account gets its own isolated tenant, so other users cannot see your memory.
-- **CortexDB engine.** Items are stored in your own CortexDB account or self-hosted CortexDB, reached directly with your key. A CortexDB on your own machine keeps the data on that machine.
-
-Secrets and personal identifiers are scrubbed before an item is sent. You can forget single items or whole sources from the Memory page. See [Deleting memory](../features/privacy-and-security.md#deleting-memory) for erasing everything.
-
-## What the backend handles
-
-These leave your machine because they cannot work otherwise. Here is what is sent:
-
-| Thing | What is sent |
-| --- | --- |
-| Hosted memory | With the TinyHumans engine, every item stored and every recall goes through the backend to hosted CortexDB. |
-| Model requests | Only what the assistant needs for that turn: your prompt plus the memory recalled for it. Not your whole memory. |
-| Web search | Your search query goes to the backend proxy, so you do not need your own search key. |
-| Connected services | When you connect Gmail, Slack and so on, the backend brokers each request. It holds your login tokens for those services, so they are not written in plain text on your laptop. |
-| Text-to-speech | The words to be spoken are streamed to generate audio, then discarded. They are not retained. |
-
-{% hint style="info" %}
-Memory is not local, so scrubbing and scoping matter. Items are scrubbed before they are sent, tool-call arguments are never stored, hosted memory is isolated per account, and a model turn sees only what was recalled for it.
-{% endhint %}
-
-## Two promises
-
-- **No training on your data.** Your conversations, memory and personal information are never used to train models.
-- **Secrets live in your operating system's store.** Local secrets are kept in macOS Keychain, Windows Credential Manager or the Linux Secret Service, not in app files. See [OS keyring and secret storage](../features/os-keyring-and-secret-storage.md).
-
-## Making it more local
-
-You have real controls. These run from most to least private:
-
-1. **Route inference on-device.** Run a local runtime such as Ollama yourself, pull the models, and [add it as a provider](local-model.md). Embeddings, summaries and, optionally, chat and reasoning then happen on your machine. OpenHuman does not install the runtime or download models for you. Speech and web search still use the backend proxy.
-2. **Tighten what the assistant can do.** Set `[autonomy] enabled = true` and `level = "readonly"` in `config.toml`. The assistant can then observe and answer but never act or reach the network on its own. The policy is off by default, so you have to turn this on. See the [Approval Gate](../features/approval-gate.md).
-3. **Keep it in one folder.** The filesystem boundary needs two things: the policy enabled and `workspace_only` on. With both, the agent is confined to its working folder and cannot read the rest of your disk. If either is off, the boundary is not enforced. A trusted root is the deliberate exception. Each one you add grants its subtree outside the working folder and takes precedence over `workspace_only`. System and credential folders (`~/.ssh`, `~/.gnupg`, `~/.aws` and OS directories) are always blocked.
-4. **Connect only what you need.** Each integration is a separate OAuth approval that you grant and can revoke. Revoking stops the next sync. Memory already collected stays in your memory engine until you forget it.
-
-## Built-in protections
-
-- **Prompt-injection screening.** Incoming content is screened for attempts to hijack the assistant's instructions before it acts on them.
-- **Secret and personal-data redaction on save.** When content is written into long-lived memory, OpenHuman strips API keys, tokens, private-key blocks and personal identifiers.
-- **Encryption in transit.** All traffic between the app and the backend uses TLS.
-
-## Success checks
-
-You know your privacy posture when you can answer these:
-
-- [ ] Is the autonomy policy on, and do you know its tier? Check `[autonomy]` in `config.toml`.
-- [ ] If you rely on the filesystem boundary, is `workspace_only` on too, and do you know which trusted roots grant access outside the working folder?
-- [ ] Do you know which integrations are connected? Check **Settings** and disconnect any you do not need.
-- [ ] If a workload must stay local, is it routed to a [local provider](local-model.md) that is running and answering?
-- [ ] Are you comfortable that model turns send retrieved snippets, not your whole memory?
-
-## Common misunderstandings
-
-| Belief | Reality |
-| --- | --- |
-| "My memory is stored on my laptop." | It is stored in CortexDB, hosted by TinyHumans or run by you. Only bookkeeping is local. |
-| "OpenHuman uploads my whole memory to the model to answer." | The model gets only what was recalled for that turn. |
-| "My service passwords are on my laptop." | The backend holds integration tokens, and local secrets go in your OS keychain. |
-| "Turning on local AI makes everything local." | Speech-to-text, text-to-speech and web search still use the backend proxy by default, and memory is still stored in CortexDB. |
-| "Revoking an integration deletes what it already gathered." | Memory already ingested stays in your memory engine until you forget it. Revoking only stops future syncing. |
-
-## See also
-
-- [Privacy and security](../features/privacy-and-security.md): the detailed architecture.
-- [Use OpenHuman with a local model](local-model.md): keep inference on-device.
-- [Create a safe companion for a child](child-safe-companion.md): the strictest lockdown, built from these controls.
diff --git a/gitbooks/guides/recover-failed-installation.md b/gitbooks/guides/recover-failed-installation.md
deleted file mode 100644
index 89fb5d3f6a..0000000000
--- a/gitbooks/guides/recover-failed-installation.md
+++ /dev/null
@@ -1,116 +0,0 @@
----
-description: >-
- Get a broken or half-installed OpenHuman running again without losing your
- memory, personas or settings.
-icon: life-ring
----
-
-# Recover from a failed installation
-
-Use this guide when the app will not install, will not start, or starts broken, and you want it working again without wiping your data.
-
-Your configuration and memory are preserved by default. Recovery means fixing the app around your data, not deleting the data. The only step that touches your data folder is a last resort, and it keeps a backup.
-
-## Prerequisites
-
-- Nothing special. You need the app, a file manager and, occasionally, a terminal.
-- Know where your data lives. Everything OpenHuman keeps is in one folder:
-
- | Platform | Data folder |
- | ------------- | --------------------------- |
- | macOS / Linux | `~/.openhuman/` |
- | Windows | `%USERPROFILE%\.openhuman\` |
-
- Leave that folder alone unless a step here explicitly says to touch it.
-
-## Privacy implications
-
-- Recovery is local. You restart or reinstall software, and your memory is not uploaded.
-- If you file a bug report, redact secrets. Share status codes, app version, OS and log lines, never tokens or JWTs.
-
-## First: read the logs
-
-Almost every failure names itself in the log, so start there.
-
-- In the app, if it opens: **Settings → About → App Logs Folder** reveals the folder in your file manager.
-- On disk: logs are under your data folder, for example `~/.openhuman/logs/openhuman.<date>.log` (Windows: `%USERPROFILE%\.openhuman\logs\openhuman.*.log`). They rotate daily.
-
-Open the most recent log, read the last error lines, and match the message to the table below.
-
-## Recovery ladder
-
-Work from the top and stop as soon as it works. Each rung is more disruptive than the last, and the early rungs never touch your data.
-
-### Rung 1: Restart cleanly
-
-- Quit OpenHuman fully, make sure no process is left running, and reopen it.
-- Run only one instance at a time. A second copy can hold a lock the first needs.
-
-### Rung 2: Reinstall the app over your data
-
-Reinstalling the application does not delete your data folder, because they are separate. This fixes a corrupted or partial install and keeps everything.
-
-- Download the current build from [tinyhumans.ai/openhuman](https://tinyhumans.ai/openhuman) or the [latest release](https://github.com/tinyhumansai/openhuman/releases/latest) and install over the top.
-- On macOS, install the real `.app` bundle. Some features need the bundle, not a dev build.
-- Reopen the app. Your memory, personas and settings are still there, because they live in `~/.openhuman/`.
-
-### Rung 3: Fix the specific error
-
-Match your symptom to a fix:
-
-| Symptom in logs / UI | Cause | Fix |
-| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
-| Sign-in stalls after the provider step; log mentions `openhuman://` scheme not registered (Windows) | The URL handler didn't register, or the install was moved after first launch | Follow the repair steps in [Troubleshooting sign-in](../overview/troubleshooting-sign-in.md#windows-openhuman-handler-not-registered) |
-| App won't render, or the window opens blank | A previous instance is still holding the port or the webview data directory | Ensure no other OpenHuman is running; if it persists, close all instances and relaunch |
-| Local AI / Ollama errors | The local runtime you configured isn't running, or a model isn't pulled | This does not block the app. OpenHuman does not install or start the runtime, so start it yourself. See [Use OpenHuman with a local model](local-model.md#common-failures) |
-| "Low disk space" warning, or writes failing | The workspace can't be written | Free up space (the app wants a healthy margin, a few hundred MB minimum) and restart |
-
-### Rung 4: Move the data folder aside (non-destructive reset)
-
-If the app still will not start and you suspect the data folder itself, rename it instead of deleting it. You get a clean start and keep a full backup you can restore.
-
-{% hint style="warning" %}
-Quit OpenHuman completely before moving its folder.
-{% endhint %}
-
-```bash
-# macOS / Linux
-mv ~/.openhuman ~/.openhuman.backup-$(date +%Y%m%d)
-```
-
-```powershell
-# Windows (PowerShell)
-Rename-Item "$env:USERPROFILE\.openhuman" ".openhuman.backup"
-```
-
-Relaunch. OpenHuman creates a fresh data folder and you sign in again.
-
-- If the fresh start works, the old folder was the problem, and your data is safe in the backup. Copy specific pieces back, such as workspace files like `SOUL.md` or `config.toml`, and test after each.
-- If it still fails, the data folder was not the cause. Rename the backup back so you lose nothing, and ask for help (below).
-
-## Success checks
-
-You have recovered when:
-
-- [ ] The app launches to the sign-in or chat screen without crashing.
-- [ ] You can sign in and reach your home or chat view.
-- [ ] Your Memory tab still shows your existing summaries, which confirms your data survived.
-- [ ] The most recent log file shows a clean startup with no repeating error.
-
-## Why your data is safe
-
-Rungs 1 to 3 delete nothing. Rung 4 renames your data folder and never removes it, so even the most aggressive step is reversible. Reinstalling the app never touches `~/.openhuman/`.
-
-## If you are still stuck
-
-Open an issue on [GitHub](https://github.com/tinyhumansai/openhuman) or ask on [Discord](https://guild.tinyhumans.ai). Include:
-
-- App version and OS.
-- The last error lines from the log (with tokens and JWTs redacted).
-- Which rung you reached and what happened.
-- Whether moving the data folder aside changed anything.
-
-## See also
-
-- [Troubleshooting sign-in](../overview/troubleshooting-sign-in.md): the deep dive for auth-specific failures.
-- [Move OpenHuman to a new PC](move-to-new-pc.md): the same data folder is what you carry over.
diff --git a/gitbooks/legal/privacy-policy.md b/gitbooks/legal/privacy-policy.md
deleted file mode 100644
index 55cbd3d27e..0000000000
--- a/gitbooks/legal/privacy-policy.md
+++ /dev/null
@@ -1,76 +0,0 @@
----
-description: >-
- How OpenHuman collects, uses, processes, stores, and protects information
- when you use the service.
-icon: key
----
-
-# Privacy Policy
-
-Last Updated: 02/02/2026
-
-This Privacy Policy describes how we collect, use, process, store, and protect information when you use our system-level AI assistant (the “Service”). The Service is designed to operate as a general-purpose assistive agent on a user’s device, such as a laptop or desktop computer. We are committed to protecting user privacy and minimizing data collection and retention.
-
-This Privacy Policy is intended to comply with applicable global data protection laws, including the EU General Data Protection Regulation (GDPR), India’s Digital Personal Data Protection Act (DPDP), the California Consumer Privacy Act and Privacy Rights Act (CCPA/CPRA), Brazil’s LGPD, and Canada’s PIPEDA.
-
-## Information We Collect
-
-We collect and process information only as necessary to provide the Service and only in response to explicit user actions.
-
-1.1 User Content and System Data When you use the Service, it may process files, application data, system context, or other information on your device only when you explicitly instruct it to do so and only to the extent required to complete a requested task.
-
-1.2 Minimal User Metadata We collect limited user metadata required for basic account or service functionality. This is restricted to: • First name • Last name • User-provided profile information (such as a bio, where applicable)
-
-We do not collect phone numbers, contact lists, precise location data, device identifiers, browsing history, behavioral analytics, or background system activity unless explicitly required for and permitted by a user-requested task.
-
-## How We Use Information
-
-We use information solely to operate, maintain, and provide the Service, including to: • Perform tasks explicitly requested by the user
-
-• Provide contextual assistance across files, applications, or workflows
-
-• Improve reliability and security of the Service
-
-We do not use personal data for advertising, marketing, profiling, or behavioral tracking. We do not sell, rent, or trade personal data. User data is not used to train shared, public, or third-party AI models.
-
-## Data Retention and Deletion
-
-The Service operates under a zero-retention-by-default design.
-
-• System data and content are processed transiently
-
-• No long-term logs of system activity, files, or actions are maintained
-
-• Temporary data required to complete a task is deleted immediately after task completion or within a maximum of 30 days
-
-Users may request deletion of their data at any time. Upon such request, all associated data is permanently deleted and cannot be recovered. Revoking permissions or uninstalling the Service immediately halts further processing.
-
-## Legal Bases for Processing
-
-Where required by law, we process personal data based on one or more of the following legal bases:
-
-• User consent
-
-• Performance of a contract
-
-• Legitimate interests, where applicable and balanced against user rights
-
-## Security Measures
-
-We implement reasonable and appropriate technical and organizational measures designed to protect information from unauthorized access, loss, misuse, or alteration. These measures include encryption in transit and at rest, least-privilege access controls, isolated processing environments, and internal monitoring and audit mechanisms. Access to user data by personnel is restricted to operational, security, or legal necessity.
-
-## Service Providers
-
-We may engage third-party service providers to support operation of the Service, such as infrastructure hosting or AI inference providers. These providers act only on our behalf, are subject to confidentiality obligations, and are restricted from using data for their own purposes.
-
-## International Data Transfers
-
-Information may be processed in locations outside your country of residence. Where applicable, we implement appropriate safeguards to ensure adequate protection consistent with applicable data protection laws.
-
-## Your Rights
-
-Depending on your location, you may have rights to access, correct, delete, restrict processing of, or withdraw consent for your personal data, as well as request data portability. Requests can be done on the dashboard at any time or may be submitted to [email protected].
-
-## Changes to This Policy
-
-We may update this Privacy Policy from time to time. Material changes will be communicated as required by law. Changes will not apply retroactively in a manner that reduces existing privacy protections.
diff --git a/gitbooks/legal/terms-of-use.md b/gitbooks/legal/terms-of-use.md
deleted file mode 100644
index 56078e70ed..0000000000
--- a/gitbooks/legal/terms-of-use.md
+++ /dev/null
@@ -1,60 +0,0 @@
----
-description: Terms and conditions governing use of the OpenHuman service.
-icon: file-contract
----
-
-# Terms & Conditions
-
-Last Updated: 2026-02-02
-
-These Terms & Conditions (“Terms”) govern your use of the Service. By installing, accessing, or using the Service, you agree to be bound by these Terms. If you do not agree, you must not use the Service.
-
-## The Service
-
-The Service is a system-level AI assistant designed to help users complete tasks, automate workflows, and interact with files, applications, and system resources based on explicit user instructions. The Service acts only on user requests and does not operate autonomously.
-
-## User Responsibilities
-
-You agree to:
-
-• Use the Service in compliance with applicable laws and regulations
-
-• Use the Service only with content and systems you have the right to access
-
-• Not use the Service for surveillance, harassment, or unlawful activity
-
-• Not attempt to reverse engineer, interfere with, or misuse the Service
-
-You are responsible for reviewing and validating any outputs before acting on them.
-
-## Content and Data Ownership
-
-You retain ownership of your content, files, and data. We do not claim ownership over user content or AI-generated outputs. Our access to data is limited, permission-based, and solely for the purpose of providing the Service.
-
-## AI Outputs Disclaimer
-
-The Service uses artificial intelligence systems that generate outputs probabilistically. Outputs may be inaccurate, incomplete, or outdated. The Service does not guarantee accuracy, reliability, or suitability for any purpose and does not replace professional judgment. You are solely responsible for how you use AI-generated outputs.
-
-## Availability and Modifications
-
-We may modify, suspend, or discontinue the Service or any part of it at any time, including to improve functionality, address security issues, or comply with legal requirements.
-
-## Limitation of Liability
-
-To the maximum extent permitted by law, the Service is provided on an “as is” and “as available” basis. We disclaim all warranties, express or implied. We are not liable for indirect, incidental, consequential, special, or punitive damages, including loss of data, loss of profits, or reliance on AI-generated outputs. We are not responsible for interruptions or failures caused by third-party software, operating systems, or services.
-
-## Indemnification
-
-You agree to indemnify and hold harmless the Service and its affiliates from claims, damages, losses, or expenses arising from your use of the Service, violation of these Terms, or infringement of third-party rights.
-
-## Termination
-
-You may stop using the Service at any time. We may suspend or terminate access if you violate these Terms or if required by law. Upon termination, data will be handled in accordance with the Privacy Policy.
-
-## Governing Law
-
-These Terms are governed by the laws of \[Insert Jurisdiction], without regard to conflict of law principles.
-
-## Onboarding Consent (Shown During Installation)
-
-By installing or using this AI assistant, you consent to it accessing system information, files, and application context solely to perform tasks you explicitly request. The assistant does not monitor your system continuously, does not act without instruction, and does not retain system data beyond what is necessary to complete a task. You remain in control of permissions at all times and may revoke access or delete your data at any time. Your data is not used for advertising or to train shared AI models.
diff --git a/gitbooks/overview/auto-update.md b/gitbooks/overview/auto-update.md
deleted file mode 100644
index 1ddd50659e..0000000000
--- a/gitbooks/overview/auto-update.md
+++ /dev/null
@@ -1,55 +0,0 @@
----
-description: >-
- How OpenHuman updates itself: one signed manifest, a bounded download retry,
- and a single update that covers the app and its core.
-icon: arrows-rotate
----
-
-# Auto-update
-
-OpenHuman updates the whole app in one step. The core is linked into the desktop shell, so there is no separate core update. Updating the shell upgrades both.
-
-## What you see
-
-When a newer build is available, the app downloads it in the background. A prompt appears once the download is ready and moves through **ready to install**, **installing** and **restarting**. If you are current you see **up to date**. A failure says so instead of retrying forever.
-
-Before installing, the app shuts down the in-process core under the same restart lock it uses elsewhere. That way replacing the bundle never races a core that still holds file handles, which keeps a `.app` replacement on macOS clean.
-
-## Where updates come from
-
-There is one endpoint, a manifest published with every release:
-
-```text
-https://github.com/tinyhumansai/openhuman/releases/latest/download/latest.json
-```
-
-Every artifact is signed, and the public key is compiled into the app. A build whose signature does not verify is refused. There is no update server to trust and no second channel.
-
-## Retries
-
-A download gets three attempts: one try plus two retries, with a delay of two seconds times the attempt number.
-
-Only transient network failures are retried. Signature failures, filesystem errors and "no artifact for this target" are not. Downloading again cannot fix a bad signature, and looping on a failed verification would waste bandwidth and could hide tampering. The policy lives in `crates/openhuman-app/src/app_update.rs`, where `classify` and `is_transient_updater_err` decide.
-
-## Periodic checks
-
-The core runs the schedule, set under `[update]` in `config.toml`:
-
-| Key | Default | What it does |
-| --- | --- | --- |
-| `enabled` | `true` | Turns periodic checks off when set to `false`. |
-| `interval_minutes` | `60` | How often to check. The minimum is 10 minutes. |
-| `restart_strategy` | `self_replace` | `self_replace` restarts in place after staging. `supervisor` stages the update and leaves the restart to whatever manages the process. |
-| `rpc_mutations_enabled` | `true` | Whether a bearer-authenticated RPC client may call the mutating update methods. |
-
-Use `supervisor` for a headless or containerized core, where something else owns the process lifecycle and the update should not restart it.
-
-## Headless and self-hosted cores
-
-A core you run yourself (`openhuman-core serve`) checks and stages updates through the `update` namespace instead of the desktop prompt. That is why `rpc_mutations_enabled` is a separate switch. The old desktop commands `check_core_update` and `apply_core_update` still exist for frontend compatibility but do nothing.
-
-## See also
-
-- [Platform and availability](../features/platform.md): what ships on each OS.
-- [Release policy](../developing/release-policy.md): how a release is cut, and the OAuth minimum-version gate.
-- [Cloud deploy](../features/cloud-deploy.md): running the core somewhere else.
diff --git a/gitbooks/overview/getting-started.md b/gitbooks/overview/getting-started.md
deleted file mode 100644
index a0ecda0ea5..0000000000
--- a/gitbooks/overview/getting-started.md
+++ /dev/null
@@ -1,93 +0,0 @@
----
-description: >-
- Install OpenHuman, sign in, choose how AI runs, connect an app, and make your
- first request against your own memory.
-icon: play
----
-
-# Getting started
-
-This page takes you from install to your first request. OpenHuman is open source under the GNU GPL3 license, and the code is at [github.com/tinyhumansai/openhuman](https://github.com/tinyhumansai/openhuman).
-
-{% hint style="info" %}
-If you want a specific outcome, such as a private assistant, a local model, a broken install fixed, or a move to a new machine, the [Guides](../guides/README.md) have task-by-task walkthroughs.
-{% endhint %}
-
-## System requirements
-
-OpenHuman runs on macOS, Windows and Linux desktops. 4 GB of RAM is recommended. Plan for 16 GB or more if you will ingest very large mailboxes or repos, or run a [local model](../features/model-routing/local-ai.md) on the same machine. For a local model you install the runtime (such as Ollama) and pull the models yourself.
-
-The first time you launch the app, your OS asks for the permissions it needs: Accessibility on macOS, and Input Monitoring for the voice hotkey. You can review them any time under **Settings**.
-
-## 1. Download and install
-
-Download the desktop app from [tinyhumans.ai/openhuman](https://tinyhumans.ai/openhuman) or the [latest GitHub release](https://github.com/tinyhumansai/openhuman/releases/latest). You can also use the install scripts, which download the release and check its SHA-256 before installing:
-
-```bash
-# macOS and Linux
-curl -fsSL https://raw.githubusercontent.com/tinyhumansai/openhuman/main/scripts/install.sh | bash
-```
-
-```powershell
-# Windows (PowerShell)
-irm https://raw.githubusercontent.com/tinyhumansai/openhuman/main/scripts/install.ps1 | iex
-```
-
-A Homebrew cask also exists, but it can lag the latest release. Open the app once it is installed.
-
-## 2. Sign in
-
-The first screen is **Sign in! Let's Cook**. You can sign in with social login or other options. An **Advanced** panel lets you point the app at a custom core RPC URL if you run your own backend. Most people can ignore it.
-
-{% hint style="info" %}
-Signing in does not give OpenHuman ongoing access to anything. Each third-party integration needs its own OAuth approval in the steps below.
-{% endhint %}
-
-{% hint style="warning" %}
-Your workspace config and runtime state live on your machine. The default setup still uses OpenHuman-hosted services for sign-in, model routing, managed integration OAuth and tool calls, and web search. Use the custom setup paths to bring your own model, search or Composio credentials. Some hosted features and real-time integration triggers need the managed backend.
-{% endhint %}
-
-## 3. Connect something and set up memory
-
-Onboarding asks how AI should run. You can use the managed TinyHumans route, or a custom setup where you bring your own model, search, embeddings and connector keys. Then it drops you into the app. Two things make your first request worth making:
-
-- **An integration.** Open [Connections](../features/connections.md), then Apps, and connect one. Gmail is a common first choice. Each connection is a one-click OAuth approval that you can revoke.
-- **A memory engine.** Open Connections, then Memory. When you are signed in, the hosted engine is already there. Otherwise point it at your own CortexDB. With neither, [memory](../features/memory.md) is off and the agent starts from zero every chat.
-
-Add the integration as a memory source on the Brain tab to sync it on a schedule.
-
-## 4. Run your first request
-
-Once a memory source has synced, try prompts like these.
-
-Briefings:
-
-- "What do I need to know from the last 12 hours?"
-- "What's waiting on me?"
-
-Cross-source questions:
-
-- "Summarize what I missed today."
-- "What are the key decisions from this week?"
-- "Extract action items from my recent conversations."
-- "What did Sarah say about the project across email and chat?"
-
-OpenHuman picks the right model for each task. See [Automatic model routing](../features/model-routing/README.md).
-
-## 5. Keep going
-
-Now that the agent has memory and a model, the rest of the product gives it more to work with:
-
-- [Chat](../features/chat.md): what a turn can do, and the four ways it stops to ask you something.
-- [Connections](../features/connections.md): everything the agent plugs into, on one page.
-- [Memory](../features/memory.md): connect more sources and sync them on a schedule.
-- [Workflows](../features/workflows.md): describe an automation and review the graph the agent proposes.
-- [Native voice](../features/native-tools/voice.md): dictation, spoken replies, or a live voice agent.
-- [Roadmap](roadmap.md): what is coming, and what was removed.
-
-## Join the community
-
-OpenHuman is in early beta, and feedback and contributions matter.
-
-- GitHub: [github.com/tinyhumansai/openhuman](https://github.com/tinyhumansai/openhuman)
-- Discord: [guild.tinyhumans.ai](https://guild.tinyhumans.ai)
diff --git a/gitbooks/overview/roadmap.md b/gitbooks/overview/roadmap.md
deleted file mode 100644
index b5f5a3d646..0000000000
--- a/gitbooks/overview/roadmap.md
+++ /dev/null
@@ -1,54 +0,0 @@
----
-description: >-
- What is being worked on next, and the known gaps, tracked in public issues.
-icon: map
----
-
-# Roadmap
-
-This page is a reading of the open issue tracker, not a commitment. It has no dates. Each item links to the issue that owns it, so the issue stays the source of truth if this page goes stale.
-
-## Taking off the early-beta badge
-
-[This checklist](https://github.com/tinyhumansai/openhuman/issues/6047) defines done. The badge comes off when its boxes are closed, the memory smoke test passes on macOS, Windows and Linux, and the release workflow can publish without hand-holding. A ticked box is not always a passing test, so read each box against the text beside it.
-
-| Area | State |
-| --- | --- |
-| Memory end to end (store, restart, recall, and the agent actually uses it) | Two of three items ticked ([one](https://github.com/tinyhumansai/openhuman/issues/6041), [two](https://github.com/tinyhumansai/openhuman/issues/6040)). The third is the end-to-end smoke test, which the checklist records as not passing yet. |
-| Reply persistence: a completed reply never vanishes | Done |
-| Clean-install sign-in on all three platforms | [Open](https://github.com/tinyhumansai/openhuman/issues/6020) |
-| Windows: native modules are refused when `%TEMP%` grants Modify to a non-owner group, which leaves memory and connectors unavailable | [Open](https://github.com/tinyhumansai/openhuman/issues/6008) |
-
-The release-pipeline and Windows path-length blockers on the checklist have since been closed, though their boxes are still unticked.
-
-## Larger efforts
-
-- **Agent to agent.** [This umbrella issue](https://github.com/tinyhumansai/openhuman/issues/3463) covers five phases: an agent-card endpoint and discovery, accepting tasks, delegating to an external agent as a tool, streaming and push notifications, and multi-instance coordination.
-- **Pluggable memory adapters.** [This issue](https://github.com/tinyhumansai/openhuman/issues/5390) adds an adapters directory and the dependency rule. Supermemory, mem0, agentmemory and cognee would follow. Today [memory](../features/memory.md) has two engines and no adapter directory.
-- **External agent runtimes.** [This issue](https://github.com/tinyhumansai/openhuman/issues/4731) adds a layer for driving Cursor, Windsurf and Codex, with a shared ACP transport for more and per-session model and effort selection. Session import from one of them is the active part.
-- **Local and self-hosted.** [One issue](https://github.com/tinyhumansai/openhuman/issues/6130) would bring back a managed local runtime with model downloads and a compute-backend selector. Today local inference means an endpoint you run yourself. [Another](https://github.com/tinyhumansai/openhuman/issues/4844) is a no-UI Linux build for a server or a Raspberry Pi.
-- **Observability.** [This issue](https://github.com/tinyhumansai/openhuman/issues/4496) adds scores to traces, so user feedback and automated quality signals sit next to the run they describe.
-
-## Built but not working yet
-
-Two surfaces exist in the build and do nothing:
-
-- Follow-up suggestion chips are built but nothing produces them, so the row is always empty ([issue](https://github.com/tinyhumansai/openhuman/issues/6465)).
-- SearXNG is configurable and reachable over the MCP server, but `searxng_search` is not registered as an agent tool, so the agent in chat cannot use it ([issue](https://github.com/tinyhumansai/openhuman/issues/6127)).
-
-The app also lists its own maturity. **Settings → About** shows every capability as stable, beta or coming soon. It is a better answer than this page to "is X finished".
-
-## Recently removed
-
-These features were once documented and are gone:
-
-- The live Google Meet agent. It joined a call through the old embedded Chromium webview and spoke back as a camera stream. See [Voice](../features/native-tools/voice.md).
-- The embedded Chromium (CEF) runtime. The shell now uses Tauri's native webview, and browser control drives a real Chrome over the DevTools protocol. See [Browser and computer control](../features/native-tools/browser-and-computer.md) and the historical [CEF notes](../developing/cef.md).
-- In-app model downloads and runtime management for local models. Point OpenHuman at a server you run.
-- The skills sandbox. Skills are now a catalogue you browse and install, plus a run surface, not code running in a JavaScript sandbox in the app.
-- The memory tree, graph view, people list and `MEMORY.md`, replaced by the per-turn memory pack. [Memory](../features/memory.md) has the full list.
-
-## See also
-
-- [Release policy](../developing/release-policy.md): how a release is cut and what the version gate does.
-- [Platform and availability](../features/platform.md): what runs where today.
diff --git a/gitbooks/overview/troubleshooting-sign-in.md b/gitbooks/overview/troubleshooting-sign-in.md
deleted file mode 100644
index 5bb3f89547..0000000000
--- a/gitbooks/overview/troubleshooting-sign-in.md
+++ /dev/null
@@ -1,86 +0,0 @@
----
-description: >-
- Diagnose sign-in failures, OAuth callbacks that do not complete, and remote
- core RPC authentication problems.
-icon: key
----
-
-# Troubleshooting sign-in
-
-Use this checklist when social sign-in hangs, returns to the welcome screen, or the core logs an unauthorized `/auth` request.
-
-## Check backend reachability
-
-From the same network as the desktop app, check the public OpenHuman endpoints:
-
-```bash
-curl -I https://tinyhumans.ai/
-curl -I https://api.tinyhumans.ai/health
-```
-
-If the website loads but the API endpoint fails, the desktop app may not be able to exchange OAuth callbacks for a session. Note the HTTP status, region and DNS result for any bug report.
-
-## Check the selected core
-
-If you use the **Advanced** remote-core mode, confirm both the RPC URL and bearer token before starting OAuth:
-
-```bash
-curl -sS https://your-core.example/rpc \
- -H "Content-Type: application/json" \
- -H "Authorization: Bearer CORE_TOKEN" \
- -d '{"jsonrpc":"2.0","id":1,"method":"core.ping","params":{}}'
-```
-
-A `401` means the desktop token and the remote core token do not match. Fix that before you retry Google or GitHub sign-in.
-
-## Check the deep-link callback
-
-A successful desktop sign-in ends with an `openhuman://auth?...` callback. If the browser shows that URL but the app stays on the welcome screen:
-
-1. Make sure only one OpenHuman desktop instance is running.
-2. Restart the app, keep the same remote-core settings, and retry sign-in.
-3. With a remote core, check whether the core receives `openhuman.auth_set_credential`. The desktop shell checks the session against the backend first, then hands the credential to the core.
-
-## Windows: `openhuman://` handler not registered
-
-On Windows, the app registers the `openhuman://` URL scheme at first launch under `HKEY_CURRENT_USER\Software\Classes\openhuman\shell\open\command`. If that registration failed, or you moved or copied the install after first launch, the browser cannot hand the OAuth callback back to the app. Sign-in then stalls after the provider step.
-
-The app logs an error at startup when this happens. Look for it in your log file (by default `%USERPROFILE%\.openhuman\logs\openhuman.*.log`):
-
-```text
-[deep-link] openhuman:// scheme registration unhealthy: OAuth callbacks may never reach the app.
-register_all_error=..., hkcu_status=NotRegistered|MissingCommand|Stale { ... }|ReadError(...)
-```
-
-To repair it, open PowerShell as the same user that runs OpenHuman. You do not need admin rights, because HKCU is per user. Replace the path with your install location:
-
-```powershell
-$exe = 'C:\Path\To\OpenHuman.exe' # update this
-New-Item -Path 'HKCU:\Software\Classes\openhuman' -Force | Out-Null
-Set-ItemProperty -Path 'HKCU:\Software\Classes\openhuman' -Name '(Default)' -Value 'URL:OpenHuman Protocol'
-New-ItemProperty -Path 'HKCU:\Software\Classes\openhuman' -Name 'URL Protocol' -Value '' -Force | Out-Null
-New-Item -Path 'HKCU:\Software\Classes\openhuman\shell\open\command' -Force | Out-Null
-Set-ItemProperty -Path 'HKCU:\Software\Classes\openhuman\shell\open\command' -Name '(Default)' -Value ('"' + $exe + '" "%1"')
-```
-
-Restart OpenHuman and retry sign-in. If `register_all_error` is not `None` in the log, something is blocking writes to `HKCU\Software\Classes`, such as antivirus or a locked-down image. You must fix that policy first, because the script above hits the same block.
-
-With a remote core, you can inject a credential by hand to confirm the core is otherwise healthy. The core stores the credential as given, so supply the user id the token belongs to unless the JWT carries a subject claim:
-
-```bash
-curl -sS https://your-core.example/rpc \
- -H "Content-Type: application/json" \
- -H "Authorization: Bearer CORE_TOKEN" \
- -d '{"jsonrpc":"2.0","id":1,"method":"openhuman.auth_set_credential","params":{"token":"JWT_FROM_CALLBACK","userId":"YOUR_USER_ID"} }'
-```
-
-Never paste real JWTs into public GitHub issues. Redact tokens and share only status codes, hostnames, app version, OS and the relevant log lines.
-
-## What to include in a bug report
-
-- App version and OS.
-- Whether the core is local or remote.
-- The RPC URL host, whether a token was set (not the token), and the `core.ping` result.
-- The OAuth provider used.
-- Whether an `openhuman://auth` URL appeared in the browser.
-- The first unauthorized log line, if present.
diff --git a/llms-full.txt b/llms-full.txt
index 2b524b4104..b69c991874 100644
--- a/llms-full.txt
+++ b/llms-full.txt
@@ -2,57 +2,57 @@
> Embed OpenHuman runtimes and independently configured agents in Rust applications.
-- [Embedding OpenHuman](gitbooks/developing/embed/README.md): `openhuman-embed` runs the OpenHuman core inside your Rust program. Your host owns the user interface, server transport and authentication flow; the core owns agent turns, memory, tools, approvals and execution policy. Calling its typed facades does not require a JSON-RPC server or the desktop shell.
-- [Embedding API reference](gitbooks/developing/embed/api-reference.md): Generate usable local Rust API documentation with `cargo doc -p openhuman-embed --no-deps --open`. Include `--features mcp,skills,channels,storage-sqlite` for the facade gates used by the offline examples, or select the feature set your host actually builds. For all exported optional surfaces use `--all-features`.
-- [Embedding architecture](gitbooks/developing/embed/architecture.md): Embed is the library facade above `openhuman-core`. The TinyHumans layer installs the backend SDK transport and owns product login/session behavior; the RPC layer adds JSON-RPC, server listeners and shipped host boot. A Rust embedder can stay at the facade when it owns those concerns itself.
-- [Concepts](gitbooks/developing/embed/concepts/README.md): Start with Runtime and agents to understand which settings are shared. Then follow the lifecycle of a request through provider selection, tools, approvals and its durable session. The scope tables distinguish runtime composition from the state a host must isolate per agent or profile.
-- [Access and approvals](gitbooks/developing/embed/concepts/access-approvals.md): `Access` groups permission level, origin, standing grants and trusted roots. Choose an origin and tier together: a trusted local host request and an external channel message are different security contexts. `Access::full()` configures both access fields. A sandbox is an additional execution boundary, configured through `AgentDefinitionSpec`.
-- [Agents](gitbooks/developing/embed/concepts/agents.md): Register an `AgentSpec` with `Runtime::agent`. Its ID selects the agent's home, durable session identity and addressed cron/channel work. An `Agent` clone refers to the same instance; it does not copy state or start another core. Runtime-wide credentials remain shared, so two agents are not two authenticated customers.
-- [Channels](gitbooks/developing/embed/concepts/channels.md): `Runtime::channels` creates listeners addressed to a live agent ID. A listener owns its transport task; dropping or stopping it ends that listener. The agent supplies the prompt, provider and tools used for every incoming message instead of handing messages to an operator agent.
-- [Completer](gitbooks/developing/embed/concepts/completer.md): Use `Completer` for one-shot text or structured generation when you do not need an agent, its tool loop or persistent transcript. It takes an explicit route and a `CompletionRequest`; the caller supplies the model and messages for every request.
-- [Cron](gitbooks/developing/embed/concepts/cron.md): The typed `Cron` facade creates named jobs with `JobSpec` and `JobSchedule`. `upsert` preserves a job's identity when the same name is configured again; `runs` exposes execution history. An agent-targeted job resolves the configured agent ID and executes with that agent's provider, prompt, tools and derived context.
-- [Errors](gitbooks/developing/embed/concepts/errors.md): Match the error type at its boundary: `RuntimeError` describes boot/configuration, `AgentError` describes registration/layout, and `CoreError` describes typed facade calls and turns. A missing compiled or selected domain is `CoreError::Unavailable`; it is a capability decision the host can reflect in its UI.
-- [Hooks and seams](gitbooks/developing/embed/concepts/hooks-seams.md): Runtime builders accept host-owned ports for storage, sessions, memory, tools and controller extensions. These are composition seams: the host supplies an implementation of the owning library's contract, while OpenHuman retains access policy, approvals and lifecycle.
-- [MCP](gitbooks/developing/embed/concepts/mcp.md): MCP connects a native agent turn to tools served over an MCP protocol transport. Configure a server on `AgentSpec::mcp`, with its transport, authentication and allowed tool names. Another agent on the same runtime does not inherit that server configuration.
-- [Memory](gitbooks/developing/embed/concepts/memory.md): `Runtime::memory(namespace)` returns a facade bound to that namespace. The caller establishes scope before sending record data; namespace identity is not taken from model arguments or record metadata. Learning and deletion use the selected memory engine contract.
-- [Observability](gitbooks/developing/embed/concepts/observability.md): Subscribe with `Runtime::events` before starting work you want to observe. Each event has a sequence number and runtime identity, with an agent ID and per-call turn ID where applicable. Repeated calls on the same durable session receive different turn IDs; the session ID is not the observation ID.
-- [Profiles and SaaS](gitbooks/developing/embed/concepts/profiles-saas.md): Ordinary runtime agents share an operator's configuration path and credentials. Use `ProfileRuntime` when one server serves different authenticated users who must not share those resources. Provision a profile, install its credential, and retain a `ProfileHandle` while serving that user's requests.
-- [Providers](gitbooks/developing/embed/concepts/providers.md): A runtime provider is the default inference choice for its agents. An agent can override it with an OpenAI-compatible route or a native `ChatModel<()>` through `Provider::custom`. The `providers` facade exposes the request/response contracts so custom adapters do not need to implement an HTTP server.
-- [Runtime defaults](gitbooks/developing/embed/concepts/runtime-defaults.md): The runtime's default provider, access policy and `ModelDefaults` reduce repeated setup. `AgentSpec` can override those defaults for an analyst, a writing agent or another workload without changing its siblings. Temperature and token limits are forwarded to the selected native model request, rather than being merely descriptive builder values.
-- [Runtime](gitbooks/developing/embed/concepts/runtime.md): A `Runtime` boots the in-process core once. It owns the selected domains, background services, module host and runtime defaults. Its agents share that core while using separately derived contexts. Build one runtime and pass an `Arc<Runtime>` to the parts of your application that register agents.
-- [Skills](gitbooks/developing/embed/concepts/skills.md): A skill bundle contains `SKILL.md` plus any referenced resources. `AgentSpec::skills_dir` copies bundles into the agent's `agents/<id>/skills/` tree. Copying is intentional: discovery rejects symlinked bundles, so linking a shared directory does not install it.
-- [Testing](gitbooks/developing/embed/concepts/testing.md): The runnable examples default to loopback fixtures. They assert request bodies, tool results, file effects, transcript scope and event ordering; a successful Rust compilation alone does not prove those behaviors. Live example execution is explicitly opt-in through the documented environment variables.
-- [Tools](gitbooks/developing/embed/concepts/tools.md): An agent's `ToolScopeSpec` chooses built-ins, named tools or `HostOnly`. Host-only mode starts with the host's advertised tools, requires an explicit bare prompt, and does not inherit an orchestrator tool catalog. This is useful when your application already owns read-only data access or tightly scoped actions.
-- [Turns and sessions](gitbooks/developing/embed/concepts/turns-sessions.md): `Agent::run` collects a turn. `Agent::turn` lets you set an explicit session, per-turn options, progress sink and cancellation before sending. Reuse the returned session identity for follow-up messages that should see the same transcript. Two calls on the same durable session remain distinct turn executions and receive distinct observation IDs.
-- [Embedding FAQ](gitbooks/developing/embed/faq.md): An ordinary embed process supports one `Runtime`; a second build returns `AlreadyRunning`. Add agents to the existing runtime. A multi-user host uses `ProfileRuntime` instead and needs a process dedicated to that mode. See runtime and profiles.
-- [Embedding guides](gitbooks/developing/embed/guides/README.md): Choose the guide that matches your host:
-- [CLI chatbot](gitbooks/developing/embed/guides/cli-chatbot.md): Keep one `Runtime` alive for the process and create an `Agent` for the conversation. The executable example starts with a single message, checks the reply, and prints it. A CLI input loop can send subsequent messages through the same agent; choose a stable thread identity when your host exposes separate conversations.
-- [Deploy a server](gitbooks/developing/embed/guides/deploy-server.md): Your HTTP host can keep a runtime alive and invoke its agents directly. The executable example binds a loopback listener, handles one request, and sends back the agent's reply. It exercises the request path without requiring an RPC server dependency in `openhuman-embed`.
-- [Lean and headless hosts](gitbooks/developing/embed/guides/lean-headless.md): `RuntimeBuilder::lean()` selects the agent, memory, and inference families without background services. Runtime module selection controls what is active; Cargo features control what is compiled. A lean preset alone does not shed compiled dependencies.
-- [Test with a mock backend](gitbooks/developing/embed/guides/mock-backend-testing.md): Run `node scripts/run-embed-examples.mjs` from the repository root. The runner builds and executes every example with the union of required features, clears inherited live-example credentials and operator workspace settings, and requires each program's `EXAMPLE_OK` marker after its assertions.
-- [Multiple agents](gitbooks/developing/embed/guides/multi-agent.md): A runtime owns shared services and credentials. Each `AgentSpec` selects its prompt, model route, access policy, and `action_dir`. Internal agent state belongs to its agent home; the action directory is where acting tools operate.
-- [SaaS with multiple tenants](gitbooks/developing/embed/guides/saas-multi-tenant.md): Use `ProfileRuntime` for a process serving multiple users. Provision each profile, install that profile's credential, and open a handle to its workspace. Reusing a thread id in two profiles does not share their conversation history.
-- [Installation](gitbooks/developing/embed/installation.md): `openhuman-embed` is currently an unpublished workspace crate. Use a local path dependency when developing in this repository, or a Git dependency on `https://github.com/tinyhumansai/openhuman` with `package = "openhuman-embed"`. Pin a reviewed Git revision for a deployed application; the nested vendored libraries are part of that revision's build inputs.
-- [Embedding integrations](gitbooks/developing/embed/integrations/README.md): An embedded runtime composes the capabilities its host supplies. Start with the adapter your application needs:
-- [Channels](gitbooks/developing/embed/integrations/channels.md): Enable the `channels` Cargo feature to use channel adapters. Your host configures the channel credential and binds incoming messages to an agent. In the Telegram example, the Bot API endpoint is a loopback stub, so updates and replies exercise the adapter without contacting Telegram.
-- [Composio](gitbooks/developing/embed/integrations/composio.md): Composio calls use the host backend transport. Install that transport before booting a managed runtime; see TinyHumans managed inference. An explicit inference provider route supplies model inference, not the connector transport.
-- [Local and custom models](gitbooks/developing/embed/integrations/local-models.md): For a local server that implements chat completions, use `Provider::openai_compatible` with its API root and model id. The constructor requires a bearer string even when a particular local server ignores it. Set the endpoint explicitly rather than relying on another user's installed configuration. The OpenAI-compatible example controls can point a live example at that local server.
-- [MCP servers](gitbooks/developing/embed/integrations/mcp.md): Enable the `mcp` Cargo feature and declare a server with `AgentSpec::mcp`. `McpServer::http` takes a registered name and endpoint; `allow_tools` narrows the remote tool list. Server configuration and its connections belong to the agent that declared them.
-- [OpenAI-compatible providers and BYOK](gitbooks/developing/embed/integrations/openai-compatible.md): Construct a route with `Provider::openai_compatible(base_url, api_key).model(model_id)`, then set it on the runtime or an individual agent. Pass the API root, such as a provider's `/v1` URL; the adapter appends `/chat/completions`. Supply an explicit model id so the route can register that model for its workload roles.
-- [Storage drivers](gitbooks/developing/embed/integrations/storage-drivers.md): Enable `storage-sqlite` for SQLite or `storage-mongodb` for MongoDB on your Embed dependency. These Cargo gates make the driver available; choosing a URL selects the runtime backend. Set `RuntimeConfig.storage.url`, pass a URL through `RuntimeBuilder::storage`, or set the `url` field in the `[storage]` section of the host's configuration. `OPENHUMAN_STORAGE_URL` is the environment override used by host configuration resolution.
-- [TinyHumans managed inference](gitbooks/developing/embed/integrations/tinyhumans-managed.md): Embed wraps the core; it does not contain a TinyHumans SDK backend client. A managed host must supply a `BackendTransport` through `RuntimeBuilder::backend_transport`, or boot through the SDK-backed builder in `openhuman-tinyhumans`. The connected host layer owns transport and session login. `RuntimeBuilder::backend_url` selects a URL; it does not install a transport.
-- [Web search](gitbooks/developing/embed/integrations/web-search.md): An agent's web-search tools (`web_search_tool`, `web_answer_tool`, `web_contents_tool`) run through the process-wide TinySearch module. Several agents in one runtime can each search with their own provider key: pin it on that agent's config, and it is never written to `config.toml`, the environment, or a log.
-- [Quickstart](gitbooks/developing/embed/quickstart.md): Start from a checkout of the repository and run `cargo run -p openhuman-embed --example run_turn`. The example boots an ephemeral runtime, creates its own local provider/backend fixtures and prints `hello from the stub`. It needs no inference account and does not contact a real backend.
-- [Embedding troubleshooting](gitbooks/developing/embed/troubleshooting.md): Use the typed error and the effective capability report together. A method that was compiled out is a different problem from a configured method with a provider failure. Keep credentials, user prompts and raw provider payloads out of routine diagnostics.
+- [Embedding OpenHuman](docs/gitbooks/en/developing/embed/README.md): `openhuman-embed` runs the OpenHuman core inside your Rust program. Your host owns the user interface, server transport and authentication flow; the core owns agent turns, memory, tools, approvals and execution policy. Calling its typed facades does not require a JSON-RPC server or the desktop shell.
+- [Embedding API reference](docs/gitbooks/en/developing/embed/api-reference.md): Generate usable local Rust API documentation with `cargo doc -p openhuman-embed --no-deps --open`. Include `--features mcp,skills,channels,storage-sqlite` for the facade gates used by the offline examples, or select the feature set your host actually builds. For all exported optional surfaces use `--all-features`.
+- [Embedding architecture](docs/gitbooks/en/developing/embed/architecture.md): Embed is the library facade above `openhuman-core`. The TinyHumans layer installs the backend SDK transport and owns product login/session behavior; the RPC layer adds JSON-RPC, server listeners and shipped host boot. A Rust embedder can stay at the facade when it owns those concerns itself.
+- [Concepts](docs/gitbooks/en/developing/embed/concepts/README.md): Start with Runtime and agents to understand which settings are shared. Then follow the lifecycle of a request through provider selection, tools, approvals and its durable session. The scope tables distinguish runtime composition from the state a host must isolate per agent or profile.
+- [Access and approvals](docs/gitbooks/en/developing/embed/concepts/access-approvals.md): `Access` groups permission level, origin, standing grants and trusted roots. Choose an origin and tier together: a trusted local host request and an external channel message are different security contexts. `Access::full()` configures both access fields. A sandbox is an additional execution boundary, configured through `AgentDefinitionSpec`.
+- [Agents](docs/gitbooks/en/developing/embed/concepts/agents.md): Register an `AgentSpec` with `Runtime::agent`. Its ID selects the agent's home, durable session identity and addressed cron/channel work. An `Agent` clone refers to the same instance; it does not copy state or start another core. Runtime-wide credentials remain shared, so two agents are not two authenticated customers.
+- [Channels](docs/gitbooks/en/developing/embed/concepts/channels.md): `Runtime::channels` creates listeners addressed to a live agent ID. A listener owns its transport task; dropping or stopping it ends that listener. The agent supplies the prompt, provider and tools used for every incoming message instead of handing messages to an operator agent.
+- [Completer](docs/gitbooks/en/developing/embed/concepts/completer.md): Use `Completer` for one-shot text or structured generation when you do not need an agent, its tool loop or persistent transcript. It takes an explicit route and a `CompletionRequest`; the caller supplies the model and messages for every request.
+- [Cron](docs/gitbooks/en/developing/embed/concepts/cron.md): The typed `Cron` facade creates named jobs with `JobSpec` and `JobSchedule`. `upsert` preserves a job's identity when the same name is configured again; `runs` exposes execution history. An agent-targeted job resolves the configured agent ID and executes with that agent's provider, prompt, tools and derived context.
+- [Errors](docs/gitbooks/en/developing/embed/concepts/errors.md): Match the error type at its boundary: `RuntimeError` describes boot/configuration, `AgentError` describes registration/layout, and `CoreError` describes typed facade calls and turns. A missing compiled or selected domain is `CoreError::Unavailable`; it is a capability decision the host can reflect in its UI.
+- [Hooks and seams](docs/gitbooks/en/developing/embed/concepts/hooks-seams.md): Runtime builders accept host-owned ports for storage, sessions, memory, tools and controller extensions. These are composition seams: the host supplies an implementation of the owning library's contract, while OpenHuman retains access policy, approvals and lifecycle.
+- [MCP](docs/gitbooks/en/developing/embed/concepts/mcp.md): MCP connects a native agent turn to tools served over an MCP protocol transport. Configure a server on `AgentSpec::mcp`, with its transport, authentication and allowed tool names. Another agent on the same runtime does not inherit that server configuration.
+- [Memory](docs/gitbooks/en/developing/embed/concepts/memory.md): `Runtime::memory(namespace)` returns a facade bound to that namespace. The caller establishes scope before sending record data; namespace identity is not taken from model arguments or record metadata. Learning and deletion use the selected memory engine contract.
+- [Observability](docs/gitbooks/en/developing/embed/concepts/observability.md): Subscribe with `Runtime::events` before starting work you want to observe. Each event has a sequence number and runtime identity, with an agent ID and per-call turn ID where applicable. Repeated calls on the same durable session receive different turn IDs; the session ID is not the observation ID.
+- [Profiles and SaaS](docs/gitbooks/en/developing/embed/concepts/profiles-saas.md): Ordinary runtime agents share an operator's configuration path and credentials. Use `ProfileRuntime` when one server serves different authenticated users who must not share those resources. Provision a profile, install its credential, and retain a `ProfileHandle` while serving that user's requests.
+- [Providers](docs/gitbooks/en/developing/embed/concepts/providers.md): A runtime provider is the default inference choice for its agents. An agent can override it with an OpenAI-compatible route or a native `ChatModel<()>` through `Provider::custom`. The `providers` facade exposes the request/response contracts so custom adapters do not need to implement an HTTP server.
+- [Runtime defaults](docs/gitbooks/en/developing/embed/concepts/runtime-defaults.md): The runtime's default provider, access policy and `ModelDefaults` reduce repeated setup. `AgentSpec` can override those defaults for an analyst, a writing agent or another workload without changing its siblings. Temperature and token limits are forwarded to the selected native model request, rather than being merely descriptive builder values.
+- [Runtime](docs/gitbooks/en/developing/embed/concepts/runtime.md): A `Runtime` boots the in-process core once. It owns the selected domains, background services, module host and runtime defaults. Its agents share that core while using separately derived contexts. Build one runtime and pass an `Arc<Runtime>` to the parts of your application that register agents.
+- [Skills](docs/gitbooks/en/developing/embed/concepts/skills.md): A skill bundle contains `SKILL.md` plus any referenced resources. `AgentSpec::skills_dir` copies bundles into the agent's `agents/<id>/skills/` tree. Copying is intentional: discovery rejects symlinked bundles, so linking a shared directory does not install it.
+- [Testing](docs/gitbooks/en/developing/embed/concepts/testing.md): The runnable examples default to loopback fixtures. They assert request bodies, tool results, file effects, transcript scope and event ordering; a successful Rust compilation alone does not prove those behaviors. Live example execution is explicitly opt-in through the documented environment variables.
+- [Tools](docs/gitbooks/en/developing/embed/concepts/tools.md): An agent's `ToolScopeSpec` chooses built-ins, named tools or `HostOnly`. Host-only mode starts with the host's advertised tools, requires an explicit bare prompt, and does not inherit an orchestrator tool catalog. This is useful when your application already owns read-only data access or tightly scoped actions.
+- [Turns and sessions](docs/gitbooks/en/developing/embed/concepts/turns-sessions.md): `Agent::run` collects a turn. `Agent::turn` lets you set an explicit session, per-turn options, progress sink and cancellation before sending. Reuse the returned session identity for follow-up messages that should see the same transcript. Two calls on the same durable session remain distinct turn executions and receive distinct observation IDs.
+- [Embedding FAQ](docs/gitbooks/en/developing/embed/faq.md): An ordinary embed process supports one `Runtime`; a second build returns `AlreadyRunning`. Add agents to the existing runtime. A multi-user host uses `ProfileRuntime` instead and needs a process dedicated to that mode. See runtime and profiles.
+- [Embedding guides](docs/gitbooks/en/developing/embed/guides/README.md): Choose the guide that matches your host:
+- [CLI chatbot](docs/gitbooks/en/developing/embed/guides/cli-chatbot.md): Keep one `Runtime` alive for the process and create an `Agent` for the conversation. The executable example starts with a single message, checks the reply, and prints it. A CLI input loop can send subsequent messages through the same agent; choose a stable thread identity when your host exposes separate conversations.
+- [Deploy a server](docs/gitbooks/en/developing/embed/guides/deploy-server.md): Your HTTP host can keep a runtime alive and invoke its agents directly. The executable example binds a loopback listener, handles one request, and sends back the agent's reply. It exercises the request path without requiring an RPC server dependency in `openhuman-embed`.
+- [Lean and headless hosts](docs/gitbooks/en/developing/embed/guides/lean-headless.md): `RuntimeBuilder::lean()` selects the agent, memory, and inference families without background services. Runtime module selection controls what is active; Cargo features control what is compiled. A lean preset alone does not shed compiled dependencies.
+- [Test with a mock backend](docs/gitbooks/en/developing/embed/guides/mock-backend-testing.md): Run `node scripts/run-embed-examples.mjs` from the repository root. The runner builds and executes every example with the union of required features, clears inherited live-example credentials and operator workspace settings, and requires each program's `EXAMPLE_OK` marker after its assertions.
+- [Multiple agents](docs/gitbooks/en/developing/embed/guides/multi-agent.md): A runtime owns shared services and credentials. Each `AgentSpec` selects its prompt, model route, access policy, and `action_dir`. Internal agent state belongs to its agent home; the action directory is where acting tools operate.
+- [SaaS with multiple tenants](docs/gitbooks/en/developing/embed/guides/saas-multi-tenant.md): Use `ProfileRuntime` for a process serving multiple users. Provision each profile, install that profile's credential, and open a handle to its workspace. Reusing a thread id in two profiles does not share their conversation history.
+- [Installation](docs/gitbooks/en/developing/embed/installation.md): `openhuman-embed` is currently an unpublished workspace crate. Use a local path dependency when developing in this repository, or a Git dependency on `https://github.com/tinyhumansai/openhuman` with `package = "openhuman-embed"`. Pin a reviewed Git revision for a deployed application; the nested vendored libraries are part of that revision's build inputs.
+- [Embedding integrations](docs/gitbooks/en/developing/embed/integrations/README.md): An embedded runtime composes the capabilities its host supplies. Start with the adapter your application needs:
+- [Channels](docs/gitbooks/en/developing/embed/integrations/channels.md): Enable the `channels` Cargo feature to use channel adapters. Your host configures the channel credential and binds incoming messages to an agent. In the Telegram example, the Bot API endpoint is a loopback stub, so updates and replies exercise the adapter without contacting Telegram.
+- [Composio](docs/gitbooks/en/developing/embed/integrations/composio.md): Composio calls use the host backend transport. Install that transport before booting a managed runtime; see TinyHumans managed inference. An explicit inference provider route supplies model inference, not the connector transport.
+- [Local and custom models](docs/gitbooks/en/developing/embed/integrations/local-models.md): For a local server that implements chat completions, use `Provider::openai_compatible` with its API root and model id. The constructor requires a bearer string even when a particular local server ignores it. Set the endpoint explicitly rather than relying on another user's installed configuration. The OpenAI-compatible example controls can point a live example at that local server.
+- [MCP servers](docs/gitbooks/en/developing/embed/integrations/mcp.md): Enable the `mcp` Cargo feature and declare a server with `AgentSpec::mcp`. `McpServer::http` takes a registered name and endpoint; `allow_tools` narrows the remote tool list. Server configuration and its connections belong to the agent that declared them.
+- [OpenAI-compatible providers and BYOK](docs/gitbooks/en/developing/embed/integrations/openai-compatible.md): Construct a route with `Provider::openai_compatible(base_url, api_key).model(model_id)`, then set it on the runtime or an individual agent. Pass the API root, such as a provider's `/v1` URL; the adapter appends `/chat/completions`. Supply an explicit model id so the route can register that model for its workload roles.
+- [Storage drivers](docs/gitbooks/en/developing/embed/integrations/storage-drivers.md): Enable `storage-sqlite` for SQLite or `storage-mongodb` for MongoDB on your Embed dependency. These Cargo gates make the driver available; choosing a URL selects the runtime backend. Set `RuntimeConfig.storage.url`, pass a URL through `RuntimeBuilder::storage`, or set the `url` field in the `[storage]` section of the host's configuration. `OPENHUMAN_STORAGE_URL` is the environment override used by host configuration resolution.
+- [TinyHumans managed inference](docs/gitbooks/en/developing/embed/integrations/tinyhumans-managed.md): Embed wraps the core; it does not contain a TinyHumans SDK backend client. A managed host must supply a `BackendTransport` through `RuntimeBuilder::backend_transport`, or boot through the SDK-backed builder in `openhuman-tinyhumans`. The connected host layer owns transport and session login. `RuntimeBuilder::backend_url` selects a URL; it does not install a transport.
+- [Web search](docs/gitbooks/en/developing/embed/integrations/web-search.md): An agent's web-search tools (`web_search_tool`, `web_answer_tool`, `web_contents_tool`) run through the process-wide TinySearch module. Several agents in one runtime can each search with their own provider key: pin it on that agent's config, and it is never written to `config.toml`, the environment, or a log.
+- [Quickstart](docs/gitbooks/en/developing/embed/quickstart.md): Start from a checkout of the repository and run `cargo run -p openhuman-embed --example run_turn`. The example boots an ephemeral runtime, creates its own local provider/backend fixtures and prints `hello from the stub`. It needs no inference account and does not contact a real backend.
+- [Embedding troubleshooting](docs/gitbooks/en/developing/embed/troubleshooting.md): Use the typed error and the effective capability report together. A method that was compiled out is a different problem from a configured method with a provider failure. Keep credentials, user prompts and raw provider payloads out of routine diagnostics.
- [OpenHuman Embed](crates/openhuman-embed/README.md): A typed Rust facade for running the OpenHuman core inside your application: one Runtime per process, with independently configured Agents.
-- [Embedding OpenHuman](gitbooks/developing/embedding.md): The embedding documentation now lives in the Embedding section.
-- [Cookbook](gitbooks/developing/embed/cookbook.md): Executable recipes are indexed from their source headers. Each entry records the declared run mode and any named Embed feature required by the example. Full source includes the surrounding setup and assertions.
-- [Compiled feature matrix](gitbooks/developing/embed/capability-matrix.md): This matrix comes from the default-feature compiled capability-report example. Runtime presets can narrow enabled domains and services; core Cargo features determine which implementations are available. Named Embed features also gate facade exports: enable `mcp` or `skills` explicitly for their public setters even when core defaults compile those implementations. Embed defaults enable the named `channels` feature. See the installation guide for these separate layers.
-- [RuntimeBuilder setters](gitbooks/developing/embed/builder-setters.md): Public consuming methods that return `Self`, extracted from the RuntimeBuilder implementations. Static host and weight presets, inspection methods and build/run methods are excluded.
-- [API index](gitbooks/developing/embed/api-index.md): Generate the complete local Rust API reference with `cargo doc -p openhuman-embed --all-features --no-deps --open`. This crate is currently unpublished; docs.rs is a future publication target. Names below are source-listed exports, including conditional Cargo-gated items; local rustdoc with your selected features describes availability. Canonical facade source.
+- [Embedding OpenHuman](docs/gitbooks/en/developing/embedding.md): The embedding documentation now lives in the Embedding section.
+- [Cookbook](docs/gitbooks/en/developing/embed/cookbook.md): Executable recipes are indexed from their source headers. Each entry records the declared run mode and any named Embed feature required by the example. Full source includes the surrounding setup and assertions.
+- [Compiled feature matrix](docs/gitbooks/en/developing/embed/capability-matrix.md): This matrix comes from the default-feature compiled capability-report example. Runtime presets can narrow enabled domains and services; core Cargo features determine which implementations are available. Named Embed features also gate facade exports: enable `mcp` or `skills` explicitly for their public setters even when core defaults compile those implementations. Embed defaults enable the named `channels` feature. See the installation guide for these separate layers.
+- [RuntimeBuilder setters](docs/gitbooks/en/developing/embed/builder-setters.md): Public consuming methods that return `Self`, extracted from the RuntimeBuilder implementations. Static host and weight presets, inspection methods and build/run methods are excluded.
+- [API index](docs/gitbooks/en/developing/embed/api-index.md): Generate the complete local Rust API reference with `cargo doc -p openhuman-embed --all-features --no-deps --open`. This crate is currently unpublished; docs.rs is a future publication target. Names below are source-listed exports, including conditional Cargo-gated items; local rustdoc with your selected features describes availability. Canonical facade source.
- [Embed examples](crates/openhuman-embed/examples/README.md): Cookbook
-<!-- Source: gitbooks/developing/embed/README.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/README.md -->
---
description: "Run the OpenHuman core inside a Rust application with one Runtime and independently configured Agents."
---
@@ -88,7 +88,7 @@ The snippets in this section are injected from compiled, offline-tested Rust exa
See [FAQ](faq.md) for design choices and [troubleshooting](troubleshooting.md) for setup failures.
-<!-- Source: gitbooks/developing/embed/api-reference.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/api-reference.md -->
---
description: "Use local rustdoc and source-derived indexes for the complete Embed public surface."
---
@@ -144,7 +144,7 @@ The generated setter list is the authoritative knob inventory. It excludes stati
The report's schema version is explicit. Read its fields rather than inferring capabilities from preset names, and handle future schema changes deliberately. It omits endpoint, credential, prompt and workspace values so hosts can expose build metadata without exposing private configuration.
-<!-- Source: gitbooks/developing/embed/architecture.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/architecture.md -->
---
description: "The host composes infrastructure around one core; agents derive scoped contexts over its runtime."
---
@@ -214,7 +214,7 @@ An agent handle keeps the core alive after the runtime handle is dropped. Explic
Agent separation is not credential separation: all ordinary runtime agents share the operator's config path and credential root. Use [profiles](concepts/profiles-saas.md) for independently authenticated users. See [storage architecture](../architecture/storage.md) for scope/driver ownership and [agent harness architecture](../architecture/agent-harness.md) for session execution.
-<!-- Source: gitbooks/developing/embed/concepts/README.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/README.md -->
---
description: "The ownership and lifecycle rules behind the Embed public API."
---
@@ -242,7 +242,7 @@ Start with Runtime and agents to understand which settings are shared. Then foll
- [Testing](testing.md): Deterministic local providers and explicit observations prove behavior without contacting real inference or backend services.
- [Errors](errors.md): Typed errors distinguish build availability, expected domain states, host setup failures and removed agent instances.
-<!-- Source: gitbooks/developing/embed/concepts/access-approvals.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/access-approvals.md -->
---
description: "Access configures turn identity and permission policy; the host chooses how parked requests receive decisions."
---
@@ -324,7 +324,7 @@ The verified example enables autonomy before building the runtime. It starts a r
For asynchronous integration use `AgentSpec::approval_handler` or retain the handle returned by `Agent::handle_approvals`. Dropping a subscription cancels its pending decision future; it does not silently approve the request. Agent removal cancels both builder and live callbacks. Continue with the [approval callback example](../cookbook.md#polling-and-callback-approvals-with-cancellation) and [sandbox guide](../guides/multi-agent.md).
-<!-- Source: gitbooks/developing/embed/concepts/agents.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/agents.md -->
---
description: "An Agent combines one identity, derived context and independently configured tool/model behavior on a shared Runtime."
---
@@ -385,7 +385,7 @@ IDs stay reserved until teardown completes, including while the last handle's de
An old polling handle or approval callback never follows a reused ID to its replacement. Active host tools cancel cooperatively and may finish their external work after removal; the host still owns those external lifetimes. See [turns and sessions](turns-sessions.md) and [access and approvals](access-approvals.md).
-<!-- Source: gitbooks/developing/embed/concepts/channels.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/channels.md -->
---
description: "A channel listener binds external messages to one registered agent and keeps transport lifecycle under host control."
---
@@ -480,7 +480,7 @@ The verified Telegram example uses a local Bot API stub, so the channel test doe
External messages use `ExternalChannel` origin and a read-only cap. Model-requested writes and other external effects are not parked for approval from the sender. Keep public-chat tools read-only and perform authorized side effects in host code or a separately configured job. When the bound agent is removed, channel work fails as unavailable instead of falling back to the operator. See [channel integration](../integrations/channels.md).
-<!-- Source: gitbooks/developing/embed/concepts/completer.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/completer.md -->
---
description: "Completer sends stateless model requests without booting a Runtime or entering the agent tool loop."
---
@@ -536,7 +536,7 @@ A physical timeout is an RPC transport failure, so an explicit `CompletionLadder
A timed-out physical attempt has unknown reported cost. Ladder aggregate cost stays unknown, and a budgeted call keeps its conservative reservation if no authoritative usage arrived. The remaining budget may therefore refuse a fallback before it sends another request. See the [routing guide](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/ROUTING.md) for the explicit ladder API.
-<!-- Source: gitbooks/developing/embed/concepts/cron.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/cron.md -->
---
description: "Cron provides durable named jobs, explicit run-now execution and job history addressed to registered agents."
---
@@ -592,7 +592,7 @@ The example checks stable upsert identity, executes a job immediately, inspects
Removing or dropping an agent deregisters its context, leaving addressed cron jobs dormant rather than silently running them as the operator. Hosts can register runtime system-job handlers for work they own outside a model turn. Review [runtime configuration](runtime-defaults.md) and [channels](channels.md) when mixing scheduled work with public chat input.
-<!-- Source: gitbooks/developing/embed/concepts/errors.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/errors.md -->
---
description: "Typed errors distinguish build availability, expected domain states, host setup failures and removed agent instances."
---
@@ -655,7 +655,7 @@ The example's refused write is handled as a tool result while the turn can still
Bearer routes refuse non-TLS remote endpoints before sending credentials. `BACKEND_UNAVAILABLE` means the embed-only host has no backend transport installed; check the host layer before rotating keys. Agent removal makes later turns on retained handles return `AgentRemoved`, even when its ID now belongs to another instance. See [troubleshooting](../troubleshooting.md) and [provider integration](../integrations/openai-compatible.md).
-<!-- Source: gitbooks/developing/embed/concepts/hooks-seams.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/hooks-seams.md -->
---
description: "Host seams replace infrastructure ports; hooks observe or control selected turn and tool boundaries."
---
@@ -702,7 +702,7 @@ The example verifies that an agent-local post-turn counter observes the configur
Removing or replacing a builder-installed named hook through the runtime API affects that registration too; the runtime tracks and restores prior process slots when its seam ownership ends. Keep hooks fast, cancellation-aware and free of sensitive logging. Use the generated [setter list](../builder-setters.md) and [API reference](../api-reference.md) for the actual port signatures.
-<!-- Source: gitbooks/developing/embed/concepts/mcp.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/mcp.md -->
---
description: "MCP servers add remote tool discovery and execution to one agent, with explicit server configuration and tool allowlists."
---
@@ -778,7 +778,7 @@ The example uses a real loopback protocol stub: it verifies initialization, `too
Tool allowlists reduce the remote catalog before model disclosure. Server authentication remains host-owned input, and remote tool side effects still pass through the relevant execution/access policy. Removing the agent evicts its MCP host after old-instance teardown, before the ID can be reused. See the [MCP integration](../integrations/mcp.md) for deployment setup.
-<!-- Source: gitbooks/developing/embed/concepts/memory.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/memory.md -->
---
description: "The typed memory facade binds a namespace before learning, retrieving or forgetting records."
---
@@ -823,7 +823,7 @@ The example uses the reference in-memory engine and proves that another namespac
Background conversation ingestion can run independently of a completed turn. Tests should disable unrelated learning/ingest activity when asserting ephemeral-workspace cleanup. See [runtime defaults](runtime-defaults.md), [storage drivers](../integrations/storage-drivers.md), and the [memory architecture](../../architecture/memory.md).
-<!-- Source: gitbooks/developing/embed/concepts/observability.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/observability.md -->
---
description: "Runtime metadata events track lifecycle and approvals; turn streams carry per-turn progress and the final result."
---
@@ -898,7 +898,7 @@ The example checks ordered add/start/end/remove events and confirms that private
When simultaneous turns share an origin thread, approval correlation can be ambiguous and its turn ID is absent rather than guessed. Handle receiver lag by refreshing state, and do not send text from `AgentProgress` to content-free analytics. See [turns and sessions](turns-sessions.md), [approvals](access-approvals.md), and [testing](testing.md).
-<!-- Source: gitbooks/developing/embed/concepts/profiles-saas.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/profiles-saas.md -->
---
description: "ProfileRuntime isolates authenticated users by workspace, credentials, conversations and event streams."
---
@@ -961,7 +961,7 @@ The example creates Alice and Bob with the same thread name and verifies that ea
Production managed calls need the TinyHumans transport installed by the host layer. `ProfileHandle::call` exposes the reviewed user surface rather than arbitrary operator controllers. Profiles do not make a shared file-system action directory safe automatically; provision external application resources per user too. See [SaaS deployment guide](../guides/saas-multi-tenant.md) and [SaaS architecture](../../saas-profiles.md).
-<!-- Source: gitbooks/developing/embed/concepts/providers.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/providers.md -->
---
description: "A provider supplies a route or native ChatModel implementation, with agent overrides and optional ordered fallback."
---
@@ -1043,7 +1043,7 @@ Ordered fallback advances only on eligible provider failures before visible outp
Use HTTPS when sending bearer credentials; loopback HTTP is supported for local test/model servers. Managed inference needs the TinyHumans host transport and a runtime credential. See [OpenAI-compatible integration](../integrations/openai-compatible.md), [managed integration](../integrations/tinyhumans-managed.md), and [local models](../integrations/local-models.md).
-<!-- Source: gitbooks/developing/embed/concepts/runtime-defaults.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/runtime-defaults.md -->
---
description: "Runtime defaults form the starting point for newly registered agents; explicit agent settings override them."
---
@@ -1107,7 +1107,7 @@ The example checks the request bodies actually received by both providers, inclu
Use the generated [builder setters](../builder-setters.md) for the current knob list. [Configuration and installation](../installation.md) explain runtime configuration discovery; [providers](providers.md) cover route selection and native models.
-<!-- Source: gitbooks/developing/embed/concepts/runtime.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/runtime.md -->
---
description: "A Runtime owns one initialized core and the process-wide resources that its agents share."
---
@@ -1149,7 +1149,7 @@ The process guard rejects a second runtime with `RuntimeError::AlreadyRunning`.
Dropping the runtime handle does not tear down the core while an agent still holds it. Drop listeners, agents and the runtime before restarting the host in the same process. See [architecture](../architecture.md), [defaults](runtime-defaults.md), and the generated [builder setters](../builder-setters.md).
-<!-- Source: gitbooks/developing/embed/concepts/skills.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/skills.md -->
---
description: "Skills are copied bundles of instructions and resources discovered inside an agent\u2019s own home."
---
@@ -1198,7 +1198,7 @@ The example writes a bundle, registers an agent, checks the copied contents and
A resumed session's prompt is frozen, so adding or editing a bundle does not rewrite an existing conversation's recorded prefix. Start a new session when you want updated instructions to become visible. See [turns and sessions](turns-sessions.md) and the generated [builder setters](../builder-setters.md) for runtime policy knobs.
-<!-- Source: gitbooks/developing/embed/concepts/testing.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/testing.md -->
---
description: "Deterministic local providers and explicit observations prove behavior without contacting real inference or backend services."
---
@@ -1280,7 +1280,7 @@ Run the offline example suite with `node scripts/run-embed-examples.mjs`; it cle
Build your Tokio workers with the documented large stack constants for nested agent turns. Use channels, cancellation guards and bounded waits to prove lifecycle transitions instead of sleeps. The [mock-backend guide](../guides/mock-backend-testing.md) covers host fixtures, and [troubleshooting](../troubleshooting.md) distinguishes compile gates from runtime availability.
-<!-- Source: gitbooks/developing/embed/concepts/tools.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/tools.md -->
---
description: "Tool catalogs expose only the allowed execution surface; host tools use the same native Tool contract as built-in tools."
---
@@ -1343,7 +1343,7 @@ The example drives an actual host tool call and inspects the provider's advertis
Runtime tool hooks apply across agents; local hooks observe only their configured agent. Tool attachments can be added and removed for later turns, while existing durable sessions retain recorded declarations. See [hooks](hooks-seams.md), [MCP](mcp.md), and [access and approvals](access-approvals.md).
-<!-- Source: gitbooks/developing/embed/concepts/turns-sessions.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/concepts/turns-sessions.md -->
---
description: "A turn is one native model/tool loop; a session is the durable identity that makes subsequent turns a conversation."
---
@@ -1416,7 +1416,7 @@ The stream example checks that deltas precede the final result and that collecte
The harness derives transcript paths from the thread and agent IDs without a timestamp. Resumed sessions reuse their recorded system prompt and tool declarations; edits to prompts, skills or integrations apply to new sessions. Compaction seals a generation and opens a child instead of erasing history. See [observability](observability.md) for session IDs versus per-call turn IDs, and [API reference](../api-reference.md) for the session-store port.
-<!-- Source: gitbooks/developing/embed/faq.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/faq.md -->
---
description: "Answers to common host, lifecycle, feature and provider choices."
---
@@ -1459,7 +1459,7 @@ A resumed session reuses recorded system messages and tool declarations. Start a
[RuntimeBuilder setters](builder-setters.md) is generated from actual consuming public setters, with source signatures. Host/weight presets and non-setter methods are intentionally documented through [API reference](api-reference.md).
-<!-- Source: gitbooks/developing/embed/guides/README.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/guides/README.md -->
---
description: "Build a chatbot, host multiple agents, serve profiles, or test an embedded runtime."
icon: code
@@ -1478,7 +1478,7 @@ Choose the guide that matches your host:
Start with [Embedding](../README.md) for the library boundary and quickstart. See [Integrations](../integrations/README.md) for providers, storage, MCP, and channels.
-<!-- Source: gitbooks/developing/embed/guides/cli-chatbot.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/guides/cli-chatbot.md -->
---
description: "Collect a reply or consume progress events in a Rust command-line host."
icon: code
@@ -1554,7 +1554,7 @@ For incremental output, consume `agent.stream(...)` until `StreamEvent::Finished
The [complete streaming example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/streaming.rs) checks that text arrives before completion and that the offline streamed reply equals a collected reply. [Provider configuration](../integrations/openai-compatible.md) covers explicit live inference.
-<!-- Source: gitbooks/developing/embed/guides/deploy-server.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/guides/deploy-server.md -->
---
description: "Invoke agents from a host-owned HTTP service without adding RPC to Embed."
icon: code
@@ -1614,7 +1614,7 @@ Use your HTTP framework for a deployed service. The example's one-request parser
If your host needs OpenHuman's existing JSON-RPC server, depend on `openhuman-rpc`, the layer above Embed. Adding that dependency to Embed would reverse the crate chain. [Channels](../integrations/channels.md) provide another way to deliver messages to bound agents.
-<!-- Source: gitbooks/developing/embed/guides/lean-headless.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/guides/lean-headless.md -->
---
description: "Control runtime activity separately from compile-time Cargo features."
icon: code
@@ -1649,7 +1649,7 @@ A headless host also owns process setup: initialize its encryption key before st
[Storage drivers](../integrations/storage-drivers.md) covers persistent backends. The [complete capability_report example](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/capability_report.rs) reports compiled features and active services without exposing provider keys or URLs.
-<!-- Source: gitbooks/developing/embed/guides/mock-backend-testing.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/guides/mock-backend-testing.md -->
---
description: "Run the embedding examples offline and verify behavior, not just compilation."
icon: code
@@ -1699,7 +1699,7 @@ The [complete host_tools example](https://github.com/tinyhumansai/openhuman/blob
Run a single gated example with `cargo run -p openhuman-embed --example mcp --features mcp`, or use the full runner to select all gates automatically. The individual examples default to offline mode. Only the [explicit live provider options](../integrations/openai-compatible.md) and [MongoDB live option](../integrations/storage-drivers.md) contact configured services.
-<!-- Source: gitbooks/developing/embed/guides/multi-agent.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/guides/multi-agent.md -->
---
description: "Share one runtime while configuring independent agent prompts and working folders."
icon: code
@@ -1786,7 +1786,7 @@ Runtime defaults can supply a provider and model settings; individual agents ove
<!-- END EMBED -->
-<!-- Source: gitbooks/developing/embed/guides/saas-multi-tenant.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/guides/saas-multi-tenant.md -->
---
description: "Isolate user credentials, workspaces, and conversation history with ProfileRuntime."
icon: code
@@ -1838,7 +1838,7 @@ Run `cargo run -p openhuman-embed --example profiles`. The [complete profiles ex
Authenticate users in your host before selecting a profile. Keep the operator's configuration and gateway credential separate from user credentials. [Managed inference](../integrations/tinyhumans-managed.md) explains who provides the backend transport.
-<!-- Source: gitbooks/developing/embed/installation.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/installation.md -->
---
description: "Add the Embed dependency, choose compile-time gates, and configure the host\u2019s runtime and state deliberately."
---
@@ -1893,7 +1893,7 @@ Initialize the credential master key through `openhuman_embed::process::init_mas
The example checks the effective report after boot and proves that credentials, provider URL and workspace path are absent. The generated matrix uses the fixed default-feature report command; it describes that build, not every feature combination a host might compile.
-<!-- Source: gitbooks/developing/embed/integrations/README.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/integrations/README.md -->
---
description: "Choose provider, tool, storage, and channel adapters for your host."
icon: code
@@ -1914,7 +1914,7 @@ An embedded runtime composes the capabilities its host supplies. Start with the
[Guides](../guides/README.md) show how these pieces fit into a CLI, an HTTP server, or a SaaS host. Every linked executable example defaults to offline mode; a live endpoint requires an explicit choice.
-<!-- Source: gitbooks/developing/embed/integrations/channels.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/integrations/channels.md -->
---
description: "Bind an incoming channel to an agent and verify the delivered reply."
icon: code
@@ -1998,7 +1998,7 @@ Keep channel credentials in host configuration and map messages to the intended
For a live Telegram host, supply the real Bot API configuration through your application's channel setup. This offline example deliberately has no live channel environment switch. [Deploy a server](../guides/deploy-server.md) covers a host-owned HTTP alternative.
-<!-- Source: gitbooks/developing/embed/integrations/composio.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/integrations/composio.md -->
---
description: "Pin connector credentials per agent while the host supplies backend transport."
icon: code
@@ -2014,7 +2014,7 @@ The repository's [Composio agent integration test](https://github.com/tinyhumans
Account login, linking, and credential acquisition belong to your connected host and connector layer. Keep secrets out of prompts and capability reports. For multiple users, use [SaaS profiles](../guides/saas-multi-tenant.md); independent action directories on a shared library runtime do not establish tenant isolation.
-<!-- Source: gitbooks/developing/embed/integrations/local-models.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/integrations/local-models.md -->
---
description: "Use a local OpenAI-compatible server or inject a native ChatModel implementation."
icon: code
@@ -2085,7 +2085,7 @@ Run `cargo run -p openhuman-embed --example custom_provider`. The [complete cust
For live local inference, configure model availability and authentication in your server. For runtime selection and service controls, see [Lean and headless hosts](../guides/lean-headless.md).
-<!-- Source: gitbooks/developing/embed/integrations/mcp.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/integrations/mcp.md -->
---
description: "Connect a declared MCP server and verify remote discovery and execution."
icon: code
@@ -2150,7 +2150,7 @@ The immediately available `mcp_list_tools` and `mcp_call_tool` bridge tools work
MCP transport does not bypass the host's execution policy. Configure agent access and approvals for actions exposed by the server. [Mock testing](../guides/mock-backend-testing.md) keeps this protocol path local during development.
-<!-- Source: gitbooks/developing/embed/integrations/openai-compatible.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/integrations/openai-compatible.md -->
---
description: "Route inference to an explicit endpoint and bearer without changing shared host configuration."
icon: code
@@ -2205,7 +2205,7 @@ Examples using `support::example_provider` switch to live inference only with `O
For a non-HTTP implementation, [local and custom models](local-models.md) covers `Provider::custom`, native fallback, and role pins. [Managed inference](tinyhumans-managed.md) uses a different backend transport boundary.
-<!-- Source: gitbooks/developing/embed/integrations/storage-drivers.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/integrations/storage-drivers.md -->
---
description: "Configure SQLite or MongoDB through Embed and inspect the selected backend."
icon: code
@@ -2291,7 +2291,7 @@ Run `cargo run -p openhuman-embed --example storage --features storage-sqlite`.
The only live database path in this example is `OPENHUMAN_EXAMPLE_MONGODB_URL`. To exercise it deliberately, enable both `storage-sqlite` and `storage-mongodb` and supply your own MongoDB URL. The offline CI runner clears this setting. A deployed host supplies its persistent URL and credentials through its own configuration.
-<!-- Source: gitbooks/developing/embed/integrations/tinyhumans-managed.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/integrations/tinyhumans-managed.md -->
---
description: "Install the host backend transport before using managed inference and hosted services."
icon: code
@@ -2345,7 +2345,7 @@ See the [complete profiles example](https://github.com/tinyhumansai/openhuman/bl
Use [OpenAI-compatible routing](openai-compatible.md) when your host wants to send inference directly to a BYOK endpoint. That explicit provider route does not supply hosted backend services.
-<!-- Source: gitbooks/developing/embed/integrations/web-search.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/integrations/web-search.md -->
---
description: "Pin a web-search provider key per agent, held only in memory."
icon: code
@@ -2365,7 +2365,7 @@ Provider order per role still comes from `search.roles` and TinySearch's default
The repository's [pinned-key integration test](https://github.com/tinyhumansai/openhuman/blob/main/tests/search_pinned_keys_e2e.rs) runs two agents with different keys against a loopback provider. It checks each call's outgoing key, and that no key reaches the environment, a file or a log line.
-<!-- Source: gitbooks/developing/embed/quickstart.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/quickstart.md -->
---
description: "Run one agent against a local fixture, then choose a provider and working directory for your host."
---
@@ -2420,7 +2420,7 @@ For managed TinyHumans inference, use the [TinyHumans host integration](integrat
Drop listeners and agent handles before shutting down the runtime. For early removal, await `remove_agent` so retained handles stop admitting turns and the old ID is released only after cleanup.
-<!-- Source: gitbooks/developing/embed/troubleshooting.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/troubleshooting.md -->
---
description: "Diagnose missing features, blocked turns, credentials, state paths and lifecycle failures."
---
@@ -2473,9 +2473,9 @@ Reproduce behavior with [offline testing](guides/mock-backend-testing.md) before
A typed Rust facade for running the OpenHuman core inside your application: one Runtime per process, with independently configured Agents.
-Read the [embedding documentation](https://github.com/tinyhumansai/openhuman/blob/main/gitbooks/developing/embed/README.md), [installation](https://github.com/tinyhumansai/openhuman/blob/main/gitbooks/developing/embed/installation.md), and [quickstart](https://github.com/tinyhumansai/openhuman/blob/main/gitbooks/developing/embed/quickstart.md).
+Read the [embedding documentation](https://github.com/tinyhumansai/openhuman/blob/main/docs/gitbooks/en/developing/embed/README.md), [installation](https://github.com/tinyhumansai/openhuman/blob/main/docs/gitbooks/en/developing/embed/installation.md), and [quickstart](https://github.com/tinyhumansai/openhuman/blob/main/docs/gitbooks/en/developing/embed/quickstart.md).
-The [cookbook](https://github.com/tinyhumansai/openhuman/blob/main/gitbooks/developing/embed/cookbook.md) is generated from executable examples. Generate complete local API docs with `cargo doc -p openhuman-embed --all-features --no-deps --open`; this workspace crate is currently unpublished.
+The [cookbook](https://github.com/tinyhumansai/openhuman/blob/main/docs/gitbooks/en/developing/embed/cookbook.md) is generated from executable examples. Generate complete local API docs with `cargo doc -p openhuman-embed --all-features --no-deps --open`; this workspace crate is currently unpublished.
Hosts supply transport, credentials and application resources. Runtime settings establish shared defaults; agents narrow provider, access, prompt and tool behavior. Use ProfileRuntime when users require separate credentials and workspaces.
@@ -2558,7 +2558,7 @@ Standalone exact source pins and generated Cargo patches: [consumer setup](CONSU
Ordered fallbacks and required exploration: [routing](ROUTING.md).
Host telemetry and the existing exporter: [observers](OBSERVERS.md).
-<!-- Source: gitbooks/developing/embedding.md -->
+<!-- Source: docs/gitbooks/en/developing/embedding.md -->
# Embedding OpenHuman
The embedding documentation now lives in the [Embedding section](embed/README.md).
@@ -2567,7 +2567,7 @@ Start with [installation](embed/installation.md) and the [quickstart](embed/quic
The public library uses one Runtime per process with independently configured Agents. For isolated authenticated users, read [profiles and SaaS](embed/concepts/profiles-saas.md).
-<!-- Source: gitbooks/developing/embed/cookbook.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/cookbook.md -->
# Cookbook
<!-- Generated by scripts/generate-embed-docs.mjs; do not edit. -->
@@ -2758,7 +2758,7 @@ Two agents with independent prompts and working folders.
Run: `cargo run -p openhuman-embed --example two_agents`
-<!-- Source: gitbooks/developing/embed/capability-matrix.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/capability-matrix.md -->
# Compiled feature matrix
<!-- Generated by scripts/generate-embed-docs.mjs; do not edit. -->
@@ -2792,7 +2792,7 @@ This matrix comes from the default-feature compiled capability-report example. R
| `web3` | No |
| `whatsapp-web` | No |
-<!-- Source: gitbooks/developing/embed/builder-setters.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/builder-setters.md -->
# RuntimeBuilder setters
<!-- Generated by scripts/generate-embed-docs.mjs; do not edit. -->
@@ -2844,7 +2844,7 @@ Public consuming methods that return `Self`, extracted from the RuntimeBuilder i
- [`workspace`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L298): `pub fn workspace(mut self, workspace: Workspace) -> Self`
- [`workspace_dir`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/src/runtime/builder.rs#L312): `pub fn workspace_dir(mut self, dir: impl Into<PathBuf>) -> Self`
-<!-- Source: gitbooks/developing/embed/api-index.md -->
+<!-- Source: docs/gitbooks/en/developing/embed/api-index.md -->
# API index
<!-- Generated by scripts/generate-embed-docs.mjs; do not edit. -->
@@ -3137,7 +3137,7 @@ The compiled capability report describes this build:
<!-- Generated by scripts/generate-embed-docs.mjs; do not edit. -->
-[Cookbook](../../../gitbooks/developing/embed/cookbook.md)
+[Cookbook](../../../docs/gitbooks/en/developing/embed/cookbook.md)
- [Polling and callback approvals with cancellation](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/approvals.rs): Allow and deny real parked writes, then cancel an in-flight callback without losing its pending request. (offline with loopback stubs; no live path.)
- [Stable capability metadata before and after boot](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/capability_report.rs): Stable capability metadata before and after boot. (offline with loopback stubs; no live path.)
diff --git a/llms.txt b/llms.txt
index 84009f837c..938b18aaa1 100644
--- a/llms.txt
+++ b/llms.txt
@@ -2,52 +2,52 @@
> Embed OpenHuman runtimes and independently configured agents in Rust applications.
-- [Embedding OpenHuman](gitbooks/developing/embed/README.md): `openhuman-embed` runs the OpenHuman core inside your Rust program. Your host owns the user interface, server transport and authentication flow; the core owns agent turns, memory, tools, approvals and execution policy. Calling its typed facades does not require a JSON-RPC server or the desktop shell.
-- [Embedding API reference](gitbooks/developing/embed/api-reference.md): Generate usable local Rust API documentation with `cargo doc -p openhuman-embed --no-deps --open`. Include `--features mcp,skills,channels,storage-sqlite` for the facade gates used by the offline examples, or select the feature set your host actually builds. For all exported optional surfaces use `--all-features`.
-- [Embedding architecture](gitbooks/developing/embed/architecture.md): Embed is the library facade above `openhuman-core`. The TinyHumans layer installs the backend SDK transport and owns product login/session behavior; the RPC layer adds JSON-RPC, server listeners and shipped host boot. A Rust embedder can stay at the facade when it owns those concerns itself.
-- [Concepts](gitbooks/developing/embed/concepts/README.md): Start with Runtime and agents to understand which settings are shared. Then follow the lifecycle of a request through provider selection, tools, approvals and its durable session. The scope tables distinguish runtime composition from the state a host must isolate per agent or profile.
-- [Access and approvals](gitbooks/developing/embed/concepts/access-approvals.md): `Access` groups permission level, origin, standing grants and trusted roots. Choose an origin and tier together: a trusted local host request and an external channel message are different security contexts. `Access::full()` configures both access fields. A sandbox is an additional execution boundary, configured through `AgentDefinitionSpec`.
-- [Agents](gitbooks/developing/embed/concepts/agents.md): Register an `AgentSpec` with `Runtime::agent`. Its ID selects the agent's home, durable session identity and addressed cron/channel work. An `Agent` clone refers to the same instance; it does not copy state or start another core. Runtime-wide credentials remain shared, so two agents are not two authenticated customers.
-- [Channels](gitbooks/developing/embed/concepts/channels.md): `Runtime::channels` creates listeners addressed to a live agent ID. A listener owns its transport task; dropping or stopping it ends that listener. The agent supplies the prompt, provider and tools used for every incoming message instead of handing messages to an operator agent.
-- [Completer](gitbooks/developing/embed/concepts/completer.md): Use `Completer` for one-shot text or structured generation when you do not need an agent, its tool loop or persistent transcript. It takes an explicit route and a `CompletionRequest`; the caller supplies the model and messages for every request.
-- [Cron](gitbooks/developing/embed/concepts/cron.md): The typed `Cron` facade creates named jobs with `JobSpec` and `JobSchedule`. `upsert` preserves a job's identity when the same name is configured again; `runs` exposes execution history. An agent-targeted job resolves the configured agent ID and executes with that agent's provider, prompt, tools and derived context.
-- [Errors](gitbooks/developing/embed/concepts/errors.md): Match the error type at its boundary: `RuntimeError` describes boot/configuration, `AgentError` describes registration/layout, and `CoreError` describes typed facade calls and turns. A missing compiled or selected domain is `CoreError::Unavailable`; it is a capability decision the host can reflect in its UI.
-- [Hooks and seams](gitbooks/developing/embed/concepts/hooks-seams.md): Runtime builders accept host-owned ports for storage, sessions, memory, tools and controller extensions. These are composition seams: the host supplies an implementation of the owning library's contract, while OpenHuman retains access policy, approvals and lifecycle.
-- [MCP](gitbooks/developing/embed/concepts/mcp.md): MCP connects a native agent turn to tools served over an MCP protocol transport. Configure a server on `AgentSpec::mcp`, with its transport, authentication and allowed tool names. Another agent on the same runtime does not inherit that server configuration.
-- [Memory](gitbooks/developing/embed/concepts/memory.md): `Runtime::memory(namespace)` returns a facade bound to that namespace. The caller establishes scope before sending record data; namespace identity is not taken from model arguments or record metadata. Learning and deletion use the selected memory engine contract.
-- [Observability](gitbooks/developing/embed/concepts/observability.md): Subscribe with `Runtime::events` before starting work you want to observe. Each event has a sequence number and runtime identity, with an agent ID and per-call turn ID where applicable. Repeated calls on the same durable session receive different turn IDs; the session ID is not the observation ID.
-- [Profiles and SaaS](gitbooks/developing/embed/concepts/profiles-saas.md): Ordinary runtime agents share an operator's configuration path and credentials. Use `ProfileRuntime` when one server serves different authenticated users who must not share those resources. Provision a profile, install its credential, and retain a `ProfileHandle` while serving that user's requests.
-- [Providers](gitbooks/developing/embed/concepts/providers.md): A runtime provider is the default inference choice for its agents. An agent can override it with an OpenAI-compatible route or a native `ChatModel<()>` through `Provider::custom`. The `providers` facade exposes the request/response contracts so custom adapters do not need to implement an HTTP server.
-- [Runtime defaults](gitbooks/developing/embed/concepts/runtime-defaults.md): The runtime's default provider, access policy and `ModelDefaults` reduce repeated setup. `AgentSpec` can override those defaults for an analyst, a writing agent or another workload without changing its siblings. Temperature and token limits are forwarded to the selected native model request, rather than being merely descriptive builder values.
-- [Runtime](gitbooks/developing/embed/concepts/runtime.md): A `Runtime` boots the in-process core once. It owns the selected domains, background services, module host and runtime defaults. Its agents share that core while using separately derived contexts. Build one runtime and pass an `Arc<Runtime>` to the parts of your application that register agents.
-- [Skills](gitbooks/developing/embed/concepts/skills.md): A skill bundle contains `SKILL.md` plus any referenced resources. `AgentSpec::skills_dir` copies bundles into the agent's `agents/<id>/skills/` tree. Copying is intentional: discovery rejects symlinked bundles, so linking a shared directory does not install it.
-- [Testing](gitbooks/developing/embed/concepts/testing.md): The runnable examples default to loopback fixtures. They assert request bodies, tool results, file effects, transcript scope and event ordering; a successful Rust compilation alone does not prove those behaviors. Live example execution is explicitly opt-in through the documented environment variables.
-- [Tools](gitbooks/developing/embed/concepts/tools.md): An agent's `ToolScopeSpec` chooses built-ins, named tools or `HostOnly`. Host-only mode starts with the host's advertised tools, requires an explicit bare prompt, and does not inherit an orchestrator tool catalog. This is useful when your application already owns read-only data access or tightly scoped actions.
-- [Turns and sessions](gitbooks/developing/embed/concepts/turns-sessions.md): `Agent::run` collects a turn. `Agent::turn` lets you set an explicit session, per-turn options, progress sink and cancellation before sending. Reuse the returned session identity for follow-up messages that should see the same transcript. Two calls on the same durable session remain distinct turn executions and receive distinct observation IDs.
-- [Embedding FAQ](gitbooks/developing/embed/faq.md): An ordinary embed process supports one `Runtime`; a second build returns `AlreadyRunning`. Add agents to the existing runtime. A multi-user host uses `ProfileRuntime` instead and needs a process dedicated to that mode. See runtime and profiles.
-- [Embedding guides](gitbooks/developing/embed/guides/README.md): Choose the guide that matches your host:
-- [CLI chatbot](gitbooks/developing/embed/guides/cli-chatbot.md): Keep one `Runtime` alive for the process and create an `Agent` for the conversation. The executable example starts with a single message, checks the reply, and prints it. A CLI input loop can send subsequent messages through the same agent; choose a stable thread identity when your host exposes separate conversations.
-- [Deploy a server](gitbooks/developing/embed/guides/deploy-server.md): Your HTTP host can keep a runtime alive and invoke its agents directly. The executable example binds a loopback listener, handles one request, and sends back the agent's reply. It exercises the request path without requiring an RPC server dependency in `openhuman-embed`.
-- [Lean and headless hosts](gitbooks/developing/embed/guides/lean-headless.md): `RuntimeBuilder::lean()` selects the agent, memory, and inference families without background services. Runtime module selection controls what is active; Cargo features control what is compiled. A lean preset alone does not shed compiled dependencies.
-- [Test with a mock backend](gitbooks/developing/embed/guides/mock-backend-testing.md): Run `node scripts/run-embed-examples.mjs` from the repository root. The runner builds and executes every example with the union of required features, clears inherited live-example credentials and operator workspace settings, and requires each program's `EXAMPLE_OK` marker after its assertions.
-- [Multiple agents](gitbooks/developing/embed/guides/multi-agent.md): A runtime owns shared services and credentials. Each `AgentSpec` selects its prompt, model route, access policy, and `action_dir`. Internal agent state belongs to its agent home; the action directory is where acting tools operate.
-- [SaaS with multiple tenants](gitbooks/developing/embed/guides/saas-multi-tenant.md): Use `ProfileRuntime` for a process serving multiple users. Provision each profile, install that profile's credential, and open a handle to its workspace. Reusing a thread id in two profiles does not share their conversation history.
-- [Installation](gitbooks/developing/embed/installation.md): `openhuman-embed` is currently an unpublished workspace crate. Use a local path dependency when developing in this repository, or a Git dependency on `https://github.com/tinyhumansai/openhuman` with `package = "openhuman-embed"`. Pin a reviewed Git revision for a deployed application; the nested vendored libraries are part of that revision's build inputs.
-- [Embedding integrations](gitbooks/developing/embed/integrations/README.md): An embedded runtime composes the capabilities its host supplies. Start with the adapter your application needs:
-- [Channels](gitbooks/developing/embed/integrations/channels.md): Enable the `channels` Cargo feature to use channel adapters. Your host configures the channel credential and binds incoming messages to an agent. In the Telegram example, the Bot API endpoint is a loopback stub, so updates and replies exercise the adapter without contacting Telegram.
-- [Composio](gitbooks/developing/embed/integrations/composio.md): Composio calls use the host backend transport. Install that transport before booting a managed runtime; see TinyHumans managed inference. An explicit inference provider route supplies model inference, not the connector transport.
-- [Local and custom models](gitbooks/developing/embed/integrations/local-models.md): For a local server that implements chat completions, use `Provider::openai_compatible` with its API root and model id. The constructor requires a bearer string even when a particular local server ignores it. Set the endpoint explicitly rather than relying on another user's installed configuration. The OpenAI-compatible example controls can point a live example at that local server.
-- [MCP servers](gitbooks/developing/embed/integrations/mcp.md): Enable the `mcp` Cargo feature and declare a server with `AgentSpec::mcp`. `McpServer::http` takes a registered name and endpoint; `allow_tools` narrows the remote tool list. Server configuration and its connections belong to the agent that declared them.
-- [OpenAI-compatible providers and BYOK](gitbooks/developing/embed/integrations/openai-compatible.md): Construct a route with `Provider::openai_compatible(base_url, api_key).model(model_id)`, then set it on the runtime or an individual agent. Pass the API root, such as a provider's `/v1` URL; the adapter appends `/chat/completions`. Supply an explicit model id so the route can register that model for its workload roles.
-- [Storage drivers](gitbooks/developing/embed/integrations/storage-drivers.md): Enable `storage-sqlite` for SQLite or `storage-mongodb` for MongoDB on your Embed dependency. These Cargo gates make the driver available; choosing a URL selects the runtime backend. Set `RuntimeConfig.storage.url`, pass a URL through `RuntimeBuilder::storage`, or set the `url` field in the `[storage]` section of the host's configuration. `OPENHUMAN_STORAGE_URL` is the environment override used by host configuration resolution.
-- [TinyHumans managed inference](gitbooks/developing/embed/integrations/tinyhumans-managed.md): Embed wraps the core; it does not contain a TinyHumans SDK backend client. A managed host must supply a `BackendTransport` through `RuntimeBuilder::backend_transport`, or boot through the SDK-backed builder in `openhuman-tinyhumans`. The connected host layer owns transport and session login. `RuntimeBuilder::backend_url` selects a URL; it does not install a transport.
-- [Web search](gitbooks/developing/embed/integrations/web-search.md): An agent's web-search tools (`web_search_tool`, `web_answer_tool`, `web_contents_tool`) run through the process-wide TinySearch module. Several agents in one runtime can each search with their own provider key: pin it on that agent's config, and it is never written to `config.toml`, the environment, or a log.
-- [Quickstart](gitbooks/developing/embed/quickstart.md): Start from a checkout of the repository and run `cargo run -p openhuman-embed --example run_turn`. The example boots an ephemeral runtime, creates its own local provider/backend fixtures and prints `hello from the stub`. It needs no inference account and does not contact a real backend.
-- [Embedding troubleshooting](gitbooks/developing/embed/troubleshooting.md): Use the typed error and the effective capability report together. A method that was compiled out is a different problem from a configured method with a provider failure. Keep credentials, user prompts and raw provider payloads out of routine diagnostics.
+- [Embedding OpenHuman](docs/gitbooks/en/developing/embed/README.md): `openhuman-embed` runs the OpenHuman core inside your Rust program. Your host owns the user interface, server transport and authentication flow; the core owns agent turns, memory, tools, approvals and execution policy. Calling its typed facades does not require a JSON-RPC server or the desktop shell.
+- [Embedding API reference](docs/gitbooks/en/developing/embed/api-reference.md): Generate usable local Rust API documentation with `cargo doc -p openhuman-embed --no-deps --open`. Include `--features mcp,skills,channels,storage-sqlite` for the facade gates used by the offline examples, or select the feature set your host actually builds. For all exported optional surfaces use `--all-features`.
+- [Embedding architecture](docs/gitbooks/en/developing/embed/architecture.md): Embed is the library facade above `openhuman-core`. The TinyHumans layer installs the backend SDK transport and owns product login/session behavior; the RPC layer adds JSON-RPC, server listeners and shipped host boot. A Rust embedder can stay at the facade when it owns those concerns itself.
+- [Concepts](docs/gitbooks/en/developing/embed/concepts/README.md): Start with Runtime and agents to understand which settings are shared. Then follow the lifecycle of a request through provider selection, tools, approvals and its durable session. The scope tables distinguish runtime composition from the state a host must isolate per agent or profile.
+- [Access and approvals](docs/gitbooks/en/developing/embed/concepts/access-approvals.md): `Access` groups permission level, origin, standing grants and trusted roots. Choose an origin and tier together: a trusted local host request and an external channel message are different security contexts. `Access::full()` configures both access fields. A sandbox is an additional execution boundary, configured through `AgentDefinitionSpec`.
+- [Agents](docs/gitbooks/en/developing/embed/concepts/agents.md): Register an `AgentSpec` with `Runtime::agent`. Its ID selects the agent's home, durable session identity and addressed cron/channel work. An `Agent` clone refers to the same instance; it does not copy state or start another core. Runtime-wide credentials remain shared, so two agents are not two authenticated customers.
+- [Channels](docs/gitbooks/en/developing/embed/concepts/channels.md): `Runtime::channels` creates listeners addressed to a live agent ID. A listener owns its transport task; dropping or stopping it ends that listener. The agent supplies the prompt, provider and tools used for every incoming message instead of handing messages to an operator agent.
+- [Completer](docs/gitbooks/en/developing/embed/concepts/completer.md): Use `Completer` for one-shot text or structured generation when you do not need an agent, its tool loop or persistent transcript. It takes an explicit route and a `CompletionRequest`; the caller supplies the model and messages for every request.
+- [Cron](docs/gitbooks/en/developing/embed/concepts/cron.md): The typed `Cron` facade creates named jobs with `JobSpec` and `JobSchedule`. `upsert` preserves a job's identity when the same name is configured again; `runs` exposes execution history. An agent-targeted job resolves the configured agent ID and executes with that agent's provider, prompt, tools and derived context.
+- [Errors](docs/gitbooks/en/developing/embed/concepts/errors.md): Match the error type at its boundary: `RuntimeError` describes boot/configuration, `AgentError` describes registration/layout, and `CoreError` describes typed facade calls and turns. A missing compiled or selected domain is `CoreError::Unavailable`; it is a capability decision the host can reflect in its UI.
+- [Hooks and seams](docs/gitbooks/en/developing/embed/concepts/hooks-seams.md): Runtime builders accept host-owned ports for storage, sessions, memory, tools and controller extensions. These are composition seams: the host supplies an implementation of the owning library's contract, while OpenHuman retains access policy, approvals and lifecycle.
+- [MCP](docs/gitbooks/en/developing/embed/concepts/mcp.md): MCP connects a native agent turn to tools served over an MCP protocol transport. Configure a server on `AgentSpec::mcp`, with its transport, authentication and allowed tool names. Another agent on the same runtime does not inherit that server configuration.
+- [Memory](docs/gitbooks/en/developing/embed/concepts/memory.md): `Runtime::memory(namespace)` returns a facade bound to that namespace. The caller establishes scope before sending record data; namespace identity is not taken from model arguments or record metadata. Learning and deletion use the selected memory engine contract.
+- [Observability](docs/gitbooks/en/developing/embed/concepts/observability.md): Subscribe with `Runtime::events` before starting work you want to observe. Each event has a sequence number and runtime identity, with an agent ID and per-call turn ID where applicable. Repeated calls on the same durable session receive different turn IDs; the session ID is not the observation ID.
+- [Profiles and SaaS](docs/gitbooks/en/developing/embed/concepts/profiles-saas.md): Ordinary runtime agents share an operator's configuration path and credentials. Use `ProfileRuntime` when one server serves different authenticated users who must not share those resources. Provision a profile, install its credential, and retain a `ProfileHandle` while serving that user's requests.
+- [Providers](docs/gitbooks/en/developing/embed/concepts/providers.md): A runtime provider is the default inference choice for its agents. An agent can override it with an OpenAI-compatible route or a native `ChatModel<()>` through `Provider::custom`. The `providers` facade exposes the request/response contracts so custom adapters do not need to implement an HTTP server.
+- [Runtime defaults](docs/gitbooks/en/developing/embed/concepts/runtime-defaults.md): The runtime's default provider, access policy and `ModelDefaults` reduce repeated setup. `AgentSpec` can override those defaults for an analyst, a writing agent or another workload without changing its siblings. Temperature and token limits are forwarded to the selected native model request, rather than being merely descriptive builder values.
+- [Runtime](docs/gitbooks/en/developing/embed/concepts/runtime.md): A `Runtime` boots the in-process core once. It owns the selected domains, background services, module host and runtime defaults. Its agents share that core while using separately derived contexts. Build one runtime and pass an `Arc<Runtime>` to the parts of your application that register agents.
+- [Skills](docs/gitbooks/en/developing/embed/concepts/skills.md): A skill bundle contains `SKILL.md` plus any referenced resources. `AgentSpec::skills_dir` copies bundles into the agent's `agents/<id>/skills/` tree. Copying is intentional: discovery rejects symlinked bundles, so linking a shared directory does not install it.
+- [Testing](docs/gitbooks/en/developing/embed/concepts/testing.md): The runnable examples default to loopback fixtures. They assert request bodies, tool results, file effects, transcript scope and event ordering; a successful Rust compilation alone does not prove those behaviors. Live example execution is explicitly opt-in through the documented environment variables.
+- [Tools](docs/gitbooks/en/developing/embed/concepts/tools.md): An agent's `ToolScopeSpec` chooses built-ins, named tools or `HostOnly`. Host-only mode starts with the host's advertised tools, requires an explicit bare prompt, and does not inherit an orchestrator tool catalog. This is useful when your application already owns read-only data access or tightly scoped actions.
+- [Turns and sessions](docs/gitbooks/en/developing/embed/concepts/turns-sessions.md): `Agent::run` collects a turn. `Agent::turn` lets you set an explicit session, per-turn options, progress sink and cancellation before sending. Reuse the returned session identity for follow-up messages that should see the same transcript. Two calls on the same durable session remain distinct turn executions and receive distinct observation IDs.
+- [Embedding FAQ](docs/gitbooks/en/developing/embed/faq.md): An ordinary embed process supports one `Runtime`; a second build returns `AlreadyRunning`. Add agents to the existing runtime. A multi-user host uses `ProfileRuntime` instead and needs a process dedicated to that mode. See runtime and profiles.
+- [Embedding guides](docs/gitbooks/en/developing/embed/guides/README.md): Choose the guide that matches your host:
+- [CLI chatbot](docs/gitbooks/en/developing/embed/guides/cli-chatbot.md): Keep one `Runtime` alive for the process and create an `Agent` for the conversation. The executable example starts with a single message, checks the reply, and prints it. A CLI input loop can send subsequent messages through the same agent; choose a stable thread identity when your host exposes separate conversations.
+- [Deploy a server](docs/gitbooks/en/developing/embed/guides/deploy-server.md): Your HTTP host can keep a runtime alive and invoke its agents directly. The executable example binds a loopback listener, handles one request, and sends back the agent's reply. It exercises the request path without requiring an RPC server dependency in `openhuman-embed`.
+- [Lean and headless hosts](docs/gitbooks/en/developing/embed/guides/lean-headless.md): `RuntimeBuilder::lean()` selects the agent, memory, and inference families without background services. Runtime module selection controls what is active; Cargo features control what is compiled. A lean preset alone does not shed compiled dependencies.
+- [Test with a mock backend](docs/gitbooks/en/developing/embed/guides/mock-backend-testing.md): Run `node scripts/run-embed-examples.mjs` from the repository root. The runner builds and executes every example with the union of required features, clears inherited live-example credentials and operator workspace settings, and requires each program's `EXAMPLE_OK` marker after its assertions.
+- [Multiple agents](docs/gitbooks/en/developing/embed/guides/multi-agent.md): A runtime owns shared services and credentials. Each `AgentSpec` selects its prompt, model route, access policy, and `action_dir`. Internal agent state belongs to its agent home; the action directory is where acting tools operate.
+- [SaaS with multiple tenants](docs/gitbooks/en/developing/embed/guides/saas-multi-tenant.md): Use `ProfileRuntime` for a process serving multiple users. Provision each profile, install that profile's credential, and open a handle to its workspace. Reusing a thread id in two profiles does not share their conversation history.
+- [Installation](docs/gitbooks/en/developing/embed/installation.md): `openhuman-embed` is currently an unpublished workspace crate. Use a local path dependency when developing in this repository, or a Git dependency on `https://github.com/tinyhumansai/openhuman` with `package = "openhuman-embed"`. Pin a reviewed Git revision for a deployed application; the nested vendored libraries are part of that revision's build inputs.
+- [Embedding integrations](docs/gitbooks/en/developing/embed/integrations/README.md): An embedded runtime composes the capabilities its host supplies. Start with the adapter your application needs:
+- [Channels](docs/gitbooks/en/developing/embed/integrations/channels.md): Enable the `channels` Cargo feature to use channel adapters. Your host configures the channel credential and binds incoming messages to an agent. In the Telegram example, the Bot API endpoint is a loopback stub, so updates and replies exercise the adapter without contacting Telegram.
+- [Composio](docs/gitbooks/en/developing/embed/integrations/composio.md): Composio calls use the host backend transport. Install that transport before booting a managed runtime; see TinyHumans managed inference. An explicit inference provider route supplies model inference, not the connector transport.
+- [Local and custom models](docs/gitbooks/en/developing/embed/integrations/local-models.md): For a local server that implements chat completions, use `Provider::openai_compatible` with its API root and model id. The constructor requires a bearer string even when a particular local server ignores it. Set the endpoint explicitly rather than relying on another user's installed configuration. The OpenAI-compatible example controls can point a live example at that local server.
+- [MCP servers](docs/gitbooks/en/developing/embed/integrations/mcp.md): Enable the `mcp` Cargo feature and declare a server with `AgentSpec::mcp`. `McpServer::http` takes a registered name and endpoint; `allow_tools` narrows the remote tool list. Server configuration and its connections belong to the agent that declared them.
+- [OpenAI-compatible providers and BYOK](docs/gitbooks/en/developing/embed/integrations/openai-compatible.md): Construct a route with `Provider::openai_compatible(base_url, api_key).model(model_id)`, then set it on the runtime or an individual agent. Pass the API root, such as a provider's `/v1` URL; the adapter appends `/chat/completions`. Supply an explicit model id so the route can register that model for its workload roles.
+- [Storage drivers](docs/gitbooks/en/developing/embed/integrations/storage-drivers.md): Enable `storage-sqlite` for SQLite or `storage-mongodb` for MongoDB on your Embed dependency. These Cargo gates make the driver available; choosing a URL selects the runtime backend. Set `RuntimeConfig.storage.url`, pass a URL through `RuntimeBuilder::storage`, or set the `url` field in the `[storage]` section of the host's configuration. `OPENHUMAN_STORAGE_URL` is the environment override used by host configuration resolution.
+- [TinyHumans managed inference](docs/gitbooks/en/developing/embed/integrations/tinyhumans-managed.md): Embed wraps the core; it does not contain a TinyHumans SDK backend client. A managed host must supply a `BackendTransport` through `RuntimeBuilder::backend_transport`, or boot through the SDK-backed builder in `openhuman-tinyhumans`. The connected host layer owns transport and session login. `RuntimeBuilder::backend_url` selects a URL; it does not install a transport.
+- [Web search](docs/gitbooks/en/developing/embed/integrations/web-search.md): An agent's web-search tools (`web_search_tool`, `web_answer_tool`, `web_contents_tool`) run through the process-wide TinySearch module. Several agents in one runtime can each search with their own provider key: pin it on that agent's config, and it is never written to `config.toml`, the environment, or a log.
+- [Quickstart](docs/gitbooks/en/developing/embed/quickstart.md): Start from a checkout of the repository and run `cargo run -p openhuman-embed --example run_turn`. The example boots an ephemeral runtime, creates its own local provider/backend fixtures and prints `hello from the stub`. It needs no inference account and does not contact a real backend.
+- [Embedding troubleshooting](docs/gitbooks/en/developing/embed/troubleshooting.md): Use the typed error and the effective capability report together. A method that was compiled out is a different problem from a configured method with a provider failure. Keep credentials, user prompts and raw provider payloads out of routine diagnostics.
- [OpenHuman Embed](crates/openhuman-embed/README.md): A typed Rust facade for running the OpenHuman core inside your application: one Runtime per process, with independently configured Agents.
-- [Embedding OpenHuman](gitbooks/developing/embedding.md): The embedding documentation now lives in the Embedding section.
-- [Cookbook](gitbooks/developing/embed/cookbook.md): Executable recipes are indexed from their source headers. Each entry records the declared run mode and any named Embed feature required by the example. Full source includes the surrounding setup and assertions.
-- [Compiled feature matrix](gitbooks/developing/embed/capability-matrix.md): This matrix comes from the default-feature compiled capability-report example. Runtime presets can narrow enabled domains and services; core Cargo features determine which implementations are available. Named Embed features also gate facade exports: enable `mcp` or `skills` explicitly for their public setters even when core defaults compile those implementations. Embed defaults enable the named `channels` feature. See the installation guide for these separate layers.
-- [RuntimeBuilder setters](gitbooks/developing/embed/builder-setters.md): Public consuming methods that return `Self`, extracted from the RuntimeBuilder implementations. Static host and weight presets, inspection methods and build/run methods are excluded.
-- [API index](gitbooks/developing/embed/api-index.md): Generate the complete local Rust API reference with `cargo doc -p openhuman-embed --all-features --no-deps --open`. This crate is currently unpublished; docs.rs is a future publication target. Names below are source-listed exports, including conditional Cargo-gated items; local rustdoc with your selected features describes availability. Canonical facade source.
+- [Embedding OpenHuman](docs/gitbooks/en/developing/embedding.md): The embedding documentation now lives in the Embedding section.
+- [Cookbook](docs/gitbooks/en/developing/embed/cookbook.md): Executable recipes are indexed from their source headers. Each entry records the declared run mode and any named Embed feature required by the example. Full source includes the surrounding setup and assertions.
+- [Compiled feature matrix](docs/gitbooks/en/developing/embed/capability-matrix.md): This matrix comes from the default-feature compiled capability-report example. Runtime presets can narrow enabled domains and services; core Cargo features determine which implementations are available. Named Embed features also gate facade exports: enable `mcp` or `skills` explicitly for their public setters even when core defaults compile those implementations. Embed defaults enable the named `channels` feature. See the installation guide for these separate layers.
+- [RuntimeBuilder setters](docs/gitbooks/en/developing/embed/builder-setters.md): Public consuming methods that return `Self`, extracted from the RuntimeBuilder implementations. Static host and weight presets, inspection methods and build/run methods are excluded.
+- [API index](docs/gitbooks/en/developing/embed/api-index.md): Generate the complete local Rust API reference with `cargo doc -p openhuman-embed --all-features --no-deps --open`. This crate is currently unpublished; docs.rs is a future publication target. Names below are source-listed exports, including conditional Cargo-gated items; local rustdoc with your selected features describes availability. Canonical facade source.
- [Embed examples](crates/openhuman-embed/examples/README.md): Cookbook
diff --git a/packages/arch/openhuman-bin/README.md b/packages/arch/openhuman-bin/README.md
index 811084e6ac..1f1862e1a2 100644
--- a/packages/arch/openhuman-bin/README.md
+++ b/packages/arch/openhuman-bin/README.md
@@ -36,6 +36,6 @@ The AUR repository should contain `PKGBUILD`, `.SRCINFO`, `openhuman`,
## Further reading
-- [Getting set up](../../../gitbooks/developing/getting-set-up.md) for the other install paths.
-- [Release policy](../../../gitbooks/developing/release-policy.md) for how versions are cut.
+- [Getting set up](../../../docs/gitbooks/en/developing/getting-set-up.md) for the other install paths.
+- [Release policy](../../../docs/gitbooks/en/developing/release-policy.md) for how versions are cut.
- [`scripts/release/`](../../../scripts/release) for the release tooling that produces the AppImage this package repackages.
diff --git a/packages/tauri-plugin-ptt/README.md b/packages/tauri-plugin-ptt/README.md
index 4348e21734..63ba125bcf 100644
--- a/packages/tauri-plugin-ptt/README.md
+++ b/packages/tauri-plugin-ptt/README.md
@@ -2,7 +2,7 @@
Push-to-talk + TTS plugin for Tauri v2, targeting iOS.
-Used by the experimental [iOS companion](../../gitbooks/features/ios-companion.md). Wraps `AVAudioEngine` + `Speech.framework` (STT) + `AVSpeechSynthesizer` (TTS).
+Used by the experimental [iOS companion](../../docs/gitbooks/en/features/ios-companion.md). Wraps `AVAudioEngine` + `Speech.framework` (STT) + `AVSpeechSynthesizer` (TTS).
On non-iOS targets all commands return a `NotSupported` error so the
desktop build is not affected.
@@ -80,6 +80,6 @@ Swift (PTTPlugin.swift)
## Further reading
-- [iOS companion](../../gitbooks/features/ios-companion.md) and [Native voice](../../gitbooks/features/native-tools/voice.md).
-- [Tauri shell](../../gitbooks/developing/architecture/tauri-shell.md) for how plugins are registered.
+- [iOS companion](../../docs/gitbooks/en/features/ios-companion.md) and [Native voice](../../docs/gitbooks/en/features/native-tools/voice.md).
+- [Tauri shell](../../docs/gitbooks/en/developing/architecture/tauri-shell.md) for how plugins are registered.
- [`app/src/assets/audio/`](../../app/src/assets/audio/README.md) for the desktop PTT chimes.
diff --git a/scripts/README.md b/scripts/README.md
index 7cce9998d8..0af6a7498f 100644
--- a/scripts/README.md
+++ b/scripts/README.md
@@ -26,7 +26,7 @@ drivers live in
| [`lib/`](lib) | Small parsers shared by the CI gates (checklist, coverage matrix, feature forwarding, module pins, module source specs). |
| [`__tests__/`](__tests__), [`tests/`](tests) | Unit tests for the scripts themselves (`node --test`, plus a PowerShell installer test). |
| [`fixtures/`](fixtures) | `latest.json` / `release.json` release-metadata fixtures consumed by [`test_install.sh`](test_install.sh) (the [`install.sh`](install.sh) test). |
-| [`theme-codemod/`](theme-codemod) | Codemod collapsing audited `light dark:` Tailwind pairings into the semantic theme utilities (`node scripts/theme-codemod/migrate.mjs [--write]`; see [`gitbooks/developing/theming.md`](../gitbooks/developing/theming.md)). |
+| [`theme-codemod/`](theme-codemod) | Codemod collapsing audited `light dark:` Tailwind pairings into the semantic theme utilities (`node scripts/theme-codemod/migrate.mjs [--write]`; see [`docs/gitbooks/en/developing/theming.md`](../docs/gitbooks/en/developing/theming.md)). |
| [`agent-batch/`](agent-batch) | Validates a batch spec of parallel agent branches, checks file overlap, prints per-agent launch prompts, and reports status (`pnpm agent-batch <validate\|overlap\|launch\|status> <spec.json>`). |
| [`deep-work/`](deep-work) | Issue-to-PR workflow automation over worktrees and AI agents: `pnpm deep-work start\|pick\|continue\|status\|list\|cleanup`. |
| [`dep-audit/`](dep-audit/README.md) | Cargo dependency audit (unused, duplicate-version, heavy, cross-repo drift) over the root workspace, `openhuman-app`, and every Cargo submodule, driven by `tinyanalyzer`. |
@@ -71,7 +71,7 @@ above.
for the experimental mobile clients; **`ios-appstore-*`** build, export, and
upload the iOS IPA and its App Store Connect assets/metadata.
- **[`install.sh`](install.sh) / [`install.ps1`](install.ps1)**: the public `curl | bash` / `irm | iex`
- installers documented in [`gitbooks/developing/getting-set-up.md`](../gitbooks/developing/getting-set-up.md); tested by
+ installers documented in [`docs/gitbooks/en/developing/getting-set-up.md`](../docs/gitbooks/en/developing/getting-set-up.md); tested by
[`test_install.sh`](test_install.sh) / `tests/OpenHumanWindowsInstall.Tests.ps1` and smoke-checked
by [`docs/RELEASE-MANUAL-SMOKE.md`](../docs/RELEASE-MANUAL-SMOKE.md).
- **[`ci-cancel-aware.sh`](ci-cancel-aware.sh)**: wraps a long-running CI command, polling the
@@ -85,6 +85,6 @@ above.
## Further reading
- [`tests/README.md`](../tests/README.md), the Rust integration targets these runners drive.
-- [Testing strategy](../gitbooks/developing/testing-strategy.md) and [E2E testing](../gitbooks/developing/e2e-testing.md).
-- [Getting set up](../gitbooks/developing/getting-set-up.md) and [`CONTRIBUTING.md`](../CONTRIBUTING.md).
+- [Testing strategy](../docs/gitbooks/en/developing/testing-strategy.md) and [E2E testing](../docs/gitbooks/en/developing/e2e-testing.md).
+- [Getting set up](../docs/gitbooks/en/developing/getting-set-up.md) and [`CONTRIBUTING.md`](../CONTRIBUTING.md).
- [`crates/README.md`](../crates/README.md) for the crates these scripts build.
diff --git a/scripts/__tests__/generate-architecture-docs.test.mjs b/scripts/__tests__/generate-architecture-docs.test.mjs
index 73391ad9e7..5ac9870df8 100644
--- a/scripts/__tests__/generate-architecture-docs.test.mjs
+++ b/scripts/__tests__/generate-architecture-docs.test.mjs
@@ -102,5 +102,5 @@ test('App.tsx still reflects the post-CoreState/ChatRuntime provider chain', ()
assert.ok(!names.includes('AIProvider'), 'AIProvider was removed pre-audit');
assert.ok(!names.includes('SkillProvider'), 'SkillProvider was removed pre-audit');
// Sanity: the doc path the gate guards actually exists.
- assert.ok(FRONTEND_DOC.endsWith('gitbooks/developing/architecture/frontend.md'));
+ assert.ok(FRONTEND_DOC.endsWith('docs/gitbooks/en/developing/architecture/frontend.md'));
});
diff --git a/scripts/ci/README.md b/scripts/ci/README.md
index d0397cae98..0e71120e93 100644
--- a/scripts/ci/README.md
+++ b/scripts/ci/README.md
@@ -53,6 +53,6 @@ Long-running CI commands (the coverage lanes) go through
## Further reading
- [`scripts/README.md`](../README.md), the map of the rest of `scripts/`.
-- [Testing strategy](../../gitbooks/developing/testing-strategy.md) for how the coverage gate fits the test layers.
-- [Loadable modules](../../gitbooks/developing/loadable-modules.md), which the module-pin gates protect.
+- [Testing strategy](../../docs/gitbooks/en/developing/testing-strategy.md) for how the coverage gate fits the test layers.
+- [Loadable modules](../../docs/gitbooks/en/developing/loadable-modules.md), which the module-pin gates protect.
- [`AGENTS.md`](../../AGENTS.md) for the layout and feature-forwarding rules these scripts enforce.
diff --git a/scripts/codex-pr-preflight.mjs b/scripts/codex-pr-preflight.mjs
index 07404c062c..9cee53129c 100755
--- a/scripts/codex-pr-preflight.mjs
+++ b/scripts/codex-pr-preflight.mjs
@@ -3,7 +3,7 @@ import fs from 'node:fs';
import path from 'node:path';
import { execSync } from 'node:child_process';
-const REQUIRED_FILES = ['AGENTS.md', 'gitbooks/developing/README.md', 'Cargo.toml', 'app/package.json'];
+const REQUIRED_FILES = ['AGENTS.md', 'docs/gitbooks/en/developing/README.md', 'Cargo.toml', 'app/package.json'];
const APP_PATTERNS = [/^app\//, /^docs\//];
const ROOT_RUST_PATTERNS = [/^src\//, /^tests\//, /^Cargo\.toml$/, /^Cargo\.lock$/];
const TAURI_PATTERNS = [/^crates\/openhuman-app\//];
diff --git a/scripts/debug/README.md b/scripts/debug/README.md
index 3e7ed02240..e4039905d8 100644
--- a/scripts/debug/README.md
+++ b/scripts/debug/README.md
@@ -74,5 +74,5 @@ underlying tools/scripts with log capture.
- [`capture-first-inference.mjs`](./capture-first-inference.mjs) and [`prompt-breakdown.mjs`](./prompt-breakdown.mjs), the inference capture proxy and prompt pricer described in [`AGENTS.md`](../../AGENTS.md).
- [`web-scripts/`](./web-scripts) holds example scenarios for `pnpm debug web`.
-- [Testing strategy](../../gitbooks/developing/testing-strategy.md), [E2E testing](../../gitbooks/developing/e2e-testing.md) and [Agent observability](../../gitbooks/developing/agent-observability.md).
+- [Testing strategy](../../docs/gitbooks/en/developing/testing-strategy.md), [E2E testing](../../docs/gitbooks/en/developing/e2e-testing.md) and [Agent observability](../../docs/gitbooks/en/developing/agent-observability.md).
- [`scripts/README.md`](../README.md) and [`tests/README.md`](../../tests/README.md).
diff --git a/scripts/dep-audit/README.md b/scripts/dep-audit/README.md
index 4fb98b2c1e..34319d7936 100644
--- a/scripts/dep-audit/README.md
+++ b/scripts/dep-audit/README.md
@@ -183,4 +183,4 @@ listed; cargo unifies it.
- [`scripts/README.md`](../README.md) for the rest of the tooling, and [`scripts/ci/`](../ci/README.md) for the merge gates.
- [`docs/dep-audit/`](../../docs/dep-audit/2026-09-19.md), the committed snapshots.
- [`AGENTS.md`](../../AGENTS.md) for the `assert-shed.sh` / `dep-sim.py` rule before claiming a dependency reduction.
-- [Building the Rust core](../../gitbooks/developing/building-rust-core.md) and the [`vendor/`](../../vendor) submodules the audit walks.
+- [Building the Rust core](../../docs/gitbooks/en/developing/building-rust-core.md) and the [`vendor/`](../../vendor) submodules the audit walks.
diff --git a/scripts/generate-architecture-docs.mjs b/scripts/generate-architecture-docs.mjs
index ad718bce22..11e08839c5 100644
--- a/scripts/generate-architecture-docs.mjs
+++ b/scripts/generate-architecture-docs.mjs
@@ -7,7 +7,7 @@
* Minimal "docs generated from code" slice for issue #3892. Derives the
* frontend **provider chain** from an explicit source marker in
* `app/src/App.tsx` and renders it into a marked block in
- * `gitbooks/developing/architecture/frontend.md`, so the documented chain
+ * `docs/gitbooks/en/developing/architecture/frontend.md`, so the documented chain
* cannot silently drift from the code (the exact drift called out in the
* issue: the doc described `UserProvider` / `AIProvider` / `SkillProvider`
* long after the code moved to `CoreStateProvider` / `ChatRuntimeProvider`).
@@ -32,7 +32,7 @@ const HERE = dirname(fileURLToPath(import.meta.url));
const REPO_ROOT = resolve(HERE, '..');
export const APP_TSX = resolve(REPO_ROOT, 'app/src/App.tsx');
-export const FRONTEND_DOC = resolve(REPO_ROOT, 'gitbooks/developing/architecture/frontend.md');
+export const FRONTEND_DOC = resolve(REPO_ROOT, 'docs/gitbooks/en/developing/architecture/frontend.md');
/** Stable tokens used to locate the generated block in the doc. */
const BLOCK_BEGIN_TOKEN = 'BEGIN GENERATED: provider-chain';
diff --git a/scripts/memory-scenarios/README.md b/scripts/memory-scenarios/README.md
index f71c11c074..a496099ef1 100644
--- a/scripts/memory-scenarios/README.md
+++ b/scripts/memory-scenarios/README.md
@@ -177,7 +177,7 @@ A finding's `basis` is **READ** when it was seen (a response, a log line) and
## See also
-- [Memory](../../gitbooks/features/memory.md) and [Memory architecture](../../gitbooks/developing/architecture/memory.md), the behavior under test.
+- [Memory](../../docs/gitbooks/en/features/memory.md) and [Memory architecture](../../docs/gitbooks/en/developing/architecture/memory.md), the behavior under test.
- [`vendor/tinymemory/`](../../vendor/tinymemory) and its repo, [tinyhumansai/tinymemory](https://github.com/tinyhumansai/tinymemory).
- [`docs/specs/memory-v2.md`](../../docs/specs/memory-v2.md) for the layout spec.
- [`life-scenarios/`](https://github.com/tinyhumansai/openhuman-benchmarks/blob/main/life-scenarios/README.md) in openhuman-benchmarks, and [`scripts/README.md`](../README.md).
diff --git a/scripts/print-core-token.sh b/scripts/print-core-token.sh
index e1f15826c0..15520e0c2b 100755
--- a/scripts/print-core-token.sh
+++ b/scripts/print-core-token.sh
@@ -77,7 +77,7 @@ Looked for:
If you are running the dockerized core, set OPENHUMAN_CORE_TOKEN in your
.env (or the App Platform secrets UI) and bounce the container. See
-gitbooks/features/cloud-deploy.md for the full single-source-of-truth setup.
+docs/gitbooks/en/features/cloud-deploy.md for the full single-source-of-truth setup.
EOF
exit 1
fi
diff --git a/scripts/test-codex-pr-preflight.mjs b/scripts/test-codex-pr-preflight.mjs
index 46a38b176b..fb5c3eac36 100755
--- a/scripts/test-codex-pr-preflight.mjs
+++ b/scripts/test-codex-pr-preflight.mjs
@@ -10,10 +10,10 @@ function run(cmd, cwd) {
function makeRepo(branchName) {
const dir = mkdtempSync(path.join(tmpdir(), 'codex-preflight-'));
- mkdirSync(path.join(dir, 'gitbooks/developing'), { recursive: true });
+ mkdirSync(path.join(dir, 'docs/gitbooks/en/developing'), { recursive: true });
mkdirSync(path.join(dir, 'app'), { recursive: true });
writeFileSync(path.join(dir, 'AGENTS.md'), '# test\n');
- writeFileSync(path.join(dir, 'gitbooks/developing/README.md'), 'ok\n');
+ writeFileSync(path.join(dir, 'docs/gitbooks/en/developing/README.md'), 'ok\n');
writeFileSync(path.join(dir, 'Cargo.toml'), '[package]\nname="x"\nversion="0.1.0"\n');
writeFileSync(path.join(dir, 'app/package.json'), '{"name":"x"}\n');
run('git init', dir);
diff --git a/scripts/test-planning/README.md b/scripts/test-planning/README.md
index 5d32b99e91..b6d1246a9c 100644
--- a/scripts/test-planning/README.md
+++ b/scripts/test-planning/README.md
@@ -41,6 +41,6 @@ pnpm test:plan -- \
## See also
-- [Testing strategy](../../gitbooks/developing/testing-strategy.md), where the backlog items land.
+- [Testing strategy](../../docs/gitbooks/en/developing/testing-strategy.md), where the backlog items land.
- [`docs/TEST-COVERAGE-MATRIX.md`](../../docs/TEST-COVERAGE-MATRIX.md) and [`tests/README.md`](../../tests/README.md).
- [`scripts/README.md`](../README.md).
diff --git a/tests/README.md b/tests/README.md
index e8309e1869..43b7374ec7 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -94,5 +94,5 @@ flakes.
- Frontend E2E lives in [`app/test/e2e/`](../app/test/e2e), using
[`app/test/e2e/helpers/element-helpers.ts`](../app/test/e2e/helpers/element-helpers.ts) rather than raw platform element
types.
-- [Testing strategy](../gitbooks/developing/testing-strategy.md) and [E2E testing](../gitbooks/developing/e2e-testing.md) for which layer a change belongs in.
+- [Testing strategy](../docs/gitbooks/en/developing/testing-strategy.md) and [E2E testing](../docs/gitbooks/en/developing/e2e-testing.md) for which layer a change belongs in.
- [`scripts/README.md`](../scripts/README.md) for the runners, and [`CONTRIBUTING.md`](../CONTRIBUTING.md).
diff --git a/tests/fixtures/memory_golden/README.md b/tests/fixtures/memory_golden/README.md
index 5b4e79da63..62d2c5a5c4 100644
--- a/tests/fixtures/memory_golden/README.md
+++ b/tests/fixtures/memory_golden/README.md
@@ -44,5 +44,5 @@ across, and check that the manifest diff matches the DDL diff.
## See also
- [`tests/README.md`](../../README.md), the layout of the Rust test targets.
-- [`memory` domain README](../../../crates/openhuman-core/src/memory/README.md) and [Memory architecture](../../../gitbooks/developing/architecture/memory.md).
+- [`memory` domain README](../../../crates/openhuman-core/src/memory/README.md) and [Memory architecture](../../../docs/gitbooks/en/developing/architecture/memory.md).
- [`vendor/tinymemory/`](../../../vendor/tinymemory), which owns the engine contracts and migrations.