Skip to content

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

docs(gitbooks): fix the safety story, purge removed runtimes, add the missing pages

cyrus3bb256e2217b
diff --git a/gitbooks/README.md b/gitbooks/README.md
index 4a6649d94c..64748ead59 100644
--- a/gitbooks/README.md
+++ b/gitbooks/README.md
@@ -2,7 +2,7 @@
description: >-
Personal AI super intelligence for your desktop: a brain that builds a
local-first memory of your life, an orchestrator of agent fleets and
- workflows, and a deep researcher across 118+ connected services, running on
+ workflows, and a deep researcher across the services you connect, running on
a Rust core light enough to embed anywhere.
icon: diamond
---
@@ -18,15 +18,15 @@ Every model in the world, all 200+ of them, shares the same fundamental limitati
OpenHuman solves this with a stack that's calmly, deliberately different:
- [**Memory you choose and can inspect**](features/memory.md)**.** Documents (folders, files, links, GitHub, RSS, connected apps), conversations and learnings are stored in a memory engine, either hosted TinyHumans or your own CortexDB. The agent asks it questions with citations, and a short brief about you opens every new chat. You can see and delete everything stored.
-- [**118+ third-party integrations**](features/integrations/README.md)**.** One-click OAuth into Gmail, GitHub, Slack, Notion, Stripe, Calendar, Drive, Linear, Jira and more, no API keys to wire by hand, no plugin marketplace to navigate.
-- **An agent built for big data.** [Smart token compression (TokenJuice)](features/token-compression.md) compacts verbose tool output before it ever enters the model's context, so sweeping through your last six months of email costs single-digit dollars. [Automatic model routing](features/model-routing/) sends each task to the right model, `hint:reasoning` to a frontier model, `hint:fast` to a cheap one, vision to vision, all under one subscription and one TinyHumans API key. Optional [local AI via Ollama or LM Studio](features/model-routing/local-ai.md) keeps supported workloads on-device, and every LLM, embedding, memory, and web search engine underneath is swappable through config rather than code.
+- [**Third-party integrations**](features/integrations/README.md)**.** One-click OAuth into Gmail, GitHub, Slack, Notion, Stripe, Calendar, Drive, Linear, Jira and more, across the 119 managed-auth toolkits the app knows about, with no API keys to wire by hand and no plugin marketplace to navigate.
+- **An agent built for big data.** [Smart token compression (TokenJuice)](features/token-compression.md) compacts verbose tool output before it ever enters the model's context, so sweeping through your last six months of email costs single-digit dollars. [Automatic model routing](features/model-routing/README.md) sends each task to the right model, `hint:reasoning` to a frontier model, `hint:fast` to a cheap one, vision to vision, all under one subscription and one TinyHumans API key. Optional [local AI via Ollama or LM Studio](features/model-routing/local-ai.md) keeps supported workloads on-device, and every LLM, embedding, memory, and web search engine underneath is swappable through config rather than code.
- **Fast, cheap decisions.** Before an agent burns a full model call choosing which of dozens of tools to use, a small classifier called Jev scores the options and answers in about 150 milliseconds instead of generating text. It shortlists tools, decides whether a tool is needed at all, and drives routine browser steps, so the expensive model gets called for the things that actually need it.
-- [**Batteries included**](features/native-tools/)**.** A complete agent toolbelt is wired in by default: [web search](features/native-tools/web-search.md), a [web-fetch scraper](features/native-tools/web-scraper.md), a full [coder toolset](features/native-tools/coder.md) (filesystem, git, lint, test, grep), [browser & computer control](features/native-tools/browser-and-computer.md), [cron & scheduling](features/native-tools/cron.md), [memory tools](features/native-tools/memory-tools.md), [agent coordination](features/native-tools/agent-coordination.md) for spawning sub-agents, and [native voice](features/native-tools/voice.md), STT in, TTS out, mascot lip-sync, and a live Google Meet agent that joins meetings, transcribes them into your memory, and can speak back into the call. No "install a plugin to read files" friction.
+- [**Batteries included**](features/native-tools/README.md)**.** A complete agent toolbelt is wired in by default: [web search](features/native-tools/web-search.md), a [web-fetch scraper](features/native-tools/web-scraper.md), a full [coder toolset](features/native-tools/coder.md) (filesystem, git, lint, test, grep), [browser & computer control](features/native-tools/browser-and-computer.md), [cron & scheduling](features/native-tools/cron.md), [memory tools](features/native-tools/memory-tools.md), [agent coordination](features/native-tools/agent-coordination.md) for spawning sub-agents, and [native voice](features/native-tools/voice.md), STT in, TTS out, mascot lip-sync, and a live voice agent you can interrupt mid-sentence. No "install a plugin to read files" friction.
- [**Workflows**](features/workflows.md)**.** Durable, visual automations on the open-source tinyflows engine. Describe the automation in chat, the agent proposes a workflow graph, you review it on a canvas and save it. Flows fire on schedules or live app events, pause at approval gates, and resume exactly where they stopped, with full step-by-step run history.
- [**A harness that finishes the job**](developing/architecture/agent-harness.md)**.** Every turn runs on the open-source tinyagents graph engine: durable checkpointing (sub-agents pause for your input and resume, instead of dying), a no-progress circuit breaker that stops identical-call loops and hands back a root-cause summary, classified tool failures rendered as actionable timeline cards, and durable, replayable run journals with per-call token and cost accounting.
- **Light enough to run in-process.** The Rust core that powers all of this runs in the same process as the desktop app rather than as a bag of background services: we've measured 500 agents alive in one process at about 1.77 MiB of marginal memory each, and thousands of agents on a single box is the direction it's heading. The same core ships as a library ([`crates/openhuman-embed`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-embed)), so another product can boot a runtime and add agents to it in a few lines of Rust. See [Performance](developing/performance.md), [Pluggable engines](developing/engines.md), and [Embedding OpenHuman](developing/embedding.md) if you're building on top of it.
- [**Privacy Mode**](features/privacy-mode.md)**.** One switch, enforced in the Rust core: local-only mode structurally blocks every cloud model call and permits only on-device runtimes (Ollama, LM Studio, MLX, local OpenAI-compatible).
-- **Simple, UI-first.** A clean desktop experience and short onboarding paths take you from install to a working agent in a few clicks, no config-first setup, no terminal required. The agent has [a face](features/mascot/README.md): a desktop mascot that speaks, reacts to its surroundings, joins your meetings as a real participant, remembers you across weeks, and keeps thinking in the background even when you've stopped typing.
+- **Simple, UI-first.** A clean desktop experience and short onboarding paths take you from install to a working agent in a few clicks, no config-first setup, no terminal required. 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 even when you've stopped typing.
Together, these turn OpenHuman into something fundamentally different from a chatbot. It is an AI agent that consumes large amounts of personal data at low cost, maintains a persistent and evolving understanding of your world, and takes proactive actions on your behalf.
diff --git a/gitbooks/SUMMARY.md b/gitbooks/SUMMARY.md
index 8896d037fd..9ac6a92dad 100644
--- a/gitbooks/SUMMARY.md
+++ b/gitbooks/SUMMARY.md
@@ -4,6 +4,8 @@
- [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
@@ -21,9 +23,12 @@
## Features
-- [Realtime Mascot](features/mascot/README.md)
+- [Chat](features/chat.md)
- [Memory](features/memory.md)
-- [Third-party Integrations (118+)](features/integrations/README.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)
@@ -36,12 +41,13 @@
- [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)
-- [Available Tools](features/native-tools/README.md)
+- [Native Tools](features/native-tools/README.md)
- [Web Search](features/native-tools/web-search.md)
- - [Image Tools](features/native-tools/image-tools.md)
- [Web Scraper](features/native-tools/web-scraper.md)
- - [Image & Video Generation](features/native-tools/media-generation.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)
@@ -51,6 +57,7 @@
- [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)
@@ -64,31 +71,32 @@
- [Overview](developing/README.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)
+ - [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)
- [Jev](developing/jev.md)
- [Embedding OpenHuman](developing/embedding.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)
+- [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)
-- [Theming (Token System)](developing/theming.md)
-- [Agent Observability](developing/agent-observability.md)
-- [Hooks](developing/hooks.md)
-- [MCP Server](developing/mcp-server.md)
-- [Claude Code CLI Provider](developing/providers/claude-code.md)
-- [AgentBox Deployment](developing/agentbox-deployment.md)
-- [Architecture](developing/architecture/README.md)
- - [Deep Architecture Reference](developing/architecture.md)
- - [Agent Harness](developing/architecture/agent-harness.md)
- - [Flows on TinyAgents (crates/openhuman-core/src/flows/)](developing/architecture/flows-on-tinyagents.md)
- - [Memory (crates/openhuman-core/src/memory/)](developing/architecture/memory.md)
- - [MCP Registry (crates/openhuman-core/src/mcp/registry/)](developing/architecture/mcp-registry.md)
- - [Security (crates/openhuman-core/src/security/)](developing/architecture/security.md)
- - [Frontend (app/src/)](developing/architecture/frontend.md)
- - [Tauri Shell (crates/openhuman-app/)](developing/architecture/tauri-shell.md)
## Legal
diff --git a/gitbooks/developing/README.md b/gitbooks/developing/README.md
index 6741fb4811..32b294d098 100644
--- a/gitbooks/developing/README.md
+++ b/gitbooks/developing/README.md
@@ -22,7 +22,7 @@ Everything above that floor is modular: cargo feature gates decide what compiles
| Path | What's there |
| ----------- | ----------------------------------------------------------------------------------------------------------------- |
| `app/` | pnpm workspace `openhuman-app`. Vite + React frontend (`app/src/`) and the Tauri desktop host (`crates/openhuman-app/`). |
-| `crates/` | Rust crates: `openhuman-core` (lib `openhuman_core` + the `openhuman-core` CLI binary; domains under `src/<domain>/`, JSON-RPC, MCP routing), `openhuman-app` (Tauri host), `openhuman-embed` (library facade), `openhuman-rpc` (shared RPC contracts + HTTP client), `openhuman-tui` (terminal frontend). |
+| `crates/` | Rust crates. Six workspace members: `openhuman-core` (package `openhuman`: the core library, domains under `src/<domain>/`, the controller contract and in-process dispatch under `src/core/`; **no binary and no JSON-RPC server**), `openhuman-rpc` (JSON-RPC 2.0 over the core: envelopes, HTTP client, and the server), `openhuman-embed` (the typed library facade), `openhuman-tinyhumans` (the only crate that may depend on `tinyhumans-sdk`: backend transport, hosted RPC proxies, host-side session owner; every host installs it first), `openhuman-cli` (the `openhuman-core` binary and every root `tests/` and `examples/` target), `openhuman-tui` (terminal frontend). Plus `openhuman-app` (the Tauri host), which is excluded from the root workspace and builds from its own manifest. |
| `gitbooks/` | This site (the public-facing docs). |
| `docs/` | Internal maintainer docs: test-coverage matrix, release smoke checklist, library benchmarking and minimal-recipe notes, translated READMEs, `community/`. |
@@ -85,7 +85,7 @@ PRs must clear the **≥ 80% coverage on changed lines** gate. Add tests for new
- Open issues and PRs at [tinyhumansai/openhuman](https://github.com/tinyhumansai/openhuman).
- PRs target `main`. Push to your fork, not upstream.
-- Follow [`CONTRIBUTING.md`](../../CONTRIBUTING.md) and the issue/PR templates.
+- Follow [`CONTRIBUTING.md`](https://github.com/tinyhumansai/openhuman/blob/main/CONTRIBUTING.md) and the issue/PR templates.
- Keep changes focused. A bug fix doesn't need surrounding cleanup; a one-shot operation doesn't need a helper.
Help building toward AGI doesn't have to mean shipping a kernel, bugfixes, docs, integrations, and tests all move the bar.
diff --git a/gitbooks/developing/agent-observability.md b/gitbooks/developing/agent-observability.md
index c9f6ff92f5..d90be4bcac 100644
--- a/gitbooks/developing/agent-observability.md
+++ b/gitbooks/developing/agent-observability.md
@@ -3,7 +3,7 @@ description: Artifact-capture layer that makes E2E tests debuggable. Logs, trace
icon: eye
---
-# Agent Observability for E2E
+# Agent Observability
This doc describes the artifact-capture layer that makes the desktop app
inspectable by coding agents (Codex, Claude Code, Cursor) through the
@@ -20,7 +20,7 @@ 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
@@ -92,7 +92,7 @@ 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
```
diff --git a/gitbooks/developing/agentbox-deployment.md b/gitbooks/developing/agentbox-deployment.md
index 7bca26cf9d..b88441f211 100644
--- a/gitbooks/developing/agentbox-deployment.md
+++ b/gitbooks/developing/agentbox-deployment.md
@@ -1,9 +1,16 @@
+---
+description: >-
+ The removed AgentBox container deployment surface, kept as the record of
+ what it was and which test pins its absence.
+icon: box-archive
+---
+
# AgentBox marketplace deployment (historical)
This page describes a container surface that no longer exists in
`openhuman-core`. A regression test,
`agentbox_run_and_jobs_paths_are_no_longer_public` in
-`crates/openhuman-core/src/core/auth_tests.rs`, asserts that `/run` and
+`crates/openhuman-rpc/src/server/auth_tests.rs`, asserts that `/run` and
`/jobs/{job_id}` are gone and pins the reason in a comment: the AgentBox
marketplace surface moved out of this codebase. `OPENHUMAN_AGENTBOX_MODE`
has no remaining reader anywhere in `crates/openhuman-core/src` today, even
diff --git a/gitbooks/developing/architecture.md b/gitbooks/developing/architecture.md
index 56c8db27b0..9385834f0d 100644
--- a/gitbooks/developing/architecture.md
+++ b/gitbooks/developing/architecture.md
@@ -3,7 +3,7 @@ description: Deep architecture reference for the OpenHuman codebase - repo layou
icon: code-branch
---
-# OpenHuman Architecture
+# Deep Architecture Reference
**A personal AI assistant built on Rust, with a persistent local memory and an agent harness that can act across your connected services.**
@@ -18,7 +18,7 @@ OpenHuman is a cross-platform communication and automation platform: a Rust core
| **`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; hosts the core as an in-process tokio task (`src/core_process.rs`). |
| **`crates/openhuman-core/`** | Cargo package **`openhuman`**: library **`openhuman_core`**, with no `tinyhumans-sdk` dependency — the hosted backend is reached only through the `backend::transport::BackendTransport` port. 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/`. There is no `src/rpc/` or `src/embed/` inside this crate any more. |
-| **`crates/openhuman-rpc/`** | Shared JSON-RPC contracts: `RpcOutcome`, `unwrap_rpc`, `apply_log_envelope`, `StructuredRpcError`. 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); re-exported by the core as `openhuman_core::rpc`. Behind `server` it also owns the `http_host` static-directory file server and registers its controllers as a core extension. |
+| **`crates/openhuman-rpc/`** | Shared JSON-RPC contracts: `RpcOutcome`, `unwrap_rpc`, `apply_log_envelope`, `StructuredRpcError`. 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 (`openhuman_embed::{Harness, Core, CoreBuilder, DomainSet, ServiceSet, HostKind}`) 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 (installs the tinyhumans transport, then `run_core_from_args`), the developer/benchmark bins, and every root `tests/*.rs` / `examples/*.rs` target. |
@@ -39,7 +39,7 @@ The desktop app **WebView** loads the UI from `app/`; RPC, agents and skills run
**Not supported yet:** Android, iOS, standalone web client (may exist as experimental targets in the repo; do not treat as product-ready).
-```
+```text
OpenHuman (shipping)
|
Desktop
@@ -55,7 +55,7 @@ Tauri v2 compiles the Rust core into native binaries per platform, embedding the
## High-level architecture
-```
+```text
+------------------------------------------------------------------+
| React Frontend |
| Redux Toolkit | coreRpcClient (fetch) | Socket.IO client | UI |
@@ -115,7 +115,7 @@ The **Tokio async runtime** drives all I/O. WebSocket connections, HTTP requests
OpenHuman implements a **dual-socket architecture**: a Rust-native WebSocket client on desktop and a JavaScript Socket.io client on web. The Rust implementation survives app backgrounding, operates independently of the WebView, and handles TLS via rustls.
-```
+```text
Desktop Mode: Web Mode:
+-------------+ +-------------+
@@ -175,7 +175,7 @@ Every remote tool definition, whether coming in through a connected server or se
## Memory
-Memory v2 is three operations (Recall, Fetch, Store) over a pluggable engine: `tinyhumans` (hosted CortexDB, needs sign-in) or `cortexdb` (your own endpoint and key); with neither, memory is off. The contract and engines live in `vendor/tinymemory` (`tinymemory-api`, `tinymemory-cortex`, `-documents`, `-sources`, `-safety`, `-context`, `-import`, `-conformance`). OpenHuman's `crates/openhuman-core/src/memory/` keeps the host side: engine binding, ops, the single `memory` agent tool, conversation buffering, document sources, the compiled `context.md`, the consent-gated v1 import and the exit flush. See [Memory architecture](architecture/memory.md), [Pluggable engines](engines.md) and the spec `docs/specs/memory-v2.md`.
+Memory v2 is three operations (Recall, Fetch, Store) over a pluggable engine: `tinyhumans` (hosted CortexDB, needs sign-in) or `cortexdb` (your own endpoint and key); with neither, memory is off. 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. The compiled `context.md` brief it used to own is gone, replaced by the per-turn memory pack. See [Memory architecture](architecture/memory.md), [Pluggable engines](engines.md) and the spec `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, so the full history stays recoverable even though a resumed session only reads the latest generation.
@@ -183,14 +183,14 @@ Conversation state is separate from memory: each thread's transcript is a JSONL
## Security architecture
-```
+```text
+-------------------------------------------------------------------+
| Security Layers |
| |
| +------------------+ +------------------+ +------------------+ |
-| | OS Keychain | | AES-256-GCM | | Tool sandbox | |
-| | (macOS/Win/Lin) | | Memory Encrypt | | (Docker / bwrap | |
-| | for credentials | | + Argon2id KDF | | firejail / etc) | |
+| | OS Keychain | | Secrets at rest | | Tool sandbox | |
+| | (macOS/Win/Lin) | | ChaCha20-Poly | | (platform jail | |
+| | for credentials | | 1305 (`enc2:`) | | or Docker) | |
| +------------------+ +------------------+ +------------------+ |
| |
| +------------------+ +------------------+ +------------------+ |
@@ -201,7 +201,7 @@ Conversation state is separate from memory: each thread's transcript is a JSONL
+-------------------------------------------------------------------+
```
-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, Docker, Bubblewrap, Firejail, Landlock, or a no-op fallback (`crates/openhuman-core/src/security/{docker,bubblewrap,firejail,landlock}.rs`, `detect.rs`); the legacy per-skill QuickJS memory and stack limit model is gone. 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/`.
+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. The backends no longer live in `security/`: `crates/openhuman-core/src/sandbox/` picks between none, the OS jail (Landlock on Linux, Seatbelt on macOS) and Docker, over the `tinybox` crates. The legacy per-skill QuickJS memory and stack limit model is gone. 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/`.
---
@@ -209,7 +209,7 @@ Credentials go through the OS keychain via the `keyring` crate (macOS Keychain,
A complete flow from user action to external service and back:
-```
+```text
User types a command in the chat UI
|
v
@@ -271,13 +271,12 @@ Core subsystems run on published `tiny*` crates, vendored as git submodules unde
| **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 dual support |
-| **Encryption** | aes-gcm + argon2 | AES-256-GCM encryption, Argon2id key derivation |
+| **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 |
-| **Graph** | SQLite (`codegraph`) | Code relationship graph, embedded |
---
@@ -287,7 +286,7 @@ The iOS client is a Tauri v2 app that shares the React/TypeScript UI codebase bu
### Transport architecture
-```
+```text
iOS App (React + Tauri iOS shell)
|
TransportManager (app/src/services/transport/TransportManager.ts)
@@ -324,8 +323,8 @@ Transport is selected by `ConnectionProfile` stored in secure storage. On pairin
- `pairingToken` is single-use, TTL'd, hashed at rest on backend.
- `sessionToken` is per-client peer and revocable 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.
-- **TODO:** migrate iOS symmetric session key to Keychain for persistence across restarts.
+- The iOS symmetric session key is held in memory, so a restart re-pairs rather than resuming.
### Backend dependency
-`tinyhumansai/backend#709` implements the `tunnel:register` / `tunnel:connect` / `tunnel:frame` socket.io protocol. End-to-end pairing does not work until that PR is merged and deployed.
+The `tunnel:register` / `tunnel:connect` / `tunnel:frame` Socket.IO protocol is served by the TinyHumans backend. Pairing depends on it being deployed, which it is; 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
index 0cab4ec400..daf78065b9 100644
--- a/gitbooks/developing/architecture/README.md
+++ b/gitbooks/developing/architecture/README.md
@@ -13,7 +13,7 @@ OpenHuman is open-sourced under GNU GPL3. This page is the high-level shape of t
OpenHuman is a **React + Tauri v2 desktop app** with a **Rust core** doing 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)│
@@ -21,13 +21,13 @@ OpenHuman is a **React + Tauri v2 desktop app** with a **Rust core** doing the h
└──────────────────────────────────────────────────────────────────┘
│ JSON-RPC (loopback HTTP) ↕
┌──────────────────────────────────────────────────────────────────┐
-│ Rust core (crates/openhuman-core/, binary `openhuman-core`) │
+│ 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, Meet agent) │
+│ • Voice (STT in, TTS out, live voice agent) │
└──────────────────────────────────────────────────────────────────┘
│
┌──────────────────────────────────────────────────────────────────┐
@@ -49,9 +49,11 @@ Running the core in-process instead of behind a socket is also why it's cheap to
## Crates
- `crates/openhuman-app/` - Tauri v2 desktop host; excluded from the root workspace, built from its own manifest.
-- `crates/openhuman-core/` - Cargo package `openhuman`: business domains, JSON-RPC server, CLI, `CoreBuilder`/`CoreRuntime`.
+- `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/` - typed library facade (`openhuman_embed::Runtime` / `Agent`, with `Harness` as a one-agent shorthand) for embedding the core in another product.
-- `crates/openhuman-rpc/` - shared RPC contracts (`Outcome`, `unwrap_rpc`, `StructuredRpcError`) and the HTTP client used by the app and TUI.
+- `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/` - 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/` - the `openhuman-core` binary, the developer and benchmark bins, and every root `tests/` and `examples/` target.
- `crates/openhuman-tui/` - standalone terminal frontend that boots the core in-process.
The full table is under "Repository layout" in the [deep architecture reference](../architecture.md).
@@ -61,13 +63,13 @@ The full table is under "Repository layout" in the [deep architecture reference]
1. **Connect**. OAuth into an [integration](../../features/integrations/README.md). Backend stores the token; 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**. `tinymemory-safety` removes secrets and personal identifiers from every item.
+4. **Scrub**. The `safety` feature of `tinymemory-integrations` removes secrets and personal identifiers from every item, on every write path.
5. **Store**. The item goes to the selected engine (hosted TinyHumans or your CortexDB). Conversation turns are logged as they happen, learnings when the agent or you add one.
6. **Recall / Fetch**. The agent's `memory` tool asks the engine a question (with citations) or runs a raw hybrid search.
7. **Pack**. Before every turn, a token-budgeted memory pack is recalled and added to that turn's model request only, never to the transcript.
8. **Forget**. Items are removed 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 entering LLM context.
-10. **Route**. The [router](../../features/model-routing/) picks the right provider and model for the task hint, one of several [pluggable engines](../engines.md) the core chooses at runtime.
+10. **Route**. The [router](../../features/model-routing/README.md) picks the right provider and model for the task hint, one of several [pluggable engines](../engines.md) the core chooses at runtime.
## Privacy boundary
diff --git a/gitbooks/developing/architecture/agent-harness.md b/gitbooks/developing/architecture/agent-harness.md
index b459a90131..809f9e45ce 100644
--- a/gitbooks/developing/architecture/agent-harness.md
+++ b/gitbooks/developing/architecture/agent-harness.md
@@ -7,6 +7,11 @@ 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
@@ -92,7 +97,7 @@ runtime-wide".
> on the in-tree `run_turn_engine` loop. **All three entry points (`Agent::turn`,
> the channel/CLI bus path, and `run_subagent`) now drive every turn through the
> published [`tinyagents`](https://crates.io/crates/tinyagents) 2.1 agent-loop
-> harness** via the adapter seam in [`crates/openhuman-core/src/agent/tinyagents/`](../../../crates/openhuman-core/src/agent/tinyagents/)
+> harness** via 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`). The legacy `run_turn_engine`, the three
> hand-rolled loops, `turn_engine_adapter`, and the custom `agent_graph/` engine
> described later in this page have been **removed**; the surviving shared seam,
@@ -100,16 +105,16 @@ runtime-wide".
> `token_budget.rs` (context trimming is now `MessageTrimMiddleware`) and the
> vestigial `interrupt.rs` fence (cancellation is the tinyagents steering channel)
> are gone; policy **stop hooks** (budget / thread-goal / iteration caps) now fire
-> through a `StopHookMiddleware` ([`tinyagents/stop_hooks.rs`](../../../crates/openhuman-core/src/agent/tinyagents/stop_hooks.rs))
+> 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, and the channel route forwards live
> `AgentProgress` like the chat route.
>
> Multi-agent **orchestration** is expressed on tinyagents' **graph layer** via
> `graph::parallel::map_reduce`, the `spawn_parallel_graph` scaffold, and the
> shared `graph::orchestration` `TaskStore` lifecycle primitives re-exported from
-> [`orchestration/mod.rs`](../../../crates/openhuman-core/src/agent/orchestration/mod.rs):
+> [`orchestration/mod.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/agent/orchestration/mod.rs):
>
-> - [`orchestration/delegation.rs`](../../../crates/openhuman-core/src/agent/orchestration/delegation.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` (conditional routing,
> `RecursionPolicy`, durable `FileCheckpointer`, `CancellationToken`, `GraphTracingSink`);
> - the **workflow phase engine** fans each phase's agents out on the graph
@@ -118,7 +123,7 @@ runtime-wide".
> - `spawn_parallel_agents` runs its fan-out through `spawn_parallel_graph` +
> `graph::parallel::map_reduce`;
> - the **agent-teams** member runtime is a conditional-routing graph
-> (`execute → complete | fail → done`, [`agent_teams/runtime.rs`](../../../crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs));
+> (`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 → Completed/Failed/Cancelled).
>
@@ -128,10 +133,10 @@ runtime-wide".
## TinyAgents crate: features & 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`), `tinyagents-graph` (`sqlite`), `tinyagents-language`, `tinyagents-registry`, `tinyagents-session`, plus `tinyinference` from `vendor/tinyagents/vendor/tinyinference`, so SDK changes can be tested in-tree before being PR'd upstream (see [`crates/openhuman-core/Cargo.toml`](../../../crates/openhuman-core/Cargo.toml)). The rationale, so future upgrades don't silently regress it:
+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 being PR'd upstream (see [`crates/openhuman-core/Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/Cargo.toml)). The rationale, so future upgrades don't silently 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, so no local patch of `rusqlite` / `libsqlite3-sys` remains. Both worlds resolve to a single `libsqlite3-sys` chain. Durable graph checkpoints run through TinyAgents' own `SqliteCheckpointer`; the earlier OpenHuman-owned `SqlRunLedgerCheckpointer` adapter has been retired (see [`orchestration/delegation.rs`](../../../crates/openhuman-core/src/agent/orchestration/delegation.rs)).
+- **`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, so no local patch of `rusqlite` / `libsqlite3-sys` remains. Both worlds resolve to a single `libsqlite3-sys` chain. Durable graph checkpoints run through TinyAgents' own `SqliteCheckpointer`; the earlier OpenHuman-owned `SqlRunLedgerCheckpointer` adapter has been retired (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 (now forwarded to `tinychannels/whatsapp-web`) currently builds against `wacore::store::InMemoryBackend` and logs that sessions are not durable. A rusqlite-backed durable WhatsApp store is required before treating Web sessions as persistent again.
- **`repl`/Rhai feature dropped.** TinyAgents no longer ships a `repl`/`rlm` scripting runtime, and OpenHuman no longer depends on it; there is no `rhai_workflows` tool. Rhai still appears as a direct dependency of `tinyflows` for its own JSON-query stack, unrelated to the agent harness (see "Language workflows" below, marked historical).
- **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.
@@ -144,7 +149,7 @@ This page walks through what happens in one turn, then zooms in on each of the m
Every turn - whether the user just typed a message, a Telegram webhook just fired, or a 9am cron just ticked - flows through the same lifecycle:
-```
+```text
┌─ inbound ─────────────────────────────────────────────────────────┐
│ user message · channel inbound · webhook · cron · composio event │
└──────────────────────────┬────────────────────────────────────────┘
@@ -186,7 +191,7 @@ The rest of this page is the same diagram, expanded.
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/)).
+- 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.
@@ -215,7 +220,7 @@ A resumed session's replayed prefix is folded into `Agent::history` rather than
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 (`inference::provider::crate_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.
+- **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`.
@@ -236,9 +241,9 @@ The loader is `agent::prompts::agents_md` (pure functions returning pre-loaded s
## The tool-call loop
-Inside `Agent::turn`, the tool-call loop is the inner engine. Since issue #4249 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`](../../../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:
+Inside `Agent::turn`, the tool-call loop is the inner engine. Since issue #4249 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
@@ -283,13 +288,13 @@ Every text dialect shares one parser: a `<tool_call>` body is tried as P-Format,
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 in `tinyagents/summarize.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.
+- **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), TinyJuice's summary stage summarizes it before it enters the parent's history. The parent agent sees only the summary. There is one summarizer, and TinyJuice owns it: it decides when a summary is worth writing, writes the extraction prompt (identifiers and key facts first), caches identical summaries, trips a per-thread breaker after three failures, and offloads the original to CCR so the `juice_retrieve` footer can recover it exactly. The model call itself belongs to the host. `ToolOutputMiddleware` binds a unary child of the current turn through `PayloadSummarizer::prepare`, registers it under a context token (`inference/tokenjuice/generate.rs`), and the module calls back through `MlHost.Generate`. 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.
+When a tool result exceeds the summarizer's threshold (`summarizer_payload_threshold_tokens`, default 4 000), TinyJuice's summary stage summarizes it before it enters the parent's history. The parent agent sees only the summary. There is one summarizer, and TinyJuice owns it: it decides when a summary is worth writing, writes the extraction prompt (identifiers and key facts first), caches identical summaries, trips a per-thread breaker after three failures, and offloads the original to CCR so the `juice_retrieve` footer can recover it exactly. The model call itself belongs to the host. `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 `MlHost.Generate`. 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.
**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.
@@ -342,7 +347,7 @@ Before a fresh tool result enters history (and ahead of the byte-budget backstop
- **HTML** → strip markup to readable text.
- **Plain text** → the opt-in Python/ML "Kompress" compressor (ModernBERT), or pass-through.
-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`. The ML (Kompress) path runs as a `kompress` backend of the shared [`runtime_python_server`](../../../crates/openhuman-core/src/runtime/python_server/) (torch + ModernBERT pip-installed at runtime), gated by the `ml_compression_enabled` flag and degrading gracefully to a native compressor when the Python runtime is unavailable.
+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`. The ML (Kompress) path runs as a `kompress` backend of the shared [`runtime_python_server`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/runtime/python_server) (torch + ModernBERT pip-installed at runtime), gated by the `ml_compression_enabled` flag and degrading gracefully to a native compressor when the Python runtime is unavailable.
### Missing capabilities
@@ -386,7 +391,7 @@ Other built-ins are never chat delegates:
| `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. |
-Work that used to go to single-belt specialists (coding, crypto, settings, scheduling, product docs, MCP servers) is now done by the orchestrator itself 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`](../../../crates/openhuman-core/src/tools/toolpacks/README.md).
+Work that used to go to single-belt specialists (coding, crypto, settings, scheduling, product docs, MCP servers) is now done by the orchestrator itself 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.
@@ -447,7 +452,7 @@ Each `AgentDefinition` carries an `agent_tier` field (`chat` / `reasoning` / `wo
**Enforcement.** Two layers:
-1. **Loader-time (static).** [`agents::loader::validate_tier_hierarchy`](../../../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.
+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.
@@ -481,7 +486,7 @@ The tool was registered for the orchestrator on `supervised`/`full` tiers only,
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)
@@ -606,15 +611,15 @@ The harness shell lives under `crates/openhuman-core/src/agent/`, with the tinya
| File / dir | What lives there |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
-| `session_host/turn/core.rs` | `Agent::turn` - the lifecycle described above; routes into the tinyagents runner via `session/turn/graph.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). |
+| `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. |
+| `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. |
@@ -641,7 +646,7 @@ The harness shell lives under `crates/openhuman-core/src/agent/`, with the tinya
Alongside the linear tool-call loop, the harness ships a **LangGraph-style state-machine engine** under `crates/openhuman-core/src/agent_graph/` (issue #4249, referenced here only as design history, the path no longer exists). Where the loop is an implicit "prompt → tool → result → next prompt" cycle, a graph models agent execution as an explicit directed graph of **nodes** (states) and **edges** (transitions), with typed working state that survives across transitions, parallel branches, and checkpoints.
-```
+```rust
StateGraph::new(name)
.add_node(id, node) // a unit of work: async fn(State) -> (State, Command)
.add_edge(from, to) // static transition
@@ -683,7 +688,7 @@ direct `tinyagents-orchestration::subagent` lifecycle. There is no
| 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 `MaxTokenModel`; mirrors progress; forwards steering; and pauses gracefully at the model-call cap. |
+| `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 now uses the TinyAgents SDK surface directly. |
@@ -725,7 +730,7 @@ three statuses:
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 (`turn/core/grounded_close.rs`, #4093 / #6278 / #6279):
+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`, #4093 / #6278 / #6279):
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.
@@ -741,7 +746,7 @@ Every run appends to a durable **event journal** (`tinyagents/journal.rs`): a `S
The remaining store cutover runs on **shadow scaffolding** (product behavior unchanged; divergences logged):
-- **Session dual-write / shadow read** (`session/turn/session_io.rs`): session messages dual-write into the TinyAgents store (default-ON flag `config.session_dual_write`); loads shadow-read for parity while the legacy file store stays authoritative.
+- **Session dual-write / shadow read** (`session_host/runtime_session.rs`): session messages dual-write into the TinyAgents store (default-ON flag `config.session_dual_write`); loads shadow-read for parity while the legacy file store stays authoritative.
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 & Todos](../../features/goals-and-todos.md).
@@ -753,5 +758,5 @@ Goals and todos are crate-backed outright, with no shadow: thread goals live in
- [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/) - how `model: "hint:reasoning"` resolves to a concrete provider+model.
+- [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
index add996d806..7ed573e809 100644
--- a/gitbooks/developing/architecture/flows-on-tinyagents.md
+++ b/gitbooks/developing/architecture/flows-on-tinyagents.md
@@ -8,10 +8,10 @@ icon: diagram-project
# Flows on TinyAgents
-The **flows** domain ([`crates/openhuman-core/src/flows/`](../../../crates/openhuman-core/src/flows/)) drives
+The **flows** domain ([`crates/openhuman-core/src/flows/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/flows)) drives
saved automations - the workflows a user builds in the canvas or the copilot
builds for them. It does **not** contain a workflow engine. Every flow is run by
-the vendored, host-agnostic [`tinyflows`](../../../vendor/tinyflows/) crate, which
+the vendored, host-agnostic [`tinyflows`](https://github.com/tinyhumansai/openhuman/tree/main/vendor/tinyflows) crate, which
**lowers each workflow onto the same [`tinyagents`](https://crates.io/crates/tinyagents)
state-graph engine that the [agent harness](agent-harness.md) runs on.** So a
saved flow is a tinyagents graph, and (after harness unification) each of its
@@ -25,23 +25,23 @@ runs, and how the two runtimes compose.
| 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/`](../../../vendor/tinyflows/) |
-| `tinyagents` | The published state-graph + agent-loop harness both runtimes lower onto. | crate; OpenHuman seam in [`crates/openhuman-core/src/agent/tinyagents/`](../../../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/`](../../../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/`](../../../crates/openhuman-core/src/flows/tinyflows/) |
+| `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/openhuman/tree/main/vendor/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`](../../../vendor/tinyflows/CLAUDE.md)); OpenHuman
+vendor-free (see its [`CLAUDE.md`](https://github.com/tinyhumansai/tinyflows/blob/main/CLAUDE.md)); OpenHuman
is the first downstream host and injects everything real through the seam.
## The run pipeline
-A flow is a [`WorkflowGraph`](../../../vendor/tinyflows/crates/tinyflows/src/model/) - a directed
+A flow is a [`WorkflowGraph`](https://github.com/tinyhumansai/tinyflows/tree/main/crates/tinyflows/src/model) - a directed
graph of typed [`Node`]s joined by [`Edge`]s, JSON on the wire. Running it is a
fixed four-stage pipeline
-([`vendor/tinyflows/crates/tinyflows/src/lib.rs`](../../../vendor/tinyflows/crates/tinyflows/src/lib.rs),
-[`compiler.rs`](../../../vendor/tinyflows/crates/tinyflows/src/compiler.rs),
-[`engine.rs`](../../../vendor/tinyflows/crates/tinyflows/src/engine.rs)):
+([`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
@@ -56,37 +56,37 @@ flowchart LR
seam["openhuman::flows::tinyflows<br/>capability seam"] -. host-injected .-> run
```
-1. **validate** ([`validate.rs`](../../../vendor/tinyflows/crates/tinyflows/src/validate.rs)) -
+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`). This is the single-trigger invariant the whole model
rests on (see [Trigger model](#the-trigger-model)).
-2. **compile** ([`compiler.rs`](../../../vendor/tinyflows/crates/tinyflows/src/compiler.rs)) - runs
+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**; 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`](../../../vendor/tinyflows/crates/tinyflows/src/engine.rs)) - the host
+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`](../../../crates/openhuman-core/src/flows/ops.rs), `flows_run`), which
+ ([`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`](../../../crates/openhuman-core/src/flows/tinyflows/langfuse_export.rs)).
+ ([`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 **HITL 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`](../../../crates/openhuman-core/src/flows/tinyflows/caps/ops.rs), `open_flow_checkpointer`).
+([`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`](../../../vendor/tinyflows/crates/tinyflows/src/engine.rs)):
+([`vendor/tinyflows/crates/tinyflows/src/engine.rs`](https://github.com/tinyhumansai/tinyflows/blob/main/crates/tinyflows/src/engine.rs)):
```json
{
@@ -122,7 +122,7 @@ never see the raw completion shape - they bind against the envelope:
### The `=`-expression scope
Node config is resolved through jq/jaq `=`-expressions
-([`vendor/tinyflows/crates/tinyflows/src/expr.rs`](../../../vendor/tinyflows/crates/tinyflows/src/expr.rs)) against a
+([`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 |
@@ -143,10 +143,10 @@ panicking - node wiring never crashes the run.
`tinyflows` touches nothing real on its own. Everything - LLM calls, tools, HTTP,
code, persistence, sub-workflow lookup - is a **capability trait** the host
-implements ([`vendor/tinyflows/crates/tinyflows/src/caps/mod.rs`](../../../vendor/tinyflows/crates/tinyflows/src/caps/mod.rs)).
+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/`](../../../crates/openhuman-core/src/flows/tinyflows/caps/mod.rs)):
+([`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 |
| ------------------ | ------------------------------- | --------------------------- | ------------------------------------------------ |
@@ -155,7 +155,7 @@ implements ([`vendor/tinyflows/crates/tinyflows/src/caps/mod.rs`](../../../vendo
| `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 | `FlowStateStore` | the `flow_state` KV table |
+| `StateStore` | resumable/stateful runs | `tinyflows_sqlite::flows::SqliteStateStore` | a namespaced KV table in `flows.db` |
| `WorkflowResolver` | `sub_workflow` by id | `OpenHumanWorkflowResolver` | the saved-flow store (`load_flow_graph`) |
| `MemoryProvider` | `memory` | `OpenHumanMemory` | the memory store (`tinyflows/memory_adapter.rs`) |
@@ -177,7 +177,7 @@ A flow `agent` node names a **registered agent kind** through a trusted
(`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`](../../../crates/openhuman-core/src/agent/tinyagents/mod.rs)) -
+ ([`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) → the
@@ -218,7 +218,7 @@ output**, so a prompt-injected upstream completion cannot pick an arbitrary agen
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`](../../../vendor/tinyflows/crates/tinyflows/src/caps/mock.rs)),
+([`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.
@@ -230,12 +230,12 @@ flows runtime and an inner one owned by the agent harness.
**Outer gate - the flow's origin + autonomy tier.** `flows_run`/`flows_resume`
scope a `TrustedAutomation { source: Workflow { require_approval } }` origin
around the whole engine future
-([`flows/ops.rs`](../../../crates/openhuman-core/src/flows/ops.rs), via
+([`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/`](../../../crates/openhuman-core/src/flows/tinyflows/caps/mod.rs)):
+([`caps/`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/tinyflows/caps/mod.rs)):
- a `readonly` run **`Block`s** at the network/code boundary and never dispatches;
- a `supervised` run's `Prompt` decision is escalated by `gate_call_for_tier`
@@ -266,13 +266,13 @@ 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`](../../../vendor/tinyflows/crates/tinyflows/src/validate.rs)). A workflow therefore
+([`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`](../../../crates/openhuman-core/src/flows/bus.rs)) is
+`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:
@@ -301,12 +301,12 @@ pattern the flow's own `agent` nodes use:
| Agent | Registry id | Entry point | Tool belt |
| --------------------- | -------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| **Builder** (copilot) | `workflow_builder` | `flows_build` ([`ops.rs`](../../../crates/openhuman-core/src/flows/ops.rs)) | `propose_workflow` / `revise_workflow` (validate-only), `dry_run_workflow` (compile + run vs. mocks), `save_workflow`, `run_workflow`, catalog/connection reads ([`builder_tools.rs`](../../../crates/openhuman-core/src/flows/builder_tools.rs)) |
-| **Scout** (discovery) | `flow_discovery` | `flows_discover` ([`ops.rs`](../../../crates/openhuman-core/src/flows/ops.rs)) | `suggest_workflows` ([`discovery_tools.rs`](../../../crates/openhuman-core/src/flows/discovery_tools.rs)) |
+| **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`, 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` ([`discovery_tools.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/flows/discovery_tools.rs)) |
| **Executor** | _(n/a - the engine)_ | `flows_run` / `flows_resume` | the capability seam above |
Both agents live under
-[`crates/openhuman-core/src/flows/agents/`](../../../crates/openhuman-core/src/flows/agents/) as
+[`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
@@ -339,14 +339,14 @@ sequenceDiagram
| Path | What lives there |
| --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
-| [`vendor/tinyflows/crates/tinyflows/src/`](../../../vendor/tinyflows/crates/tinyflows/src/) | The engine: `model/`, `validate.rs`, `compiler.rs`, `engine.rs`, `expr.rs`, `caps/`, `nodes/`. |
-| [`vendor/tinyflows/crates/tinyflows/src/caps/mod.rs`](../../../vendor/tinyflows/crates/tinyflows/src/caps/mod.rs) | The capability traits + `Capabilities` bundle. |
-| [`crates/openhuman-core/src/flows/tinyflows/caps/`](../../../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`](../../../crates/openhuman-core/src/flows/ops.rs) | `flows_run` / `flows_resume` / `flows_build` / `flows_discover` and CRUD. |
-| [`crates/openhuman-core/src/flows/bus.rs`](../../../crates/openhuman-core/src/flows/bus.rs) | `FlowTriggerSubscriber` - the host-side multi-trigger bridge. |
-| [`crates/openhuman-core/src/flows/builder_tools.rs`](../../../crates/openhuman-core/src/flows/builder_tools.rs) | The builder's `propose` / `revise` / `dry_run` / `save` / `run` tools. |
-| [`crates/openhuman-core/src/flows/agents/`](../../../crates/openhuman-core/src/flows/agents/) | `workflow_builder` + `flow_discovery` agent definitions. |
-| [`crates/openhuman-core/src/flows/tinyflows/langfuse_export.rs`](../../../crates/openhuman-core/src/flows/tinyflows/langfuse_export.rs) | Post-run export of the durable graph observations. |
+| [`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 builder's `propose` / `revise` / `dry_run` / `save` / `run` tools. |
+| [`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
diff --git a/gitbooks/developing/architecture/frontend.md b/gitbooks/developing/architecture/frontend.md
index c5fcd411ac..71b07e8a37 100644
--- a/gitbooks/developing/architecture/frontend.md
+++ b/gitbooks/developing/architecture/frontend.md
@@ -5,41 +5,42 @@ description: >-
icon: browsers
---
-# Frontend (app/src/)
+# Frontend
-The OpenHuman desktop UI: a Vite + React 19 tree under `app/src/` (pnpm workspace `openhuman-app`). It uses Redux Toolkit with persistence for session state, talks to the in-process Rust core over JSON-RPC (`coreRpcClient` → 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.
+`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` → 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 is one consolidated reference. Use the table of contents above (or your reader's outline) to jump between sections.
## Quick reference
-| Section | Covers |
-| ------------------------------------------------- | --------------------------------------------------------------- |
-| [Architecture](frontend.md#architecture-overview) | Provider chain, build, layout, conventions |
-| [State Management](frontend.md#state-management) | Redux Toolkit slices, selectors, persistence |
-| [Services Layer](frontend.md#services-layer) | `apiClient`, `socketService`, `coreRpcClient` |
-| [Providers](frontend.md#providers) | `ThemeProvider`, `CoreState`, `Socket`, `ChatRuntime` providers |
-| [Pages & Routing](frontend.md#pages-routing) | `HashRouter`, route guards, main routes |
-| [Components](frontend.md#components) | UI / settings component patterns |
-| [Hooks & Utilities](frontend.md#hooks-utilities) | Shared hooks, helpers, config |
+| 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 & Routing](#pages--routing) | `HashRouter`, route guards, main routes |
+| [Components](#components) | UI / settings component patterns |
+| [Hooks & Utilities](#hooks--utilities) | Shared hooks, helpers, config |
## Scale
-| Metric | Value |
-| --------------------------------------- | ------------------------------------------------------------------------- |
-| TypeScript / TSX files under `app/src/` | \~1900 (`find app/src -name '*.ts' -o -name '*.tsx' \| wc -l` to refresh) |
-| Test runner | Vitest (`app/test/vitest.config.ts`) |
+| 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/* (~50 modules)
+├── 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/)
@@ -102,7 +103,7 @@ _Generated from `app/src/App.tsx` by `scripts/generate-architecture-docs.mjs`. D
### Module relationships (simplified)
-```
+```text
App.tsx
├─ Redux store + persistor
├─ ThemeProvider / I18nProvider - theme tokens, useT() localization
@@ -117,7 +118,7 @@ App.tsx
### 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
@@ -211,7 +212,7 @@ The application uses singleton services for external communication. This prevent
### Service architecture
-```
+```text
app/src/services/
├─ apiClient (HTTP REST)
│ └─ backend URL resolved at runtime (services/backendUrl)
@@ -279,7 +280,7 @@ const result = await callCoreRpc<MyType>({
How a call flows:
-1. **URL + token resolution**: the RPC URL follows the precedence in [Runtime config precedence](frontend.md#runtime-config-precedence); the per-launch bearer token comes from the Tauri `core_rpc_token` command (or the stored token for self-hosted cores).
+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 (#3865). `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.
@@ -297,7 +298,7 @@ Errors are classified into a stable `CoreRpcError.kind` (`auth_expired`, `transp
## 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](frontend.md#provider-chain) above. There is **no** `UserProvider`, `AIProvider`, or `SkillProvider`: auth/user state lives in `CoreStateProvider`, AI configuration lives in the Rust core, and skills execute in the core (the frontend QuickJS skills engine was removed).
+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/user state lives in `CoreStateProvider`, AI configuration lives in the Rust core, and skills execute in the core (the frontend QuickJS skills engine was removed).
### ThemeProvider (`providers/ThemeProvider.tsx`)
@@ -410,7 +411,7 @@ registry cannot describe.
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. `ChatToolGroup` wraps a run of calls in the tool timeline;
+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.
@@ -436,37 +437,52 @@ The application uses HashRouter with protected and public route guards. Desktop
### Route map
-Current desktop routes (read `AppRoutes.tsx` for the authoritative table: the file is heavily commented with the rationale for each redirect):
-
-```
-/ → Welcome (PublicRoute; redirects to /home if logged in)
-/auth → WebCallbackPage (auth callback)
-/callback/:kind[/:status] → WebCallbackPage (generic OAuth/provider callbacks)
-/onboarding/* → Onboarding stepper (ProtectedRoute)
-/human → HumanPage (dedicated mascot stage)
-/brain → redirect to /connections?tab=brain (Memory)
-/flows → FlowsPage · /flows/draft → draft canvas · /flows/:id → FlowCanvasPage
-/workflows/run → WorkflowsRun (single-purpose Skill runner)
-/connections → Skills page (connections hub); `?tab=brain&brain=<engine|ask|learnings|conversations|documents|context>` is Memory (`pages/Memory.tsx`, `components/memory/`); `/settings/memory-engine` redirects to the `engine` chip
-/chat/:threadId? → Accounts (unified chat: agent + connected web apps)
-/invites → Invites
-/feedback → Feedback
-/notifications → Notifications
-/ptt-overlay → PttOverlayPage (push-to-talk overlay window)
-/dev/agent-insights → dev-only preview
-* → DefaultRedirect
-```
-
-Back-compat redirects (all `Navigate replace`, query params preserved):
+`app/src/AppRoutes.tsx` is the authoritative table and is heavily commented with the rationale for each entry. The desktop routes it declares:
-```
-/home → /chat /skills → /connections
-/activity → /settings/account /channels → /connections?tab=messaging
-/intelligence→ /settings/account /routines → /settings/automations
-/workflows → /settings/automations /webhooks → /settings/integrations#webhooks
-```
-
-There is **no** `/login` route: authentication flows through the Welcome page, the `/auth` callback, and deep links. Desktop **Settings is not an inline route**: when the URL is `/settings/*`, `AppShellDesktop` keeps rendering the _background_ location and mounts `SettingsModal` on top (see [Settings](frontend.md#settings)). Note that `/agents` does not exist.
+| 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 legacy `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
@@ -480,7 +496,7 @@ All three guards read `useCoreState()` (not Redux auth state) and render `RouteL
A routed stepper (`Onboarding.tsx` mounts nested routes inside `OnboardingLayout`):
-```
+```text
/onboarding/welcome → WelcomePage
/onboarding/runtime-choice → RuntimeChoicePage
├── cloud → /chat
@@ -492,14 +508,13 @@ Each custom step offers **Default** (let OpenHuman manage it) vs **Configure** (
### Settings
-Settings is a full `/settings/*` URL surface, presented on desktop as a **modal overlay** and on iOS as a full page. The old `SettingsPanelLayout` / `useSettingsAnimation` / `ProfilePanel` modal system is gone.
+Settings is a routed `/settings/*` page like every other surface, on desktop and on iOS alike. It was a desktop modal overlay that kept the page behind it rendered; that system is gone, and so are the older `SettingsPanelLayout` / `useSettingsAnimation` / `ProfilePanel` modals and the registry-derived settings search field (see [Removed](#removed) below).
-- **`components/settings/settingsRouteRegistry.ts`** — single declarative source of truth for every settings destination (id/route slug, i18n keys, section, sidebar `navGroup`, `devOnly`, search keywords). Navigation menus, breadcrumbs, and settings search all derive from it.
-- **`components/settings/settingsRouteElements.tsx`** — maps registry entries to panel `<Route>` elements.
-- **`components/settings/modal/`** — `SettingsModal` (mounted by `AppShellDesktop` whenever the path is a settings path; `settingsOverlay.ts` computes `{ settingsOpen, baseLocation }` so the page behind stays rendered), `SettingsModalFrame` (backdrop / Esc / focus / close), `SettingsModalLayout` (routed two-column layout).
-- **`components/settings/layout/`** — two-pane chrome: `SettingsLayout`, `SettingsSidebar` (grouped by `SettingsNavGroup`: general, assistant, data, connections, knowledge & memory, agents & autonomy, models & inference, automation & integrations, diagnostics & logs), `SettingsSubNav`, `SettingsIndexRedirect`.
-- **`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, breadcrumbs, and search pick it up automatically.
-- **`components/settings/search/`** — settings search bar + registry-derived index.
+- **`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
@@ -539,15 +554,15 @@ The listener intercepts `openhuman://` URLs (e.g. auth handoff), exchanges token
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, modal, layout, panels, search (see above)
+├── settings/ # Settings registry, layout, panels, controls (see above)
├── accounts/ # Connected-app provider icons (the live WebviewHost overlay was removed with the CEF provider webviews)
├── BootCheckGate/, daemon/ # Boot + service gates in the provider chain
├── commands/ # CommandProvider (command palette)
-├── Announcement/, upsell/, userErrors/, walkthrough/ # Shell-level overlays
+├── 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)
@@ -555,7 +570,7 @@ components/
Conventions:
-- Modals render through a portal: shell modals (Settings, link modal) render above routed content, and the Settings modal uses the backgroundLocation pattern rather than unmounting the page underneath.
+- 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.
@@ -566,10 +581,10 @@ Conventions:
### Custom Hooks (`hooks/`)
-\~45 app-level hooks. Representative examples:
+`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](frontend.md#runtime-config-precedence)).
+- `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.
@@ -662,4 +677,24 @@ const result = await callCoreRpc<Snapshot>({
});
```
----
+## Removed
+
+Stated rather than deleted, because each of these still turns up in older code and in older notes:
+
+| 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 overview](../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.
diff --git a/gitbooks/developing/architecture/mcp-registry.md b/gitbooks/developing/architecture/mcp-registry.md
index 63a2732c7f..9f43d0d44d 100644
--- a/gitbooks/developing/architecture/mcp-registry.md
+++ b/gitbooks/developing/architecture/mcp-registry.md
@@ -8,11 +8,11 @@ description: >-
icon: plug
---
-# MCP Registry (`crates/openhuman-core/src/mcp/registry/`)
+# MCP Registry
`crates/openhuman-core/src/mcp/registry/` is the **host half** of the dynamic, user-facing side of OpenHuman's Model Context Protocol client support: browsing the supported upstream registries (Smithery and the official modelcontextprotocol registry), reconciling the install store against the user's `mcp.json` document, persisting that, and (for servers launched as local subprocesses or HTTP-remote endpoints) supervising the connection lifecycle. Installed servers' tools are surfaced to agents via the unified tool registry (`crate::tools::registry`).
-The registries are **browse-only**. There is no install-from-catalog path and no setup agent: a user who finds a server in the Registry tab opens its own page, reads the install instructions there, and declares the server in the mcp.json tab (`{ "mcpServers": { name: { command, args, env } | { url, headers } } }`). `config_doc.rs` is that document's contract and `config_ops.rs` the reconciliation (`mcp_clients_config_get` / `mcp_clients_config_set`).
+The registries are **browse-only**. There is no install-from-catalog path and no setup agent: a user who finds a server in the Registry tab opens its own page, reads the install instructions there, and declares the server in the mcp.json tab (`{ "mcpServers": { name: { command, args, env } | { url, headers } } }`). The document's contract and its reconciliation live in `tinymcp::registry::config_doc`; `config_ops.rs` here is the RPC envelope over them (`mcp_clients_config_get` / `mcp_clients_config_set`).
The **client half**, meaning both transports, the Smithery/official catalogs, the SQLite store, the live connection map, the subprocess supervisor, browser sign-in, and the write-audit log, moved to the vendored `tinymcp` crate (`vendor/tinymcp`). What lives in this directory is only what belongs to this application:
@@ -49,7 +49,7 @@ All payload types (`InstalledServer`, `McpTool`, `ConnStatus`, the Smithery/offi
## Server transport model
-An `InstalledServer` (from `tinymcp_bus`, re-exported as `registry::types::InstalledServer`) carries a `Transport` discriminator with stdio and HTTP-remote variants: a local subprocess (`npx`, `uvx`, or a direct binary) speaking stdio JSON-RPC, or a hosted server (the majority of what Smithery lists) dialled over streamable HTTP. A declaration in `mcp.json` becomes such a row directly (`config_doc::to_installed`): `command`/`args` → stdio, `url` → HTTP-remote, `env`/`headers` → the credential table. `tinymcp` dials whatever the row says; this domain only decides what the row says.
+An `InstalledServer` (from `tinymcp_bus`, re-exported as `registry::types::InstalledServer`) carries a `Transport` discriminator with stdio and HTTP-remote variants: a local subprocess (`npx`, `uvx`, or a direct binary) speaking stdio JSON-RPC, or a hosted server (the majority of what Smithery lists) dialled over streamable HTTP. A declaration in `mcp.json` becomes such a row directly (`tinymcp::registry::config_doc`): `command`/`args` → stdio, `url` → HTTP-remote, `env`/`headers` → the credential table. `tinymcp` dials whatever the row says; this domain only decides what the row says.
## Boot-time spawn and the reconnect supervisor
@@ -63,8 +63,8 @@ Installed servers are connected as the core comes up, and `mcp::registry::superv
| `host.rs` (parent `mcp/`) | One `tinymcp` service per workspace, opened on first use; proxy resolution for MCP traffic (`proxy_for_mcp`). |
| `helpers.rs` | Shared RPC-handler plumbing: `Outcome` encoding, identifier guards, workspace-service resolution, credential-name injection. |
| `ops.rs` | `mcp_clients_*` RPC handler implementations (uninstall, list, browse, connect/disconnect, tool call, `update_env`, registry settings). One-to-one with `schemas.rs` handlers; publishes `DomainEvent`s `tinymcp` does not. |
-| `config_doc.rs` | The `mcp.json` contract: `render` (store → document, credential names only), `parse` (document → declarations, refusing what the store cannot carry), `same_dial`, `to_installed`, `merge_credentials`. |
-| `config_ops.rs` | `mcp_clients_config_get` / `config_set`: replace the store with what the document declares (add, rewrite in place under the same `server_id`, or uninstall), merging write-only credentials and connecting new enabled servers in the background. |
+| `config_ops.rs` | `mcp_clients_config_get` / `config_set`: the `Outcome` envelope, domain events and background connects over `tinymcp`'s `McpRegistry::render_config_doc` / `apply_config_doc`. The `mcp.json` shape, its refusals and the reconciliation (add, rewrite in place under the same `server_id`, or uninstall, merging write-only credentials) live in `tinymcp::registry::config_doc`. |
+| `action_tool.rs` | One deferred agent tool per action on a connected server, built from `tinymcp_bus::agent_tools::action_tool_specs` with `tools_safe_for_agent` as the admission filter; execution re-checks the current connection and routes through `ops.rs`. |
| `schemas/` (`mod.rs`, `registry.rs`, `handlers.rs`, `params.rs`) | Controller schemas + handler dispatch. Re-exported from `mod.rs` as `all_mcp_registry_controller_schemas` / `all_mcp_registry_registered_controllers`. |
| `bus.rs` | `DomainEvent` subscriber (`McpClientEventSubscriber`) that logs `McpServer*` / `McpClientToolExecuted` lifecycle events. |
| `supervisor_events.rs` | Turns a `tinymcp::Supervisor` tick report into this domain's `DomainEvent`s, stamped with the workspace whose host was ticked. |
@@ -102,7 +102,7 @@ pub use types::{ConnStatus, InstalledServer, McpTool};
## Tests
-Focused `*_tests.rs` siblings cover each file: `bus_tests.rs`, `ops_tests.rs`, `schemas_tests.rs`, `action_tool_tests.rs`, `supervisor_events_tests.rs`, `tools_tests.rs`, `config_doc_tests.rs`.
+Focused `*_tests.rs` siblings cover each file: `bus_tests.rs`, `ops_tests.rs`, `schemas_tests.rs`, `action_tool_tests.rs`, `supervisor_events_tests.rs`, `tools_tests.rs`.
## Related
diff --git a/gitbooks/developing/architecture/memory.md b/gitbooks/developing/architecture/memory.md
index c4229145a6..b54a733f20 100644
--- a/gitbooks/developing/architecture/memory.md
+++ b/gitbooks/developing/architecture/memory.md
@@ -5,13 +5,15 @@ description: >-
icon: diagram-project
---
-# Memory (`crates/openhuman-core/src/memory/`)
+# Memory
-OpenHuman drives TinyMemory's agent memory lifecycle around every turn: a
-memory pack recalled before the model runs, the turn logged on both sides,
-memory recalled into compaction checkpoints, and belief builds run in the
-background. The behaviour is specified in `docs/specs/memory-v2.md`; the
-user-facing feature is [Memory](../../features/memory.md).
+`crates/openhuman-core/src/memory/` is the host layer over TinyMemory: it drives
+the agent memory lifecycle around every turn, with a memory pack recalled before
+the model runs, the turn logged on both sides, memory recalled into compaction
+checkpoints, and belief builds run in the background.
+
+The behaviour is specified in `docs/specs/memory-v2.md`; the user-facing feature
+is [Memory](../../features/memory.md).
## TinyMemory crates (`vendor/tinymemory/crates/`)
diff --git a/gitbooks/developing/architecture/security.md b/gitbooks/developing/architecture/security.md
index dbc91f9b68..4ad6bae76b 100644
--- a/gitbooks/developing/architecture/security.md
+++ b/gitbooks/developing/architecture/security.md
@@ -6,7 +6,7 @@ description: >-
icon: shield-halved
---
-# Security (`crates/openhuman-core/src/security/`)
+# Security
`crates/openhuman-core/src/security/` is the **trust boundary for the autonomous core**. It owns the autonomy / risk policy that decides whether a given tool call is allowed, the pluggable sandbox backends that confine those 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, and the `redact()` helper every other domain uses to keep logs free of plaintext credentials.
@@ -22,7 +22,7 @@ This module is the place to look first when asking "is this agent action allowed
| 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` (`Supervised` / `SemiAutonomous` / `Autonomous`) | `policy/types.rs` | Three-step autonomy ladder. |
+| `AutonomyLevel` (`ReadOnly` / `Supervised` / `Full`) | `policy/types.rs` | Three-step autonomy ladder. |
| `CommandRiskLevel`, `ToolOperation`, `ActionTracker` | `policy/types.rs` | Risk classification + per-session counting. |
| `SecretStore` | `keyring/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. |
@@ -36,7 +36,7 @@ This module no longer carries sandbox backends. The old `Sandbox` trait, `NoopSa
## Autonomy ladder
-`AutonomyLevel` is a three-step ladder that controls how aggressively the policy gates tool calls. `Supervised`, the default, requires an explicit approval round trip for every higher-risk tool call. `SemiAutonomous` lets low and medium-risk calls through but still gates the higher-risk ones. `Autonomous` lets the agent run unattended within its budget and risk caps.
+`AutonomyLevel` is a three-step ladder that controls how aggressively the policy gates tool calls, and it only takes effect while `[autonomy] enabled = true`. `ReadOnly` blocks every writing class outright: no in-tier approval can authorize one. `Supervised`, the default, allows reads and parks everything else for an approval round trip. `Full` allows reads and writes and 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 given tool call; `ActionTracker` keeps the per-session counts that the policy compares against those caps. The agent harness asks `SecurityPolicy` for a decision before every executable tool dispatch.
@@ -62,7 +62,7 @@ All of this only applies when the autonomy policy is turned on. Per `AGENTS.md`,
| Path | Role |
| ------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `policy/` (`mod.rs`, `types.rs`, `path_checks.rs`, `command_checks.rs`, `enforcement.rs`, `policy_command*.rs`, `policy_tests*.rs`, `proptest_tests.rs`) | `SecurityPolicy`, `AutonomyLevel`, risk classification, path and command checks, action tracking. |
+| `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`, `keyring/` | `SecretStore` (implemented in `keyring/encrypted_store.rs`) + round-trip tests. |
@@ -70,6 +70,8 @@ All of this only applies when the autonomy policy is turned on. Per `AGENTS.md`,
| `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/`, `pii/`, `prompt_injection/` | Sibling kernel-security domains under the same module. Each owns its own surface; this page covers the policy core only. |
## Calls into
@@ -79,9 +81,9 @@ All of this only applies when the autonomy policy is turned on. Per `AGENTS.md`,
## Called by
- `crates/openhuman-core/src/cron/ops.rs`: wraps shell jobs in `SecurityPolicy::from_config`.
-- `crates/openhuman-core/src/tools/ops.rs` and most `tools/impl/{system,network,memory,agent}/*.rs`: every executable tool consults `SecurityPolicy`.
-- `crates/openhuman-core/src/tools/impl/network/{curl,http_request,web_fetch,mcp}.rs`: risk-classify outbound calls.
-- `crates/openhuman-core/src/memory/tools/{store,forget}.rs`: sensitive-write tracking.
+- `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`.
diff --git a/gitbooks/developing/architecture/tauri-shell.md b/gitbooks/developing/architecture/tauri-shell.md
index ff4bb08a4d..f0f9f52cc2 100644
--- a/gitbooks/developing/architecture/tauri-shell.md
+++ b/gitbooks/developing/architecture/tauri-shell.md
@@ -1,16 +1,18 @@
---
-description: The desktop host (`crates/openhuman-app/`) - Tauri v2 + WebView, IPC, embedded core lifecycle, core bridge.
+description: >-
+ The desktop host in crates/openhuman-app/: Tauri v2 and WebView, the IPC
+ command surface, the embedded core's lifecycle, and the core JSON-RPC bridge.
icon: desktop
---
-# Tauri shell (`crates/openhuman-app/`)
+# Tauri Shell
-The desktop host for OpenHuman: Tauri v2 + WebView, IPC commands, window management, and bridging to the embedded `openhuman-core` Rust runtime (core JSON-RPC). It does **not** duplicate the full domain stack; that lives in `crates/openhuman-core` (library `openhuman_core`; the `openhuman-core` binary is `crates/openhuman-cli/src/main.rs`).
+`crates/openhuman-app/` is the desktop host for OpenHuman: Tauri v2 and WebView, IPC commands, window management, and the bridge to the embedded `openhuman-core` Rust runtime over core JSON-RPC. It does **not** duplicate the full domain stack; that lives in `crates/openhuman-core` (library `openhuman_core`; the `openhuman-core` binary is `crates/openhuman-cli/src/main.rs`).
## 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 [Commands](#tauri-ipc-commands-app-src-tauri)).
+2. **IPC**. Expose an explicit set of Tauri commands (see [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 + 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.
@@ -39,7 +41,7 @@ Non-desktop targets fail at compile time (`compile_error!` in `lib.rs`).
`crates/openhuman-app/src/` is a flat set of modules (no `commands/` or `utils/` subtree). Key modules:
-```
+```text
crates/openhuman-app/src/
├── lib.rs # `run()`, tray/menu, plugins, `generate_handler!`, most window/update/lifecycle commands
├── main.rs # Binary entry
@@ -79,7 +81,7 @@ There is **no** `src-tauri/src/services/session_service.rs` in this tree; sessio
### 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`)
@@ -102,8 +104,8 @@ The renderer talks to the local core **directly over HTTP**: `app/src/services/c
### Related
-- IPC surface: see the [Commands](#tauri-ipc-commands-app-src-tauri) section below
-- HTTP bridge: see the [Core bridge & helpers](#core-bridge-helpers-app-src-tauri) section below
+- IPC surface: see the [Commands](#tauri-ipc-commands-cratesopenhuman-app) section below
+- HTTP bridge: see the [Core bridge & helpers](#core-bridge--helpers-cratesopenhuman-app) section 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)
diff --git a/gitbooks/developing/building-rust-core.md b/gitbooks/developing/building-rust-core.md
index 3df6676bab..a3fe9de41d 100644
--- a/gitbooks/developing/building-rust-core.md
+++ b/gitbooks/developing/building-rust-core.md
@@ -23,7 +23,7 @@ If you want the full desktop app (`pnpm dev`, Tauri, frontend tooling), use [Get
## 1. Install the pinned Rust toolchain
-The repository pins Rust in [`rust-toolchain.toml`](../../rust-toolchain.toml):
+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`
@@ -115,7 +115,7 @@ Notes:
The `openhuman` core crate links a large single rlib, so the edit → `cargo
check`/`cargo test` inner loop is frequently link-bound. A faster linker (mold
on Linux, lld on macOS) can cut a large slice off every incremental relink.
-[`.cargo/config.toml`](../../.cargo/config.toml) documents the manual
+[`.cargo/config.toml`](https://github.com/tinyhumansai/openhuman/blob/main/.cargo/config.toml) documents the manual
opt-in, but the easiest path is:
```bash
@@ -196,7 +196,7 @@ Why these matter:
If you are building the desktop shell instead of the core-only crate, install the broader dependency set.
-**Ubuntu / Debian** (mirrored from [`.github/workflows/build-desktop.yml`](../../.github/workflows/build-desktop.yml)):
+**Ubuntu / 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
diff --git a/gitbooks/developing/cef.md b/gitbooks/developing/cef.md
index 5ace7f835d..615a7bce35 100644
--- a/gitbooks/developing/cef.md
+++ b/gitbooks/developing/cef.md
@@ -5,15 +5,15 @@ description: >-
icon: chrome
---
-# Chromium Embedded Framework
+# Chromium Embedded Framework (historical)
{% hint style="warning" %}
**Historical.** The desktop shell no longer ships CEF. `crates/openhuman-app/` builds on upstream Tauri's native webview runtime (Wry: WKWebView / WebView2 / WebKitGTK), and `AGENTS.md` forbids restoring CEF or CDP-scanner assumptions. The native iMessage scanner remains separate because it reads `chat.db` directly. Everything below describes the retired runtime and is kept only as design background; the file paths it cites (`crates/openhuman-app/src/webview_accounts/`, `scripts/ensure-tauri-cli.sh`, `vendor/tauri-cef`) no longer exist.
{% endhint %}
-OpenHuman doesn't run on the platform's built-in webview. It ships its own **Chromium Embedded Framework (CEF) runtime** via a fork of `tauri-runtime`, and that single decision is load-bearing for almost every "OpenHuman knows what's happening in your tools" feature in the product.
+For about a year OpenHuman did not run on the platform's built-in webview. It shipped its own **Chromium Embedded Framework (CEF) runtime** through a fork of `tauri-runtime`, and that single decision was load-bearing for almost every "OpenHuman knows what's happening in your tools" feature in the product.
-This page explains why CEF is in the bundle, what the codebase uses it for today, and where the same surface could go.
+This page explains why CEF was in the bundle, what the codebase used it for, and what replaced each piece. Nothing described below is in the shipped app.
## Why CEF instead of a stock webview
@@ -27,11 +27,13 @@ CDP is the load-bearing primitive. Every "watch what's happening inside Slack /
- `Runtime.evaluate` for ephemeral one-shot reads (a single fixed JSON serializer, never a persistent bridge).
- `Page.addScriptToEvaluateOnNewDocument` for the small number of cases where we genuinely need a renderer-side shim before page JS runs.
-Stock webviews can't give us any of that. So we vendor CEF.
+Stock webviews give none of that, which is why CEF was vendored.
+
+**What replaced it.** Browser automation moved out of the shell entirely: a real Chrome driven over CDP from the Rust side, through the `tinycomputer` module, as a separate process the agent either launches or attaches to. See [Browser & Computer Control](../features/native-tools/browser-and-computer.md). The scanners that walked a third-party app's IndexedDB are gone; the one that survived, iMessage, never needed a browser because it reads `chat.db` directly.
The vendored runtime lived at `crates/openhuman-app/vendor/tauri-cef/` (forked from the upstream `tauri-cef` branch onto `tinyhumansai/tauri-cef:feat/cef-notification-intercept`, currently CEF 146.4.1). Every Tauri crate is patched at `crates/openhuman-app/Cargo.toml` via `[patch.crates-io]` to point at this fork. The vendored `cargo-tauri` CLI bundles Chromium correctly into `Contents/Frameworks/`; stock `@tauri-apps/cli` produces a broken bundle that panics in `cef::library_loader::LibraryLoader::new`. `scripts/ensure-tauri-cli.sh` (removed) reinstalled the vendored CLI whenever the fork is newer than the installed binary.
-## What CEF is used for today
+## What CEF was used for
### Embedded third-party webviews
@@ -70,7 +72,7 @@ Each scan emitted `webview:event` payloads from the shell, so scanning continued
### Google Meet mascot camera
-The flashiest CEF trick. The Meet agent doesn't just _attend_ a meeting, it **broadcasts** itself as a camera. This works because CEF lets us:
+The flashiest CEF trick, and the one that went with it. The Meet agent did not just _attend_ a meeting, it **broadcast** itself as a camera. That worked because CEF let us:
1. Inject a tiny bridge (`camera_bridge.js`) via `Page.addScriptToEvaluateOnNewDocument` before any Meet code runs.
2. Override `navigator.mediaDevices.getUserMedia` so it returns a `MediaStream` from a hidden 640×480 canvas instead of a real camera.
@@ -88,7 +90,7 @@ This was the bulk of the (since removed) `docs/TAURI_CEF_FINDINGS_AND_CHANGES.md
## The "no new JS injection" rule
-The rule is documented in [`CLAUDE.md`](../../CLAUDE.md): **migrated providers load with zero injected JavaScript**. All scraping happens natively over CDP from the scanner side.
+The rule is documented in [`CLAUDE.md`](https://github.com/tinyhumansai/openhuman/blob/main/AGENTS.md): **migrated providers load with zero injected JavaScript**. All scraping happens natively over CDP from the scanner side.
This matters because anything host-controlled that runs inside a third-party origin is an attack-surface liability. A persistent JS bridge inside Slack is one Slack update away from breaking, and one mistake away from leaking the bridge to attacker-controlled JS. CDP from outside the renderer is strictly better.
@@ -105,94 +107,16 @@ This matters because anything host-controlled that runs inside a third-party ori
Legacy injection should shrink, never grow. New providers go straight onto the CDP-only path.
-## CEF prewarm
-
-A hidden CEF webview (`cef-prewarm`) boots the browser on app launch so the first child webview spawns instantly when the user clicks. It's torn down before `cef::shutdown()` to avoid races during quit. See `crates/openhuman-app/src/lib.rs` around the prewarm + close lifecycle.
-
-## Windows startup triage
-
-CEF initializes before the onboarding UI can recover from renderer failures. If
-Windows users report a silent exit, a permanent "Connecting..." spinner, or a
-`tauri-runtime-cef` assertion before the first interactive window appears, ask
-for these details in the issue:
-
-- Windows edition and full build number, especially for Insider builds.
-- OpenHuman version and installer type (`.msi` or `.exe`).
-- Whether `%LOCALAPPDATA%\com.openhuman.app` was moved aside before retrying.
-- Startup log lines from `[startup]`, `[cef-profile]`, and `[cef-startup]`.
-- Any panic text that names `tauri-runtime-cef/src/lib.rs`.
-
-For Windows Insider builds, also confirm whether the same installer launches on
-the current stable Windows release. That separates a profile/cache problem from
-an OS/runtime compatibility regression in CEF startup.
-
-If the logs point to a GPU-process startup failure rather than a stale CEF
-profile lock, set `OPENHUMAN_DISABLE_GPU=1` before launching OpenHuman. On
-Windows this pins CEF to the pure-software ANGLE/SwiftShader GL backend
-(`--use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader
---disable-gpu-compositing`) rather than bare `--disable-gpu`: on NVIDIA Blackwell
-/ RTX 50-series stacks the GPU process fails to initialise and `--disable-gpu`
-alone leaves CEF with no working software GL path, so `cef::initialize` still
-returns 0 (#4294, #4385). SwiftShader needs no hardware driver, so it lets CEF
-start on GPUs the bundled Chromium (currently CEF 146.4.1) doesn't yet support.
-On other platforms the same env var passes `--disable-gpu` and
-`--disable-gpu-compositing` without forwarding arbitrary Chromium flags. Leave it
-unset for normal use because forcing software rendering slows WebGL-heavy surfaces.
-
-## Linux shell fallback for CEF startup crashes
-
-On some Linux desktops, especially NVIDIA proprietary driver setups under Wayland/XWayland, the Tauri/CEF shell can fail during native window configuration before the React app becomes usable. One known symptom is an X11 `BadWindow` error after CEF reports the main browser context.
-
-When the core itself is healthy, you can keep developing by running the core and frontend separately:
-
-```bash
-cargo build --bin openhuman-core
-./target/debug/openhuman-core run --port 7788
-```
-
-In another terminal:
-
-```bash
-cd app
-pnpm dev
-```
-
-Open the Vite URL in a regular browser, choose **Advanced** / remote core mode, set the RPC URL to `http://127.0.0.1:7788/rpc`, and use the bearer token written by the core. This bypasses native-only features such as tray, auto-update, and embedded provider webviews, but keeps the agent, memory, skills, and RPC surface available for debugging.
-
-## Plugin audit
-
-Anything new added to `crates/openhuman-app/src/lib.rs` must be audited for `js_init_script` calls. `tauri-plugin-opener` ships an init script (`init-iife.js`) by default that adds a global click listener; we configure it with `.open_js_links_on_click(false)` so it doesn't run inside third-party webviews. `tauri-plugin-notification`'s init script was likewise dropped from the vendored copy.
-
-## Where this could evolve
-
-The CDP surface is general-purpose. Today it powers memory ingest from a fixed list of providers; the same primitive can do much more.
-
-### Browser automation as a first-class agent tool
-
-Today the agent has [native tools](../features/native-tools/README.md) for filesystem, git, web search, and web fetch. The next obvious tool is **"drive a real browser session"**: log into a SaaS the user is already authed in, fill a form, scrape a paginated table, download an export.
-
-The plumbing is already there. A `@openhuman/browser_task` skill could spin up a dedicated CEF webview, drive it via CDP from the core, and surface the result as a tool call. The user's existing per-account profiles mean no re-auth.
-
-### Headless CEF for server-side replay
-
-The same scanner pattern (long-lived WebSocket → IDB walk + DOM snapshot) works without a UI. Headless CEF in the core sidecar could replay sessions on a schedule, useful for users who host the core in the cloud and want auto-fetch from sources that don't expose a clean OAuth API.
-
-### Privacy hooks at the browser-process layer
-
-CEF's `CefRequestHandler` already lets us intercept network requests. A small step from "intercept and log" to "intercept and rewrite": ad-block, tracker-block, DNS pinning, request rewriting per provider. Privacy as a first-class browser feature instead of a leaky JS shim inside each origin.
-
-### CDP-driven testing framework
-
-The scanner pattern, spawn webview, walk IDB, snapshot DOM, evaluate one ephemeral expression, is structurally identical to E2E test orchestration. We could ship `@openhuman/web_test` as a public skill: `connect_cef → snapshot → evaluate → assert`. Tests written in plain Rust against any web app, no Selenium / Playwright dependency.
-
-### Renderer ↔ Rust message channel
-
-Today every CDP `Runtime.evaluate` is fire-and-forget. A long-lived bidirectional channel from renderer to Rust (the way Tauri does IPC for the host app) would unlock streaming use cases: live typing detection, real-time selection / highlight tracking, proactive nudges. Designing this so it doesn't violate the "no persistent JS bridge in third-party origins" rule is the interesting constraint.
-
-### Multi-account merge
+## Removed sections
-Each connected account gets its own profile and its own IDB. CDP can snapshot one account's IDB, decrypt-merge with another's, and upsert into a shared memory doc, e.g. one unified Slack memory across three workspaces.
+This page used to carry a CEF prewarm note, Windows and Linux startup-triage
+runbooks, a plugin-audit table, and a "where this could evolve" design section.
+They are dropped rather than kept: the runbooks told a maintainer to collect
+logs and set environment variables that no longer exist, and the design section
+has been overtaken. The one idea in it that did happen, browser automation as a
+first-class agent tool, is
+[Browser & Computer Control](../features/native-tools/browser-and-computer.md).
## See also
-- [`CLAUDE.md`](../../CLAUDE.md). the canonical "no new JS injection" rule.
+- [`AGENTS.md`](https://github.com/tinyhumansai/openhuman/blob/main/AGENTS.md): the canonical rule that no JavaScript injection is added to child webviews, and that CEF and CDP-scanner assumptions are not restored.
diff --git a/gitbooks/developing/e2e-testing.md b/gitbooks/developing/e2e-testing.md
index 2b1d906541..154d093000 100644
--- a/gitbooks/developing/e2e-testing.md
+++ b/gitbooks/developing/e2e-testing.md
@@ -1,9 +1,16 @@
---
-description: End-to-end testing with WDIO + tauri-driver. CI and local setup.
+description: >-
+ The desktop and web end-to-end suites: the WDIO and tauri-driver harness,
+ how to run a spec locally or in Docker, the environment variables each lane
+ reads, and which lanes actually execute in CI.
icon: vials
---
-# E2E Testing Guide
+# 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 on a schedule; macOS and Windows are manual.
## Overview
@@ -156,7 +163,7 @@ error) before Tauri's deep-link forwarding path is installed.
Two web E2E sessions on one machine need separate ports. The lane refuses to
start when any of its three ports is already listening, because its readiness
probes are ordinary HTTP GETs that the other session's mock, core and web host
-answer just as happily — and `openhuman-core run` falls back to a neighbouring
+answer just as happily, and `openhuman-core run` falls back to a neighbouring
port rather than exiting, so it would stay alive on a port nothing probes
(#5918). 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 (#6478).
@@ -171,9 +178,29 @@ E2E_PORT_BASE=31000 pnpm --filter openhuman-app test:e2e:web
### Push / PR checks
-The default pull-request gate is `.github/workflows/ci-fast.yml` (quality checks plus complete unit-test suites for changed areas). E2E suites do not run on PRs to `main`. The full E2E matrix (Rust mock-backend, Playwright web, desktop on Linux/macOS/Windows) runs in `.github/workflows/ci-full.yml` on PRs targeting the `release` branch and on every push to it.
+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
+executes. The job's "3 OS" title names the matrix the reusable workflow is
+able to run, not the one CI Full asks for.
-macOS and Windows desktop E2E do not run on pushes or PRs. `.github/workflows/e2e.yml` is a manually dispatched workflow whose `run_macos` / `run_windows` inputs default to `false` until #5485 lands a native driver for each platform; someone has to opt in explicitly to get cross-platform desktop signal before promotion.
+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 default to `false` as well, so someone has to opt in
+explicitly to get cross-platform desktop signal before a promotion. Both stay
+off until #5485 lands a native driver for each platform.
---
@@ -267,3 +294,12 @@ 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.
+- [Building and installing OpenHuman](getting-set-up.md): toolchain and submodules a local E2E build needs.
diff --git a/gitbooks/developing/embedding.md b/gitbooks/developing/embedding.md
index da1dea4316..cfc51f085e 100644
--- a/gitbooks/developing/embedding.md
+++ b/gitbooks/developing/embedding.md
@@ -1,3 +1,10 @@
+---
+description: >-
+ Embedding the core in another Rust process: one Runtime, any number of
+ independently configured Agents on it.
+icon: code
+---
+
# Embedding OpenHuman
`openhuman-embed` is a typed Rust library for running the OpenHuman core
@@ -24,10 +31,10 @@ openhuman-embed = { git = "https://github.com/tinyhumansai/openhuman", package =
Every feature on this crate forwards to the same-named feature on
`openhuman-core`: `default`, `http-server`, `inference`, `documents`,
-`hosting`, `modules`, `voice`, `web3`, `runtime-node`, `contacts`, `media`,
+`hosting`, `modules`, `voice`, `web3`, `runtime-node`, `media`,
`flows`, `skills`, `mcp`, `crash-reporting`, `channels`,
-`sandbox-bubblewrap`,
-`whatsapp-web`, `file-logging`, `scheduler-gate`. Two of them also gate
+`whatsapp-web`, `file-logging`, `scheduler-gate` (eighteen entries including
+`default`). Two of them also gate
items on this crate's own surface: `mcp` gates `HttpHeader`,
`McpAuthConfig`, `McpServer`, `AgentSpec::mcp` and `HarnessBuilder::mcp`;
`skills` gates `AgentSpec::skills_dir` and `HarnessBuilder::skills_dir`.
@@ -149,8 +156,12 @@ silently refuse, which reads as a weak model rather than a missing scope.
- `Access::readonly()`: observe only, no writes, no shell, no network side
effects. Safe default for an untrusted prompt.
- `Access::supervised()`: act, but park risky operations for a human
- decision. The approval gate stays on, so an unattended harness stalls here
- until an approval answers or the ten-minute TTL denies it.
+ decision. Unlike the desktop default, this **turns the autonomy policy on**
+ for that agent (`Access` sets the policy flag as well as the tier), so the
+ approval gate really is live and an unattended harness stalls here until an
+ approval answers or the ten-minute TTL denies it. The user-facing default is
+ the opposite: `[autonomy] enabled = false`, where the gate is inert. See
+ [Approval Gate](../features/approval-gate.md).
- `Access::full()`: act autonomously, no approval pauses. Grants real shell
and file access under `action_dir`; point it at a directory you are
willing to have changed. Hard blocks still apply regardless of tier:
@@ -330,8 +341,9 @@ the first backend-touching dispatch:
openhuman_tinyhumans::install(openhuman_tinyhumans::InstallOptions::default())?;
```
-That call also registers the hosted RPC proxies (billing, team, referral,
-announcements) into the core's controller registry. See
+That call also registers the seven hosted RPC proxy domains (billing, team,
+referral, announcements, webhooks, channel linking and backend-brokered OAuth)
+into the core's controller registry. See
[One API key for everything](tinyhumans-api-key.md) for what a TinyHumans
API key unlocks once it is installed this way.
@@ -420,7 +432,8 @@ bundles. The repository-root `examples/embed_headless.rs` and
directly, without this crate; run them with `cargo run --example
embed_headless`.
-Tests worth reading alongside the examples: `tests/harness_embed.rs` proves
+Tests worth reading alongside the examples, all under
+`crates/openhuman-embed/tests/`: `harness_embed.rs` proves
`Harness` runs a real turn against a mocked provider with nothing else
bound; `tests/runtime_agents.rs` runs three agents with different
providers, access tiers, skills, MCP servers and working directories on one
diff --git a/gitbooks/developing/engines.md b/gitbooks/developing/engines.md
index 0313c658c6..d6129d79ed 100644
--- a/gitbooks/developing/engines.md
+++ b/gitbooks/developing/engines.md
@@ -1,3 +1,10 @@
+---
+description: >-
+ The four swappable engine families (models, embeddings, memory, search) and
+ how each one is selected by config rather than code.
+icon: gears
+---
+
# Pluggable engines
OpenHuman routes four kinds of work, chat and reasoning, embeddings, memory,
@@ -72,7 +79,7 @@ pluggable engine. The contract is `tinymemory-api` (vendored at
the engine is hosted, needs an endpoint or key, and which fetch modes it
supports. `tinymemory::list_engines` and `build_engine` are the registry.
-Two engines ship, both from the `tinymemory-cortex` crate:
+Two engines ship, both served by `tinymemory-integrations` (the three TinyMemory crates are `tinymemory-api`, `tinymemory-tools` and `tinymemory-integrations`):
| id | what | endpoint | key |
| --- | --- | --- | --- |
@@ -115,10 +122,12 @@ than leaving the agent with no search tool at all.
SearXNG is a separate toggle (`[searxng] enabled`, `base_url`) rather than a
`search.engine` value, since it points at a self-hosted instance instead of a
-vendor API. Engine definitions live under
-`crates/openhuman-core/src/search/engines/`, one file per provider; the
-selector and provider resolution are in `crates/openhuman-core/src/search/mod.rs`
-and `crates/openhuman-core/src/config/schema/tools/search.rs`.
+vendor API. The providers themselves live in the `tinysearch` module
+(`vendor/tinysearch`), which owns the per-provider transports and the 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`, and the host's
+provider list is taken from the contract rather than maintained separately.
See [Web Search](../features/native-tools/web-search.md) for the tool surface
each engine exposes.
diff --git a/gitbooks/developing/getting-set-up.md b/gitbooks/developing/getting-set-up.md
index 5ac697ca1b..35f942a4c4 100644
--- a/gitbooks/developing/getting-set-up.md
+++ b/gitbooks/developing/getting-set-up.md
@@ -1,9 +1,12 @@
---
-description: How to build OpenHuman from source - toolchain, submodules, Tauri CLI, and local desktop builds.
+description: >-
+ Building OpenHuman from source: the pinned toolchain, the vendored
+ submodules, the Tauri CLI wrapper, and local desktop builds, plus the
+ release installers for each platform.
icon: wrench
---
-# Building and installing OpenHuman
+# Getting Set Up
This guide covers the full desktop/source install path plus the release installers, so pick whichever path matches what you're doing:
@@ -19,7 +22,7 @@ If you only need the Rust workspace under `crates/` on a fresh machine (no Node,
- `[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
-- Git submodules under `vendor/` (`git submodule update --init --recursive`), required by both the core and the desktop shell
+- 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 each manifest whether the crate is optional or not; a subset is always a build break
- Platform desktop build tools: Xcode Command Line Tools on macOS, or the Tauri GTK/WebKit/AppIndicator package set on Linux
macOS Homebrew quick start:
@@ -94,7 +97,7 @@ Installer behavior:
### Arch Linux package recipe
The repository includes an `openhuman-bin` AUR recipe at
-[`packages/arch/openhuman-bin`](../../packages/arch/openhuman-bin/). It uses the
+[`packages/arch/openhuman-bin`](https://github.com/tinyhumansai/openhuman/tree/main/packages/arch/openhuman-bin). It uses the
official x86_64 AppImage as the binary source, extracts the bundled application
tree during `makepkg`, installs a desktop entry, and exposes `/usr/bin/openhuman`.
@@ -137,7 +140,7 @@ Windows installer behavior:
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`](../../.github/workflows/build-desktop.yml)).
+[`.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
@@ -149,7 +152,7 @@ library path. Install the `.deb` bundle with `dpkg -i`.
Manual download links (all platforms):
-- Website: https://tinyhuman.ai/openhuman
+- Website: https://tinyhumans.ai/openhuman
- Latest release: https://github.com/tinyhumansai/openhuman/releases/latest
## Troubleshooting
@@ -174,3 +177,12 @@ A previous Tauri build or `openhuman-core run` harness left a process listening
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
index 036460238b..d1ca9a1947 100644
--- a/gitbooks/developing/hooks.md
+++ b/gitbooks/developing/hooks.md
@@ -1,3 +1,10 @@
+---
+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 that OpenHuman runs at a specific moment (before a
@@ -198,9 +205,9 @@ every tool call.
Three RPC methods, on the `hooks` namespace:
```bash
-openhuman hooks list # what is configured, from which file, and whether it is wired
-openhuman hooks reload # re-read every layer
-openhuman hooks test --event beforeShellExecution \
+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}'
```
@@ -256,8 +263,12 @@ Both need `chmod +x`.
## Implementation
-`crates/openhuman-core/src/hooks/`: `types` (the wire contract), `config` (the file and its
-layering), `matcher`, `exec` (one hook: stdin, timeout, exit codes),
-`engine` (selection, ordering, aggregation), `context` (the envelope),
-`bridge` (mounting on the harness's existing tool and turn seams), `ops` (the
-moments with no existing seam), `followup`.
+The engine and the whole `hooks.json` contract live upstream, in
+`tinyagents_runtime::command_hooks`: the types, the file and its layering, the
+matcher, running one hook (stdin, timeout, exit codes), selection and ordering
+and aggregation, the context envelope, and follow-ups.
+
+What stays in `crates/openhuman-core/src/hooks/` is the host half: `bridge`
+(mounting the engine on the harness's existing tool and turn seams), `ops` (the
+moments with no existing seam), `host`, `schemas` (the RPC surface) and
+`prompt_eval`. The beside-code `README.md` there is the authoritative split.
diff --git a/gitbooks/developing/jev.md b/gitbooks/developing/jev.md
index 565ae5b00f..b9f825b6a2 100644
--- a/gitbooks/developing/jev.md
+++ b/gitbooks/developing/jev.md
@@ -1,3 +1,10 @@
+---
+description: >-
+ The small decision model: what it answers, where it is called, what it
+ costs, and how it is configured.
+icon: scale-balanced
+---
+
# Jev
Jev is a decision model, not a text generator. Give it a request and a
@@ -87,9 +94,9 @@ would only add a network round trip for no gain.
`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), confined to the browser surface and the allowed websites.
-The decision model is chosen in `[computer] decision_model` — Jev (through
+The decision model is chosen in `[computer] decision_model`: Jev (through
the hosted proxy when signed in, or the user's OpenRouter key), OpenJev, or
-Sage — and a failed step goes to the rescue model (`[computer] rescue_model`,
+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`.
diff --git a/gitbooks/developing/loadable-modules.md b/gitbooks/developing/loadable-modules.md
new file mode 100644
index 0000000000..7bee8b2465
--- /dev/null
+++ b/gitbooks/developing/loadable-modules.md
@@ -0,0 +1,98 @@
+---
+description: >-
+ How capability arrives at runtime instead of compile time: the TinyBus module
+ ABI, the pinned registry, admission checks, and what happens when one faults.
+icon: puzzle-piece
+---
+
+# Loadable modules
+
+Feature gates decide what compiles into the binary. Modules decide what the binary can *reach* once it is running. A module is a first-party native library, loaded into the core process, serving a small typed interface over TinyBus.
+
+The trade is explicit: a module shares the core's address space and its crash domain, so it is trusted code and the admission checks matter. In exchange, a user who never generates a document never pays for the document writer, in download size, in resident memory, or in dependency surface.
+
+## The registry
+
+`crates/openhuman-core/src/modules/registry/` compiles in **fourteen** records. Only this registry may select an artifact; nothing reads a module name from config and goes looking.
+
+| 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 |
+| `tinyruntime` + `tinyruntime-nodejs` + `tinyruntime-python` | Runtime discovery and warm interpreter pools |
+| `tinymcp` | The MCP client and registry |
+| `tinyconnectors` | OAuth connector actions and triggers |
+| `tinybox` | Sandbox capability discovery |
+| `tinychannels` | Messaging channel transports |
+| `tinyhosts` | Hosting provider operations |
+
+Each record carries a version, the release it came from, and one **`PlatformAsset` per supported build**: thirteen of the fourteen publish eleven (`ubuntu-24.04` and `ubuntu-22.04` × `x86_64`/`arm64`, `macos-26` and `macos-15` × `arm64`/`x86_64`, `windows-2025-x86_64`, `windows-2022-x86_64`, `windows-11-arm64`), and `tinycomputer` publishes seven because it has no Linux backend.
+
+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 point of the digest is that it describes the artifact the release workflow signed, not the one on your machine.
+
+## Resolution order
+
+Each step exists to avoid the cost of the next:
+
+1. Already serving on the host's broker.
+2. An operator override: a path in `[modules].overrides`, or a `*_TEST_MODULE` environment variable.
+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 is at that path. That is acceptable only because it is the operator's own file named by the operator's own config, and it is why the block 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; 2.35 or newer gets 22.04; anything older, and musl or an unknown libc, gets an **empty** candidate list, so no published artifact can load there by design.
+
+## Admission
+
+In order, and all of it 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 a panic that aborts takes the host 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 majors equal **and** the module's minor at least the host's, so a newer module serves an older host and the reverse is refused rather than half-working. Never redeclare a contract type in OpenHuman, and call members through the contract's constants rather than 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**.
+
+That is the direct consequence of the other 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 be running 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 # off means the features say so, rather than 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 rather than 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 own readiness.
+
+## Adding or moving one
+
+A module's behaviour belongs in the submodule that owns it, not here. 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, since a leaf gate's absence should mean "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
index 104cdf7a1c..c3ca8c858d 100644
--- a/gitbooks/developing/mcp-server.md
+++ b/gitbooks/developing/mcp-server.md
@@ -34,8 +34,8 @@ clients can write as `mcp:<client>`.
## Tools
The MCP surface routes through the existing controller registry plus the core
-security policy: read tools pass the read gate, and the two write tools
-(`memory.learn`, `memory.forget`) pass the act gate and are audited:
+security policy: read tools pass the read gate, and the three act-gated tools
+(`memory.learn`, `memory.forget`, `agent.run_subagent`) are audited:
| MCP tool | Backing RPC | Purpose |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------- |
@@ -47,6 +47,10 @@ security policy: read tools pass the read gate, and the two write tools
| `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` when their search role has a usable provider (a signed-in
@@ -69,7 +73,7 @@ unless you know otherwise. `memory.list` accepts optional `filter`, `limit` and
`memory.learn` accepts `text` plus optional `kind` (`preference`, `fact`,
`procedure`, `correction`, `other`) and `confidence` (0 to 1). `memory.forget`
accepts `ids` (1 to 100). Memory tools answer `MEMORY_OFF` when no memory engine
-is usable. See [Memory v2](../../docs/specs/memory-v2.md) for the model.
+is usable. See [Memory v2](https://github.com/tinyhumansai/openhuman/blob/main/docs/specs/memory-v2.md) for the model.
Enable SearXNG under Connections → Search, in `config.toml`, or via environment:
@@ -120,7 +124,7 @@ The `initialize` response includes:
| `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 33 built-in subagents |
+| `openhuman://prompts/agents/<id>` | `<id>/prompt.md` for each of the 15 built-in subagents |
All resources have `mimeType: "text/markdown"`.
diff --git a/gitbooks/developing/performance.md b/gitbooks/developing/performance.md
index ee4e449f76..176c2097ce 100644
--- a/gitbooks/developing/performance.md
+++ b/gitbooks/developing/performance.md
@@ -1,3 +1,10 @@
+---
+description: >-
+ Measured footprint: agent density in one process, cold start, binary size,
+ and the dependency-floor ratchet that keeps it there.
+icon: gauge
+---
+
# Performance and footprint
OpenHuman's Rust core runs in-process as a library, not as one OS process per
@@ -56,6 +63,8 @@ memory budget.
| `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` row is a historical measurement: that scenario was removed from the profile binary, so the number stands but 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, the
thing a process pays exactly once, takes 476 ms. After that, a warmed turn in
the same process costs 0.5-1.9 MiB rather than the 26-31 MiB a first turn
@@ -84,9 +93,9 @@ what the desktop app ships).
| Pure slim | none | 68.4 MiB | 51.0 MiB |
The `skills,flows` recipe in
-[`docs/library-minimal-recipe.md`](../../docs/library-minimal-recipe.md) is
+[`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, meet, MCP and the desktop
+and saved-workflow runs, drops voice, web3, media, MCP and the desktop
automation stack, and lands about 30% smaller than the default build. Most of
that gain is binary size and code-paging surface; it only moves settled RSS by
about 3-5 MiB per scenario, since most of the RSS story is initialization and
@@ -102,12 +111,14 @@ Everything above compiles in at build time through Cargo features (`media`,
`skills`, `flows`, `mcp`, `channels`, `http-server`, `scheduler-gate`,
`file-logging`, `modules`, and more). Beyond that, several domains ship as
loadable native `cdylib` modules rather than being linked into the core
-binary at all: `tinydocs`, `tinyvoice`, `tinyjuice`, `tinyruntime`,
-`tinywallet`, `tinymcp`, `tinychannels`, and `tinyconnectors`, each behind a
+binary at all. The compiled registry pins fourteen: `tinycomputer`,
+`tinysearch`, `tinydocs`, `tinywallet`, `tinyjuice`, `tinyvoice`,
+`tinyruntime` with its Node and Python providers, `tinymcp`,
+`tinyconnectors`, `tinybox`, `tinychannels` and `tinyhosts`, each 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 `AGENTS.md`'s "Loadable
-modules and bus contracts" section for the rules.
+matter more than for an ordinary dependency. See
+[Loadable modules](loadable-modules.md) for the whole model.
## The kernel-floor ratchet
@@ -115,9 +126,11 @@ modules and bus contracts" section for the rules.
profile (`--no-default-features --features flows`, the surface a second host
would embed) along three numbers: package count, unique crate names, and
native (C/C++) build count. `scripts/kernel-floor.limits` holds the ceiling
-for each, currently `flows:306:285:2`, and the ratchet only moves down: a
-change that grows the graph has to lower this number in the same PR, and
-raising it requires a written justification a reviewer actually reads. This
+for each, and the ratchet only moves down: a change that grows the graph has
+to lower those numbers in the same PR, and raising one requires a written
+justification a reviewer actually reads. Read the current ceiling out of the
+file rather than from here; it moves, and the file keeps a dated history of
+every move inline. This
is what stops the dependency floor silently growing back after each gating
effort sheds crates from it.
@@ -148,8 +161,8 @@ scripts/kernel-floor.sh flows
`scripts/profile/README.md` documents the remaining scripts (`library-cpu.sh`
for CPU profiling via samply, `library-heap.sh` for live-heap attribution via
dhat). Full methodology, caveats, and the per-scenario breakdown live in
-[`docs/library-benchmarking.md`](../../docs/library-benchmarking.md) and
-[`docs/library-minimal-recipe.md`](../../docs/library-minimal-recipe.md).
+[`docs/library-benchmarking.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/library-benchmarking.md) and
+[`docs/library-minimal-recipe.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/library-minimal-recipe.md).
## Measurement conditions, stated plainly
diff --git a/gitbooks/developing/providers/claude-code.md b/gitbooks/developing/providers/claude-code.md
index 031a9a297d..3f08ab4a99 100644
--- a/gitbooks/developing/providers/claude-code.md
+++ b/gitbooks/developing/providers/claude-code.md
@@ -1,8 +1,14 @@
+---
+description: >-
+ Routing a workload through the Claude Code CLI or the Claude Agent SDK.
+icon: terminal
+---
+
# Claude Code CLI provider
OpenHuman can route any chat workload through Anthropic's `claude` CLI instead of calling the Anthropic HTTP API directly. The CLI handles model selection, auth, and prompt-cache management; OpenHuman drives it as a long-lived, session-resuming child process, parses its stream-json output, and hands it an MCP endpoint so the model can reach native OpenHuman state (memory, threads, agents, search). This is one of several pluggable LLM backends; see [Engines](../engines.md) for the full list.
-The provider itself, `ClaudeCodeProvider`, is owned by `tinyagents-harness` (vendor/tinyagents), not by OpenHuman: see [its README](../../../vendor/tinyagents/crates/tinyagents-harness/src/providers/claude_code/README.md) for the full 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.
+The provider itself, `ClaudeCodeProvider`, is owned by `tinyagents-harness` (vendor/tinyagents), not by OpenHuman: see [its README](https://github.com/tinyhumansai/tinyagents/blob/main/crates/tinyagents-harness/src/providers/claude_code/README.md) for the full 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
@@ -38,7 +44,7 @@ The status RPC is on the existing inference namespace:
openhuman-core rpc openhuman.inference_claude_code_status
```
-Returns one of (`CliStatus` in [`tinyagents-harness`'s `claude_code/types.rs`](../../../vendor/tinyagents/crates/tinyagents-harness/src/providers/claude_code/types.rs)):
+Returns one of (`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
@@ -53,7 +59,7 @@ installations. When the CLI is found through a fallback, its directory and
user bin directories are prepended to the child process `PATH`, while the
inherited entries remain available.
-The same status is rendered in the settings panel via `ClaudeCodeStatusCard` ([`app/src/components/settings/panels/ai/ClaudeCodeStatusCard.tsx`](../../../app/src/components/settings/panels/ai/ClaudeCodeStatusCard.tsx)).
+The same status is rendered in the settings panel via `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
@@ -91,7 +97,7 @@ The `openhuman.inference_claude_code_auth_status` RPC reports the richer state f
## Tool surface exposed to the CLI
-The CLI sees these tools as `mcp__openhuman__<name>`, served over the loopback HTTP MCP endpoint described above (the same tool set the stdio MCP server in [`crates/openhuman-core/src/mcp/server/`](../../../crates/openhuman-core/src/mcp/server/) exposes to other MCP clients):
+The CLI sees these tools as `mcp__openhuman__<name>`, served over the loopback HTTP MCP endpoint described above (the same tool set 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`
@@ -104,5 +110,5 @@ The MCP server enforces `SecurityPolicy::ToolOperation` checks; `agent.run_subag
- 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 CC turn waits in queue rather than failing fast.
-- Cost accounting from the CLI's `result.total_cost_usd` is captured in the mapper but not yet wired into OpenHuman's billing layer ([`crates/openhuman-core/src/platform/cost/`](../../../crates/openhuman-core/src/platform/cost/)).
+- Cost accounting from the CLI's `result.total_cost_usd` is captured in the mapper but not yet wired into OpenHuman's billing layer ([`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/release-policy.md b/gitbooks/developing/release-policy.md
index cec22150b6..7721f76e4d 100644
--- a/gitbooks/developing/release-policy.md
+++ b/gitbooks/developing/release-policy.md
@@ -3,7 +3,7 @@ description: Release cadence, version policy, OAuth-and-installer rules. How shi
icon: ship
---
-# Release policy: latest desktop builds and OAuth
+# Release Policy
This runbook describes how we avoid users completing OAuth (including Gmail) on outdated desktop installers while the canonical flow is the latest release.
@@ -37,19 +37,19 @@ Implementation: `app/src/utils/oauthAppVersionGate.ts`, `app/src/utils/desktopDe
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](../../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 (there is no release PR in the promotion flow). Before approving the production run, the `Release-Approval` required reviewer verifies (a) the sign-off comment exists on the staging-tagged commit and (b) the production run actually targets that validated content: pass the staging-tagged SHA as `commit_sha`, or confirm nothing but `[skip ci]` version-bump commits separate it from the run's target. Anything more than bump commits means new content QA never smoked: re-run staging first.
+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 (there is no release PR in the promotion flow). Before approving the production run, the `Release-Approval` required reviewer verifies (a) the sign-off comment exists on the staging-tagged commit and (b) the production run actually targets that validated content: pass the staging-tagged SHA as `commit_sha`, or confirm nothing but `[skip ci]` version-bump commits separate it from the run's target. Anything more than bump commits means new content QA never smoked: re-run staging first.
## Branch model and CI lanes
Two long-lived branches, two CI lanes:
-- `main`: where all feature/fix PRs land. Every PR runs CI Fast ([`ci-fast.yml`](../../.github/workflows/ci-fast.yml)), with quality checks and complete unit-test suites for changed areas, gated at ≥ 80% diff coverage.
-- `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`](../../.github/workflows/ci-full.yml)): complete unit suites, Rust mock-backend E2E, Playwright web E2E, and the full desktop E2E matrix on Linux/macOS/Windows. The `CI Full Gate` check aggregates every lane except the Playwright spec run, which is non-blocking signal for now (`continue-on-error`, flaky under CI contention, #3615): a green gate does not prove Playwright specs passed, so check that lane's result in the run before cutting. Only the Playwright artifact _build_ is gated.
+- `main`: where all feature/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 complete unit-test suites for changed areas, gated at ≥ 80% diff coverage.
+- `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 a manual dispatch whose inputs default to off until a native driver lands for each, so cross-platform desktop signal is opt-in rather than part of the matrix. The `CI Full Gate` check aggregates every lane except the Playwright spec run, which is non-blocking signal for now (`continue-on-error`, flaky under CI contention, #3615): a green gate does not prove Playwright specs passed, so check that lane's result in the run before cutting. Only the Playwright artifact _build_ is gated.
The cycle:
-1. A maintainer dispatches [`promote-main-to-release.yml`](../../.github/workflows/promote-main-to-release.yml), which pushes a merge commit from `main` into `release` (no PR). Re-dispatching refreshes `release` with main's latest while preserving fix commits already on `release`; when `release` already contains `main` it's a no-op.
-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 Lite for quick lint/coverage feedback and CI Full as the merge-blocking `CI Full Gate` check), and the post-merge push re-runs CI Full on the merge result.
+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` (no PR). Re-dispatching refreshes `release` with main's latest while preserving fix commits already on `release`; when `release` already contains `main` it's a no-op.
+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, CI Full as the merge-blocking `CI Full Gate` check), and 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`. Staging may instead be dispatched from `main` when QA needs to validate main before promotion. The release workflows do not query or enforce the `CI Full Gate`; operators verify the relevant CI evidence before cutting.
4. A cut sourced from `release` back-merges `release` into `main` (`scripts/release/merge-release-into-main.sh`: fast-forward when possible, else a versioned merge commit such as `chore(release): merge release v1.2.4 back into main`), so bump commits and fix commits flow back. A staging cut sourced from `main` needs no back-merge. Version-bump commits carry `[skip ci]`.
@@ -61,14 +61,14 @@ Two first-class GitHub Actions workflows, one per environment. Pick by intent ra
| Workflow | Branch | Bumps | Tags pushed | Concurrency group | Use when |
| -------------------------------------------------------------------------- | ------------------- | -------------------------------------------------- | -------------------- | -------------------- | --------------------------------------------------------------------------------------- |
-| [`release-staging.yml`](../../.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`](../../.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`). |
+| [`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 matrix build / sign / Sentry-DIF / artifact-upload pipeline used by both flows lives in [`.github/workflows/build-desktop.yml`](../../.github/workflows/build-desktop.yml) as a `workflow_call` reusable workflow. The two top-level workflows above own ref resolution, version bumping, tagging, and publish/cleanup; the build itself is shared.
+The matrix build / sign / Sentry-DIF / artifact-upload pipeline used by both flows lives in [`.github/workflows/build-desktop.yml`](https://github.com/tinyhumansai/openhuman/blob/main/.github/workflows/build-desktop.yml) as a `workflow_call` reusable workflow. The two top-level workflows above own ref resolution, version bumping, tagging, and publish/cleanup; the build itself is shared.
### Android / Google Play
-Android releases are handled by the separate [`.github/workflows/android-compile.yml`](../../.github/workflows/android-compile.yml) workflow, which 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 workflow keeps the unsigned and signed AABs as Actions artifacts for audit/debugging.
+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, which 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 workflow keeps the unsigned and signed AABs as Actions artifacts for audit/debugging.
Manual Android uploads use the same workflow:
@@ -145,6 +145,6 @@ Rotate `XGITHUB_APP_PRIVATE_KEY` every quarter (and immediately on any suspected
3. Trigger a low-risk verification run (e.g. Release (Staging)) and confirm the Generate GitHub App token step succeeds and the push authenticates.
Do not use Release Production for this check unless you intentionally want 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` does too, but skips the tag/build and is the lower-risk probe).
4. Back in App settings → Private keys, delete the old key so only the freshly-issued one remains valid.
-5. Record the rotation date (PR description, ops log, or `docs/OPERATIONS.md`) so the next quarter's owner can see when it last happened.
+5. Record the rotation date in the PR description or the ops log so the next quarter's owner can see when it last happened.
Rotating invalidates any copy of the old key that may have leaked, capping the exposure window at one quarter.
diff --git a/gitbooks/developing/testing-strategy.md b/gitbooks/developing/testing-strategy.md
index c61981e497..8242834bf6 100644
--- a/gitbooks/developing/testing-strategy.md
+++ b/gitbooks/developing/testing-strategy.md
@@ -5,7 +5,7 @@ icon: vial
# Testing Strategy
-How OpenHuman tests its product. Source of truth for "where does my test go?". Companion to [`TEST-COVERAGE-MATRIX.md`](../../docs/TEST-COVERAGE-MATRIX.md).
+How OpenHuman tests its product. Source of truth for "where does my test go?". Companion to [`TEST-COVERAGE-MATRIX.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/TEST-COVERAGE-MATRIX.md).
---
@@ -15,9 +15,9 @@ How OpenHuman tests its product. Source of truth for "where does my test go?". C
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| **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:unit` |
+| **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 behaviour | All platforms: Linux CI drives the Wry-based debug build (macOS/Windows desktop E2E is disabled until a native driver lands, #5485). See [E2E Testing](e2e-testing.md). |
-| **Manual smoke** | [`docs/RELEASE-MANUAL-SMOKE.md`](../../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, signed off in release PR |
+| **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, signed off in release PR |
---
@@ -79,7 +79,7 @@ A spec that asserts only the happy path is incomplete.
- **Element helpers**: `clickNativeButton`, `waitForWebView`, `clickToggle` in `helpers/element-helpers.ts`, use these instead of raw `XCUIElementType*` selectors.
- **Shared flows**: `completeOnboardingIfVisible`, `navigateViaHash`, `navigateToSkills`, `walkOnboarding` in `helpers/shared-flows.ts`.
- **Core RPC from spec**: `callOpenhumanRpc` in `helpers/core-rpc.ts`, drives the embedded core directly when a UI step would be brittle.
-- **Platform guards**: `isTauriDriver`, `isMac2`, `supportsExecuteScript` in `helpers/platform.ts` (the first two are legacy shims; everything runs on the Appium Chromium driver now).
+- **Platform guards**: `isTauriDriver` and `supportsExecuteScript` in `helpers/platform.ts`. Desktop E2E runs the debug binary under Xvfb through `tauri-driver` on Linux; the Appium Chromium-driver backend went away with CEF, and macOS and Windows have no automated desktop session yet.
- **Artifact capture on failure**: `captureFailureArtifacts` runs from `wdio.conf.ts`, screenshots + DOM dumps land under `app/test/e2e/artifacts/`.
---
@@ -111,13 +111,13 @@ cargo check --manifest-path crates/openhuman-app/Cargo.toml
pnpm typecheck
pnpm lint
pnpm format:check
-pnpm test:unit
+pnpm test # vitest, via the app workspace
# Rust integration with mock backend
pnpm test:rust
# E2E (slow - run when behaviour changes user-visibly)
-pnpm test:e2e:build
+pnpm --filter openhuman-app test:e2e:build
bash app/scripts/e2e-run-spec.sh test/e2e/specs/<your-spec>.spec.ts <id>
```
@@ -125,7 +125,7 @@ bash app/scripts/e2e-run-spec.sh test/e2e/specs/<your-spec>.spec.ts <id>
## Not driver-automatable - manual smoke required
-Some surfaces cannot be driven by WDIO / Appium because they cross OS-level trust boundaries or hardware paths. The complete checklist + sign-off block lives in [`docs/RELEASE-MANUAL-SMOKE.md`](../../docs/RELEASE-MANUAL-SMOKE.md), that file is the source of truth for what must be verified per release. Examples of what it covers:
+Some surfaces cannot be driven by WDIO / Appium because they cross OS-level trust boundaries or hardware paths. The complete checklist + sign-off block lives in [`docs/RELEASE-MANUAL-SMOKE.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/RELEASE-MANUAL-SMOKE.md), that file is the source of truth for what must be verified per release. Examples of what it covers:
- macOS TCC permission prompts (Accessibility, Input Monitoring, Microphone)
- Gatekeeper signature validation on first launch
@@ -140,7 +140,7 @@ If a feature has no automated coverage AND is not on the manual smoke list, trea
## Coverage matrix as the contract
-Every feature leaf in the [coverage matrix](../../docs/TEST-COVERAGE-MATRIX.md) maps to:
+Every feature leaf in the [coverage matrix](https://github.com/tinyhumansai/openhuman/blob/main/docs/TEST-COVERAGE-MATRIX.md) maps to:
1. A test path or paths, **or**
2. A justified `🚫` with a manual-smoke entry.
@@ -204,7 +204,7 @@ git -C vendor/tinyagents submodule update --init --recursive
*Falsified:* deinitialising `vendor/tinyagents/vendor/tinytools` and re-running
`cargo test -p openhuman-tinyhumans` gives, 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)
@@ -255,7 +255,7 @@ Tracked as openhuman#6512; per-profile detail in openhuman#6486.
`183 passed; 0 failed`. It is **not** a requirement there.
*Reported for `openhuman --lib`:* `web_chat` aborts with
-`fatal runtime error: stack overflow` without it, which is why `ci-lite.yml`
+`fatal runtime error: stack overflow` without it, which is why the CI lane
exports it. Not reproduced here: treat that as the reason the CI command above
carries it, and re-verify before relying on it elsewhere.
diff --git a/gitbooks/developing/theming.md b/gitbooks/developing/theming.md
index a4f8a3aeb2..30adb5973c 100644
--- a/gitbooks/developing/theming.md
+++ b/gitbooks/developing/theming.md
@@ -1,4 +1,11 @@
-# Theming
+---
+description: >-
+ The CSS token system behind every theme: how tokens are defined, how
+ Tailwind consumes them, and how to add one.
+icon: palette
+---
+
+# Theming (Token System)
OpenHuman is fully re-skinnable at runtime. Colours and fonts are driven by CSS
variables (the "tokens"), so a theme is just a set of values for those variables.
diff --git a/gitbooks/developing/tinyhumans-api-key.md b/gitbooks/developing/tinyhumans-api-key.md
index 8fd09d311d..c796c74c12 100644
--- a/gitbooks/developing/tinyhumans-api-key.md
+++ b/gitbooks/developing/tinyhumans-api-key.md
@@ -1,3 +1,10 @@
+---
+description: >-
+ What a single TinyHumans API key unlocks, how it is resolved, and which
+ seams read it.
+icon: key
+---
+
# One TinyHumans API key
One TinyHumans credential unlocks every managed backend surface: chat
@@ -52,7 +59,7 @@ Two wire forms, chosen by 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** (`BackendOAuthClient`, `IntegrationClient`):
+- **Backend REST** (`BackendClient`, `IntegrationClient`):
`x-api-key: <key>`.
`crates/openhuman-core/src/security/credentials/api_key.rs` owns storage and
diff --git a/gitbooks/features/approval-gate.md b/gitbooks/features/approval-gate.md
index 11607f1f1f..23ec248989 100644
--- a/gitbooks/features/approval-gate.md
+++ b/gitbooks/features/approval-gate.md
@@ -1,15 +1,30 @@
---
description: >-
- Human-in-the-loop consent for side-effecting tool calls. The agent parks any
- risky action until you approve it, and fails closed if you don't.
+ Human-in-the-loop consent for side-effecting tool calls. When the autonomy
+ policy is on, the agent parks any risky action until you approve it, and
+ fails closed if you don't.
icon: shield-check
---
# Approval Gate
-The Approval Gate is the checkpoint between the agent and the outside world. Whenever the agent wants to run a tool that has a real-world effect (post to Slack, send an email, create a calendar event, run a shell command, install a package), the gate intercepts the call, shows you exactly what's about to happen, and waits for your decision before anything runs.
+The Approval Gate is the checkpoint between the agent and the outside world. When the agent wants to run a tool with a real-world effect (post to Slack, send an email, create a calendar event, run a shell command, install a package), the gate intercepts the call, shows you what is about to happen, and waits for your decision.
-It's on by default. Nothing with an external effect leaves your machine in an interactive chat without you saying yes.
+{% hint style="warning" %}
+**The autonomy policy is off by default, and the gate is part of it.** `[autonomy] enabled` defaults to `false` (`crates/openhuman-core/src/config/schema/autonomy.rs`). Until you turn it on, command classification, the tier table, the allowlist, the hourly action budget, `workspace_only` and `forbidden_paths` are all inert, and an acting tool call runs without a prompt.
+
+That is deliberate rather than an oversight: these agents are expected to run inside a container, a platform jail or a Docker sandbox that already provides the isolation this in-process policy was approximating, and a shell that refuses ordinary shell syntax is not a usable shell. Set `[autonomy] enabled = true` in `config.toml` to get everything on this page.
+{% endhint %}
+
+## What still holds with the policy off
+
+Three things do not depend on `[autonomy] enabled`:
+
+- **Credential stores and system roots stay unreachable.** `SecurityPolicy::is_always_forbidden` refuses `~/.ssh`, `~/.gnupg`, `~/.aws` and system roots, along with `..` traversal and null bytes in a path, on every code path. It is a floor, not a tier.
+- **Hard tool-level blocks are independent.** The checks inside the tool implementations themselves, including the tool-policy middleware, run regardless.
+- **Sandboxing is a separate mechanism.** The platform jail and the Docker backend are chosen by `[runtime]` and the session's origin, not by the autonomy tier. See [sandboxing](privacy-and-security.md).
+
+Everything below describes the policy with `[autonomy] enabled = true`.
---
@@ -19,21 +34,23 @@ Every acting tool call is classified into a **command class**, and your **autono
| Command class | What it covers |
| ------------- | ----------------------------------------------------------------- |
-| Read | Provably read-only / observational (curated allowlist) |
+| Read | Provably read-only or observational (curated allowlist) |
| Write | State-changing; the fail-closed default for anything unrecognized |
| Network | Reaches the network (curl, wget, ssh, scp, …) |
| Install | Installs an OS or global language package |
-| Destructive | Catastrophic / irreversible / privilege-escalating |
+| Destructive | Catastrophic, irreversible or privilege-escalating |
-The tier comes from **Settings → Agent access** (`[autonomy].level`):
+The tier comes from **Settings → Permissions** (`[autonomy].level`, `AutonomyLevel` in `crates/openhuman-core/src/security/policy/types.rs`):
| Tier | Read | Write | Network / Install / Destructive |
| ---------------------- | ----- | ------ | ------------------------------- |
-| Read-only | Allow | Block | Block |
-| Supervised _(default)_ | Allow | Prompt | Prompt |
-| Full | Allow | Allow | Prompt |
+| `readonly` | Allow | Block | Block |
+| `supervised` _(default when the policy is on)_ | Allow | Prompt | Prompt |
+| `full` | Allow | Allow | Prompt |
+
+Anything that lands on **Prompt** is parked at the gate. `Block` is refused outright: no in-tier approval can authorize it. Classification is fail-closed. A command that is not provably read-only is treated as at least `Write`, and across a piped command the highest class wins, so `ls | curl …` is `Network`.
-Anything that lands on **Prompt** is parked at the gate. `Block` is refused outright: no in-tier approval can authorize it. Classification is fail-closed. A command that isn't provably read-only is treated as at least `Write`, and across a piped command the highest class wins (so `ls | curl …` is `Network`).
+A quoted heredoc body (`<< 'EOF' … EOF`) is data, not shell: it is blanked before any structural scan. An unquoted delimiter (`<< EOF`) is still expanded and still scanned.
---
@@ -63,19 +80,30 @@ Approve Always allow Deny 10-min TTL
run run refused (fail closed)
```
-When a call is parked, an **Approval Request card** appears above the chat composer. It shows the tool name, a safe one-line summary of the action, and the (redacted) command. Three choices:
+When a call is parked, an **Approval Request card** appears above the chat composer. It shows the tool name, a safe one-line summary of the action, and the redacted command. Three choices:
- **Approve**: run this one call.
- **Always allow**: run it, and add the tool to your `auto_approve` list so it skips the prompt next time.
- **Deny**: refuse this call.
-You can also just type **yes** / **no** in chat. The reply is routed back to the parked request.
+You can also type **yes** or **no** in chat. The reply is routed back to the parked request.
---
## Always allow
-Approving with **Always allow** persists the tool name onto `[autonomy].auto_approve` (config save + live-policy reload), so the gate short-circuits to _allow_ for that tool on future turns. The list ships with safe read-only tools pre-approved (`file_read`, `memory_search`, `memory_list`, `get_time`, `list_dir`, `glob`, `grep`) and is editable in **Settings → Agent access**. Remove an entry there to start being prompted again.
+Approving with **Always allow** persists the tool name onto `[autonomy].auto_approve` (config save plus a live policy reload), so the gate short-circuits to allow for that tool on later turns. Remove an entry in **Settings → Agent access** to start being prompted again.
+
+The shipped default list is `file_read`, `memory_search`, `memory_list`, `get_time`, `list_dir`, `glob`, `grep`. Four of those names no longer match a registered tool: the memory surface is one tool called `memory`, the clock is `current_time`, and the directory listing is `list`. Those four entries are therefore inert, and `file_read`, `glob` and `grep` are the three that do anything. Checked against `app/src/features/conversations/tools/__fixtures__/coreToolNames.json`. That fixture is the catalogue the core's drift test compares against, though it is not exhaustive: a few credential-gated and env-gated tools are registered without appearing in it.
+
+---
+
+## `auto_approve_all`
+
+Separately from the per-tool list, `[autonomy].auto_approve_all` approves **every** call without prompting. Two things are worth knowing before enabling it:
+
+- An unlabelled call site is still hard-denied, and the hard security blocks inside the tool implementations are unaffected.
+- It bypasses **parking**, not just the prompt. A remote-origin triage dispatch (a connector or webhook payload reaching `triage.escalate`) normally parks and writes an audit row; with this flag on it is allowed immediately and **no audit row is written**, so those dispatches leave no approval trail.
---
@@ -83,38 +111,40 @@ Approving with **Always allow** persists the tool name onto `[autonomy].auto_app
Every non-approve path resolves to **Deny**:
-- **Timeout**: a parked request lives for 10 minutes; if undecided it is transitioned to a terminal `deny`.
+- **Timeout**: a parked request lives for 10 minutes; if undecided it transitions to a terminal `deny`.
- **Persist failure** or a dropped channel: denied.
- The timeout path re-reads the stored decision first, so an approval that committed in the race 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 a write-once execution outcome (success / error, error text sanitized and capped) as a durable audit trail. Everything persisted or broadcast is redacted first: PII and chat content are scrubbed and home paths stripped.
+Pending requests are stored in SQLite (`{workspace_dir}/approval/approval.db`) and **survive a core restart**. After an approved tool finishes, the gate records a write-once execution outcome (success or error, with the error text sanitized and capped) as a durable audit trail. Everything persisted or broadcast is redacted first: PII and chat content are scrubbed and home paths stripped.
---
## Background and cron bypass
-The gate is **interactive-only**. Background, triage, and cron turns carry no chat context, so there's nobody to answer a prompt. These turns are pre-authorized and pass straight through (no row, no event). Approval is only enforced for live chat turns.
+The gate is **interactive-only**. Background, triage and cron turns carry no chat context, so there is nobody to answer a prompt. These turns are pre-authorized and pass straight through, with no row and no event. Approval is enforced for live chat turns.
---
-## Configuration & RPC
+## Configuration and RPC
-- **`OPENHUMAN_APPROVAL_GATE`**: set to `0` / `false` to skip installing the gate entirely. With no gate, `Prompt`-class calls run unprompted. On by default.
-- **`[autonomy].level`** and **`[autonomy].auto_approve`**: tier and allowlist, via the `config.update_autonomy_settings` RPC or Settings → Agent access.
+- **`[autonomy].enabled`**: the master switch. `false` by default; everything on this page needs it `true`.
+- **`OPENHUMAN_APPROVAL_GATE`**: set to `0` or `false` to skip installing the gate even with the policy on. With no gate, `Prompt`-class calls run unprompted.
+- **`[autonomy].level`** and **`[autonomy].auto_approve`**: tier and allowlist, via the `config.update_autonomy_settings` RPC or 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/executed audit rows (`limit` 1 to 500, default 50). Surfaced in **Settings → Approval history**. |
+| `openhuman.approval_list_recent_decisions` | Decided and executed audit rows (`limit` 1 to 500, default 50). Surfaced in **Settings → Approval history**. |
| `openhuman.approval_decide` | Apply a decision (`approve_once` / `approve_always_for_tool` / `deny`). |
-`list_pending` / `list_recent_decisions` return empty (not an error) when no gate is installed; `decide` errors when the gate is absent or the request is unknown or already decided.
+`list_pending` and `list_recent_decisions` return empty rather than an error when no gate is installed; `decide` errors when the gate is absent or the request is unknown or already decided.
---
## See also
-- [Privacy & Security](privacy-and-security.md): autonomy tiers, trusted roots, and path hardening.
-- [Security architecture](../developing/architecture/security.md): the command-classification and policy internals.
+- [Privacy & 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
index 7826c2c124..cc9a8451b3 100644
--- a/gitbooks/features/billing-and-usage.md
+++ b/gitbooks/features/billing-and-usage.md
@@ -1,7 +1,7 @@
---
description: >-
Plans, credits and saved cards over Stripe and Coinbase, plus a local
- local dashboard for token usage and cost estimates.
+ dashboard for token usage and cost estimates.
icon: credit-card
---
@@ -54,7 +54,17 @@ The **Billing** button on the desktop Accounts page opens the hosted web billing
### RPC surface
-Namespace `billing`, exposed as `openhuman.billing_*` (16 methods), e.g. `billing_get_summary`, `billing_get_current_plan`, `billing_get_balance`, `billing_get_transactions`, `billing_purchase_plan`, `billing_top_up`, `billing_create_coinbase_charge`, `billing_get_cards`, `billing_create_setup_intent`, `billing_update_auto_recharge`, `billing_redeem_coupon`.
+Namespace `billing`, exposed as `openhuman.billing_*`. The registered set is
+`all_billing_registered_controllers` in
+`crates/openhuman-tinyhumans/src/hosted/billing/schemas.rs`:
+
+| 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` |
---
@@ -97,5 +107,6 @@ Because cost tracks **real token counts**, anything that shrinks the prompt dire
## See also
-- [Token compression (TokenJuice)](token-compression.md)
-- [Model routing](model-routing/README.md)
+- [Smart Token Compression](token-compression.md): fewer tokens on each call, so a lower recorded cost.
+- [Automatic Model Routing](model-routing/README.md): sends work to the cheapest model that can handle it.
+- [Privacy & Security](privacy-and-security.md): what is logged, and what never is.
diff --git a/gitbooks/features/channels.md b/gitbooks/features/channels.md
index d06f5fc3ab..879007e521 100644
--- a/gitbooks/features/channels.md
+++ b/gitbooks/features/channels.md
@@ -27,7 +27,9 @@ Channels that support it can show a typing indicator, stream progressive **draft
## Supported channels
-OpenHuman ships **15 channel provider modules**: 14 built by default, plus WhatsApp Web behind the `whatsapp-web` Cargo feature. Alongside them, the in-app **Web** chat is built into the desktop app rather than being a provider module, and a separate `cli` channel serves the `openhuman-core` terminal binary. Seven channels are exposed in the Settings UI; the rest are enabled through `config.toml`.
+OpenHuman ships **15 channel provider modules**, of which **14 compile into the shipped desktop build**: WhatsApp Web sits behind the `whatsapp-web` Cargo feature, which is in neither the contributor default set nor the shipped product set, so it is an opt-in build rather than something you can switch on. Alongside them, the in-app **Web** chat is built into the app rather than being a provider module, and 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, 元宝); the rest are enabled by hand in `config.toml`.
+
+Matrix is the one to know about: a `[channels.matrix]` stanza is still accepted by the config parser, but the provider was removed from the build. It is logged and skipped, so a Matrix config does nothing.
| Channel | Direction | Inbound transport | Credential mode | In Settings UI |
| ------------------ | ------------- | ---------------------------- | ------------------------------------------------------------------ | -------------- |
@@ -69,10 +71,10 @@ Secrets supplied for any mode are stored through OpenHuman's credential layer an
## Where to connect a channel
-Channels are set up under **Connections → Channels** in the left sidebar — **not** under Settings, and not under any "Automation & Channels" menu (no such menu exists). Open that tab, pick a platform tile, and follow its setup card:
+Channels are set up under **Connections → Channels** in the left sidebar, **not** under Settings, and not under any "Automation & Channels" menu (no such menu exists). Open that tab, pick a platform tile, and follow its setup card:
-- **Discord** — choose _Connect via OpenHuman_ (link your account or install the bot via OAuth), or paste your own Discord bot token.
-- **Telegram** — message the managed OpenHuman bot to link, or paste a BotFather bot token.
+- **Discord**: choose _Connect via OpenHuman_ (link your account or install the bot via OAuth), or paste your own Discord bot token.
+- **Telegram**: message the managed OpenHuman bot to link, or paste a BotFather bot token.
Slack is connected as an **app** under **Connections → OAuth** (Composio) so the agent can read and act in Slack; it is not set up as a talk-back channel in the Channels tab.
diff --git a/gitbooks/features/chat.md b/gitbooks/features/chat.md
new file mode 100644
index 0000000000..30ec7f3d0e
--- /dev/null
+++ b/gitbooks/features/chat.md
@@ -0,0 +1,97 @@
+---
+description: >-
+ The chat surface: composer, slash commands, mentions, model and effort
+ pickers, the context ring, the tool timeline, approvals, sub-agent cards,
+ artifacts and threads.
+icon: comments
+---
+
+# Chat
+
+Chat is where almost everything happens. It is not a text box with a send button: a turn here can call tools, spawn sub-agents, stop to ask you something, park an action for approval, produce files, and bill itself, and the transcript shows all of it in order.
+
+Open it at **Chat** in the sidebar, or `⌘N` for a new conversation.
+
+## The composer
+
+The input is a rich text field rather than a plain one, which is what lets a `/` become a command chip and a popover anchor to the caret as you type. Alongside it:
+
+- **Attach** files. An image, a PDF, an Office document or an archive is preserved in the working folder and offered to the model natively when the model and the route both support that type; otherwise it degrades to extracted text, a bounded readout, or an archive listing with accessible paths.
+- **Model**, and a separate **thinking effort**. Both apply to this conversation, not globally.
+- **Context ring**, which shows how full the context window is for this thread and opens a breakdown with per-sub-agent cost.
+- **Voice**: tap to speak, or hand the turn to the live voice agent. See [Voice](native-tools/voice.md).
+- When the box is empty, the mascot button takes you to the full-screen [mascot](mascot/README.md) stage.
+
+### Slash commands
+
+Typing `/` offers three sources at once: the built-ins (`/new`, `/clear`, `/stop`, `/plan`, `/build`), the core's own command list, and your installed skills and workflows.
+
+### Mentions
+
+Typing `@` offers two sources: **memory**, searched as you type, and **files**, meaning the artifacts this thread has already produced. A mention becomes a chip, so the agent gets the reference rather than a guess at what you meant.
+
+## Reading a turn
+
+Each assistant turn groups its reasoning and its tool calls into one chronological block, so you can see what it thought and what it did in the order it happened rather than in two separate panes.
+
+- **Tool calls** render per tool: a search shows its queries and sources, a shell call shows its command and exit, a failed call shows a failure card with the reason rather than a stack trace. Every tool runs in the core; nothing executes in the browser.
+- **Sources** appear as badges under an answer, up to four inline and then a count.
+- **Timing and cost** are on the turn, and the context ring's breakdown attributes spend to the sub-agents that caused it.
+- **Find in conversation** (`⌘F`) searches this thread only, and the right-edge rail jumps between turns.
+
+The action bar on an assistant turn has copy, regenerate, a thumbs up or down that is remembered, read-aloud, and export as Markdown. On your own turns you can edit and resend, which branches the conversation: the branch picker moves between versions.
+
+## When the agent needs you
+
+Four different kinds of stop, all inline:
+
+| Stop | What it looks like |
+| --- | --- |
+| **Approval** | A card naming the tool and a redacted one-line summary of the action. Approve once, always allow that tool, or deny. See [Approval Gate](approval-gate.md). |
+| **Permission** | A connector or provider needs authorizing; the card collects exactly the fields that provider needs. |
+| **Clarification** | The agent asks a direct question and waits. |
+| **Plan review** | A proposed plan with approve, reject, or revise-with-feedback. |
+
+A background or scheduled turn has nobody to ask, so an approval raised outside a live chat collects in a deck you can decide later. Undecided requests deny themselves after ten minutes.
+
+## Sub-agents
+
+When a turn delegates, each child appears as its own card: a nested transcript, its own status, a reply box when it is waiting on you, and a cancel button. Delegation is asynchronous, so the parent keeps working and the card fills in as the child reports. Detached background agents, scheduled runs and memory syncs collect in a separate inbox card rather than interrupting the thread.
+
+## Files the agent makes
+
+Anything the agent produces that is meant for you, a document, a deck, an image, a render, becomes an artifact: a chip above the composer opens a panel with download, reveal in folder, and delete. Only finished artifacts persist across a restart; a failed one offers a retry.
+
+## Workflow proposals
+
+Ask for an automation and 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 it on the canvas. That card is the only path from a proposal to a saved automation, which is deliberate. See [Workflows](workflows.md).
+
+## Threads
+
+The sidebar lists your conversations. You can create, select, rename inline, and delete behind a confirmation. Turns on different threads run **concurrently**, so starting something slow in one conversation does not block another.
+
+Threads carry a goal and a to-do list when the agent sets them, shown as a pinned list and a banner with its token budget. Both are read-only in the UI today: the agent maintains them, you do not edit them there.
+
+A long conversation is compacted rather than truncated. The compaction seals what came before and opens a new generation that records the sealed one as its parent, so nothing is deleted on disk even though the model only reads the head. There is no UI for browsing those 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
+
+Stated so you don't go looking: there is no thread search, pinning, folders or archiving in the sidebar; no UI for setting a thread goal or ticking a to-do; no browser for compaction generations; and follow-up suggestion chips are built but have no producer, so the 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 & 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
index f3cc5d334e..d5d8729497 100644
--- a/gitbooks/features/cloud-deploy.md
+++ b/gitbooks/features/cloud-deploy.md
@@ -1,9 +1,15 @@
---
-description: Hosting the headless openhuman-core in the cloud - DigitalOcean App Platform, Fly.io, or Docker Compose on any VPS.
+description: >-
+ Hosting the headless openhuman-core on a server: DigitalOcean App Platform,
+ Fly.io, Docker Compose on any VPS, or an Oracle Cloud Terraform stack, plus
+ the bearer token, workspace volume, and secret-storage rules each one needs.
icon: cloud
---
-# Cloud deployment
+# Cloud Deploy
+
+**Who this page is for:** an operator running the core as a server process. A
+desktop user never needs any of it; the shell already runs a core in-process.
OpenHuman is a desktop app, but its **Rust core** (`openhuman-core`) is a
headless JSON-RPC server that can be hosted in the cloud. Deploying the core
@@ -27,8 +33,9 @@ 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 already knows how to talk
-to a remote core; set `OPENHUMAN_CORE_RPC_URL` and `OPENHUMAN_CORE_TOKEN=...`
-in `app/.env.local` and launch.
+to a remote core: it has a first-class **Settings → Core connection** panel
+that persists the RPC URL and bearer token, so nothing has to be put in an
+environment file.
---
@@ -38,7 +45,7 @@ OpenHuman's supported remote deployment is **core remote, UI local**: run
`openhuman-core` on a Linux server and point a desktop client at that RPC URL.
The deployed core does not serve the full React/Tauri UI as a production web
app yet. Desktop-only features still need the Tauri shell, including tray
-controls, native deep links, CEF account scanners, OS keychain integration, and
+controls, native deep links, the native iMessage scanner, OS keychain integration, and
window/screen affordances.
For a browser-accessible UI on a private server today, use the Vite web build as
@@ -81,13 +88,13 @@ not recommended because every RPC call carries the bearer token.
## Single source of truth for the bearer token
Every `/rpc` call carries `Authorization: Bearer <token>`. The core has two
-ways to load that token at startup ([`crates/openhuman-core/src/core/auth.rs`](../../crates/openhuman-core/src/core/auth.rs)):
+ways to load that token at startup ([`crates/openhuman-core/src/core/auth.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/core/auth.rs)):
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`
+ _only when `OPENHUMAN_CORE_TOKEN` is unset_. Standalone `openhuman-core run`
uses this so CLI clients can `cat` the file.
**Rule of thumb for any remote / dockerized deploy: always set
@@ -97,7 +104,7 @@ file from outside the container will get a stale or empty value. The two
paths are deliberately mutually exclusive at startup; mixing them is the most
common reason behind "the dashboard gets 401 after I redeployed".
-To check what the _running_ core is using, run [`scripts/print-core-token.sh`](../../scripts/print-core-token.sh)
+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
@@ -106,10 +113,11 @@ scripts/print-core-token.sh --redact # first 8 hex chars + '…' (safe for lo
scripts/print-core-token.sh # full value (pipe straight into a client)
```
-The desktop app's first-run picker also exposes a **Test connection** button
-next to the Core RPC URL + token fields, which fires `core.ping` against the
-URL with the typed token and reports `Connected ✓` / `Auth failed` /
-`Unreachable` inline before persisting the configuration.
+The desktop app's first-run picker and **Settings → Core connection** both
+expose a **Test connection** button next to the Core RPC URL and token fields.
+It fires `core.ping` against the typed URL with the typed token and reports one
+of three outcomes inline, connected, auth failed or unreachable, before
+anything is persisted.
---
@@ -126,11 +134,19 @@ URL with the typed token and reports `Connected ✓` / `Auth failed` /
| `OPENHUMAN_CORE_PORT` | no | Defaults to `7788`. |
| `RUST_LOG` | no | `info` is fine; `debug` for triage. |
-Endpoints exposed by the running container:
+Endpoints exposed by the running container, with the route policy from
+[`crates/openhuman-rpc/src/server/auth.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-rpc/src/server/auth.rs):
+
+| 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 /health`, public liveness probe. Used by every deploy path's healthcheck.
-- `POST /rpc`, bearer-protected JSON-RPC entrypoint.
-- `GET /events`, `GET /ws/dictation`, public streaming channels.
+Treat only `/health`, `/` and `/schema` as genuinely unauthenticated.
The `OPENHUMAN_WORKSPACE` directory (`/home/openhuman/.openhuman` inside the
container) holds the core's config, sqlite databases, and skill state. **Mount
@@ -142,7 +158,7 @@ restart.
## 1. DigitalOcean App Platform: one-click
Click the button below to create a new App Platform application from this
-repository's [`.do/app.yaml`](../../.do/app.yaml):
+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)
@@ -200,19 +216,26 @@ 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:v1.2.4 # pinned by GitHub Release tag
-docker pull ghcr.io/tinyhumansai/openhuman-core:1.2.4 # pinned by SemVer
+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 its glibc floor: the
-`aarch64` binary links against glibc 2.39 (`ubuntu:24.04` or newer works,
-`debian:bookworm-slim` ships 2.36 and fails at exec with `GLIBC_2.39' not found`),
-the `x86_64` binary links against glibc 2.34.
+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:
@@ -225,9 +248,11 @@ docker run -d --name openhuman-core -p 7788:7788 \
ghcr.io/tinyhumansai/openhuman-core:latest
```
-Or use the in-repo Compose file (still builds the image locally from
-`Dockerfile`; switch the `image:` field to `ghcr.io/tinyhumansai/openhuman-core:latest`
-in `docker-compose.yml` to consume the published image instead):
+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:
@@ -262,7 +287,7 @@ case "$ARCH" in
aarch64) TARGET=aarch64-unknown-linux-gnu ;;
*) echo "Unsupported arch: $ARCH"; exit 1 ;;
esac
-VERSION=1.2.4 # set to the release you want
+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
@@ -272,9 +297,10 @@ 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: `aarch64` needs glibc 2.39 or newer
-(Ubuntu 24.04, Debian 13), `x86_64` needs glibc 2.34 or newer (Ubuntu 22.04,
-Debian 12). Check with `ldd --version` on the host.
+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
@@ -312,7 +338,8 @@ ExecReload=/bin/kill -HUP $MAINPID
Operator flow:
1. Call `openhuman.update_check` to discover a release.
-2. Configure `restart_strategy = "supervisor"` in your `update.toml` (or set
+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
@@ -324,7 +351,7 @@ 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`](../../docker-compose.yml)) maps the core
+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.
@@ -364,10 +391,9 @@ docker compose up -d --force-recreate openhuman-core
docker compose exec openhuman-core /bin/sh -c \
'echo -n "$OPENHUMAN_CORE_TOKEN" | head -c 8; echo "…"'
-# 4. Update every desktop client (Switch mode → re-paste in the picker, or
-# edit OPENHUMAN_CORE_TOKEN in app/.env.local and relaunch). Clients that
-# still hold the old token will get HTTP 401 on the next /rpc call — that
-# is expected, not a regression.
+# 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
@@ -390,31 +416,39 @@ core.example.com {
## Pointing the desktop app at a hosted core
-In the desktop app's environment file (`app/.env.local`):
+Configure this in the app, not in a file. **Settings → Core connection**
+(`app/src/components/settings/panels/CoreConnectionPanel.tsx`) takes the core's
+RPC URL and bearer token, offers a **Test connection** button that fires
+`core.ping` against the typed values, and shows live reachability for the
+active core. The pre-router first-run picker accepts the same two fields.
-```bash
-# Use the hosted core instead of spawning a local sidecar.
-OPENHUMAN_CORE_RUN_MODE=external
-OPENHUMAN_CORE_RPC_URL=https://core.example.com/rpc
-OPENHUMAN_CORE_TOKEN=<the same token you set on the server>
-```
+Enter the server's URL and the token you set on it:
-For a private tailnet-only VM with no public IP, use the tailnet URL instead:
+| Deployment | URL to enter |
+| --- | --- |
+| Public host behind TLS | `https://core.example.com/rpc` |
+| Private tailnet-only VM | `http://100.x.x.x:7788/rpc` |
-```bash
-OPENHUMAN_CORE_RUN_MODE=external
-OPENHUMAN_CORE_RPC_URL=http://100.x.x.x:7788/rpc
-OPENHUMAN_CORE_TOKEN=<the same token you set on the server>
-```
+Saving persists the choice and restarts the app, so the normal boot gate re-runs
+against the new mode. A URL with no path is treated as the core's base and
+`/rpc` is appended for you, and a `user:pass@host` URL is rejected because the
+token field is the only credential path.
-Restart the desktop app. The provider chain in `App.tsx` will route all RPC
-calls to the remote core; nothing else changes. Public `http://` hosts are
-rejected by the app picker; use HTTPS for any publicly reachable core.
+Plain `http://` is accepted without complaint only for loopback and
+private-network hosts, which includes RFC1918 ranges and the Tailscale
+`100.64.0.0/10` range (`isLocalOrPrivateNetworkHost` in
+`app/src/utils/configPersistence.ts`). A public `http://` host still saves, but
+the panel warns, because every RPC call carries the bearer token in the clear.
+Use HTTPS for anything publicly reachable.
+
+`VITE_OPENHUMAN_CORE_RPC_URL` in `app/.env.local` is a build-time fallback only.
+The saved panel value outranks it, as does the shell's own `core_rpc_url`
+command, so setting it will not move a desktop client onto a remote core.
### Troubleshooting: sign-in fails after OAuth on a cloud runtime
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
+but the desktop then shows a sign-in error, while the **same** account signs in
fine on the local (embedded) runtime (issue #3025).
The desktop shell validates the fresh session token against the backend
@@ -443,9 +477,9 @@ cloud-specific, actionable message for these instead of a generic "try again"
A cloud core has no browser to complete OAuth in. Obtain a credential
elsewhere and hand it to the core at boot:
-- `OPENHUMAN_BACKEND_API_KEY=<key>` — a TinyHumans API key (recommended; no
+- `OPENHUMAN_BACKEND_API_KEY=<key>`: a TinyHumans API key (recommended; no
user identity, nothing to expire).
-- `OPENHUMAN_BACKEND_SESSION_TOKEN=<jwt>` — a session JWT with a subject claim.
+- `OPENHUMAN_BACKEND_SESSION_TOKEN=<jwt>`: a session JWT with a subject claim.
Either installs the credential only when the store has none of that kind; to
rotate, clear first (`openhuman-core auth clear_credential --kind api-key`).
@@ -467,9 +501,10 @@ account:
(`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`, `learning_provider` if you want
+ (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>"`.
+ `default_model: "<model-id>"`. Those are the whole set the controller
+ accepts; see `crates/openhuman-core/src/config/ops/model.rs`.
`openhuman.inference_agent_chat_simple` is the quickest end-to-end check.
Managed features (integrations, teams, hosted voice) still need a TinyHumans
@@ -598,7 +633,7 @@ 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`](../../.fly/fly.toml). Fill in
+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`:
@@ -687,16 +722,15 @@ curl -fsS https://<your-app-name>.fly.dev/health
### Step 6: Point the desktop app at the hosted core
-In `app/.env.local`:
+In the desktop app, open **Settings → Core connection**, switch it to the
+remote core, and enter:
-```bash
-OPENHUMAN_CORE_RUN_MODE=external
-OPENHUMAN_CORE_RPC_URL=https://<your-app-name>.fly.dev/rpc
-OPENHUMAN_CORE_TOKEN=<the token you set in Step 4>
-```
+- URL: `https://<your-app-name>.fly.dev/rpc`
+- Token: the value you set in Step 4
-Or use the **first-run picker** in the desktop app (Core RPC URL + token
-fields with a **Test connection** button) to configure without editing files.
+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
@@ -746,7 +780,7 @@ redeploy:
```toml
[build]
- image = "ghcr.io/tinyhumansai/openhuman-core:v1.2.4"
+ image = "ghcr.io/tinyhumansai/openhuman-core:v<version>"
```
### Logs
@@ -763,15 +797,15 @@ uses UID 1000), files already written to the persistent volume will be owned
by the old UID and produce `Permission denied (os error 13)` on startup.
The same thing happens to a Docker named volume that outlives an image
-upgrade, and to any workspace a **root** `docker exec` wrote into — `docker
+upgrade, and to any workspace a **root** `docker exec` wrote into. `docker
exec` does not run the entrypoint, so it lands as root and leaves a
`root:root` `config.toml` behind (the core writes it at mode 0600, so the
runtime user then cannot open it at all).
`scripts/docker-entrypoint-core.sh` now repairs this automatically: it chowns
the workspace **recursively** on every start, skipping entries already owned
-correctly. If the repair cannot run — `cap_drop: ALL` without `cap_add: CHOWN`
-— the entrypoint refuses to start rather than booting a container that answers
+correctly. If the repair cannot run, for example `cap_drop: ALL` without
+`cap_add: CHOWN`, the entrypoint refuses to start rather than booting a container that answers
`/health` with 200 while every config RPC returns `Permission denied
(os error 13)`, and prints the exact `chown` to run. Look for
`[docker-entrypoint] pre-heal` / `FATAL` lines in the container log.
@@ -860,3 +894,13 @@ 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 & Security](privacy-and-security.md): the trust model a server-hosted core inherits.
+- [OS Keyring & 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
new file mode 100644
index 0000000000..dc3a8c0a33
--- /dev/null
+++ b/gitbooks/features/connections.md
@@ -0,0 +1,50 @@
+---
+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 everything you would call a setting that changes what the agent *can do*, rather than how it looks, lives here, split into two groups in the left rail.
+
+Most of the older addresses redirect here, so a bookmark to `/skills` or `/channels` still lands in the right place.
+
+## Integrations
+
+| Tab | What it holds |
+| --- | --- |
+| **Apps** | 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). |
+| **Messaging** | 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** | Model Context Protocol servers, in four views: your servers, client config, the raw `mcp.json` (which is the only place a server is actually added), and a browsable registry. Includes 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 & 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 per-tool policy. |
+| **Computer** | Desktop and browser control, the decision model, and the planner. See [Browser & 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 is one tab per engine family, and each one is the same shape: use the managed TinyHumans route, or paste your own key.
+
+| 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 [Automatic Model Routing](model-routing/README.md). |
+| **Apps key** | Your own connector-platform key, if you would rather not use the managed route. |
+| **Voice** | Speech-to-text and text-to-speech providers, per-workload routing, and the dictation hotkey. |
+| **Embeddings** | The embedding provider behind memory and tool search. |
+| **Search** | Web-search providers. Two have a managed route; the rest are bring-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 & Usage](billing-and-usage.md). |
+
+## Why one page
+
+These used to be a dozen separate settings screens, and the split never held: connecting Gmail is an integration, a memory source, a trigger source and a set of agent tools at once, and so is connecting GitHub. Keeping them on one page with one rail means the thing you are setting up stays in front of you while you set up the parts of it that live in other systems.
+
+Settings that change how the app *behaves* rather than what it reaches, appearance, personality, security, keychain, 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 & 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
index 83281baef5..54eb4ea132 100644
--- a/gitbooks/features/goals-and-todos.md
+++ b/gitbooks/features/goals-and-todos.md
@@ -1,10 +1,18 @@
---
-description: The agent's session todo list and per-thread goals.
+description: >-
+ The agent's session todo list and its per-thread goals: in-session work
+ state the chat pane reflects, rather than a task board you manage.
icon: target
---
# Goals & Todos
+The agent tracks its own work in two places: a session todo list for the steps
+of the request it is handling, and a per-thread goal for the objective that
+thread is trying to finish.
+
+---
+
## Agent work state
While it works on a multi-step request the agent keeps a session todo list,
@@ -17,10 +25,12 @@ Neither is a kanban board. There is no per-thread task board, no card CRUD,
no approval gate, and no `thread_goals`, `todos`, or `threads_task_board` RPC
endpoint. Conversation threads remain the chat/session container.
+---
+
## In the chat pane
-Both show above the composer while the agent works, read-only — the agent
-owns them, the pane reflects them:
+Both show above the composer while the agent works, read-only: the agent
+owns them, the pane reflects them.
- The **todo checklist** lists every step with its state: completed items
strike through and stay, the one `in_progress` item is marked, and the
@@ -29,10 +39,14 @@ owns them, the pane reflects them:
reached, complete) and tokens used against the budget when one was set.
Neither has an RPC of its own. Each tool call answers with its state as JSON,
-so the pane reads the newest `todo` / `goal_*` tool result in the thread —
+so the pane reads the newest `todo` / `goal_*` tool result in the thread,
across the live turn and the thread's persisted turns, which is what keeps a
goal on screen for the many turns after the one that set it.
+---
+
## See also
- [Memory](memory.md): durable preferences and facts live there as learnings; goals and todos are in-session only.
+- [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 crate-backed stores behind both.
diff --git a/gitbooks/features/hosting.md b/gitbooks/features/hosting.md
new file mode 100644
index 0000000000..2854d7ef42
--- /dev/null
+++ b/gitbooks/features/hosting.md
@@ -0,0 +1,58 @@
+---
+description: >-
+ Put a workspace folder on the internet: deploy a site, provision and wire a
+ database, set environment variables, attach a domain, 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 itself 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 model underneath is provider-neutral, and Railway, Cloudflare and a self-hosted target are the named next steps, but nothing else is wired yet.
+{% endhint %}
+
+## What the agent can do
+
+| Tool | Effect |
+| --- | --- |
+| `hosting_launch_site` | Deploy a workspace directory as a live site, optionally provisioning a database and wiring it in, setting environment variables, and attaching 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` | Point production back at an earlier deployment that already built. |
+| `hosting_list_sites` | The sites on the account. |
+| `hosting_set_env` | Set environment variables on an existing site. |
+| `hosting_add_domain` | Attach 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 its five steps in the one order that works: create the site, provision the database, **connect the database before the build**, set the environment, then build. A framework that reads its environment at build time gets a broken build in any other order. The call returns while the build is still running, so the agent polls `hosting_deployment_status` rather than blocking.
+
+There is a rollback and no separate promote, because a rollback *is* promoting an older deployment. It refuses a deployment that never finished building, since promoting a failed build would take the site down during an attempt to bring it back up.
+
+## Two things it will not do
+
+- **Read a secret.** A managed database's connection string is injected by the provider into the site's environment. OpenHuman learns the variable *names* and never their values, which is why a launch reports `DATABASE_URL` rather than a URL.
+- **Deploy something you did not name.** The directory resolver refuses an absolute path, a `..` escape and anything that is not a directory. It is the one place that decides what may leave the machine, and a deployment uploads every byte under the folder it is given.
+
+## Setting it up
+
+```toml
+[hosting]
+enabled = true
+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`, falling back to `VERCEL_TOKEN`; a team account also reads `TINYHOSTS_VERCEL_TEAM_ID` or `VERCEL_TEAM_ID`.
+
+`[hosting] enabled` is `false` by default. With it off, or with no credential resolvable anywhere, **the ten tools are not registered at all** rather than registered and failing. That is deliberate: a tool that is present and cannot work is worse than one that is absent, because a model retries it. A *misconfigured* section, an unknown provider slug or a blank configured key, is an error and is logged, not silently skipped.
+
+## 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
index c36487d4aa..99637394d1 100644
--- a/gitbooks/features/integrations/README.md
+++ b/gitbooks/features/integrations/README.md
@@ -1,13 +1,15 @@
---
description: >-
- 118+ third-party integrations - Gmail, Notion, GitHub, Slack, Stripe, Calendar
+ Managed OAuth into Gmail, Notion, GitHub, Slack, Stripe, Calendar
and more - with one-click OAuth and zero API keys.
icon: plug
---
-# Third-party Integrations (118+)
+# Third-party Integrations
-OpenHuman ships with backend-proxied access to **118+ third-party services**. Connecting any of them through the managed path is a one-click OAuth flow inside the app, there are no API keys to wire by hand, and no plugin marketplace to navigate.
+OpenHuman ships with backend-proxied access to the connector platform's managed-auth catalog, **119 toolkits** as the app knows them. Connecting one through the managed path is a one-click OAuth flow inside the app: no API keys to wire by hand, and no plugin marketplace to navigate.
+
+That figure is the catalog the app ships (`KNOWN_COMPOSIO_TOOLKITS` in `app/src/components/composio/toolkitMeta.tsx`, pinned at 119 by `toolkitMeta.test.tsx`). What you can actually connect is whatever the backend's allowlist returns when the page loads, and the per-toolkit action schemas are fetched live, so no number in this repository bounds the total actions reachable.
Under the hood, 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 brokering, rate limits, and trigger webhook fan-out. If you switch to direct mode, the core talks to Composio with your own Composio API key; synchronous tool calls work, but real-time trigger webhooks must be configured on your own webhook infrastructure.
@@ -43,28 +45,28 @@ Click **Connect** on any integration. A browser window opens for OAuth. Once you
Each integration shows its current status:
-- **Not connected**. integration has not been set up.
-- **Connected**. integration is active and being synced.
-- **Manage**. active integration with options to reconfigure or disconnect.
+- **Not connected**: the integration has not been set up.
+- **Connected**: the integration is active and being synced.
+- **Manage**: an active integration, with options to reconfigure or disconnect.
You can revoke any connection at any time from the **Connections** page.
## Messaging channels
-Three integrations are special. OpenHuman uses them to _talk back_ to you, not just read from them:
+Some integrations are not just something to read from: OpenHuman uses them to _talk back_ to you. Eight channels have a setup flow in the app, and more are available by hand in `config.toml`. The three you are most likely to start with:
-- **Telegram**. the primary messaging channel. Two-way: send and receive messages, manage chats, search history, create groups, 80+ actions on your behalf. All actions run through your own encrypted credentials.
-- **Discord**. send and receive messages via Discord. Connect your account to receive OpenHuman messages there.
-- **Web**. a browser-based chat interface within the desktop app. Messages stay entirely local.
+- **Telegram**: the usual first choice. Two-way, with a managed one-click connection or your own bot token.
+- **Discord**: two-way, by OAuth or your own bot token, with a server and channel picker.
+- **Web**: the chat inside the desktop app itself. Messages stay entirely local.
-Set your default under **Connections → Channels**. The active route status shows which channel is currently in use. Telegram offers two credential modes: connect via OpenHuman (one-click, encrypted) or provide your own credentials for maximum control.
+Set your default under **Connections → Messaging**. [Messaging Channels](../channels.md) has the full list and what each one can do.
## Beyond the curated catalog: MCP & Skills
-The 118+ OAuth connectors are the curated path. Beyond them, OpenHuman opens up the wider open-tooling ecosystem:
+The managed OAuth connectors are the curated path. Beyond them, OpenHuman opens up the wider open-tooling ecosystem:
- **MCP servers**: a built-in registry browses thousands of [Model Context Protocol](https://modelcontextprotocol.io) servers (Smithery + the official registry) that install locally as new agent tools.
-- **Skills**: a browsable, ~90,000-entry catalog of `SKILL.md` capability bundles aggregated from HermesHub, ClawHub, LobeHub and more. (Note: the old in-app skills runtime has been removed; Skills are now a metadata catalog you install from the **Connections → Skills** tab.)
+- **Skills**: a browsable catalog of `SKILL.md` capability bundles aggregated from several public registries, installed from the **Connections → Skills** tab. The old in-app JavaScript sandbox is gone; a skill runs as its own agent session with the interpreters it declares, not as code inside the app.
See [MCP Servers & Skills](mcp-and-skills.md) for the full picture.
@@ -72,8 +74,8 @@ See [MCP Servers & Skills](mcp-and-skills.md) for the full picture.
Two capabilities ship native rather than as integrations because they're load-bearing for the desktop experience:
-- [**Voice**](../native-tools/voice.md). STT in, TTS out, plus a live Google Meet agent that joins meetings, stores them as conversations in memory, and can speak back into the call.
-- [**Native tools**](../native-tools/README.md). built-in web search, web-fetch scraper, and a full filesystem/git/lint/test/grep coder toolset that the agent uses out of the box.
+- [**Voice**](../native-tools/voice.md): STT in, TTS 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 filesystem, git, lint, test and grep coder toolset the agent has out of the box.
## Privacy boundary
diff --git a/gitbooks/features/integrations/mcp-and-skills.md b/gitbooks/features/integrations/mcp-and-skills.md
index e1f0bafa48..93cb8872cc 100644
--- a/gitbooks/features/integrations/mcp-and-skills.md
+++ b/gitbooks/features/integrations/mcp-and-skills.md
@@ -17,7 +17,7 @@ OpenHuman has a built-in **MCP registry** that browses the open MCP ecosystem an
- **Two upstream registries, merged.** Discovery fans out in parallel to [Smithery.ai](https://smithery.ai) and the official [`registry.modelcontextprotocol.io`](https://registry.modelcontextprotocol.io), then merges the results: thousands of servers across both.
- **Search → install → connect.** Search the catalog, view a server's details, and install it. A local install spawns the server as a stdio subprocess; deployed servers connect over HTTP.
-- **Supervised connections.** Installed servers are persisted in a local SQLite store (`mcp_clients/mcp_clients.db`) with their command, args, and transport. A supervisor loop keeps enabled servers connected, probing every ~60s with per-server exponential backoff. Each non-nominal probe outcome (a slow answer, a dropped transport, a reconnect that succeeded or failed) shows up in **Settings → Developer → Event Log** under the `mcp` badge — an answered probe does not, so a healthy server stays silent — and a server that stays down, comes back after failing, or cannot start because its launcher runtime is missing raises a notification.
+- **Supervised connections.** Installed servers are persisted in a local SQLite store (`mcp_clients/mcp_clients.db`) with their command, args, and transport. A supervisor loop keeps enabled servers connected, probing every ~60s with per-server exponential backoff. Each non-nominal probe outcome (a slow answer, a dropped transport, a reconnect that succeeded or failed) shows up in **Settings → Developer → Event Log** under the `mcp` badge. An answered probe does not, so a healthy server stays silent. A server that stays down, comes back after failing, or cannot start because its launcher runtime is missing raises a notification.
Once connected, an MCP server's tools are available to the agent exactly like native tools.
@@ -41,6 +41,6 @@ OpenHuman can run the other way around, too. `openhuman-core mcp` exposes OpenHu
## See also
-- [Third-party Integrations](README.md): the curated 100+ OAuth connectors.
+- [Third-party Integrations](README.md): the curated managed-auth OAuth connectors.
- [MCP Server](../../developing/mcp-server.md): running OpenHuman as an MCP server.
- [Available Tools](../native-tools/README.md): the native tools that ship by default.
diff --git a/gitbooks/features/integrations/triggers.md b/gitbooks/features/integrations/triggers.md
index eb3410a7a6..023cfa7081 100644
--- a/gitbooks/features/integrations/triggers.md
+++ b/gitbooks/features/integrations/triggers.md
@@ -35,7 +35,7 @@ If an older Gmail connection was created before this scope was requested, reconn
## Where triggers come from, end to end
-```
+```text
┌────────────────────┐
│ third-party API │ Gmail / Slack / Notion / GitHub / ...
└─────────┬──────────┘
@@ -70,7 +70,7 @@ The webhook never reaches your machine raw. The backend is what holds the OAuth
## The triage step
-Before any action runs, every trigger goes through the [`trigger_triage`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/agent/agents/trigger_triage) agent. Its only job is to decide what the rest of the system should do.
+Before any action runs, every trigger goes through the [`trigger_triage`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/agent/registry/agents/trigger_triage) agent. Its only job is to decide what the rest of the system should do.
It picks exactly one of four actions:
@@ -78,7 +78,7 @@ It picks exactly one of four actions:
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **`drop`** | Nothing. Trigger is silently logged and discarded. | Spam, duplicates, irrelevant noise. The default for things you don't care about. |
| **`acknowledge`** | A short memory note is persisted, no agent runs. | Passive notifications worth remembering ("a new page was created in archive"). |
-| **`react`** | The [`trigger_reactor`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/agent/agents/trigger_reactor) agent runs with one or two tool calls. | A small, single-step side effect: store a memory entry, post a quick acknowledgement, mark a thread read. |
+| **`react`** | The [`trigger_reactor`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/agent/registry/agents/trigger_reactor) agent runs with one or two tool calls. | A small, single-step side effect: store a memory entry, post a quick acknowledgement, mark a thread read. |
| **`escalate`** | The full **orchestrator** agent takes over with planning capability. | Anything that needs reasoning, multiple steps, or multiple skills: drafting a reply, updating several Notion pages, deciding how to triage an inbound issue. |
The triage agent has the same memory and workspace context the rest of the agent has. It can tell whether a trigger is relevant to something you're currently working on, who the people involved are, and whether it's the kind of thing you've asked OpenHuman to act on before.
@@ -123,8 +123,8 @@ Triggers follow the same boundary as the rest of the product (see [Privacy & Sec
## Implementation pointers (for developers)
-- Triage agent: `crates/openhuman-core/src/agent/agents/trigger_triage/`
-- Reactor agent: `crates/openhuman-core/src/agent/agents/trigger_reactor/`
+- Triage agent: `crates/openhuman-core/src/agent/registry/agents/trigger_triage/`
+- Reactor agent: `crates/openhuman-core/src/agent/registry/agents/trigger_reactor/`
- Composio bus subscriber: `crates/openhuman-core/src/integrations/composio/bus.rs` (`ComposioTriggerSubscriber`)
- Trigger history persistence: `crates/openhuman-core/src/integrations/composio/trigger_history.rs`
- Domain events: `DomainEvent::ComposioTriggerReceived`, `DomainEvent::TriggerEscalated` in `crates/openhuman-core/src/core/events.rs`
diff --git a/gitbooks/features/ios-companion.md b/gitbooks/features/ios-companion.md
index d4a6cc7f93..080c899831 100644
--- a/gitbooks/features/ios-companion.md
+++ b/gitbooks/features/ios-companion.md
@@ -2,7 +2,7 @@
description: >-
Pair an iOS companion app to your desktop OpenHuman over an end-to-end
encrypted tunnel, scanned from a QR code.
-icon: smartphone
+icon: mobile-screen
---
# iOS Companion
@@ -15,13 +15,15 @@ The iOS Companion lets you reach your desktop OpenHuman from your phone: you sca
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 renders the results.
+What is experimental here is the **client**, not the core. The core's pairing domain is complete and wired into the controller registry (`crates/openhuman-core/src/security/devices/`): it registers the channel, derives the keys, persists the device, and tracks peer status. Earlier contributor notes described pairing as blocked on an unmerged backend change; that is no longer the case. Two real gaps remain, both noted below: there is no desktop screen for managing paired devices, and revocation is local-side only.
+
---
## What it is
Pairing is brokered by the Rust `devices` domain in the core. The core registers a pairing channel with the tinyhumans backend's `tunnel:*` Socket.IO relay, generates a fresh X25519 keypair, and renders a QR code. The phone scans it, generates **its own** X25519 keypair, and connects back over the same relay. The backend is a **blind forwarder**: it relays opaque frames and never sees plaintext.
-Once paired, the device shows up in **Settings → Devices** on the desktop with an online/offline dot, and can be revoked at any time.
+Pairing and revocation are core RPCs, not a desktop screen. The old **Settings → Devices** page was removed and its slug now redirects to **Settings → Account** (`app/src/components/settings/settingsRouteRegistry.ts`), and nothing in the desktop frontend calls the `devices_*` methods. Listing and revoking a paired device means calling the core directly for now.
---
@@ -47,10 +49,10 @@ Desktop core Backend relay iOS app
|-- X25519 DH + derive session keys | |
|-- persist PairedDevice | |
|-- publish DevicePaired event | |
- | device appears in Devices list | |
+ | devices_list now returns it | |
```
-The QR payload (carried as an `openhuman://pair?...` deep link) contains the channel id (`cid`), a single-use pairing token (`pt`), the core's public key (`cpk`), an optional LAN URL (`rpc`), and an expiry (`exp`). The pairing token is single-use, hashed at rest on the backend, and the QR is rejected client-side once `exp` has passed (the backend enforces the real ~10 minute TTL).
+The QR payload (carried as an `openhuman://pair?...` deep link) contains the channel id (`cid`), a single-use pairing token (`pt`), the core's public key (`cpk`), an optional LAN URL (`rpc`), and an expiry (`exp`). The pairing token is single-use and the QR is rejected client-side once `exp` has passed. The core does not choose that expiry: it stores and republishes whatever `pairingExpiresAt` the backend returns in its `tunnel:register` ACK, so the real TTL is the backend's.
---
@@ -83,12 +85,17 @@ The phone may reach the core three ways. `TransportManager` (`app/src/services/t
Paired devices are persisted by the core in SQLite (`{workspace_dir}/devices/devices.db`, table `paired_devices`): channel id, label, the device's public key, a SHA-256 hash of the core session token, and timestamps. The core's X25519 private key is stored encrypted at rest (via the OS keyring `SecretStore`) so handshakes survive a restart.
+- **Create**: `devices_create_pairing` registers the channel, mints and persists the keypair, and returns the QR fields.
- **List**: `devices_list` returns non-revoked devices, overlaying a live `peer_online` flag sourced from `tunnel:peer-status` (online status is never persisted).
- **Revoke**: `devices_revoke` soft-deletes the device, tears down all in-memory and tunnel state for the channel, and publishes a `DeviceRevoked` event. Today revocation is local-side: the backend channel is left to expire via its pairing-token TTL (a backend revoke endpoint is a follow-up).
+All three are reachable over JSON-RPC as `openhuman.devices_create_pairing`, `openhuman.devices_list` and `openhuman.devices_revoke`, and on the CLI through the generic namespace dispatcher: `openhuman-core devices create_pairing`, `openhuman-core devices list`, `openhuman-core devices revoke --channel_id <id>`.
+
---
## See also
- [Privacy & Security](privacy-and-security.md): how OpenHuman handles your data and keys.
- [Voice](native-tools/voice.md): push-to-talk and dictation, the headline use case for a phone companion.
+- [Architecture](../developing/architecture.md): where the iOS client sits relative to the core.
+- [OS Keyring & 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
index 0b9722558c..463c820dd2 100644
--- a/gitbooks/features/mascot/README.md
+++ b/gitbooks/features/mascot/README.md
@@ -1,8 +1,7 @@
---
description: >-
- The on-screen face of OpenHuman, a desktop mascot that speaks, reacts, joins
- your meetings, and thinks in the background even when you aren't looking at
- it.
+ The on-screen face of OpenHuman: a desktop mascot that speaks, reacts, and
+ keeps working in the background even when you aren't looking at it.
icon: face-smile
---
@@ -10,7 +9,7 @@ icon: face-smile
OpenHuman has a face. The mascot is an animated character that lives on your desktop and acts as the visible surface of the agent, what it's saying, what it's thinking about, when it's idle, when it's busy, when it has something to tell you.
-It is not a chrome ornament. The mascot is wired into the same pieces as the rest of the agent: voice, memory, [scheduled runs](../native-tools/cron.md), and the [Google Meet integration](../native-tools/voice.md). When the agent talks, the mascot is the one talking; when the agent is thinking, the mascot is the one thinking.
+It is not a chrome ornament. The mascot is wired into the same pieces 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 is the one talking; when the agent is thinking, the mascot is the one thinking.
## What it does
@@ -18,9 +17,7 @@ It is not a chrome ornament. The mascot is wired into the same pieces as the res
When the agent replies, the audio is generated through a hosted TTS model and streamed to your speakers. At the same time, the mascot drives a viseme map against the audio so its mouth shapes match the words coming out. There's no separate "talking head" video, the same audio stream that you hear is the one driving the animation.
-See [Native Voice](../native-tools/voice.md) for the speech-to-text, text-to-speech, and meeting plumbing the mascot rides on top of.
-
-### It joins your meetings, as a real participant
+See [Native Voice](../native-tools/voice.md) for the speech-to-text and text-to-speech plumbing the mascot rides on top of.
### It moves and reacts to its surroundings
@@ -47,11 +44,11 @@ Most assistants are a blinking text input. That's fine for a tool. It's not fine
The mascot exists because:
- **Presence beats panels.** A face you can glance at tells you, in one frame, whether the agent is busy, idle, or trying to get your attention.
-- **It makes voice calls feel like a conversation.** A camera feed of an animated character lip-syncing to its own speech is a different experience than a robotic voice with a black tile.
+- **It makes talking feel like a conversation.** An animated character lip-syncing to its own speech is a different experience from a robotic voice and a blank panel.
- **Personality is a UX surface.** A consistent character on screen is easier to trust, talk to, and forgive when it makes a mistake than a faceless API.
## See also
- [Native Voice](../native-tools/voice.md), the STT / TTS plumbing the mascot rides on.
- [Memory](../memory.md), what the mascot remembers, and how.
-- [Chromium Embedded Framework](../../developing/cef.md), the camera-into-Meet pipeline (developer reference).
+- [Themes & Theme Studio](../theming.md), where the mascot's colour, shape and voice are set.
diff --git a/gitbooks/features/model-routing/README.md b/gitbooks/features/model-routing/README.md
index 39d29438ce..2baa706618 100644
--- a/gitbooks/features/model-routing/README.md
+++ b/gitbooks/features/model-routing/README.md
@@ -13,22 +13,12 @@ Different parts of an agent want different models. Long reasoning wants a fronti
The model parameter on any chat call can take one of two shapes:
-- **Concrete model name**. e.g. `anthropic/claude-sonnet-4`. Routes to the default provider with that exact model.
-- **Hint prefix**. e.g. `hint:reasoning`. Looks the hint up in the route table and resolves to a `(provider, model)` pair.
-
-```rust
-// crates/openhuman-core/src/providers/router.rs
-fn resolve(&self, model: &str) -> (usize, String) {
- if let Some(hint) = model.strip_prefix("hint:") {
- if let Some((idx, resolved_model)) = self.routes.get(hint) {
- return (*idx, resolved_model.clone());
- }
- }
- (self.default_index, model.to_string())
-}
-```
+- **Concrete model name**: for example `anthropic/claude-sonnet-4`. Routes to the default provider with that exact model.
+- **Hint prefix**: for example `hint:reasoning`. Looks the hint up in the route table and resolves to a `(provider, model)` pair.
+
+The rule is the whole of it: strip a `hint:` prefix, look the remainder up in the route table, and fall through to the default provider with the name unchanged if there is no entry. A name without the prefix is never rewritten.
-The router wraps several pre-created providers (Anthropic, OpenAI, Google, Groq, etc.) and picks the right one per request. Hints can be remapped at runtime without restarting the core.
+The route table is `[[model_routes]]` in `config.toml`, one entry per hint (`ModelRouteConfig` in `crates/openhuman-core/src/config/schema/routes.rs`), with `[[embedding_routes]]` doing the same for embeddings. Resolution and provider construction live in `crates/openhuman-core/src/inference/`. Hints can be remapped at runtime without restarting the core.
## Common hints
@@ -51,9 +41,10 @@ The subscription is the default, not a requirement. The same router works agains
## Overriding routes
-- **Globally**. config TOML (`Config` struct in `crates/openhuman-core/src/config/schema/types.rs`) can supply a custom route table at startup.
-- **Per call**. pass a concrete model name (no `hint:` prefix) and the router falls through to the default provider with that exact model.
-- **For a skill**. skills can pin a hint or a model in their manifest.
+- **Globally**: `[[model_routes]]` in `config.toml` supplies the route table at startup.
+- **Per call**: pass a concrete model name with no `hint:` prefix and 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
diff --git a/gitbooks/features/model-routing/local-ai.md b/gitbooks/features/model-routing/local-ai.md
index 44bdea8c7f..92b5e2c526 100644
--- a/gitbooks/features/model-routing/local-ai.md
+++ b/gitbooks/features/model-routing/local-ai.md
@@ -8,7 +8,7 @@ icon: microchip
# Local AI (optional)
-OpenHuman can send any workload to a model running on your own machine: chat, reasoning, vision, memory embeddings, summary-tree building, and learning/reflection passes. Local AI is **opt-in** and **off** by default.
+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:
@@ -74,7 +74,7 @@ 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`, `embeddings_provider`, and `learning_provider`. A field that is unset, blank, or `cloud` stays on the default route. For the background features (embeddings, memory, learning), `Config::workload_local_model(...)` in `crates/openhuman-core/src/config/schema/types/resolvers.rs` treats a workload as local only when its field is `ollama:<model>`.
+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 the background workloads, `Config::workload_local_model(...)` in `crates/openhuman-core/src/config/schema/types/resolvers.rs` treats a workload as local only when its field is `ollama:<model>`.
The legacy `local_ai.usage.*` booleans are kept only so older configs migrate. They do not override the workload fields.
@@ -83,7 +83,6 @@ The legacy `local_ai.usage.*` booleans are kept only so older configs migrate. T
| Workload | Configured by | Notes |
| ------------------------------------ | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Chat, reasoning, coding, agentic** | `chat_provider`, `reasoning_provider`, ... | Any local prefix from the table above. |
-| **Learning / reflection** | `learning_provider` | `crates/openhuman-core/src/agent/learning/reflection.rs`. |
| **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 it 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.
diff --git a/gitbooks/features/model-routing/local-and-byok-models.md b/gitbooks/features/model-routing/local-and-byok-models.md
index 5e340d4a71..1bbde3d0b3 100644
--- a/gitbooks/features/model-routing/local-and-byok-models.md
+++ b/gitbooks/features/model-routing/local-and-byok-models.md
@@ -32,7 +32,7 @@ Speech is configured separately from the LLM workload fields, and the two halves
There is no local STT engine: speech-to-text is either the hosted proxy or a third-party API you supply a key for, while TTS keeps 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"`.
-That last row is deliberately about **inference data only**. Sign-in, managed integration OAuth, billing, and hosted features such as meeting agents still use the OpenHuman backend even when inference is entirely yours, so running local models is not by itself a guarantee that nothing leaves the machine. If you want a hard guarantee that no inference leaves the machine, use [Privacy Mode](../privacy-mode.md), which enforces the local-only path in the Rust core rather than relying on configuration alone.
+That last row is deliberately 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, so running local models is not by itself a guarantee that nothing leaves the machine. If you want a hard guarantee that no inference leaves the machine, use [Privacy Mode](../privacy-mode.md), which enforces the local-only path in the Rust core rather than relying on configuration alone.
## Route A: local models
@@ -69,7 +69,7 @@ Two traps worth calling out:
- **Gemma 3 is split by size.** The 270M and 1B builds are text-only. Vision starts at 4B. Picking `gemma3:1b-it-qat` for vision gets you 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). Memory v2 does not use local embeddings; the memory engine embeds on its own side.
+For embeddings, prefer **`bge-m3`** (1024 dimensions). Note what that does and does not cover: an `embeddings_provider` of `ollama:bge-m3` routes OpenHuman's own embedding calls locally, but the memory engine embeds on its own side, so switching this does not make memory recall local. Only [Privacy Mode](../privacy-mode.md) changes where inference goes, and memory is a separate decision you make by choosing its engine.
### 3. Point OpenHuman at it
@@ -103,7 +103,7 @@ The full set of workload fields is `chat_provider`, `reasoning_provider`, `agent
#### Attaching images in chat needs one more flag
-`vision_provider` routes the **vision workload** — image summaries and the OCR/description path. It does not by itself let you attach an image to a chat or agent turn.
+`vision_provider` routes the **vision workload**: image summaries and the OCR/description path. It does not by itself let you attach an image to a chat or agent turn.
A turn only rehydrates image attachments when the resolved chat model is known to accept them, and 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`:
@@ -114,7 +114,7 @@ provider = "ollama"
vision = true
```
-Without that flag the images are stripped before dispatch and the model answers from the text alone — fluently, and with no indication that it never saw the picture.
+Without that flag the images are stripped before dispatch and the model answers from the text alone, fluently, and with no indication that it never saw the picture.
See [Local AI (optional)](local-ai.md) for endpoint overrides, the other runtimes, and troubleshooting.
diff --git a/gitbooks/features/native-tools/README.md b/gitbooks/features/native-tools/README.md
index e332bcdc1d..e75863727e 100644
--- a/gitbooks/features/native-tools/README.md
+++ b/gitbooks/features/native-tools/README.md
@@ -1,8 +1,8 @@
---
description: >-
The full toolset OpenHuman's agent has out of the box - research, code,
- control your machine, schedule jobs, talk back to you, and call into 118+
- third-party services.
+ control your machine, schedule jobs, talk back to you, and call into your
+ connected services.
icon: toolbox
---
@@ -14,7 +14,7 @@ This page is the index. Each subpage covers one family of tools.
## Why ship them natively
-A plugin-only model means tools live in different processes, behind RPC, with their own auth and packaging stories. That's fine for open-ended extensibility, but for the **core** tools every agent needs (read a file, search the web, edit code, set a reminder, join a meeting), shipping them in-process means:
+A plugin-only model means tools live in different processes, behind RPC, with their own auth and packaging stories. That's fine for open-ended extensibility, but for the **core** tools every agent needs (read a file, search the web, edit code, set a reminder, drive a browser), shipping them in-process means:
- Consistent error handling.
- Zero install friction.
@@ -28,16 +28,17 @@ A plugin-only model means tools live in different processes, behind RPC, with th
| [Web Search](web-search.md) | Search the live web via the managed proxy (powered by Exa), backend-proxied Parallel, your own Exa/Brave/Querit/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/patch files, glob, grep, git, lint, test. |
+| [Documents](documents.md) | Write `.docx` and `.pptx`, and read PDF, Word, PowerPoint and Excel back in. |
| [Browser & Computer Control](browser-and-computer.md) | Open URLs, inspect DOM snapshots, click, type, move the mouse. |
| [Cron & Scheduling](cron.md) | Recurring jobs, one-off reminders, scheduled agent runs. |
-| [Voice](voice.md) | Speech-to-text in, text-to-speech out, live Google Meet agent. |
+| [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, over [memory](../memory.md). |
-| [Third-party Integrations](../integrations/README.md) | The agent's view of the [118+ connected services](../integrations/README.md). |
+| [Third-party Integrations](../integrations/README.md) | The agent's view of the [connected services](../integrations/README.md). |
| [Agent Coordination](agent-coordination.md) | Spawn subagents, delegate to skills, plan, ask the user. |
| [System & Utilities](system-and-utilities.md) | Shell, node, SQL, current time, push notifications, LSP. |
## See also
- [Smart Token Compression](../token-compression.md) - what keeps tool output costs bounded.
-- [Third-party Integrations](../integrations/README.md) - the user-facing pitch and OAuth flow for the 118+ catalog.
+- [Third-party Integrations](../integrations/README.md) - the user-facing pitch and OAuth flow for the managed catalog.
- [Privacy & Security](../privacy-and-security.md) - the boundary every tool runs inside.
diff --git a/gitbooks/features/native-tools/agent-coordination.md b/gitbooks/features/native-tools/agent-coordination.md
index 8ff37be46c..3deb5bc5b8 100644
--- a/gitbooks/features/native-tools/agent-coordination.md
+++ b/gitbooks/features/native-tools/agent-coordination.md
@@ -18,12 +18,10 @@ Beyond doing the work, the agent has tools for _organising_ the work - planning
| `list_subagents` / `close_subagent` | Inspect reusable workers for the parent thread or explicitly retire one. |
| `spawn_worker_thread` | Explicit background work tracked as a separate worker thread. |
| `delegate` | Hand a task to a specialist (e.g. an archetype with different prompts/tools/permissions). |
-| `archetype_delegation` | Route to a named archetype - vision, image, video, presentation, workflow builder, etc. |
+| `spawn_parallel_agents` | Fan one task out to several specialists at once and merge what they return. |
| `use_skill` | Load an inline skill's playbook and tools (coding, web3, system, scheduling, docs, mcp) and call them directly. |
-| `skill_delegation` | Hand off to a [skill](../integrations/README.md#skills) installed in the workspace. |
-| `ask_clarification` | Pause and ask the user a precise question instead of guessing. |
+| `ask_user_clarification` | Pause and ask the user a precise question instead of guessing. |
| `plan_exit` | Exit a planning phase and start executing. |
-| `check_onboarding_status` / `complete_onboarding` | Gate behaviour on whether the user has finished onboarding. |
`spawn_subagent` and archetype delegation calls accept an optional `model` field for a one-off exact model pin. If it is omitted, the harness uses config-level per-agent pins when present and otherwise falls back to the normal model-routing hints. Model, sandbox mode, parent thread, action root, and task key are part of reusable sub-agent compatibility, so materially different work gets a separate worker.
diff --git a/gitbooks/features/native-tools/browser-and-computer.md b/gitbooks/features/native-tools/browser-and-computer.md
index 12d17e92b9..c3cb209ea8 100644
--- a/gitbooks/features/native-tools/browser-and-computer.md
+++ b/gitbooks/features/native-tools/browser-and-computer.md
@@ -1,32 +1,103 @@
---
-description: Open URLs, inspect DOM snapshots, click, type, and move the mouse - natively.
+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 picking each step.
icon: display
---
# Browser & Computer Control
-When the agent needs to _use_ your machine the way a person would - open a page, inspect its DOM snapshot, click a button, type a phrase - these tools are how it does it.
+When the agent needs to _use_ a machine the way a person would, open a page, read what is on screen, click a button, type a phrase, these tools are how it does it. Both surfaces come from one loadable module, **TinyComputer**, which serves desktop and browser control over a single interface and is downloaded on first use.
+
+## Two surfaces, one model
+
+Desktop and browser produce the same kind of "screen": a compact list of the things a person could interact with, each with a role, a name, a value, its states, the actions it supports, and the labels of the boxes it sits in, capped at 254 controls. Both offer the same short action list (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 bound 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 since moved into that position. Browser references survive a redraw, because they are marks that last as long as the element is on the page.
## Browser
-- **Open** a URL in an embedded webview the agent can read back from.
-- **Snapshot** the current page's accessibility/DOM structure, including stable element references for later actions.
+The browser is a real Chrome or Chromium, driven over the Chrome DevTools Protocol by a library linked into the module. There is no extra process and no socket.
+
+- **Open** a session: launch a fresh browser (headless or headed), or **attach to the Chrome you already have running**. Attaching matters more than it sounds: plenty of sites turn away a fresh automated browser and serve a person's own. On task end an attached browser is only disconnected, never closed.
+- **Snapshot** the page. The default perception 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. Hidden, zero-size, transparent and disabled things are dropped; things below the fold are marked offscreen and things behind a dialog are marked covered. It falls back to the accessibility tree when it cannot 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, 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 does not prove a file finished.
+
+Screenshots are never returned inline. A reply carries a handle the agent reads in chunks and releases when done.
+
+Sessions are bounded: the module allows up to 8 at once, and OpenHuman keeps at most 6 per conversation thread with a 30-minute idle timeout, so a long chat reuses one browser instead of opening a new one per 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: running apps, windows, displays, Notification Center entries, the clipboard, and screenshots.
+
+Actions go through the accessibility API rather than synthesized input, so by default they do **not** steal focus, move your cursor or touch the pasteboard, and a run can proceed while you use the machine. A "headed" mode and real mouse and key events exist for apps that need them, and are the exception.
+
+For dense apps, a skeleton snapshot caps the walk at three levels and returns structure without leaf detail, which is the difference between tens of thousands of tokens and a few hundred.
+
+## Tasks
+
+Above the primitives 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 immediately with a status, which the agent polls and answers:
+
+| Status | What it means |
+| ----------------- | ----------------------------------------------------------------------- |
+| `running` | Working. |
+| `needs_input` | A field it cannot 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` | Terminal. |
+
+Two properties are worth stating plainly:
+
+- **Reaching a payment page always stops the task.** It becomes a checkpoint that cannot 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 the name, and the value is typed locally into the field.
+
+Page and screen text is treated as data, never as instructions, and the safety rules are plain code rather than model judgement.
+
+## Agent tools
+
+| Tool | What it does |
+| --- | --- |
+| `browser` | Everything above on 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` | Open a URL and get a session back. |
+| `desktop_list_apps`, `desktop_list_windows` | What is running and where. |
+| `desktop_launch` | Start an app. |
+| `desktop_snapshot`, `desktop_find` | Read the screen, or look for one thing on it. |
+| `desktop_goal`, `desktop_continue_goal` | Run a desktop task and answer its stops. |
+
+Irreversible steps go through OpenHuman's [Approval Gate](../approval-gate.md), bound to a digest of the exact action and URL. If no approval gate is installed, the action is **denied**, not allowed.
+
+## 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, because an accessibility API called by an unauthorized process usually returns an *empty tree* rather than an error, which is indistinguishable from an app with no buttons. A missing permission produces a named refusal that says which setting to change.
+
+Linux is not in the shipped surface: the module registry publishes no Linux artifact, so neither desktop control nor browser automation is available there even though the browser engine itself would run.
-The browser surface runs through CEF (Chromium Embedded Framework) and includes a security layer that scopes what pages can do. See [Chromium Embedded Framework](../../developing/cef.md) for the platform details.
+## Settings
-## Computer (mouse + keyboard)
+**Connections → Computer** 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, allowed domains).
-- **Mouse** - move, click, drag.
-- **Keyboard** - type text, send key chords.
-- **Human path** - moves and clicks follow human-like trajectories rather than teleporting, so they don't trip naive bot detection.
+`[desktop] approvals_enabled` defaults to `false`: the core auto-continues the module's confirmation stop after the module re-observes and re-validates the exact target. Setting it `true` turns on an explicit approval card instead. Desktop goal confirmations are single-use and expire after 10 minutes.
## What it's good for
-- Driving sites that don't have an API or a [native integration](../integrations/README.md).
-- Multi-step UI flows where an interactive DOM snapshot provides the next actionable element.
-- Automating local apps from inside a chat.
+- Driving sites that have no API and no [native integration](../integrations/README.md).
+- Multi-step UI flows where each snapshot tells you the next actionable element.
+- 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.
-- [Chromium Embedded Framework](../../developing/cef.md) - the runtime browser layer.
+- [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
index 9d6f3abd54..e90e661356 100644
--- a/gitbooks/features/native-tools/coder.md
+++ b/gitbooks/features/native-tools/coder.md
@@ -13,11 +13,11 @@ The coder family is what makes OpenHuman a viable coding partner instead of a ch
| ---------------- | ----------------------------------------------------------------- |
| `file_read` | Read a file (with line numbers, like `cat -n`). |
| `file_write` | Write a new file. |
-| `edit_file` | Targeted edits - match-and-replace with strict uniqueness checks. |
+| `edit` | Targeted edits - match-and-replace with strict uniqueness checks. |
| `apply_patch` | Apply a unified diff. |
-| `glob_search` | Find files by glob pattern. |
+| `glob` | Find files by glob pattern. |
| `grep` | Ripgrep-style search across the tree. |
-| `list_files` | Walk a directory tree. |
+| `list` | Walk a directory tree. |
| `read_diff` | Diff between two files or revisions. |
| `git_operations` | Status, diff, log, blame, branch, commit. |
| `run_linter` | Run the project's linter. |
@@ -35,7 +35,7 @@ A shell tool plus `cat`/`sed`/`awk` could _technically_ do all of this. The nati
## Workspace scoping
-Filesystem tools respect a workspace boundary - the agent can't read or write outside it without explicit permission. Same boundary the rest of the app uses for `OPENHUMAN_WORKSPACE`.
+Filesystem tools act inside the agent's **working folder** (`action_dir`), not the workspace directory, which holds internal state and is never a tool target. With the autonomy policy on, `workspace_only` confines them to that folder and anything outside it needs an explicit trusted root. With the policy off (the default) that confinement is not enforced, and the thing that still holds either way is the hard floor: 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
diff --git a/gitbooks/features/native-tools/documents.md b/gitbooks/features/native-tools/documents.md
new file mode 100644
index 0000000000..1b14f613a7
--- /dev/null
+++ b/gitbooks/features/native-tools/documents.md
@@ -0,0 +1,64 @@
+---
+description: >-
+ Write .docx and .pptx files, and read PDF, Word, PowerPoint and Excel 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 loadable module rather than in the app binary, which is why the writers' dependencies are in no OpenHuman build.
+
+## Writing
+
+| Tool | Produces |
+| --- | --- |
+| `generate_document` | A `.docx` from a structured spec: title, author, headings, paragraphs, bullet lists. |
+| `generate_presentation` | A `.pptx` from slides: titles, bullets, images. |
+
+The spec is validated before anything is written, and the limits are part of the contract rather than advice:
+
+| `.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 aggregate character cap is the load-bearing one: sections times paragraphs times characters per paragraph would otherwise allow a spec that no reader could open.
+
+The finished file arrives as an [artifact](../chat.md), so it shows up 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 text with per-section provenance (a page number for a PDF, 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, which is a suggestion for vision, not a claim that OCR is needed. |
+| DOCX, PPTX, XLSX | Slide and sheet order comes from the file's own relationship manifest, so an unreferenced slide is excluded rather than guessed at by filename. Spreadsheets read shared and inline strings and use cached cell values; formulas are never evaluated. |
+
+Bounds: 64 MiB in, 256 result sections, 200,000 bytes of text out, and the result says whether it was truncated. Text is never cut mid-character. Rendering PDF pages to images is opt-in per page, 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: a signed native library downloaded on first use and verified against a SHA-256 pinned in the compiled registry. The consequence worth knowing is that the document writers and the PDF reader are **not** in OpenHuman's dependency graph in any build configuration, and with the `documents` feature off the two tools are simply absent from the agent's list rather than present and failing, while a PDF attachment degrades to a file reference instead of extracted text.
+
+## See also
+
+- [Image & Video Generation](media-generation.md): the other thing that produces a file.
+- [Memory](../memory.md): where a read 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
index 04de405c69..94ee165e1f 100644
--- a/gitbooks/features/native-tools/image-tools.md
+++ b/gitbooks/features/native-tools/image-tools.md
@@ -1,115 +1,43 @@
-# Image Tools
-
-OpenHuman's image contract gives agents a stable way to reason about
-image generation and local image inspection without tying the prompt surface to a
-single provider runtime.
-
-## Scope
-
-The contract lives in the top-level `crates/openhuman-core/src/media/image/` module and
-currently covers two model-facing tools:
-
-| Tool | Purpose | Permission | Output |
-| ------------------ | --------------------------------------------------------- | ---------- | ------------------------------------- |
-| `image_generation` | Generate or edit raster images from a prompt. | Write | Local generated-media artifact paths. |
-| `view_image` | Load a local image file into model-visible image context. | Read-only | Image content visible to the model. |
-
-This layer is intentionally high level. Existing lower-level tools still own
-their concrete behavior:
-
-- `image_info` reads local image metadata and optional base64 text.
-- Agent multimodal preparation normalizes `[IMAGE:...]` markers for providers
- that accept image data.
-
-The image layer defines names, schemas, gating, and prompt rules so
-agents can make consistent decisions as runtimes add direct support.
-
-## `image_generation`
+---
+description: >-
+ The reading side of images: attachments the model can see natively, local
+ image metadata, and which model handles vision.
+icon: image
+---
-`image_generation` is a hosted provider capability. The Rust core should not
-pretend to be an image renderer when no provider supports it. When enabled, the
-runtime should:
-
-1. Validate any `input_image_path` through the same local-file policy used for
- image viewing.
-2. Send the prompt and optional edit image to the hosted image provider.
-3. Persist returned bytes under a session-scoped generated-media root, or under
- an approved caller-provided `output_path`.
-4. Return saved artifact paths so the final assistant answer can reference them.
-
-The schema includes `prompt`, optional `output_path`, optional `size`, optional
-`input_image_path`, and `output_format` (`png`, `webp`, `jpeg`).
-
-## `view_image`
-
-`view_image` loads pixels from a local file into model-visible context. Use it
-when text metadata is insufficient: screenshots, UI review, OCR, diagrams,
-charts, visual diffs, and generated-image inspection.
-
-The runtime must keep local file boundaries explicit:
-
-- Allow paths in the approved workspace.
-- Allow paths created during the current session.
-- Allow paths explicitly referenced by the user or trusted tool output.
-- Deny paths outside policy, and do not silently attach unrelated local images.
-
-The schema includes `path` and optional `detail` (`auto`, `high`, `original`).
-Use `original` only when full-resolution inspection is necessary.
+# Image Tools
-## Prompt Guidance
+Generating images is [Image & Video Generation](media-generation.md). This page is the other direction: getting an image *into* a turn so the model can look at it.
-Prompt rendering should include image guidance only when at least one
-media tool is enabled. The guidance should tell agents:
+## Attaching an image
-- Use `view_image` when pixels are needed, not for ordinary file metadata.
-- Use `image_generation` for requested raster image creation or edits.
-- Provide an output path when the destination matters.
-- Mention generated artifact paths in final answers.
-- Respect local image boundaries before attaching a file to model context.
+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:
-## Tests
+- If the model's facts say it accepts that modality **and** the transport supports it, the image goes up natively as image content.
+- If not, it degrades rather than failing: a bounded readout, or a reference to the file with its path and metadata, so the agent can still reason about it and tell you what it cannot see.
-The module has focused Rust tests for:
+Uploads are preserved in the acting workspace across a restart, and the ordered references survive in the transcript, so a later turn can still refer to "the second screenshot".
-- JSON schema shape for `image_generation`.
-- JSON schema shape for `view_image`.
-- Independent gating of generation vs local viewing.
-- End-to-end contract rendering from config to specs and prompt guidance.
+## `image_info`
-Future runtime PRs should add provider-specific execution tests next to the
-runtime adapter, not in the hosted contract module.
+One tool, read-only: it reads a local image's metadata (format, dimensions, size) and can return its bytes as base64 text for a model that wants them inline. It is the tool to reach for when the question is "what *is* this file", and it does not need a vision model.
-## Media generation (GMI): image and video tools
+## Which model sees it
-Separate from the high-level `image_generation` contract above, the
-`crates/openhuman-core/src/media/generation/` domain ships **wired, executing** tools that
-generate images and video through the OpenHuman backend's `media_generation`
-provider (GMI Cloud: Seedream, SeedEdit, Seedance, Veo).
+Vision is a workload with its own provider slot, so you can route it independently of chat:
-| Tool | Purpose | Permission | Output |
-| ---------------------- | ---------------------------------------------------------------- | ---------- | ----------------------------------------- |
-| `media_generate_image` | Text-to-image / image-to-image via GMI. | Execute | Local file path under `generated-media/`. |
-| `media_generate_video` | Text-to-video / image-to-video via GMI. | Execute | Local file path under `generated-media/`. |
-| `media_list_models` | List the curated model catalog (and optionally GMI's live list). | Read-only | Model ids + pricing. |
+```toml
+vision_provider = "…" # a provider id, or leave unset to use the chat provider
+```
-How it works:
+If a configured vision model turns out to be chat-only, the call returns a named error rather than silently substituting another model. There is deliberately no default local vision model: a local setup has to name one. [Local models and BYOK](../model-routing/local-and-byok-models.md) lists the ones worth trying.
-- Generation is asynchronous. The tool submits to the backend (which charges on
- submit and returns a request id), then **blocks with progress**, polling until
- the request reaches a terminal state.
-- GMI returns expiring signed URLs; the tool downloads each artifact into the
- agent's `generated-media/` directory and returns a stable local file path.
-- The backend owns provider keys, billing, and rate limiting
- (`/agent-integrations/media-generation/*`, see `backend/docs/media-generation.md`).
+## Delegation
-### Image & video sub-agents
+A turn that needs to look at several images, or to work through one carefully, is usually handed to the built-in vision sub-agent rather than done inline, so the main conversation does not carry every pixel of context. Delegation happens on the agent's own judgement; you do not have to ask for it.
-Two specialist sub-agents wrap these tools and are reachable from the
-orchestrator via delegation:
+## See also
-- **`image_agent`** (`delegate_create_image`) owns prompt craft, model
- selection, and saving generated images. It rides the multimodal `vision` workload route
- tier so it can inspect what it produces.
-- **`video_agent`** (`delegate_create_video`) owns text-to-video and
- image-to-video. It sets expectations that generation can take minutes and
- blocks until the clip is saved.
+- [Image & Video Generation](media-generation.md): making images and video rather than reading them.
+- [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
index ef7fb1920b..ec1c939a3d 100644
--- a/gitbooks/features/native-tools/integrations.md
+++ b/gitbooks/features/native-tools/integrations.md
@@ -1,11 +1,11 @@
---
-description: The agent's view of the 119+ connected third-party services.
+description: The agent's view of the connected third-party services.
icon: plug
---
# Third-party Integrations
-OpenHuman's agent can call into [119+ third-party services](../integrations/README.md) - Gmail, Notion, GitHub, Slack, Lark / Feishu, Stripe, Calendar, and the long tail - through a single proxied tool surface.
+OpenHuman's agent can call into [the connected third-party services](../integrations/README.md), Gmail, Notion, GitHub, Slack, Lark/Feishu, Stripe, Calendar and the long tail, through a single proxied tool surface.
## How it shows up to the agent
diff --git a/gitbooks/features/native-tools/media-generation.md b/gitbooks/features/native-tools/media-generation.md
index 687412bd3e..bf314d1a17 100644
--- a/gitbooks/features/native-tools/media-generation.md
+++ b/gitbooks/features/native-tools/media-generation.md
@@ -29,6 +29,6 @@ Prompts and reference media for these tools are sent to the OpenHuman backend an
## See also
-- [Image Tools](image-tools.md) covers the _vision_ side: reading and analyzing images.
-- [Available Tools](./) lists the full native toolbelt.
+- [Image Tools](image-tools.md) covers the reading side: attachments, image metadata, and the vision model slot.
+- [Available Tools](README.md) lists the full native toolbelt.
- [Billing, Cost & Usage](../billing-and-usage.md) explains how media jobs are metered.
diff --git a/gitbooks/features/native-tools/system-and-utilities.md b/gitbooks/features/native-tools/system-and-utilities.md
index 61a667d671..a50b7926dd 100644
--- a/gitbooks/features/native-tools/system-and-utilities.md
+++ b/gitbooks/features/native-tools/system-and-utilities.md
@@ -19,7 +19,7 @@ The catch-all family. Small, sharp tools the agent reaches for to round out a ta
| `schedule` | One-shot "do this once at time T" - for recurring jobs see [Cron](cron.md). |
| `pushover` | Send a push notification to your devices. |
| `lsp` | Query a language server (definitions, references, diagnostics). |
-| `workspace_state` | Inspect the current workspace - open files, recent edits, environment. |
+| `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` | Self-reflection - what tools have been used in this session and how often. |
diff --git a/gitbooks/features/native-tools/voice.md b/gitbooks/features/native-tools/voice.md
index 66670a002e..0526193cb6 100644
--- a/gitbooks/features/native-tools/voice.md
+++ b/gitbooks/features/native-tools/voice.md
@@ -1,13 +1,13 @@
---
description: >-
- Native voice - speech-to-text in, text-to-speech out, mascot lip-sync,
- and a live Google Meet agent that listens and speaks.
+ Native voice: speech-to-text in, text-to-speech out, mascot lip-sync, and a
+ live voice agent you can interrupt mid-sentence.
icon: microphone
---
# Voice
-OpenHuman is voice-first when you want it to be. STT, TTS, and the live Google Meet agent are part of the core, not a third-party plugin.
+OpenHuman is voice-first when you want it to be. Dictation, reply speech and the live voice agent are part of the core, not a third-party plugin.
## Speech-to-text
@@ -38,21 +38,20 @@ Choose how Tiny's voice runs under **Connections → Voice agents**:
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.
-## Live Google Meet agent
+## Privacy
-OpenHuman's flagship voice integration:
+- Audio capture is local. Streaming STT goes through the OpenHuman backend; no recording is retained beyond the live transcript.
+- TTS audio is streamed and discarded: nothing stored.
+- What you and the agent say in a live session is saved to the open conversation, and so reaches your memory engine on the same terms as typed chat, when memory is on.
-- Joins a Google Meet via the embedded webview.
-- Streams audio out to STT in real time, transcribes everyone in the call, and writes structured notes into the [Memory](../memory.md) as the meeting progresses.
-- When you ask it to speak (or it decides it has something useful to add), it generates audio through the TTS model and **plays it back into the meeting as an outbound camera/mic stream**, so other participants actually hear it.
+There is no local speech-to-text engine. The bundled whisper build was removed; STT is either the hosted route or a third-party API you bring a key for. Text-to-speech still has a local option (Piper).
-## Privacy
+## Removed
-- Audio capture is local. Streaming STT goes through the OpenHuman backend; no recording is retained beyond the live transcript.
-- TTS audio is streamed and discarded - nothing stored.
-- Meeting transcripts are stored as conversations in your memory engine, when memory is on.
+The **live Google Meet agent** is gone. It joined a call through the old embedded Chromium webview, transcribed it into memory and spoke back as an outbound camera stream. The frontend surface, the `agent_meetings` domain and the join path were all removed; nothing in the shipped build joins a meeting. The second mascot and its per-mascot voice (the "meeting duo") survive as [mascot](../mascot/README.md) settings.
## See also
-- [Memory](../memory.md) - where Meet transcripts and notes live.
-- [Automatic Model Routing](../model-routing/) - Meet's brain uses `hint:fast` for low-latency conversational turns.
+- [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
index b5785cbcb6..2d0d879eba 100644
--- a/gitbooks/features/native-tools/web-scraper.md
+++ b/gitbooks/features/native-tools/web-scraper.md
@@ -1,31 +1,78 @@
---
-description: A purpose-built "GET-and-read" tool that returns clean text, not raw HTML.
+description: >-
+ The `web_fetch` tool: a single-purpose GET-and-read primitive that returns a
+ page as Markdown rather than raw HTML, behind an allowlist and an SSRF guard.
icon: globe
---
# Web Scraper
-A purpose-built fetch tool, separate from generic `http_request` / `curl`. It exists because the agent doesn't want raw HTML - it wants the _article_.
+`web_fetch` is the agent's GET-and-read primitive, deliberately separate from `http_request` and `curl`. It exists because the agent rarely wants the markup: it wants the page. HTML comes back converted to Markdown, with links kept and scripts dropped.
-## What it does
+Reach for `http_request` instead when you need POST, custom headers or richer HTTP semantics, and for `curl` when the point is to stream a file to disk.
-- Fetches a URL.
-- Strips boilerplate (nav, ads, footer, scripts).
-- Returns clean text the agent can reason over.
+---
+
+## 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 | Return the body exactly as sent, skipping Markdown conversion. |
+| `summary_focus` | No | An OpenHuman addition that steers the [TokenJuice](../token-compression.md) summary toward a topic. |
+
+The tool is read-only and never prompts for approval. Parallel `web_fetch` calls are safe, since a GET is idempotent.
+
+Conversion is driven by the response `Content-Type`, falling back to content sniffing when the header is absent. A response that is explicitly not HTML is returned verbatim.
+
+---
+
+## 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()` |
-## Guardrails
+The first two are the shipped defaults in `crates/openhuman-core/src/config/schema/tools/http.rs` and are shared with `http_request`. A `0` in either key is treated as unset and falls back to the default, so a stale zero cannot disable every fetch.
-- Caps response at 1 MB - large pages get truncated, not silently dropped.
-- 20-second timeout - slow servers don't stall the conversation.
-- Subject to the same proxy and URL-guard rules as other network tools.
+Two behaviours are worth knowing:
+
+- **Oversize pages are truncated, not dropped.** The body is cut at a character boundary, never mid-character, and the result header records `download_capped_at=<N>B` so the agent knows it is looking at a partial page. The cap bounds what reaches the model rather than what is downloaded, since the response is read before it is trimmed. Streaming with a hard download ceiling is `curl`'s job, not this tool's.
+- **Past 24,000 characters the remainder is not discarded.** The full extracted page is spilled to 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 as a result naming its `Location` and leaves the decision to the agent. Re-calling `web_fetch` with that URL runs the whole guard again from scratch rather than inheriting the first call's approval.
+
+---
+
+## The allowlist and the URL guard
+
+Every fetch passes `tinytools-std`'s URL guard (`vendor/tinyagents/vendor/tinytools/crates/tinytools-std/src/url_guard/`) before any connection is made. It is the same gate `http_request` and `curl` use.
+
+**Shape.** Only `http` and `https` are accepted. URLs carrying whitespace, a backslash, userinfo (`user:pass@`), a percent-encoded authority, or an IPv6 literal host are rejected outright.
+
+**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 rather than open. Narrow it from 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: loopback, RFC1918 private, link-local (which covers the cloud metadata address `169.254.169.254`), CGNAT, the 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 even looked up. Rate limiting applies, and the egress disclosure spine records the destination host before the request leaves.
+
+---
## What it's good for
-- Reading articles, blog posts, docs pages, GitHub READMEs without the noise.
+- Reading articles, documentation pages and GitHub READMEs without the surrounding noise.
- Following up on a [Web Search](web-search.md) result.
-- Summarising a single page on demand.
+- Summarising a single known page on demand.
+
+---
## See also
-- [Web Search](web-search.md) - find URLs to feed into the scraper.
-- [Smart Token Compression](../token-compression.md) - what trims long pages before they hit the model.
+- [Web Search](web-search.md): finds the URLs to feed this tool, and owns the allowed-websites list.
+- [Smart Token Compression](../token-compression.md): what trims a long page before it reaches the model.
+- [Browser & Computer Control](browser-and-computer.md): for pages that need clicking rather than reading.
+- [Privacy & 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
index 1cad711cdd..fa9ee981ed 100644
--- a/gitbooks/features/native-tools/web-search.md
+++ b/gitbooks/features/native-tools/web-search.md
@@ -49,7 +49,7 @@ Every provider has a **route**:
| -------- | ------------------ | ------------------------- | ----------------------------------------------------------------------------------------------------- |
| 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 | Included | Search, contents | Off by default. |
+| 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. |
diff --git a/gitbooks/features/notifications-and-activity.md b/gitbooks/features/notifications-and-activity.md
index 16a22f92db..daa674bcbf 100644
--- a/gitbooks/features/notifications-and-activity.md
+++ b/gitbooks/features/notifications-and-activity.md
@@ -1,20 +1,22 @@
---
description: >-
- The notification center, the Activity transparency hub, and the Routines
- scheduler: everything OpenHuman tells you about, and everything it does in
- the background.
+ The notification center, the quiet notice tray, and where background work
+ now surfaces: everything OpenHuman tells you about, and everything it does
+ while you are not watching.
icon: bell
---
# Notifications & Activity
-OpenHuman surfaces two kinds of "what's happening" in one place: **notifications** (things you should look at, like an important Slack message, a failed webhook, or a high-priority email) and **activity** (a transparent ledger of what the agent did on its own while you weren't watching). This page covers the notification center, the Activity hub that fronts it, and the Routines screen for managing scheduled automations.
+OpenHuman surfaces two kinds of "what's happening": **notifications** (things you should look at, like an important Slack message, a failed webhook, or a high-priority email) and **activity** (a ledger of what the agent did on its own while you weren't watching).
+
+Both live on the **Notifications** page. There is no longer an Activity hub or a Routines screen: `/activity` and `/routines` are back-compatibility redirects, and what they used to front moved to the Notifications page and to [Workflows](workflows.md) respectively.
---
## Notification Center
-The notification center is fed by two independent streams that render side by side under **Activity → Alerts**.
+The notification center is fed by two independent streams, which render as two stacked sections on the Notifications page.
### Integration notifications
@@ -44,7 +46,7 @@ The second stream translates selected internal events into compact, user-facing
| Notification triaged | Agents | Only when routed (`escalate`/`react`) |
| API key rejected | System | Always; links to the LLM settings tab |
-The category set the notification center understands is **messages, agents, skills, system, meetings, reminders, important**. The Alerts view shows a filter chip row, but only for categories that actually appear in the current feed, plus **Mark all read** and **Clear**. Clicking a notification marks it read and follows its deep link. Some core notifications carry **action buttons** (e.g. a meeting auto-join prompt) and are pinned to the top of the center.
+The category set the notification center understands is **messages, agents, skills, system, meetings, reminders, important**. The page shows a filter chip row, but only for the categories that actually appear in the current feed, plus **Mark all read** and **Clear**. Clicking a notification marks it read and follows its deep link. Some core notifications carry **action buttons** and are pinned to the top. The feed holds the most recent 200 items.
### Per-provider routing & thresholds
@@ -58,35 +60,32 @@ Every provider has its own settings (`notification.settings_set`), letting you t
Auto-routing re-reads the provider's settings the moment before escalating, so toggling a setting mid-flight takes effect immediately. A notification is only routed to the agent when its score clears the provider threshold **and** `route_to_orchestrator` is enabled.
----
+These per-provider settings have no UI today: the page that edited them was removed, so they are set through the RPC or by hand. The per-category preferences gate **ingest**, not just display, which is worth knowing before changing one.
-## Activity hub
+---
-The Activity surface (`/activity`) is the transparency layer over everything the agent does without you in the loop. It has two tabs:
+## The notice tray
-| Tab | What it shows |
-| --------------- | ---------------------------------------------------------------------- |
-| **Automations** | Workflows the agent runs on your behalf (the workflows panel) |
-| **Alerts** | The notification center described above (integration + system streams) |
+Separate from the notification center, a quiet tray in the bottom-right corner collects **things you can act on**: a provider key that was rejected, a plan limit reached, a keyring consent prompt. It replaced the full-width banners that used to push the chat down. Repeats of the same problem bump a count rather than stacking, and the tray is in-memory, so it clears on restart.
-The tab is URL-backed (`/activity?tab=…`), so navigating away and back restores the one you were on. Older deep links (`?tab=memory`, `?tab=agents`, `?tab=council`, `?tab=tasks`, …) are no longer visible tabs: they live under Settings → Developer & Diagnostics and fall back to the Automations tab.
+Product announcements arrive separately again, as a modal shown once per signed-in session, with the ids you have already seen remembered.
---
-## Routines
-
-Routines (`/routines`) is the user-facing management UI for scheduled automations. It is the desktop face of the cron system. Jobs are sorted by next-run time, each rendered as a card showing:
-
-- The schedule, rendered human-readable (e.g. "every day at 9am") from its cron expression.
-- The job **type** badge: _agent_ (runs a prompt through the agent) or _command_.
-- The **next run** time (when enabled) and the **last run status** dot. Sage means success, coral means failure, and neutral means it has not run yet.
-- A toggle to **enable/disable** the routine, a **Run Now** button for manual triggering (it polls until the run lands), and an expandable **run history**.
+## Where background work surfaces
-Routines surface and manage the scheduled jobs; the underlying scheduling engine, cron syntax, and the agent tools for creating jobs programmatically are covered on the [Cron / scheduled tasks](native-tools/cron.md) page. Completed and failed runs also emit Agents-category notifications into the center described above.
+| Kind of background work | Where to look |
+| --- | --- |
+| Scheduled jobs and their run history | **Workflows → Schedules**. See [Cron & Scheduling](native-tools/cron.md). |
+| Workflow runs | **Workflows → Runs** |
+| Memory belief builds and source syncs | **Connections → Brain → Background** |
+| Detached sub-agents and async delegation | The background inbox card in the thread that started them. See [Chat](chat.md). |
+| Everything above, as notifications | The Notifications page, Agents category |
---
## See also
-- [Cron / scheduled tasks](native-tools/cron.md) covers the scheduling engine and agent tools behind Routines.
-- [Triggers](integrations/triggers.md) covers webhooks and inbound events that can raise notifications.
+- [Cron & 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
index fed08a2b42..502c3dff4a 100644
--- a/gitbooks/features/orchestration.md
+++ b/gitbooks/features/orchestration.md
@@ -30,9 +30,11 @@ The orchestrator spawns specialized sub-agents (up to 3 levels deep), reuses com
Inbound traffic hits a **fast reflex agent** that triages in seconds and hands a deep **reasoning core** a concise brief; the core does the multi-step work and delegates to workers. Mid-task steering input can be delivered into a live session, and 20:1 compression keeps week-long sessions bounded.
-## What's next: RLMs
+## What's next
-The direction we're building toward: **Rhai-backed language workflows**. These are agents that express orchestration as small programs in a sandboxed REPL, rather than a fixed graph, so control flow itself becomes something the model writes, inspects, and repairs. The graph engine, checkpointing, and trust model above are the substrate for it.
+The scripted-orchestration idea this page used to advertise, 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. The substrate above, graphs with checkpointing under a trust model, is the shape orchestration takes.
+
+What is tracked in the open instead: an [agent-to-agent protocol](https://github.com/tinyhumansai/openhuman/issues/3463) so a graph can span instances, and durable swarm task graphs. See the [roadmap](../overview/roadmap.md).
---
diff --git a/gitbooks/features/os-keyring-and-secret-storage.md b/gitbooks/features/os-keyring-and-secret-storage.md
index 56ce1b5b1e..742f1e82ea 100644
--- a/gitbooks/features/os-keyring-and-secret-storage.md
+++ b/gitbooks/features/os-keyring-and-secret-storage.md
@@ -1,4 +1,7 @@
---
+description: >-
+ The OS keyring as root of trust: what is stored there, what is encrypted on
+ disk beside it, and what the consent prompt is asking for.
icon: key
---
diff --git a/gitbooks/features/personalization.md b/gitbooks/features/personalization.md
index 54110b24cf..7d1133b5f1 100644
--- a/gitbooks/features/personalization.md
+++ b/gitbooks/features/personalization.md
@@ -27,5 +27,5 @@ How the agent presents itself (`SOUL.md`, `IDENTITY.md`, `ROLE.md` in your works
- [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.
-- [Goals & To-dos](goals-and-todos.md), the agent's in-session work tracking.
+- [Goals & Todos](goals-and-todos.md), the agent's in-session work tracking.
- [Cron & Scheduling](native-tools/cron.md), the scheduled runs that keep working your workspace between turns.
diff --git a/gitbooks/features/platform.md b/gitbooks/features/platform.md
index b674802ad0..8a5ac2da53 100644
--- a/gitbooks/features/platform.md
+++ b/gitbooks/features/platform.md
@@ -52,24 +52,24 @@ OpenHuman is built as a native application rather than a web wrapper for three r
## Architecture at a glance
-```
-┌──────────────────────────────────────────────────┐
-│ Tauri shell - windowing, OS integration │
-└──────────────────────────────────────────────────┘
- │ JSON-RPC ↕
-┌──────────────────────────────────────────────────┐
-│ Rust core (`openhuman` sidecar) │
-│ • Memory, integrations, source sync │
-│ • Model router, TokenJuice, native tools │
-│ • Voice (STT in, TTS out, Meet agent) │
-└──────────────────────────────────────────────────┘
- │
-┌──────────────────────────────────────────────────┐
-│ React frontend - screens, navigation │
-└──────────────────────────────────────────────────┘
+```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 is a delivery vehicle (windowing, process lifecycle, IPC). All product logic lives in the Rust core. The React frontend talks to the core over JSON-RPC. See [Architecture](../developing/architecture/) for the full picture.
+The shell is a delivery vehicle (windowing, process lifecycle, IPC). All product logic lives in the Rust core, which runs as a tokio task **inside** the shell process rather than as a separate binary the shell launches. The React frontend talks to it over JSON-RPC on loopback. See [Architecture](../developing/architecture/README.md) for the full picture.
---
@@ -81,8 +81,9 @@ configured with that core URL and bearer token.
A private browser UI is possible for development/preview by serving the Vite
frontend and pointing it at the remote core, but it is not a full replacement
-for the desktop shell. Native deep links, tray controls, OS keychain access, CEF
-account scanners, and screen/window integrations still require the Tauri app.
+for the desktop shell. Native deep links, tray controls, OS keychain access, the
+native iMessage scanner, and screen and window integrations still require the
+Tauri app.
See [Cloud Deploy](cloud-deploy.md#remote-ui-choices) for the current remote UI
setup.
@@ -104,4 +105,4 @@ Source sync and live LLM calls require connectivity. When the network returns, t
## Auto-update
-The desktop shell auto-updates itself via Tauri's updater plugin against a manifest published on GitHub Releases. The OpenHuman core sidecar ships inside the same bundle, so a shell update upgrades both.
+The desktop shell auto-updates itself via Tauri's updater plugin against a manifest published on GitHub Releases. The core is linked into the shell, so a shell update upgrades both; there is no separate core update. 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
index 0558202bb7..d79729fb48 100644
--- a/gitbooks/features/privacy-and-security.md
+++ b/gitbooks/features/privacy-and-security.md
@@ -1,4 +1,7 @@
---
+description: >-
+ What stays on your machine, what the backend brokers, and which of these
+ layers are enforced by default.
icon: shield
---
@@ -34,9 +37,9 @@ OpenHuman is designed so that the **memory of your life lives on your machine**.
| | |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| **LLM calls** | Proxied through the backend under one subscription, then forwarded to the underlying provider (Anthropic / OpenAI / Google / etc.) per the [model router](model-routing/). |
-| **Web search proxy** | The native [web search tool](native-tools/web-search.md) uses the backend proxy by default, currently powered by [Exa](https://exa.ai), so you don't carry a search API key. With your own Exa, Brave, Querit, or Tavily key, queries go directly to that provider; Parallel remains routed through the OpenHuman backend. With Tavily selected, the `tavily_extract` tool also sends extraction requests — including the URLs being extracted — directly to Tavily. If you call the optional SearXNG tool, that query goes to your configured SearXNG instance instead. |
-| **Integration OAuth & tool proxy** | Token storage and rate-limited request brokering for [118+ integrations](integrations/README.md). |
+| **LLM calls** | Proxied through the backend under one subscription, then forwarded to the underlying provider (Anthropic / OpenAI / Google / etc.) 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 don't 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, and 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 & tool proxy** | Token storage and rate-limited request brokering for [the connected integrations](integrations/README.md). |
| **TTS streaming** | Hosted [text-to-speech](native-tools/voice.md) audio streams. Audio is generated and discarded - not retained. |
---
@@ -61,17 +64,15 @@ Memory only helps if it is safe to keep. Every item passes through secret and PI
Scrubbing and scoped retrieval together become the privacy architecture.
-<figure><img src="../.gitbook/assets/V17 — Privacy [email protected]" alt=""><figcaption></figcaption></figure>
-
## Security
**Encrypted in transit.** All communication between the application and the OpenHuman backend uses TLS. No data travels in plain text.
**Key in keyring, ciphertext on disk.** For local secrets that must be persisted in app files, OpenHuman stores encrypted ciphertext on disk and keeps the master decryption key in the OS keyring. See [OS Keyring & Secret Storage](os-keyring-and-secret-storage.md).
-**Sandboxed skills.** Each skill runs in its own isolated execution environment with enforced memory and resource limits. Skills cannot access each other's data, the host system's file system, or your credentials.
+**Sandboxed execution.** Shell and code the agent runs goes 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 separately sandboxed: the in-app JavaScript sandbox was removed, and a skill now runs as its own agent session subject to the same execution policy as any other turn.
-**Workspace-scoped tools.** The native [filesystem tools](native-tools/coder.md) operate within the workspace the user opens; they do not have ambient access to the rest of the disk.
+**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.
diff --git a/gitbooks/features/privacy-mode.md b/gitbooks/features/privacy-mode.md
index 4e3c94a2b4..9f7a56ee59 100644
--- a/gitbooks/features/privacy-mode.md
+++ b/gitbooks/features/privacy-mode.md
@@ -38,9 +38,9 @@ Inference is no longer the only chokepoint. `local_only` is also enforced at the
One deliberate exemption: backend **control-plane** round-trips (sign-in, session, team, billing, and the integration connection-management and catalog reads) keep flowing, because 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` - 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.
+**Voice is not covered.** There is no local speech-to-text engine, so dictation and transcription still leave the device under `local_only`: 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 orthogonal to the [autonomy tiers](privacy-and-security.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.
+Privacy Mode governs **data egress**. It is orthogonal to 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
diff --git a/gitbooks/features/settings.md b/gitbooks/features/settings.md
new file mode 100644
index 0000000000..eabfd788e8
--- /dev/null
+++ b/gitbooks/features/settings.md
@@ -0,0 +1,82 @@
+---
+description: >-
+ The settings surface: what each panel controls, where the autonomy tier
+ actually lives, and which old addresses now redirect into Connections.
+icon: gear
+---
+
+# Settings
+
+Settings is a two-pane screen: a grouped rail on the left, one panel on the right. It holds the things that change how the app behaves. Things that change what the agent can *reach* live 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, licences, and the capability catalogue. |
+
+**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 colours, 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 colours, 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 & 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
+
+Not in Agent access, which is the first place everyone looks.
+
+The tier itself (`readonly`, `supervised`, `full`) has no user-facing control: the panel holding the radios is a developer-only deep link. Set it in `config.toml` instead:
+
+```toml
+[autonomy]
+enabled = true # off by default; nothing below applies until this is true
+level = "supervised"
+```
+
+`[autonomy] enabled` is `false` out of the box, which means Agent access's trusted roots, the always-allow list and the workspace-only switch are all inert until you turn the policy on. [Approval Gate](approval-gate.md) explains the whole model, including what stays enforced either way.
+
+## Redirects
+
+Roughly three times as many settings routes redirect as render, because the panels moved into [Connections](connections.md) and the addresses were kept working. Notable ones:
+
+| Old address | Now |
+| --- | --- |
+| `/settings/llm`, `/settings/embeddings`, `/settings/voice`, `/settings/search` | Connections, the matching API-keys tab |
+| `/settings/agents/*`, `/settings/tools` | Connections → Agent tools |
+| `/settings/memory-*`, `/settings/intelligence` | Connections → Brain |
+| `/settings/mcp-server`, `/settings/skills-runner` | Connections → MCP, Connections → Skills |
+| `/settings/wallet-balances` | Connections → Wallet |
+| `/settings/cron-jobs` | Workflows → Schedules |
+| `/settings/automations` | Workflows |
+| `/settings/team`, `/settings/billing`, `/settings/notifications`, `/settings/devices`, `/settings/language` | Settings → Account |
+
+## Not here yet
+
+There is no search across settings: the global search bar was removed, and the per-entry keywords are no longer read by anything. 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 & Security](privacy-and-security.md): the posture behind the privacy panel.
diff --git a/gitbooks/features/theming.md b/gitbooks/features/theming.md
index 9d46d1727d..7b4ebd9b5d 100644
--- a/gitbooks/features/theming.md
+++ b/gitbooks/features/theming.md
@@ -1,63 +1,168 @@
---
description: >-
- Five built-in theme families, light/dark/auto variants, and a full visual
- Theme Studio - make OpenHuman look the way you want.
+ Five theme families with light, dark and auto variants, a visual Theme Studio
+ for colours, fonts and backdrops, and Appearance controls for text size,
+ corner rounding and borders.
icon: palette
---
# Themes & Theme Studio
-OpenHuman is fully re-skinnable at runtime. Pick from built-in themes, switch light/dark/auto, or open the **Theme Studio** to design your own. Every change applies instantly and persists locally, no restart required.
+OpenHuman is re-skinnable at runtime. Every change applies instantly and persists locally, with 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/auto, every colour token, fonts per role, the backdrop, and custom-theme management |
---
## Built-in themes
-Five theme families ship out of the box, each with light and dark variants:
+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 |
-| Family | Feel |
-| ------------ | ---------------------------------------- |
-| **Classic** | The default OpenHuman look. |
-| **Ocean** | Cool blues around the `#4A83DD` primary. |
-| **Sepia** | Warm, paper-like, easy on the eyes. |
-| **Matrix** | High-contrast green-on-black. |
-| **HAL 9000** | Deep black with a red accent. |
+Each family is applied as **Light**, **Dark** or **Auto**. Auto follows your operating system's `prefers-color-scheme` and re-applies live the moment you flip the OS between light and dark, with no reload.
-Each can be applied as **Light**, **Dark**, or **Auto**. Auto follows your operating system's `prefers-color-scheme` setting and re-applies live the moment you flip your OS between light and dark, with no reload.
+Classic carries no colour or font overrides of its own on purpose: it is the palette defined in `app/src/styles/tokens.css`, selected by nothing more than the light/dark switch.
---
-## Theme Studio
+## Colours
-**Settings → Theme Studio** is a full visual editor. From it you can:
+The Theme Studio exposes every colour token, grouped as **Surfaces**, **Text**, **Borders** and **Accent colours**. The four accent ramps (primary, sage, amber, coral) show their `500` shade by default and expand to all eleven shades from `50` to `950`.
-- **Pick a family** from a gallery of theme tiles (built-ins plus your own custom themes).
-- **Adjust every colour token** with colour pickers: surfaces, text, borders, and accent ramps. A live **contrast warning** flags when text-on-background luminance drops below a readable threshold.
-- **Swap fonts per role**: title, heading, body, mono, and serif can each use a different family.
-- **Configure the backdrop**: an animated WebGL mesh, a flat colour, or a custom image, with an optional dotted overlay.
-- **Manage custom themes**: create, edit, reset, delete, and **export / import as JSON** to share a theme with someone else.
+Each token is stored as a space-separated RGB channel triple such as `255 255 255`, not a hex string, because Tailwind wraps every token as `rgb(var(--token) / <alpha-value>)` so opacity modifiers like `bg-surface/50` keep working. The reasoning is recorded 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.
+
+---
-### Editing a preset auto-forks
+## Fonts
-Changing any token on a built-in preset transparently creates a **new custom theme**. The original preset stays pristine. So you can start from Ocean, tweak it, and keep both.
+Five roles can each take a different 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 rather than silently snapping to another font.
+
+Cabinet Grotesk is not bundled, so every stack naming it resolves to Inter. The name is kept so the intended stack stays legible; see the note in `app/src/styles/tokens.css`.
---
-## Where it's stored
+## 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. |
-Theme state (the active theme, the light/dark/auto variant, and all your custom themes) lives in Redux and persists to `localStorage` via `redux-persist`, so it survives app restarts and is scoped to your user. Sharing a theme is just exporting the JSON and having someone import it.
+No built-in preset sets a backdrop, so every family starts on `solid` and the animated shader is opt-in. The dotted-canvas overlay that once sat above all three was removed outright rather than defaulted off, so there is no setting to rediscover.
---
-## Under the hood
+## 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 |
+
+Beyond the tiers, a **Custom size** number field and slider take any whole pixel value. It is clamped to **12px to 28px** by `clampFontSizePx` in `app/src/store/themeSlice.ts`, which brackets the tiers on both sides: denser than Small, larger than Extra large. A non-finite value falls back to 16. Picking a tile 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`, leaving `--line-chrome` to the theme. The tokens are 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, by setting a `data-borders-<area>="off"` attribute that `app/src/styles/layout-overrides.css` acts on. Four areas:
+
+| Area | Covers |
+| --- | --- |
+| Cards & 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 colour, 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 pristine, 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) and **Delete theme**, which falls back to Classic.
+
+Sharing goes through JSON on the clipboard, not a file. **Copy JSON** puts the whole theme object in your clipboard and also renders 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, and an unrecognised backdrop kind is dropped rather than 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 just 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 colours and fonts as inline `--token` custom properties on the root `<html>` element, overriding the stylesheet's light and dark blocks at runtime.
+
+**Presets and fully custom themes are the same mechanism.** There is no per-theme stylesheet class and no `data-theme` attribute. The only class involved is `.dark`, a light/dark base selector that also keeps residual Tailwind `dark:` utilities aligned. Any token a theme leaves out falls through to the stylesheet defaults, and 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` rather than `userScopedStorage`, deliberately: 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 inert. Neither has a UI control, and neither has a consumer:
-Themes are driven by CSS custom-property **tokens** (space-separated RGB channel triples, so Tailwind opacity modifiers like `bg-surface/50` keep working). The `ThemeProvider` writes the active theme's overrides onto the `<html>` root; unspecified tokens fall through to the light/dark defaults.
+| Field | State |
+| --- | --- |
+| `developerMode` | Has a reducer and a `selectDeveloperMode` selector, but nothing dispatches or reads either. Its own 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 at all, so there is not even a readable accessor. |
-For the full token taxonomy, Tailwind wiring, and component-authoring best practices, see the contributor reference: [Theming (developing)](../developing/theming.md).
+Both sit in the persist whitelist, so a stale default may sit in `localStorage` doing nothing. Editing either by hand has no visible effect.
---
## See also
-- [Theming (contributor reference)](../developing/theming.md): token system, Tailwind wiring, migration codemod.
-- [Realtime Mascot](mascot/README.md): the other big piece of OpenHuman's personality.
+- [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 & Availability](platform.md): which desktop platforms the shell ships on.
diff --git a/gitbooks/features/token-compression.md b/gitbooks/features/token-compression.md
index 698ed1692c..da87406f88 100644
--- a/gitbooks/features/token-compression.md
+++ b/gitbooks/features/token-compression.md
@@ -105,9 +105,12 @@ Opt out of the whole feature with `context.compaction_enabled = false` or `OPENH
Beyond the deterministic compressors, TokenJuice can route plain text through a **ModernBERT** token-salience model that scores and drops low-information spans. The TinyJuice compressor exposes the optional ML slot, and OpenHuman bridges it to Kompress in `crates/openhuman-core/src/inference/tokenjuice/ml/`.
- **Off by default.** Enable with `ml_compression_enabled = true` in `[tokenjuice]`.
-- **Runs locally** as the `kompress` backend of the shared Python runtime sidecar. No data leaves your machine.
+- **Runs locally** as the `kompress` backend of the long-running Python host
+ process OpenHuman keeps warm for Python-backed models
+ (`crates/openhuman-core/src/runtime/python_server/`), reached over a private
+ stdio protocol. No data leaves your machine.
- **Tunable:** `ml_model_id` (default `answerdotai/ModernBERT-base`), `ml_target_ratio` (default `0.5`), `ml_max_input_chars` (default `200000`), `ml_device` (`cpu`/`auto`), `ml_sidecar_idle_timeout_secs`.
-- **Graceful:** if the sidecar is unavailable or an input exceeds the char cap, it degrades to the native compressors without ever failing the agent loop.
+- **Graceful:** if that process is unavailable or an input exceeds the char cap, it degrades to the native compressors without ever failing the agent loop.
---
diff --git a/gitbooks/features/wallet.md b/gitbooks/features/wallet.md
index 0831a5e905..e0ca35dee3 100644
--- a/gitbooks/features/wallet.md
+++ b/gitbooks/features/wallet.md
@@ -103,7 +103,7 @@ The agent reaches the wallet through six tools:
Notice there is **no agent tool that executes a transfer.** The agent can prepare a quote, but actually moving funds (`execute_prepared`) goes through the RPC surface, where it must be explicitly confirmed and pass the owner-binding check. Combined with the prepare-then-confirm flow and the per-thread quote binding, this keeps the agent from silently spending funds.
-Because these are financial actions, they should be surfaced through the [approval gate](approval-gate.md) so a human confirms before money moves. Treat every transfer as a high-stakes action.
+Because these are financial actions, the shape of every write is prepare-then-confirm: a quote is bound to the conversation that asked for it, expires after five minutes, and is consumed when it executes, so two confirmations cannot double-submit. The [approval gate](approval-gate.md) is the second layer, and it only applies once you have turned the autonomy policy on, which is **off by default**. Treat every transfer as a high-stakes action and read that page before relying on the gate.
---
diff --git a/gitbooks/features/workflows.md b/gitbooks/features/workflows.md
index 991e4d6b9e..85f48ebc9b 100644
--- a/gitbooks/features/workflows.md
+++ b/gitbooks/features/workflows.md
@@ -22,11 +22,13 @@ Two design guarantees make this safe:
- The `propose_workflow` tool **only validates and describes** a candidate graph. It can never create or enable a flow by itself.
- The **only** path from a proposal to a _new_ saved workflow is you clicking **Save & enable** on the card. That calls the `flows_create` RPC directly from the app, not from the agent.
-One deliberate carve-out: when _you_ start the build (the Workflows page prompt bar creates the flow first and opens the copilot on it), the builder agent may finish the job with its `save_workflow` tool — it writes the built graph onto that **already-existing** flow after a sandbox dry run. It still cannot create a flow of its own, enable or disable one, or change the approval gate, and a real test run always requires your explicit confirmation first.
+One deliberate carve-out: when _you_ start the build (the Workflows page prompt bar creates the flow first and opens the copilot on it), the builder agent may finish the job with its `save_workflow` tool: it writes the built graph onto that **already-existing** flow after a sandbox dry run. It still cannot create a flow of its own, enable or disable one, or change the approval gate, and a real test run always requires your explicit confirmation first.
## What a workflow is made of
-A workflow graph is built from **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`.
+A workflow graph is built from 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`. The other seven are reachable by importing a graph. Two also have no host adapter wired yet: a `shell` node has no runner, and an `approval` node falls back to pausing the run for `flows_resume` rather than raising its own card.
A graph is usually a straight line or a fan-out, but it may 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`.
@@ -56,7 +58,7 @@ When a run pauses, you get a **Flow Approval Card** in your notifications naming
## RPC surface (for developers)
-The `flows` domain (`crates/openhuman-core/src/flows/`) exposes ten controllers under `openhuman.flows_*`: `create`, `get`, `list`, `update`, `delete`, `set_enabled`, `run`, `resume`, `list_runs`, `get_run`. See the [Agent Harness](../developing/architecture/agent-harness.md) page for how flow runs share the tinyagents execution stack.
+The `flows` domain (`crates/openhuman-core/src/flows/`) exposes 36 controllers under `openhuman.flows_*`, covering 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
diff --git a/gitbooks/guides/README.md b/gitbooks/guides/README.md
index a2080c9d13..cd8e35031f 100644
--- a/gitbooks/guides/README.md
+++ b/gitbooks/guides/README.md
@@ -1,8 +1,8 @@
---
description: >-
Outcome-driven, step-by-step guides for getting a real result out of
- OpenHuman: set up an assistant, run a local model, protect sensitive data,
- recover a broken install, or move to a new machine.
+ OpenHuman: set up an assistant, run one or several local models, protect
+ sensitive data, recover a broken install, or move to a new machine.
icon: list-check
---
@@ -20,6 +20,7 @@ You do not need to read these in order, and you do not need to be technical. Pic
| --------------------------------------------------- | -------------------------------------------------------------------- |
| 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) |
+| Share 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) |
@@ -56,3 +57,11 @@ Where your data physically lives on disk:
| Windows | `%USERPROFILE%\.openhuman\` |
Almost everything in this section (backups, recovery, migration) comes back to that one folder.
+
+---
+
+## See also
+
+- [Privacy & Security](../features/privacy-and-security.md): the trust model every guide here assumes.
+- [Local AI (optional)](../features/model-routing/local-ai.md): the config reference behind the local-model guides.
+- [Memory](../features/memory.md): what the data folder actually holds.
diff --git a/gitbooks/guides/child-safe-companion.md b/gitbooks/guides/child-safe-companion.md
index 2316cef909..655d7534bc 100644
--- a/gitbooks/guides/child-safe-companion.md
+++ b/gitbooks/guides/child-safe-companion.md
@@ -31,7 +31,7 @@ This guide is about stacking the real controls that exist, and being clear about
| Control | What it protects against | What it does **not** do |
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
-| **Read-only autonomy** | The assistant taking any action (sending, writing files, running commands, or reaching the network on its own) | Doesn't filter what it _says_ |
+| **`readonly` autonomy** (needs the policy on) | The assistant taking any action (sending, writing files, running commands, or reaching the network on its own) | Doesn't filter what it _says_ |
| **Approval Gate (on)** | Any state-changing/network action slipping through without an adult's yes | Doesn't review conversation content |
| **Workspace-only + blocked system dirs** | The agent touching files outside a small folder, or any credential/system directory | Doesn't restrict what topics come up |
| **Prompt-injection screening** | Attempts (in pasted text) to hijack the assistant's instructions | Isn't a general content moderator |
@@ -47,9 +47,9 @@ The honest gap: **none of these filter the model's language or subject matter.**
**Settings → Agents → Agent access:**
-- Autonomy: **Read-only**. The assistant can talk and answer, but cannot act, write files, or reach the network on its own.
+- Autonomy: `[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.
-- Keep the [Approval Gate](../features/approval-gate.md) on. (With Read-only, acting is blocked outright anyway. Leave the gate on as a second layer.)
+- Leave the [Approval Gate](../features/approval-gate.md) installed as a second layer. (At `readonly`, acting is blocked outright anyway.)
- Review the **auto-approve** list and remove anything you don't want running without a prompt.
### 2. Keep inference and data local
@@ -70,7 +70,7 @@ Edit the behavior prompt (`SOUL.md`, via the **Brain** page `/brain`) to set age
## Success checks
-- [ ] Autonomy is **Read-only**; workspace-only and the approval gate are on.
+- [ ] `[autonomy] enabled = true` and `level = "readonly"`; `workspace_only` is on.
- [ ] No integrations are connected.
- [ ] Inference is local (`ready`), so conversations aren't going to a cloud provider.
- [ ] In your own testing, the persona refuses and redirects unsafe prompts.
@@ -81,13 +81,13 @@ Edit the behavior prompt (`SOUL.md`, via the **Brain** page `/brain`) to set age
| Symptom | Cause | Fix |
| ---------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------------------------- |
| It produced content you consider inappropriate | There is no content filter; the persona alone governs tone | Strengthen the `SOUL.md` rules; supervise; this is an inherent limit of the tool |
-| It tried to do something (send/open/fetch) | Tier isn't Read-only | Set autonomy to **Read-only** in Agent access |
+| It tried to do something (send/open/fetch) | The policy is off, or the tier isn't `readonly` | Set `enabled = true` and `level = "readonly"` in `config.toml` |
| Conversation went to the cloud | Chat isn't 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/parental controls to lock down the machine itself |
## Recovery
-- **Instant lockdown:** set autonomy to **Read-only** (if it drifted). Acting stops next turn.
+- **Instant lockdown:** set `level = "readonly"` (if it drifted). Acting stops next turn.
- **Reset persona:** revert your `SOUL.md` edits to defaults if the customization misbehaves.
- **The real recovery is supervision.** If the experience isn't right for the child, step in. No software setting substitutes for that.
@@ -95,4 +95,5 @@ Edit the behavior prompt (`SOUL.md`, via the **Brain** page `/brain`) to set age
- [Keep sensitive data private](privacy-sensitive-data.md): the controls this guide stacks.
- [Approval Gate](../features/approval-gate.md): how actions are gated.
-- [Privacy & Security](../features/privacy-and-security.md): autonomy tiers and path hardening in depth.
+- [Approval Gate](../features/approval-gate.md): the autonomy tiers and what each one blocks.
+- [Privacy & 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
index 1cd1e64d64..3b3c02b144 100644
--- a/gitbooks/guides/doctor-assistant.md
+++ b/gitbooks/guides/doctor-assistant.md
@@ -36,9 +36,9 @@ With that boundary set, here's how to shape it responsibly.
In **Settings → Agents → Agent access**:
-- Set autonomy to **Read-only** (pure Q&A/drafting) or **Supervised** (drafting plus approved actions). Avoid **Full** for clinical use.
+- Turn the autonomy policy on and set its tier: `[autonomy] enabled = true` with `level = "readonly"` (pure Q&A and drafting) or `level = "supervised"` (drafting plus approved actions) in `config.toml`. Avoid `full` for clinical use. The policy is off until you set `enabled = true`.
- Keep **workspace-only** on so the agent can't wander your disk.
-- Keep the [Approval Gate](../features/approval-gate.md) on. Nothing gets _acted on_ (files written, actions taken) without your yes. Note it gates **actions**, not network transport: prompts and attachments can still be sent upstream for inference.
+- With the policy on, the [Approval Gate](../features/approval-gate.md) parks every acting call, so nothing gets _acted on_ (files written, actions taken) without your yes. Note it gates **actions**, not network transport: prompts and attachments can still be sent upstream for inference.
### 2. Turn on local inference for sensitive work
@@ -65,7 +65,7 @@ Test with **made-up** cases, never real patient data, until you're satisfied wit
## Success checks
-- [ ] Autonomy is **Read-only** or **Supervised**, workspace-only is on, approval gate is on.
+- [ ] `[autonomy] enabled = true`, `level` is `readonly` or `supervised`, and `workspace_only` is on.
- [ ] If you're keeping 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 in replies to synthetic prompts.
- [ ] Only intended sources are connected.
@@ -77,12 +77,12 @@ Test with **made-up** cases, never real patient data, until you're satisfied wit
| ------------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| It states things with false confidence | Persona doesn't 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 take an action on its own | Tier too permissive | Drop to **Read-only**; keep the approval gate on |
+| It tried to take an action on its own | The policy is off, or the tier is too permissive | Set `enabled = true` and `level = "readonly"` |
| It "remembered" something it shouldn't have | A source with disallowed data was connected | Revoke the integration; already-ingested chunks are local and can be cleared from the workspace |
## Recovery
-- **Instant containment:** set autonomy to **Read-only**. Acting stops on the next turn.
+- **Instant containment:** set `level = "readonly"`. Acting stops on the next turn.
- **Pull a source:** revoke any integration from Settings; future syncs stop immediately.
- **Reset the persona:** the behavior lives in an editable file; revert your edits to return to default tone.
diff --git a/gitbooks/guides/local-model.md b/gitbooks/guides/local-model.md
index 142e6bd51d..0eb43fd59a 100644
--- a/gitbooks/guides/local-model.md
+++ b/gitbooks/guides/local-model.md
@@ -27,7 +27,7 @@ For the config reference (provider strings, endpoint overrides, every workload f
## Privacy implications
- Workloads you route locally run on-device. Nothing about that work is sent out.
-- Anything you leave on the default route still goes through the OpenHuman [model router](../features/model-routing/). Local AI only changes the workloads you move.
+- Anything you leave on the default route still goes through the OpenHuman [model router](../features/model-routing/README.md). Local AI only changes 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; then an unreachable runtime makes the request fail instead.
---
@@ -114,4 +114,4 @@ Some workloads use the backend unless you configure something else: speech-to-te
- [Local AI (optional)](../features/model-routing/local-ai.md): the config reference.
- [Keep sensitive data private](privacy-sensitive-data.md): the plain-language version of local vs external.
-- [Automatic Model Routing](../features/model-routing/): how tasks get matched to models.
+- [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
index 5d7e6c4831..d43dcc742e 100644
--- a/gitbooks/guides/move-to-new-pc.md
+++ b/gitbooks/guides/move-to-new-pc.md
@@ -33,12 +33,12 @@ Inside it, the things you care about migrating:
| What | Where (inside the data folder) | Travels with a folder copy? |
| ------------------------------------------------------ | --------------------------------------------- | --------------------------------- |
| **Memory items** | In your engine (TinyHumans or CortexDB) | Sign in again / re-enter the key |
-| **Persona & 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** in this folder | ❌ No (re-established on sign-in) |
-| **Integration access** (Gmail, Slack, …) | Brokered by the backend, tied to your account | ❌ No (reconnects on sign-in) |
+| **Persona & 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** in this folder | No (re-established on sign-in) |
+| **Integration access** (Gmail, Slack, …) | Brokered by the backend, tied to your account | No (reconnects on sign-in) |
{% hint style="info" %}
**Why some things don't travel, and why that's fine.** OpenHuman deliberately keeps secrets out of loose files. Your session token and certain local secrets live in the operating system's secure store (Keychain / Credential Manager / Secret Service), and your integration tokens are held by the backend against your account. So the folder copy carries your _data and persona_; **signing in on the new machine re-establishes the secrets and integrations.** You never hand-copy raw tokens between machines.
@@ -118,3 +118,5 @@ The migration worked when:
- [Recover from a failed installation](recover-failed-installation.md): same data folder, 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): re-standing-up a runtime on the new machine.
+- [OS Keyring & 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
index c6c164156f..fd6c4719aa 100644
--- a/gitbooks/guides/multiple-local-llm-servers.md
+++ b/gitbooks/guides/multiple-local-llm-servers.md
@@ -1,59 +1,62 @@
---
description: >-
- Route workloads to multiple self-hosted OpenAI-compatible LLM servers through
- a community gateway, with a Mac mini and Linux GPU PC example.
+ Route different OpenHuman workloads to models on different machines you own,
+ behind one OpenAI-compatible gateway, with a Mac mini and Linux GPU PC
+ worked example.
+icon: network-wired
---
# Use multiple local LLM servers
-If you already run models on several machines, you can expose them through one
-OpenAI-compatible gateway and select a backend in each workload's model ID.
-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. Other compatible gateways can serve the same role.
+**Goal:** keep a small, fast model and a large, slow one on separate machines you own, and send each OpenHuman workload to the right one, without giving up the local provider path.
-The example puts OpenHuman Core, the router, and a small model on a **Mac mini
-with 64 GB RAM**, and a larger model server on a **Linux GPU PC**:
+OpenHuman talks to one endpoint per provider string. If your models live on more than one machine, put a gateway in front of them: it exposes a single OpenAI-compatible endpoint and uses a prefix on the model ID to choose 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 can play the same part.
+
+The worked 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)
- └─ Model Router, 127.0.0.1:18080/v1
+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
```
-These labels and ports are examples. Choose models and context lengths that fit
-your hardware, including KV-cache and concurrency headroom. The router neither
-hosts models nor downloads weights. This setup changes inference destinations;
-it does not relocate the Core's existing workspace, memory, or project files.
-If you connect a UI from another machine, the router URL is relative to **Core**.
+---
+
+## 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, which you install, start, and load models into yourself. OpenHuman does not do any of that, and neither does the gateway.
+- Enough memory and context headroom on each machine for the models you pick, including KV-cache and whatever concurrency you expect.
+- SSH access from the machine running the core to each remote machine.
-## 1. Start the model servers
+## Privacy implications
+
+- A loopback gateway is not the same thing as on-device inference. The gateway listens on `127.0.0.1`, but it forwards prompts to whatever upstream its own config names, which may be another machine.
+- OpenHuman classifies the `local-openai:` prefix as a local runtime and does not inspect the gateway's upstreams, so `local_only` privacy mode will not stop a prompt that the gateway relays off the box. 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. Those stay where they were.
+
+---
-Run a small model with an OpenAI-compatible server on the Mac mini, for example
-MLX or LM Studio, at `http://127.0.0.1:8080/v1`. Run a larger model on the Linux PC
-with a server such as vLLM at that PC's `http://127.0.0.1:8000/v1`.
-Use the runtime's own installation and model-loading instructions; see
-[the local-model guide](local-model.md) for the single-server setup.
+## Steps
-On the Mac mini, create a tunnel to the Linux PC. Replace the example SSH host
-with yours, and keep the tunnel running:
+### 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 that machine's `http://127.0.0.1:8000/v1`, for example under vLLM. Use each runtime's own 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 forwarded Linux endpoint is now `http://127.0.0.1:18000/v1` on the Mac mini.
-Keep authenticated remote inference behind SSH or HTTPS rather than sending
-bearer keys over plain HTTP across the network.
+The Linux server is now reachable as `http://127.0.0.1:18000/v1` on the Mac mini.
-## 2. Start the community gateway
+### 2. Start the gateway
-Build Model Router following its
-[README](https://github.com/tjm8874/model-router#build-and-run). Its
-[example configuration](https://github.com/tjm8874/model-router/blob/main/examples/mac-mini-linux.toml)
-contains the following backend mapping:
+Build and run the gateway following its own README. The backend mapping for this example looks like:
```toml
[server]
@@ -67,11 +70,11 @@ endpoints = ["chat/completions"]
[backends.LinuxGPU]
base_url = "http://127.0.0.1:18000/v1"
endpoints = ["chat/completions"]
-# For an authenticated upstream, set the environment variable in the router:
+# For an authenticated upstream, name an environment variable the gateway reads:
# api_key_env = "LINUX_LLM_API_KEY"
```
-Validate your configuration and start it:
+Check the config, start it, and read back the catalogue:
```sh
model-router --config router.toml --check-config
@@ -79,22 +82,15 @@ model-router --config router.toml
curl http://127.0.0.1:18080/v1/models
```
-Use the binary's actual path if it is not on `PATH`. The configuration check does
-not contact upstream servers. The model catalogue prefixes upstream IDs with the
-backend name: `org/model:4bit` becomes `MacMini:org/model:4bit`. Colons and slashes
-inside the upstream model ID are preserved. Check `router_errors` as well as
-`data`; one reachable backend does not mean every backend is ready.
+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`: 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. Route OpenHuman workloads
+### 3. Point OpenHuman at the gateway
-Merge these settings into the active Core user's `config.toml`, preserving your
-other settings. Replace the placeholder model IDs with exact IDs from the gateway
-catalogue. Keep workload keys at the top level, **before** `[local_ai]`:
+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, and keep the workload keys at the top level, **before** the `[local_ai]` table, or TOML will read them as part of it:
```toml
chat_provider = "local-openai:MacMini:your-small-model-id"
memory_provider = "local-openai:MacMini:your-small-model-id"
-learning_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"
@@ -108,38 +104,49 @@ chat_model_id = "MacMini:your-small-model-id"
vision_model_id = ""
```
-`lm_studio` is the existing local OpenAI-compatible settings identifier; this
-example's endpoint is Model Router, not an LM Studio installation requirement.
-The `local-openai:` prefix selects OpenHuman's compatible provider. Core passes
-`MacMini:your-small-model-id` to the router, which removes `MacMini:` and forwards
-`your-small-model-id` to the named upstream.
-
-`OPENHUMAN_LOCAL_INFERENCE_URL` or `LOCAL_OPENAI_URL` in Core's environment can
-override the configured URL. Update or unset them when switching endpoints; see
-[Local AI](../features/model-routing/local-ai.md#supported-runtimes).
-
-Only assign vision to a vision-capable model and register its capabilities and
-context window in OpenHuman. This text-only example leaves vision and embeddings
-unassigned. Embedding services and background memory engines have separate
-configuration/version constraints; adding a gateway does not automatically
-reroute them. Model Router can forward `/v1/embeddings` and `/v1/decide` to
-compatible services but does not translate APIs or start those services.
-
-## 4. Verify and maintain the routes
-
-Test a short chat using the local model, then a reasoning or agentic workload
-using the Linux model. Confirm the backend/model in the router's logs and the
-responses in OpenHuman. Model discovery and `/health` alone are not inference
-proof. Test streaming and tool calls with models that support them.
-
-Run the router under a per-user LaunchAgent or systemd user service if you need
-continuous availability. Supervise the SSH tunnel separately. Validate the router
-configuration and restart it after changes; upstream connection failures return
-errors, with no automatic retry or fallback in this gateway.
-
-The gateway listens only on loopback and has no inbound authentication. It keeps
-upstream keys separate from Core's incoming Authorization header. A loopback
-gateway can still forward prompts to another machine: OpenHuman's `local_only`
-provider classification does not inspect the gateway's upstream configuration.
-Review those destinations yourself; do not infer on-device-only inference from
-the `local-openai:` prefix. Unassigned workloads retain their existing routes.
+Three things are worth being precise about:
+
+| Key | What it actually 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 then `LOCAL_OPENAI_URL` in the core's environment both take priority over `local_ai.base_url`, so 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 adding 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 the route it had.
+
+### 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's logs and the reply in OpenHuman. Model discovery and a `/health` probe are not proof of inference. If your models support streaming and tool calls, exercise 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 rather than silently answer 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 on an upstream failure: there is no automatic retry and no fallback, which is the behaviour 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 own `Authorization` header.
+
+## Next steps
+
+- [Use OpenHuman with a local model](local-model.md): the single-server version of this setup.
+- [Local AI (optional)](../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): the broader picture of what leaves your machines.
diff --git a/gitbooks/guides/organize-project-folders.md b/gitbooks/guides/organize-project-folders.md
index 4e3a7bd22e..43f00c05eb 100644
--- a/gitbooks/guides/organize-project-folders.md
+++ b/gitbooks/guides/organize-project-folders.md
@@ -1,7 +1,8 @@
---
description: >-
Let OpenHuman tidy, rename, and restructure a folder of files safely, inside
- a boundary you set, with every change gated by your approval.
+ a boundary you set, with every change gated by your approval once the
+ autonomy policy is on.
icon: folder-tree
---
@@ -9,7 +10,7 @@ icon: folder-tree
**Goal:** point the assistant at a folder and have it clean it up (sort files, rename consistently, remove clutter) without letting it roam your whole disk or make changes you didn't see.
-The core idea: the agent works inside a **boundary you define**, and any file change that isn't provably read-only is **parked for your approval** before it runs.
+The core idea: the agent works inside a **boundary you define**, and with the autonomy policy on, any file change that isn't provably read-only is **parked for your approval** before it runs.
---
@@ -30,19 +31,30 @@ The core idea: the agent works inside a **boundary you define**, and any file ch
### 1. Decide where the agent may act
-By default the agent's read/write root is its **projects** area (by default `~/OpenHuman/projects`), and it's confined there. It does **not** have ambient access to the rest of your disk. To let it work on a folder elsewhere, add that folder as a **trusted root**:
+{% 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 are
+all inert and acting tool calls run unprompted. Credential stores and system
+roots stay blocked either way.
+{% endhint %}
-- Open **Settings → Agents → Agent access**.
+With the policy on, the agent's read/write root is its working folder and it is confined there, without ambient access to the rest of your disk. To let it work on a folder elsewhere, add that folder as a **trusted root**:
+
+- Open **Settings → Agent access**.
- 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 right autonomy tier
-- **Supervised** _(recommended)_: the agent proposes each change and you approve moves/renames/deletes as they come.
-- **Full**: routine file writes run automatically. Still tighten the trusted root so "automatic" stays contained.
+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.
+- `full`: routine file writes run automatically. Still tighten the trusted root so "automatic" stays contained.
-Leave the [Approval Gate](../features/approval-gate.md) on. Deleting and moving files are state-changing actions, so they'll be parked for your yes/no.
+Deleting and moving files are state-changing actions, so with `supervised` they are parked for your yes or no by the [Approval Gate](../features/approval-gate.md).
### 3. Ask for the reorganization
@@ -68,16 +80,16 @@ When the agent wants to move, rename, or delete, an **Approval Request card** ap
| Symptom | Cause | Fix |
| ----------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
-| "I can't access that folder" | The folder isn't a trusted root, or `workspace_only` is confining the agent | Add it in **Settings → Agents → Agent access** as a read-write trusted root |
-| It asks for approval on every single file | Supervised tier gates each write | Use **Always allow** for the specific safe tool, or narrow the request so there are fewer actions |
+| "I can't access that folder" | The folder isn't 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 single 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/credential directory | That's by design; those paths are never accessible. Choose a normal working folder |
| It reorganized more than you wanted | The instruction was broad | Ask it to "show the plan first"; approve selectively |
## Recovery
-- **Nothing runs without approval** in Supervised tier. If a plan looks wrong, **Deny** and it doesn't happen.
+- **Nothing runs without approval** at the `supervised` tier. If a plan looks wrong, **Deny** and it doesn't happen.
- **Undo is manual.** OpenHuman doesn't roll file operations back for you, so work on a **copy** of anything precious, or keep the folder under version control (e.g. `git`) so you can revert.
-- If the agent is doing too much, drop to **Read-only** in Agent access. It can still suggest a plan but can't change files.
+- If the agent is doing too much, set `level = "readonly"`. It can still suggest a plan but can't change files.
## See also
diff --git a/gitbooks/guides/personal-assistant.md b/gitbooks/guides/personal-assistant.md
index 3bcd2fb6ce..f331b7cc3b 100644
--- a/gitbooks/guides/personal-assistant.md
+++ b/gitbooks/guides/personal-assistant.md
@@ -1,7 +1,7 @@
---
description: >-
Go from a fresh install to a working personal assistant that knows your
- context, respects your boundaries, and acts only with your approval.
+ context, respects the boundaries you set, and acts only with your approval.
icon: robot
---
@@ -24,7 +24,7 @@ This is the "start here" guide. It assumes nothing beyond a downloaded app.
- Signing in **does not** grant ongoing access to anything. Every integration is a separate, explicit OAuth approval 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/reasoning runs through the OpenHuman-hosted [model router](../features/model-routing/). If you want inference on-device instead, see [Use OpenHuman with a local model](local-model.md).
+- By default, chat/reasoning runs 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).
- Full detail: [Keep sensitive data private](privacy-sensitive-data.md).
---
@@ -53,15 +53,36 @@ An assistant with no memory is just a chatbot. Connect at least one source so it
### 4. Set your boundaries
-Open **Settings → Agents → Agent access**. This controls how much the assistant can do on its own:
-
-| Tier | What it means |
-| -------------------------- | ------------------------------------------------------------------------------------------------------------------ |
-| **Read-only** | The assistant can observe and answer, but never acts (no sending, no file writes, no commands). |
-| **Supervised** _(default)_ | It can act, but any state-changing, network, install, or destructive action is **parked for your approval** first. |
-| **Full** | Routine actions run automatically; network/install/destructive actions still ask. |
-
-Leave it on **Supervised** unless you have a reason not to. Nothing with an external effect will happen in a chat without you saying yes. This is the [Approval Gate](../features/approval-gate.md), and it's on by default.
+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 is **parked for your approval** first. |
+| `full` | Routine actions run automatically; network, install and destructive actions still ask. |
+
+{% hint style="warning" %}
+**The policy is off until you set `enabled = true`.** It is not on out of the
+box, and there is no user-facing switch for the tier: the panel that holds the
+radios is a developer-only deep link. Until you turn it 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 without you saying yes: that is the
+[Approval Gate](../features/approval-gate.md).
+
+**Settings → Agent access** holds the rest of the boundary once the policy is
+on: the trusted roots, the always-allow list, the action timeout and the
+workspace-only switch.
### 5. Shape its personality (optional)
@@ -99,11 +120,11 @@ You have a working assistant when **all** of these are true:
| Sign-in returns to the welcome screen | The OAuth callback didn't 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 reference the source explicitly ("from my email…"); confirm the source is connected |
-| It performed an action you didn't expect | Autonomy tier may be set to **Full** | Set **Settings → Agents → Agent access** back to **Supervised** |
+| It performed an action you didn't 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, drop the tier to **Read-only** in Agent access. It takes effect on the next turn and blocks all acting immediately.
+- **Reset boundaries fast:** if the assistant is doing too much, set `level = "readonly"` in `config.toml`. It takes effect on the next turn and blocks all acting immediately.
- **Nothing you connect is permanent:** revoke any integration from Settings; chunks already in your local memory stay (they're yours), and the next sync tick stops pulling that source.
- **If the app itself won't start,** see [Recover from a failed installation](recover-failed-installation.md). Your configuration is preserved by default.
diff --git a/gitbooks/guides/privacy-sensitive-data.md b/gitbooks/guides/privacy-sensitive-data.md
index 86a1d18703..3e1b2bc46c 100644
--- a/gitbooks/guides/privacy-sensitive-data.md
+++ b/gitbooks/guides/privacy-sensitive-data.md
@@ -59,8 +59,8 @@ These leave your machine because they can't work otherwise, but note _what_ is s
You have real controls. 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) so embeddings, summarization, and optionally chat/reasoning happen on your machine. OpenHuman doesn't install the runtime or download models for you. _(Speech and web search still use the backend proxy even then.)_
-2. **Tighten what the assistant can do.** In **Settings → Agents → Agent access**, set the autonomy tier. **Read-only** means it can observe and answer but never act or reach the network on its own. See the [Approval Gate](../features/approval-gate.md).
-3. **Keep it in one folder.** By default the agent is confined to your workspace and cannot read the rest of your disk (`workspace_only` is on). System and credential folders (`~/.ssh`, `~/.gnupg`, `~/.aws`, and OS directories) are blocked outright, regardless of settings.
+2. **Tighten what the assistant can do.** Set `[autonomy] enabled = true` and `level = "readonly"` in `config.toml`: it can then observe and answer but never act or reach the network on its own. The policy is **off by default**, so this is a switch you have to throw, not one to leave alone. See the [Approval Gate](../features/approval-gate.md).
+3. **Keep it in one folder.** With the policy on, `workspace_only` confines the agent to its working folder and it cannot read the rest of your disk; with the policy off, that boundary is not enforced. System and credential folders (`~/.ssh`, `~/.gnupg`, `~/.aws`, and OS directories) are blocked outright either way.
4. **Connect only what you need.** Every integration is a separate OAuth approval you grant (and can revoke) individually. Revoking stops the next sync; memory already collected stays local because it's yours.
## Built-in protections you didn't have to configure
@@ -75,7 +75,7 @@ You have real controls. From most to least private:
You know your privacy posture when you can answer these:
-- [ ] Do you know your autonomy tier? (Check **Settings → Agents → Agent access**.)
+- [ ] Is the autonomy policy on, and do you know its tier? (Check `[autonomy]` in `config.toml`.)
- [ ] Do you know which integrations are connected? (Check **Settings**; disconnect any you don't need.)
- [ ] If locality matters for a workload, 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?
diff --git a/gitbooks/guides/recover-failed-installation.md b/gitbooks/guides/recover-failed-installation.md
index a485af1a96..093d88f7cb 100644
--- a/gitbooks/guides/recover-failed-installation.md
+++ b/gitbooks/guides/recover-failed-installation.md
@@ -67,7 +67,7 @@ Match your symptom:
| 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 / crashes on launch citing a **CEF / cache lock** (`SingletonLock`, cache "held by another instance") | A previous instance's browser cache is still locked | Ensure no other OpenHuman is running; if it persists, close all instances and relaunch |
+| 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 doesn't install or start the runtime; 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 |
diff --git a/gitbooks/legal/privacy-policy.md b/gitbooks/legal/privacy-policy.md
index 9e2f3f119f..55cbd3d27e 100644
--- a/gitbooks/legal/privacy-policy.md
+++ b/gitbooks/legal/privacy-policy.md
@@ -11,7 +11,7 @@ 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. 
+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
diff --git a/gitbooks/legal/terms-of-use.md b/gitbooks/legal/terms-of-use.md
index 2e21d45680..56078e70ed 100644
--- a/gitbooks/legal/terms-of-use.md
+++ b/gitbooks/legal/terms-of-use.md
@@ -5,7 +5,7 @@ icon: file-contract
# Terms & Conditions
-Last Updated: 02/02/2026
+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.
diff --git a/gitbooks/overview/auto-update.md b/gitbooks/overview/auto-update.md
new file mode 100644
index 0000000000..33b54b7c63
--- /dev/null
+++ b/gitbooks/overview/auto-update.md
@@ -0,0 +1,55 @@
+---
+description: >-
+ How OpenHuman updates itself: one signed manifest, a bounded download retry,
+ and a shell update that carries the core with it.
+icon: arrows-rotate
+---
+
+# Auto-update
+
+OpenHuman updates the whole app in one step. The core is linked into the desktop shell rather than shipped beside it, so there is no separate core update to think about: a shell update upgrades both.
+
+## What you see
+
+When a newer build is published, an update prompt appears in the app. It has four states, in order: **checking**, **downloading** (with progress), **ready to install**, and then the relaunch. If you are already current you see **up to date**, and a failure says so rather than silently retrying forever.
+
+Installing shuts the in-process core down first, under the same restart lock the app uses elsewhere, so replacing the bundle never races a core still holding file handles. On macOS that is what keeps a `.app` replacement clean.
+
+## Where updates come from
+
+A single 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. That is the whole trust story: no update server to trust, no second channel.
+
+## Retry policy, and what is deliberately not retried
+
+Downloads get **three attempts** (one try plus two retries) with a linear backoff 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**, and that asymmetry is the point: re-downloading cannot fix a bad signature, and looping on a verification failure would both waste the user's bandwidth and mask tampering. The policy lives in `crates/openhuman-app/src/app_update.rs`, where `classify` and `is_transient` are the two functions that decide.
+
+## Periodic checks
+
+The core runs the schedule, under `[update]` in `config.toml`:
+
+| Key | Default | What it does |
+| --- | --- | --- |
+| `enabled` | `true` | Turn periodic checks off entirely. |
+| `interval_minutes` | `60` | How often to check. The runtime floor is 10 minutes. |
+| `restart_strategy` | `self_replace` | `self_replace` restarts in place after staging; `supervisor` stages and leaves the restart to whatever is managing the process. |
+| `rpc_mutations_enabled` | `true` | Whether a bearer-authenticated RPC client may call the mutating update methods at all. |
+
+`supervisor` is the setting for a headless or containerised core: something else owns the process lifecycle, and the update should not decide to restart on its own.
+
+## Headless and self-hosted cores
+
+A core you run yourself (`openhuman-core serve`) checks and stages through the `update` namespace rather than the desktop prompt, which is why `rpc_mutations_enabled` exists as a separate switch. The desktop commands that used to update a core binary separately (`check_core_update`, `apply_core_update`) are kept as explicit no-ops for frontend compatibility and do nothing.
+
+## See also
+
+- [Platform & 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
index 8c490822aa..ce8b653360 100644
--- a/gitbooks/overview/getting-started.md
+++ b/gitbooks/overview/getting-started.md
@@ -1,7 +1,7 @@
---
description: >-
- Install OpenHuman, walk through the in-app onboarding (sign in, connect Gmail,
- choose how AI runs), and run your first request against your own memory.
+ Install OpenHuman, walk through the in-app onboarding (sign in, choose how AI
+ runs, connect an app), and run your first request against your own memory.
icon: play
---
@@ -29,7 +29,7 @@ The first time you launch OpenHuman, the OS will prompt for the permissions the
## 1. Download and install
-Get the OpenHuman desktop app from [http://tinyhumans.ai/openhuman](http://tinyhumans.ai/openhuman) or via your platform's package manager. Open the app once it's installed.
+Get the OpenHuman desktop app from [tinyhumans.ai/openhuman](https://tinyhumans.ai/openhuman) or via your platform's package manager. Open the app once it's installed.
## 2. Sign in
@@ -43,9 +43,26 @@ The first screen is **"Sign in! Let's Cook"**. Multiple sign-in options are avai
**Know what is local and what is managed.** Your workspace config, and local runtime state live on your machine. The default setup still uses OpenHuman-hosted services for sign-in, model routing, managed integration OAuth/tool calls, and web search proxying. Use the custom setup paths if you want to bring your own model, search, or Composio credentials. Some hosted features and real-time integration triggers still require the managed backend.
{% endhint %}
-## 3. Run your first request
+## 3. Connect something, and set up memory
-Once Gmail is connected and a memory source has synced, try prompts like:
+Onboarding offers a runtime choice (the managed TinyHumans route, or a custom
+setup where you bring your own model, search, embeddings and connector keys) and
+then drops you into the app. Two things make the first request worth making:
+
+- **An integration.** Open [Connections](../features/connections.md) → Apps and
+ connect one. Gmail is the usual first choice; each connection is a one-click
+ OAuth approval you can revoke.
+- **A memory engine.** Connections → Brain. 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:
**Briefings**
@@ -59,22 +76,20 @@ Once Gmail is connected and a memory source has synced, try prompts like:
- "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 automatically. See [Automatic Model Routing](../features/model-routing/).
-
----
-
-## 4. Set up memory
-
-Open **Connections → Memory**. On the **Engine** tab choose TinyHumans (signed in) or your own CortexDB, then add a folder, link or GitHub repo on the **Documents** tab. The agent can then answer questions about it, with citations. See [Memory](../features/memory.md).
+OpenHuman picks the right model for each task automatically. See [Automatic Model Routing](../features/model-routing/README.md).
---
-## 5. Let the mascot do more
+## 5. Keep going
Now that the agent has memory and a model, the rest of the product is about giving it more surfaces:
-- [**Memory**](../features/memory.md) - connect more sources; they sync on a schedule into your memory engine.
-- [**Native Voice**](../features/native-tools/voice.md) - push-to-talk dictation and TTS replies so you can talk to OpenHuman instead of typing.
+- [**Chat**](../features/chat.md): what a turn can actually 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; they sync on a schedule into your memory engine.
+- [**Workflows**](../features/workflows.md): describe an automation and review the graph the agent proposes.
+- [**Native Voice**](../features/native-tools/voice.md): dictation and spoken replies, or a live voice agent.
+- [**Roadmap**](roadmap.md): what is coming, and what was removed.
## Join the community
diff --git a/gitbooks/overview/roadmap.md b/gitbooks/overview/roadmap.md
new file mode 100644
index 0000000000..3918e19f8f
--- /dev/null
+++ b/gitbooks/overview/roadmap.md
@@ -0,0 +1,57 @@
+---
+description: >-
+ What is being worked on next, and the known gaps. Tracked in public issues
+ rather than promised here.
+icon: map
+---
+
+# Roadmap
+
+This page is a reading of the open issue tracker, not a commitment. Dates are deliberately absent. Everything below links to the issue that owns it, so if this page goes stale the issue is still the truth.
+
+Checked 2026-10-07.
+
+## Taking off the early-beta badge
+
+[#6047](https://github.com/tinyhumansai/openhuman/issues/6047) is the checklist, with an explicit definition of done: the badge comes off when the boxes are closed, the memory smoke test passes on all three platforms, and the release workflow can publish without hand-holding.
+
+| Area | State |
+| --- | --- |
+| Memory end to end (store, restart, recall, and the agent actually uses it) | Done |
+| Reply persistence: a completed reply can never vanish | Done |
+| Clean-install sign-in on all three platforms | Open, [#6020](https://github.com/tinyhumansai/openhuman/issues/6020) |
+| Windows: native modules refused when `%TEMP%` grants Modify to a non-owner group, leaving memory and connectors unavailable | Open, [#6008](https://github.com/tinyhumansai/openhuman/issues/6008) |
+
+The release-pipeline and Windows path-length blockers the checklist also lists have since been closed, even though the boxes are still unticked there.
+
+## Programmes with several issues behind them
+
+- **Agent to agent.** [#3463](https://github.com/tinyhumansai/openhuman/issues/3463) is the umbrella over 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.** [#5390](https://github.com/tinyhumansai/openhuman/issues/5390) adds the adapters directory and the dependency rule; supermemory, mem0, agentmemory and cognee follow behind it. Today [memory](../features/memory.md) has two engines and no adapter directory exists yet.
+- **External agent runtimes.** [#4731](https://github.com/tinyhumansai/openhuman/issues/4731) is an abstraction layer for driving Cursor, Windsurf and Codex, with a shared ACP transport for several more and per-session model and effort selection. Session import from one of them is the live edge of this work.
+- **Local and self-hosted.** [#6130](https://github.com/tinyhumansai/openhuman/issues/6130) would bring back a managed local runtime with model downloads and a compute-backend selector, deliberately re-adding something that was removed: local inference today means an endpoint you run yourself. [#4844](https://github.com/tinyhumansai/openhuman/issues/4844) is a no-UI Linux build for a server or a Raspberry Pi.
+- **Observability.** [#4496](https://github.com/tinyhumansai/openhuman/issues/4496) adds scores to traces, so user feedback and automated quality signals land next to the run they describe.
+
+## Shipped but inert
+
+Two surfaces exist in the build and do nothing, which is worth knowing before you go looking for them:
+
+- **Follow-up suggestion chips** are built and unreachable: nothing produces them, so the row is always empty ([#6465](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 ([#6127](https://github.com/tinyhumansai/openhuman/issues/6127)).
+
+The app also ships its own maturity ledger: **Settings → About** lists every capability with a status of stable, beta or coming soon, which is a better answer than this page for "is X finished".
+
+## Recently removed
+
+Things the docs used to describe that are gone, so you are not hunting for them:
+
+- The **live Google Meet agent**. It joined a call through the old embedded Chromium webview and spoke back as a camera stream. The frontend, the domain and the join path were all removed. See [Voice](../features/native-tools/voice.md).
+- The **embedded Chromium (CEF) runtime**. The shell runs on Tauri's native webview; browser control is a real Chrome driven over the DevTools protocol. See [Browser & Computer Control](../features/native-tools/browser-and-computer.md) and the historical [CEF notes](../developing/cef.md).
+- **In-app model downloads** and runtime lifecycle management for local models. Point OpenHuman at a server you run.
+- The **skills sandbox**. Skills are a catalogue you browse and install plus a run surface, not code executing inside 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 & Availability](../features/platform.md): what runs where today.
diff --git a/gitbooks/overview/troubleshooting-sign-in.md b/gitbooks/overview/troubleshooting-sign-in.md
index 90680211a8..04df78bbac 100644
--- a/gitbooks/overview/troubleshooting-sign-in.md
+++ b/gitbooks/overview/troubleshooting-sign-in.md
@@ -47,7 +47,7 @@ On Windows the `openhuman://` URL scheme is registered to the running executable
The Tauri shell now emits a `log::error!` line at startup when this happens. Look for it in your log file (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(…)
```