The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
docs: add local model and memory guides
Steven Enamakelae5fe3002db7
diff --git a/gitbooks/developing/performance.md b/gitbooks/developing/performance.mdindex f4a5b11c90..8434a4c4d7 100644--- a/gitbooks/developing/performance.md+++ b/gitbooks/developing/performance.md@@ -1,31 +1,19 @@---description: >-- Measured footprint: agent density in one process, cold start, binary size,- and the dependency-floor ratchet that keeps it there.+ Measured footprint: how many agents fit in one process, cold start, binary+ size and the dependency limits that keep it small.icon: gauge---# Performance and footprint-OpenHuman's Rust core runs in-process as a library, not as one OS process per-agent. That single decision is where most of the density numbers on this page-come from: a fixed bootstrap cost (allocator warm-up, code paging, registries,-detectors) is paid once per process and then shared across however many agents-run inside it, instead of being paid again for every agent.+OpenHuman's Rust core runs in-process as a library, not as one OS process per agent. Most of the density numbers on this page come from that one decision. A fixed bootstrap cost (allocator warm-up, code paging, registries, detectors) is paid once per process and shared by every agent inside it.-Everything below was measured on Apple Silicon macOS, `--release` build,-against a deterministic mock inference provider (the `rss-bench` feature),-not real network calls. Treat the absolute numbers as this-machine numbers and-the ratios (density, marginal cost, binary delta) as the parts worth-generalizing. The scripts to reproduce them are listed at the end.+Everything below was measured on Apple Silicon macOS with a `--release` build and a deterministic mock inference provider (the `rss-bench` feature), not real network calls. Treat the absolute numbers as numbers for that machine. The ratios (density, marginal cost, binary delta) are the parts worth generalizing. The scripts to reproduce them are listed at the end.## Fleet: how many agents fit in one process-`library-fleet.sh` runs N concurrent live agents in a single process, with-latency-realistic mock inference (200 ms) so idle time behaves like a real-network wait instead of a busy loop. It reports the *marginal* RSS per-additional agent once the fixed base is paid, which is the number that-actually decides how many agents fit in a box.+`library-fleet.sh` runs N concurrent live agents in a single process. Mock inference takes 200 ms, so idle time behaves like a real network wait instead of a busy loop. The script reports the marginal RSS per additional agent once the fixed base is paid. That number decides how many agents fit in a box.| N agents | Marginal KiB/agent | Settled MiB | Idle CPU ms/10s | Threads | FDs || ---: | ---: | ---: | ---: | ---: | ---: |@@ -33,28 +21,15 @@ actually decides how many agents fit in a box.| 100 | 1,866 | 356 | 3 | 123 | 820 || 500 | 1,770 | 1,393 | 3 | 211 | 3,220 |-500 agents in one process, measured, at roughly 1.77 MiB marginal cost each.-Idle CPU stays flat regardless of N, which is the property that matters: an-agent that isn't mid-turn should not be spending cycles. Thread count grows-about 0.35 per agent, which is the one line item worth watching before pushing-past 500 in production.+500 agents fit in one process at roughly 1.77 MiB marginal cost each. Idle CPU stays flat as N grows, which matters because an agent that is not mid-turn should not spend cycles. Thread count grows by about 0.35 per agent. Watch that line before pushing past 500 in production.-Thousands of agents on a single box is the direction this is heading, not a-number we've hit yet. The trend across 50/100/500 agents is a settling-marginal cost, not a rising one, which is what makes that direction plausible.+Thousands of agents on one box is a goal, not a measured result. The marginal cost settles across 50, 100 and 500 agents instead of rising, which makes the goal plausible.## In-process vs one process per agent-The same benchmark suite includes `library-instances.sh`, which spawns N-independent `library-profile` processes instead of N agents inside one-process. That measured about 47.8-48.2 MiB per instance, flat across N =-10/25/50, which puts roughly 42 instances in a 2 GiB box by summed RSS (an-upper bound; macOS has no PSS-equivalent metric to divide out shared pages).+`library-instances.sh` spawns N independent `library-profile` processes instead of N agents in one process. Each instance used about 47.8 to 48.2 MiB, flat across N = 10, 25 and 50. That puts roughly 42 instances in a 2 GiB box by summed RSS. This is an upper bound, because macOS has no PSS-equivalent metric to divide out shared pages.-One process per agent pays the ~30-50 MiB fixed base every time. The-in-process model pays it once. At the measured marginal cost, the one-process-fleet model is roughly 25 times denser than the per-process model for the same-memory budget.+One process per agent pays the 30 to 50 MiB fixed base every time. The in-process model pays it once. At the measured marginal cost, one process is roughly 25 times denser than one process per agent for the same memory budget.## Cold start@@ -63,28 +38,17 @@ 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.+The `cold-phases` scenario was removed from the profile binary, so that row cannot be re-run from this tree. Everything else on this page reproduces with the commands below.-A cold agent turn answers in about 102 ms. The full nine-phase bootstrap, 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-retains, because most of a cold turn's cost is executable code paging in for-the first time, not per-turn allocation.+A cold agent turn answers in about 102 ms. The full nine-phase bootstrap, which a process pays once, takes 476 ms. After that, a warmed turn in the same process costs 0.5 to 1.9 MiB, not the 26 to 31 MiB a first turn retains. Most of a cold turn's cost is executable code paging in for the first time, not per-turn allocation.## Slim build footprint-A `--no-default-features --features rss-bench` build (drops every optional-domain) settles at about 15.2 MiB of private physical memory and roughly 42-MiB RSS. The rest of that RSS is reclaimable executable text and allocator-high-water retention, not live data: a deep attribution pass found about 3.2-MiB of live heap and 18.7 MiB of resident executable text inside that 42 MiB.+A `--no-default-features --features rss-bench` build, which drops every optional domain, settles at about 15.2 MiB of private physical memory and roughly 42 MiB RSS. The rest of that RSS is reclaimable executable text and allocator high-water retention, not live data. A deep attribution pass found about 3.2 MiB of live heap and 18.7 MiB of resident executable text inside the 42 MiB.## Binary size by feature set-Cargo feature gates control what compiles in. Two starting points matter:-Contrib (`[features] default` in `crates/openhuman-core/Cargo.toml`, what a-bare `cargo check` builds) and Product (`scripts/ci/product-features.txt`,-what the desktop app ships).+Cargo feature gates control what compiles in. Two starting points matter: Contrib (`[features] default` in `crates/openhuman-core/Cargo.toml`, what a bare `cargo check` builds) and Product (`scripts/ci/product-features.txt`, what the desktop app ships).| Build | Features | Unstripped | Stripped || --- | --- | ---: | ---: |@@ -92,54 +56,23 @@ what the desktop app ships).| library-minimal | `skills,flows` | ~81.1 MiB | ~60.4 MiB || Pure slim | none | 68.4 MiB | 51.0 MiB |-The `skills,flows` recipe in-[`docs/library-minimal-recipe.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/library-minimal-recipe.md) is-the supported embed target for a headless host: it keeps SKILL.md execution-and saved-workflow runs, drops voice, web3, media, MCP and the desktop-automation stack, and 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-allocator behavior rather than linked code size.+The `skills,flows` recipe in [`docs/library-minimal-recipe.md`](https://github.com/tinyhumansai/openhuman/blob/main/docs/library-minimal-recipe.md) is the supported embed target for a headless host. It keeps SKILL.md execution and saved-workflow runs, drops voice, web3, media, MCP and the desktop automation stack, and ends up about 30% smaller than the default build. Most of that gain is binary size and code-paging surface. It moves settled RSS by only about 3 to 5 MiB per scenario, because RSS depends more on initialization and allocator behavior than on linked code size.-Do not describe this as a "15 MB binary." The smallest number on this page is-15.2 MiB of private memory in a slim, running process; the smallest binary is-51 MiB stripped with nothing enabled.+Note that the smallest figure here, 15.2 MiB, is private memory in a slim running process. It is not a binary size. The smallest binary is 51 MiB stripped with nothing enabled.## Feature gates and loadable modules-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. The compiled registry pins fourteen records across twelve module names, because `tinyruntime` ships as a router plus two language providers: `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-[Loadable modules](loadable-modules.md) for the whole model.--## The kernel-floor ratchet--`scripts/kernel-floor.sh` measures the dependency graph of the `flows`-profile (`--no-default-features --features flows`, the surface a second host-would embed) along three numbers: package count, unique crate names, and-native (C/C++) build count. `scripts/kernel-floor.limits` holds the ceiling-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.+Cargo features (`media`, `skills`, `flows`, `mcp`, `channels`, `http-server`, `scheduler-gate`, `file-logging`, `modules` and more) decide what compiles in. Beyond that, several domains ship as loadable native `cdylib` modules that are not linked into the core binary at all.++The compiled registry pins fourteen records across twelve module names, because `tinyruntime` ships as a router plus two language providers. The modules are `tinycomputer`, `tinysearch`, `tinydocs`, `tinywallet`, `tinyjuice`, `tinyvoice`, `tinyruntime` (with its Node and Python providers), `tinymcp`, `tinyconnectors`, `tinybox`, `tinychannels` and `tinyhosts`. Each sits behind a small `*-bus` contract crate. A module loads into the same process and shares its privileges, so the admission checks (ABI, manifest, dependency, digest) matter more than for an ordinary dependency. See [Loadable modules](loadable-modules.md).++## The dependency-floor ratchet++`scripts/kernel-floor.sh` measures the dependency graph of the `flows` profile (`--no-default-features --features flows`, the surface a second host would embed) on three counts: packages, unique crate names and native (C/C++) builds. `scripts/kernel-floor.limits` holds the ceiling for each. The ratchet only moves down. A change that grows the graph must lower those numbers in the same PR, and raising one needs a written justification. Read the current ceiling from the file, because it changes. The ratchet stops the dependency floor from creeping back up after a gating effort sheds crates.## How to reproduce-Every number above comes from the driver scripts under `scripts/profile/`,-built around `crates/openhuman-cli/src/bin/library_profile/main.rs`-(scenario implementations) and the `library-profile` / `rss-bench` binaries.-Benchmarks run from these scripts, not in CI.+Every number above comes from the driver scripts under `scripts/profile/`. They are built around `crates/openhuman-cli/src/bin/library_profile/main.rs` (the scenarios) and the `library-profile` and `rss-bench` binaries. The benchmarks run from these scripts, not in CI.```bash# RSS/duration medians across fresh processes, all scenarios@@ -158,26 +91,12 @@ Benchmarks run from these scripts, not in CI.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+`scripts/profile/README.md` documents the remaining scripts: `library-cpu.sh` for CPU profiling with samply and `library-heap.sh` for live-heap attribution with dhat. Full methodology, caveats and the per-scenario breakdown are in[`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--These numbers were gathered on macOS, which has no cgroup memory limit to-enforce locally and no `/proc/<pid>/smaps_rollup`, so there is no true PSS-(proportional shared memory) reading available. RSS overcounts shared pages-in a way that matters more as agent count grows. The fleet and instances-numbers are a projection from measured marginal cost, not a live "did it-survive an OOM kill at N agents" test on the target 2 GB / 2 vCPU Linux box.-Every scenario also replaces network inference with a deterministic mock-provider at a fixed latency, so turn timings measure orchestration overhead,-not real model latency. Real Linux cgroup validation is documented follow-up-work, not something this page claims already happened.--For token-level cost rather than process footprint, see [Smart Token-Compression](../features/token-compression.md), which is the other half of-"cheap": it controls how much of what the harness assembles actually reaches-the model.+## Measurement conditions++These numbers were gathered on macOS. It has no local cgroup memory limit and no `/proc/<pid>/smaps_rollup`, so there is no true PSS (proportional shared memory) reading. RSS overcounts shared pages, and the error grows with agent count. The fleet and instances numbers project from measured marginal cost. They are not a live test of surviving an OOM kill at N agents on a 2 GB / 2 vCPU Linux box. Every scenario also replaces network inference with a mock provider at fixed latency, so turn timings measure orchestration overhead, not real model latency. Validation under Linux cgroups has not been done yet.++For token cost instead of process footprint, see [Smart token compression](../features/token-compression.md). It is the other half of "cheap": it controls how much of what the harness assembles reaches the model.diff --git a/gitbooks/developing/providers/claude-code.md b/gitbooks/developing/providers/claude-code.mdindex 3f08ab4a99..5645f65ea9 100644--- a/gitbooks/developing/providers/claude-code.md+++ b/gitbooks/developing/providers/claude-code.md@@ -1,26 +1,24 @@---description: >-- Routing a workload through the Claude Code CLI or the Claude Agent SDK.+ Route chat workloads through the Claude Code CLI.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.+OpenHuman can send any chat workload through Anthropic's `claude` CLI instead of calling the Anthropic HTTP API directly. The CLI handles model selection, auth and prompt caching. OpenHuman runs it as a long-lived child process that resumes sessions, parses its stream-json output, and gives it an MCP endpoint so the model can reach OpenHuman state (memory, threads, agents, search). This is one of several pluggable LLM backends. See [Engines](../engines.md) for the full list.-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.+`tinyagents-harness` (vendor/tinyagents) owns the provider, `ClaudeCodeProvider`. See [its README](https://github.com/tinyhumansai/tinyagents/blob/main/crates/tinyagents-harness/src/providers/claude_code/README.md) for the file map and implementation notes. OpenHuman only wires it up in `crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rs`, which supplies the MCP endpoint (`OpenHumanMcpEndpoint`, below) and reads the resulting model string back into its own routing.## Requirements-- Claude Code CLI **≥ 2.0.0** (`MIN_CLI_VERSION`), either on `PATH`, at one of the supported- well-known install locations, or selected with- `OPENHUMAN_CLAUDE_CLI=/abs/path/to/claude`.-- An Anthropic API key in `ANTHROPIC_API_KEY`, **or** a pre-existing `~/.claude/.credentials.json` from `claude login`.-- The `http-server` Cargo feature (on by default): OpenHuman exposes its MCP tools to the CLI over a loopback HTTP endpoint (`crate::mcp::server::ensure_local_http`), not by spawning `openhuman-core mcp` as a subprocess. Without that feature, the provider still runs, but the CLI gets no OpenHuman tools.+- Claude Code CLI 2.0.0 or newer (`MIN_CLI_VERSION`). It can be on `PATH`, in a supported well-known install location, or selected with `OPENHUMAN_CLAUDE_CLI=/abs/path/to/claude`.+- An Anthropic API key in `ANTHROPIC_API_KEY`, or an existing `~/.claude/.credentials.json` from `claude login`.+- The `http-server` Cargo feature (on by default). OpenHuman exposes its MCP tools to the CLI over a loopback HTTP endpoint (`crate::mcp::server::ensure_local_http`), not by running `openhuman-core mcp` as a subprocess. Without that feature the provider still runs, but the CLI gets no OpenHuman tools.## Routing a workload through the CLI-The factory grammar accepts a new prefix: `claude-code:<model>[@<temperature>]`. Apply it via the standard inference settings (per-role, locked decision #3):+Use the provider prefix `claude-code:<model>[@<temperature>]`. Set it per role through the standard inference settings:```bash# Through the JSON-RPC update endpoint:@@ -34,81 +32,75 @@ openhuman-core rpc openhuman.inference_update_model_settings \| `reasoning_provider` | long-context reasoning workloads || `agentic_provider` | multi-step agentic loops |-A workload set to `claude-code:<model>` always spawns a fresh `claude` child per turn; concurrency is capped at `MAX_CONCURRENT_TURNS = 4` per `ClaudeCodeProvider` instance (see [Per-turn behavior](#per-turn-behavior)).+A workload set to `claude-code:<model>` starts a fresh `claude` child for every turn. Concurrency is capped at `MAX_CONCURRENT_TURNS = 4` per `ClaudeCodeProvider` instance (see [Per-turn behavior](#per-turn-behavior)).## Verifying the install-The status RPC is on the existing inference namespace:+The status RPC is in the inference namespace:```bashopenhuman-core rpc openhuman.inference_claude_code_status```-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)):+It returns one of these (`CliStatus` in [`tinyagents-harness`'s `claude_code/types.rs`](https://github.com/tinyhumansai/tinyagents/blob/main/crates/tinyagents-harness/src/providers/claude_code/types.rs)):- `{"status":"ok","version":"2.0.4","path":"/usr/local/bin/claude"}`: ready- `{"status":"not_installed"}`: no usable `claude` was found through theconfigured override, `PATH`, or the supported fallback locations-- `{"status":"outdated","version":"1.9.0","min_required":"2.0.0","path":"…"}`: bump CLI-- `{"status":"unusable","path":"…","reason":"…"}`: binary present but the version probe failed+- `{"status":"outdated","version":"1.9.0","min_required":"2.0.0","path":"..."}`: upgrade the CLI+- `{"status":"unusable","path":"...","reason":"..."}`: binary present but the version probe failed-Binary lookup uses this precedence: `OPENHUMAN_CLAUDE_CLI` first, then the-`PATH` search, then the ordered fallback locations. The fallback list covers-the native installer and common user-local, Bun, npm-global, and Homebrew-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.+Binary lookup checks `OPENHUMAN_CLAUDE_CLI` first, then `PATH`, then the ordered fallback locations. The fallbacks cover the native installer and common user-local, Bun, npm-global and Homebrew installs. When the CLI is found through a fallback, its directory and the user bin directories are prepended to the child process `PATH`. The inherited entries stay available.-The 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)).+The settings panel shows the same status through `ClaudeCodeStatusCard` ([`app/src/components/settings/panels/ai/ClaudeCodeStatusCard.tsx`](https://github.com/tinyhumansai/openhuman/blob/main/app/src/components/settings/panels/ai/ClaudeCodeStatusCard.tsx)).## Per-turn behavior-`ClaudeCodeProvider::run_chat` acquires one of `MAX_CONCURRENT_TURNS` (4) semaphore permits, plus a per-thread mutex so two overlapping calls for the same conversation cannot race on the same session UUID. Each turn then:+`ClaudeCodeProvider::run_chat` takes one of `MAX_CONCURRENT_TURNS` (4) semaphore permits, plus a per-thread mutex so two overlapping calls for the same conversation cannot race on one session UUID. Each turn then:-1. Resolves a per-thread CC session UUID from `<workspace_dir>/claude-code-sessions.json`. New threads get a fresh RFC-4122 v4 UUID; the CLI requires v4 specifically for `--resume`.-2. Asks the host's `McpEndpointProvider` for an MCP endpoint. OpenHuman's implementation (`OpenHumanMcpEndpoint`) lazily starts one in-process HTTP MCP server per core (`crate::mcp::server::ensure_local_http`, loopback only) and returns its URL plus a bearer token; the config file passed via `--mcp-config` carries that token in its `Authorization` header. If starting the endpoint fails, the turn still proceeds, just without OpenHuman tools.+1. Resolves a per-thread session UUID from `<workspace_dir>/claude-code-sessions.json`. New threads get a fresh RFC 4122 v4 UUID, because the CLI requires v4 for `--resume`.+2. Asks the host's `McpEndpointProvider` for an MCP endpoint. OpenHuman's implementation (`OpenHumanMcpEndpoint`) lazily starts one in-process HTTP MCP server per core (`crate::mcp::server::ensure_local_http`, loopback only) and returns its URL plus a bearer token. The config file passed with `--mcp-config` carries that token in its `Authorization` header. If the endpoint fails to start, the turn still runs, without OpenHuman tools.3. Spawns the CLI with:- `-p --input-format stream-json --output-format stream-json --verbose --include-partial-messages --add-dir <project_dir>`- `--mcp-config <scratch>/openhuman-mcp-config.json --strict-mcp-config` when the endpoint resolved, so only the configured MCP servers are visible- - `--permission-mode acceptEdits` (default) or `bypassPermissions` (full access, see below)- - by default, `--disallowedTools Bash,BashOutput,KillShell,WebFetch,WebSearch,Task`, so CC's own shell, network, and subagent-fanout builtins stay off and OpenHuman tools (`mcp__openhuman__*`) are the only way to reach those capabilities; omitted entirely when full access is on- - `--session-id <uuid>` on first turn, `--resume <uuid>` thereafter+ - `--permission-mode acceptEdits` (default) or `bypassPermissions` (full access, described below)+ - by default, `--disallowedTools Bash,BashOutput,KillShell,WebFetch,WebSearch,Task`, so Claude Code's own shell, network and sub-agent builtins stay off and OpenHuman tools (`mcp__openhuman__*`) are the only way to reach those capabilities. This flag is omitted when full access is on+ - `--session-id <uuid>` on the first turn, `--resume <uuid>` after that- `--model <model>` (the suffix after `claude-code:`)- - `--append-system-prompt-file <scratch>/append-system-prompt.txt` if the conversation carries a system message (a file, not an argv value, so a large harness prompt does not hit Windows' argv length limit)-4. Pipes stdin: full conversation history folded into a text preamble on a new session, just the pending user turn(s) on `--resume` (the CLI already holds its own prior-turn context server-side).+ - `--append-system-prompt-file <scratch>/append-system-prompt.txt` if the conversation carries a system message. It is a file, not an argument, so a large harness prompt does not hit Windows' argument length limit+4. Pipes stdin. A new session gets the full conversation history folded into a text preamble. A `--resume` gets only the pending user turns, because the CLI already holds the earlier context.5. Streams stdout through the JSONL parser, then the event mapper, into `ProviderDelta`s on the request's `stream` sink.-On exit non-zero the driver bubbles stderr (capped at 16 KiB) up as the error message.+If the CLI exits non-zero, the driver returns its stderr (capped at 16 KiB) as the error message.-On macOS the spawn is wrapped in a Seatbelt jail (`sandbox-exec`) by default when `/usr/bin/sandbox-exec` exists; set `OPENHUMAN_CLAUDE_CODE_SANDBOX=0` to opt out. The profile blocks reads and writes under the first `.openhuman*`-named ancestor of `workspace_dir` (this provider's own session store and settings), not the CLI's own file tools. Linux and Windows have no OS-level wall yet.+On macOS the spawn runs inside a Seatbelt jail (`sandbox-exec`) by default when `/usr/bin/sandbox-exec` exists. Set `OPENHUMAN_CLAUDE_CODE_SANDBOX=0` to opt out. The profile blocks reads and writes under the first `.openhuman*`-named ancestor of `workspace_dir`, which holds this provider's own session store and settings. It does not restrict the CLI's own file tools. Linux and Windows have no OS-level wall yet.### Permission posture and full access-The default posture, `acceptEdits`, restricts CC to file reads and edits under `project_dir` and withholds shell, network, and `Task` fan-out via `--disallowedTools`. A user can opt into full access (CC's entire toolset, including Bash) either through the settings toggle persisted in `<workspace_dir>/claude_code_settings.json`, or with `OPENHUMAN_CLAUDE_CODE_PERMISSION_MODE=bypass|bypassPermissions|full`. This is an explicit user choice; enabling the Claude Code provider alone never grants shell or network access.+The default, `acceptEdits`, limits Claude Code to file reads and edits under `project_dir` and withholds shell, network and `Task` access through `--disallowedTools`. You can opt into full access (the whole Claude Code toolset, including Bash) with the settings toggle saved in `<workspace_dir>/claude_code_settings.json`, or with `OPENHUMAN_CLAUDE_CODE_PERMISSION_MODE=bypass|bypassPermissions|full`. This is an explicit choice. Enabling the provider alone never grants shell or network access.## Auth resolution order1. `ANTHROPIC_API_KEY` env var (highest precedence, set on the spawned child).-2. A host-provided auth-profile store, or Claude Pro/Max OAuth: both still future work.-3. `~/.claude/.credentials.json`: the CLI's own login from `claude login` (Pro/Max subscription), used transparently by simply not setting `ANTHROPIC_API_KEY` on the child, so the CLI reads its own credentials (the Keychain, on macOS, under the `Claude Code-credentials` service).-4. None: the CLI will fail with an auth error.+2. `~/.claude/.credentials.json`: the CLI's own login from `claude login` (Pro or Max subscription). OpenHuman leaves `ANTHROPIC_API_KEY` unset on the child, so the CLI reads its own credentials. On macOS they live in the Keychain under the `Claude Code-credentials` service.+3. Neither: the CLI fails with an auth error.-The `openhuman.inference_claude_code_auth_status` RPC reports the richer state for the Settings → AI panel by spawning `claude auth status --json` (bounded by a 10-second timeout) rather than reading the credentials file directly, since a macOS login lives in the Keychain, not on disk.+The `openhuman.inference_claude_code_auth_status` RPC reports the richer state for the Settings > AI panel. It runs `claude auth status --json` with a 10-second timeout instead of reading the credentials file, because a macOS login lives in the Keychain, not on disk.## Tool surface exposed to the CLI-The CLI sees these tools as `mcp__openhuman__<name>`, served over the loopback HTTP MCP endpoint described above (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):+The CLI sees these tools as `mcp__openhuman__<name>`, served over the loopback HTTP MCP endpoint described above. It is the same tool set that the stdio MCP server in [`crates/openhuman-core/src/mcp/server/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/mcp/server) exposes to other MCP clients:- `core.list_tools`, `core.tool_instructions`- `memory.recall`, `memory.fetch`, `memory.list`, `memory.learn`, `memory.forget`-- `agent.list_subagents`, `agent.run_subagent` (write, flagged `destructiveHint` per MCP spec)+- `agent.list_subagents`, `agent.run_subagent` (write, flagged `destructiveHint` as the MCP spec requires)- `searxng_search`-The MCP server enforces `SecurityPolicy::ToolOperation` checks; `agent.run_subagent`, `memory.learn` and `memory.forget` act (write); the rest are read-only. The CLI's own `tool_use` blocks (its internal Read/Bash/etc. calls) are never surfaced to OpenHuman as harness tool calls: the CLI has already executed them by the time they appear in the stream, so `event_mapper.rs` only strips their argument JSON out of the visible text.+The MCP server enforces `SecurityPolicy::ToolOperation` checks. `agent.run_subagent`, `memory.learn` and `memory.forget` write. The rest are read-only. The CLI's own `tool_use` blocks (its internal Read, Bash and similar calls) never reach OpenHuman as harness tool calls, because the CLI has already run them by the time they appear in the stream. `event_mapper.rs` only strips their argument JSON from the visible text.-## Limitations (v1)+## Limitations- Vision input is forwarded as native image blocks when pasted images are available to the Claude Code provider. Images that cannot be read are sent as a short text notice.-- Every role routed to `claude-code:` shares the same `MAX_CONCURRENT_TURNS` semaphore; under load a 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/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/platform/cost)).+- Every role routed to `claude-code:` shares the same `MAX_CONCURRENT_TURNS` semaphore; under load a turn waits in the queue instead of failing fast.+- Cost accounting from the CLI's `result.total_cost_usd` is captured in the mapper but not yet wired into OpenHuman's cost tracking ([`crates/openhuman-core/src/platform/cost/`](https://github.com/tinyhumansai/openhuman/tree/main/crates/openhuman-core/src/platform/cost)).- Linux and Windows run the CLI unconfined; the Seatbelt jail is macOS-only.diff --git a/gitbooks/features/memory.md b/gitbooks/features/memory.mdindex ecb6b34082..2fbc49e0d8 100644--- a/gitbooks/features/memory.md+++ b/gitbooks/features/memory.md@@ -8,103 +8,105 @@ icon: brain# Memory-OpenHuman's memory lets the agent remember you across chats: what you are working on, what you prefer, what is in your documents. Memory is a feature of the app, not a hidden database. You pick who stores it, see what is stored, and delete anything.+Memory lets the agent remember you across chats: what you are working on, what you prefer, what is in your documents. It is a feature of the app, not a hidden database. You choose who stores it, see what is stored, and delete anything.-Open it from **Connections → Memory**. It has eight tabs (chips): **Engine**, **Ask**, **Explorer**, **Learnings**, **Conversations**, **Brain**, **Background** and **Settings**. The old `/brain` and `/settings/memory-engine` addresses redirect there.+Open it from **Connections > Memory**. It has eight tabs: Engine, Ask, Explorer, Learnings, Conversations, Brain, Background and Settings. The old `/brain` and `/settings/memory-engine` addresses redirect there.## How the agent uses memory-Memory works around every turn, without the agent having to ask:+Memory works around every turn, and the agent does not have to ask for it.-- **Before the model answers**, OpenHuman logs what you said and recalls a short, token-budgeted *memory pack* for the turn: relevant learnings (and beliefs the engine has built from them), documents from your brain, this agent's earlier conversations and, briefly, other agents'. The pack is added to the model request for that turn only. It is never written into the chat, so the conversation itself stays exactly as you had it.-- **After the answer**, the reply is logged together with a one-line result for each tool it used.+- **Before the model answers**, OpenHuman logs what you said and recalls a short *memory pack* for the turn, sized to a token budget. The pack holds relevant learnings (and beliefs the engine built from them), documents from your brain, this agent's earlier conversations and, briefly, other agents' conversations. The pack is added to the model request for that turn only. It is never written into the chat, so your conversation stays exactly as you had it.+- **After the answer**, the reply is logged with a one-line result for each tool it used.- **When a long chat is compacted**, OpenHuman recalls what the folded-away turns covered and adds it to the summary that replaces them.-- **In the background**, every few minutes, the engine builds beliefs from what was stored ("the user prefers short answers", "deploys happen on Fridays").+- **In the background**, every few minutes, the engine builds beliefs from what was stored, such as "the user prefers short answers" or "deploys happen on Fridays".-The answer's memory chips show which stored items the pack cited. To see what a turn would get, open **Ask → Pack preview**.+Memory chips on an answer show which stored items the pack cited. To see what a turn would get, open **Ask > Pack preview**.## Engines-An engine stores your memory and answers questions about it. There are two:+An engine stores your memory and answers questions about it. There are two.| Engine | What it is | Needs || --- | --- | --- |-| **TinyHumans** | Hosted CortexDB run by TinyHumans, reached through the TinyHumans backend | You are signed in, or the host supplies a TinyHumans API key (headless and library hosts) |-| **CortexDB** | Your own CortexDB, called directly (managed `api-v1.cortexdb.ai` or self-hosted) | A CortexDB API key (kept in the OS keychain), and an endpoint if not the managed one |+| TinyHumans | Hosted CortexDB run by TinyHumans, reached through the TinyHumans backend | You are signed in, or the host supplies a TinyHumans API key (headless and library hosts) |+| CortexDB | Your own CortexDB, called directly (managed `api-v1.cortexdb.ai` or self-hosted) | A CortexDB API key (kept in the OS keychain), and an endpoint if it is not the managed one |-Either way your memory items are stored in CortexDB, not on your computer; OpenHuman keeps only bookkeeping (queued jobs, sync and import progress) locally. See [Where your memory is stored](privacy-and-security.md#where-your-memory-is-stored).+With either engine your memory items live in CortexDB, not on your computer. OpenHuman keeps only bookkeeping locally, such as queued jobs and sync progress. See [Where your memory is stored](privacy-and-security.md#where-your-memory-is-stored).-Pick one on the **Engine** tab. If you are signed out and have neither a CortexDB key nor a host-supplied TinyHumans API key, memory is **off**: the agent has no memory tool, nothing is stored, and the Memory page tells you why.+Pick an engine on the **Engine** tab. If you are signed out and have neither a CortexDB key nor a host-supplied TinyHumans API key, memory is off. The agent has no memory tool, nothing is stored, and the Memory page tells you why.## What the engine does-- **Recall** answers a question in plain language and cites the stored items it relied on. The engine implements it.-- **Fetch** is raw search over stored items with metadata filters (folder, repo, thread, source, time window). Both launch engines support hybrid search only.+- **Recall** answers a question in plain language and cites the stored items it used.+- **Fetch** is a raw search over stored items with metadata filters (folder, repo, thread, source, time window). Both engines support hybrid search only.- **Store** takes three kinds of items: documents, conversations and learnings.## What gets stored### The brain: documents-The **Brain** tab holds documents every agent shares, filed by source type: `pdf`, `markdown`, `notion`, `github`, `web`, and one per other source (`gmail`, `docx`, …). It shows how many documents each source holds, lets you search them, add one (pasted text or a file on your computer), and forget a whole source.+The **Brain** tab holds documents that every agent shares, filed by source type: `pdf`, `markdown`, `notion`, `github`, `web`, and one per other source (`gmail`, `docx` and so on). It shows how many documents each source holds. You can search them, add one (pasted text or a file from your computer), and forget a whole source.-Below that, **Synced sources** keep the brain up to date. A source is one of:+Below that, synced sources keep the brain up to date. A source is one of:| Kind | Target | Filed under || --- | --- | --- |-| `folder` | A folder on your computer | `pdf`, `web` (HTML) or `markdown` by file type |-| `file` | A single file | as for a folder |+| `folder` | A folder on your computer | `pdf`, `web` (HTML) or `markdown`, by file type |+| `file` | A single file | Same as a folder || `link` | A web page | `web` || `github` | A repository (`owner/repo`) | `github` || `rss` | A feed URL | `web` |-Sources sync when you press sync and on a schedule you set per source. An unchanged file that syncs again is not stored twice. Removing a source can also forget the items it produced.+Sources sync when you press sync and on a schedule you set for each source. An unchanged file that syncs again is not stored twice. Removing a source can also forget the items it produced.### Conversations-Every turn is logged as it happens: your message before the model runs, the reply after. Each agent's turns are kept apart. Tool calls are stored by name and id with a one-line result, never their arguments. Turn logging can be switched off on the **Conversations** tab, which also lists each agent's stored turns.+Every turn is logged as it happens: your message before the model runs, and the reply after. Each agent's turns are kept apart. Tool calls are stored by name and id with a one-line result, never their arguments. You can switch turn logging off on the **Conversations** tab, which also lists each agent's stored turns.### Learnings-A learning is one durable statement: a preference, fact, procedure or correction. The agent saves them with its `memory` tool (`learn` action), and you can add or delete them on the **Learnings** tab. Beliefs the engine built are listed there too, marked **Built belief**.+A learning is one lasting statement: a preference, fact, procedure or correction. The agent saves them with its `memory` tool (the `learn` action), and you can add or delete them on the **Learnings** tab. Beliefs the engine built are listed there too, marked "Built belief".Everything is scrubbed for secrets and personal identifiers before it leaves your machine.### Past conversations-Chats from before turn logging are not in memory until you sync them. The **Conversations** tab shows how many chats and turns are still unsynced; **Sync past conversations** uploads them (after you confirm) in the same form as new turns, without tool arguments. You can close the page while it runs, and syncing again later only sends what is new.+Chats from before turn logging are not in memory until you sync them. The **Conversations** tab shows how many chats and turns are still unsynced. **Sync past conversations** uploads them after you confirm, in the same form as new turns and without tool arguments. You can close the page while it runs, and syncing again later sends only what is new.## Exploring what memory holds-The **Explorer** tab shows everything your memory holds, grouped by one property at a time: type, memory node, source, workspace, folder, file, language, repository, link, thread, agent, tool or tag. Each value shows how many items carry it. Click one to narrow to those items, then group again by another property; the breadcrumb at the top takes you back up. The items at each step are listed below, and **Open** shows one in full with all its details and a **Forget** button.+The **Explorer** tab shows everything your memory holds, grouped by one property at a time: type, memory node, source, workspace, folder, file, language, repository, link, thread, agent, tool or tag. Each value shows how many items carry it. Click a value to narrow to those items, then group by another property. The breadcrumb at the top takes you back up. The items at each step are listed below. **Open** shows one in full with all its details and a **Forget** button.-On a very large memory the counts may cover only the items scanned so far; the tab says so when that happens.+On a very large memory, the counts may cover only the items scanned so far. The tab says so when that happens.## Each agent's own memory-Memory is organised the way a team works:+Memory is organized the way a team works:- **Shared by every agent:** learnings and the brain.-- **Each agent's own:** its conversations. The pack an agent gets leads with its own history; other agents' turns appear only briefly.-- **Teams and tenants:** an agent team gets a memory of its own, below its own root (`team:<id>`), apart from everyone else's.+- **Each agent's own:** its conversations. An agent's pack leads with its own history, and other agents' turns appear only briefly.+- **Teams and tenants:** an agent team gets its own memory below its own root (`team:<id>`), apart from everyone else's.-By default an agent's memory id is its definition id. In `config.toml`, `[memory.agents.<id>]` can give a definition another memory id (`agent_id`), another root (`root`), or switch its per-turn pack off (`recall = false`). A host that runs OpenHuman agents as part of something larger (an AI company, a multi-agent product) binds each agent to its own memory: `[memory] agent_id` and `root` on that agent's config, or `AgentSpec::memory(MemoryBinding::new("employee-7").root("team:acme"))` through the [embedding library](../developing/embedding.md).+By default an agent's memory id is its definition id. In `config.toml`, `[memory.agents.<id>]` can give a definition another memory id (`agent_id`), another root (`root`), or turn off its per-turn pack (`recall = false`).++A host that runs OpenHuman agents as part of something larger, such as an AI company or a multi-agent product, can bind each agent to its own memory. Use `[memory] agent_id` and `root` on that agent's config, or `AgentSpec::memory(MemoryBinding::new("employee-7").root("team:acme"))` through the [embedding library](../developing/embedding.md).## The agent's memory tool-The agent has one tool, `memory`, with four actions: `recall`, `fetch`, `learn` and `forget`. OpenHuman's own [MCP server](../developing/mcp-server.md) exposes the same abilities to other apps as `memory.recall`, `memory.fetch`, `memory.list`, `memory.learn` and `memory.forget`.+The agent has one tool, `memory`, with four actions: `recall`, `fetch`, `learn` and `forget`. OpenHuman's own [MCP server](../developing/mcp-server.md) offers the same abilities to other apps as `memory.recall`, `memory.fetch`, `memory.list`, `memory.learn` and `memory.forget`.## Settings and background work-The **Settings** tab sets the pack's shape: on or off, its size in tokens, how many learnings, documents and turns it holds, and how often beliefs are built. The **Background** tab lists queued belief builds and recent runs, with **Run now**. With the TinyHumans engine, beliefs are built on the service's own schedule.+The **Settings** tab sets the shape of the pack: on or off, its size in tokens, how many learnings, documents and turns it holds, and how often beliefs are built. The **Background** tab lists queued belief builds and recent runs, with a **Run now** button. With the TinyHumans engine, beliefs are built on the service's own schedule.## Importing your previous memory-If OpenHuman finds memory from the earlier (v1) version, the Memory page offers a one-time import. It uploads that data to the engine you selected, so it only starts after you explicitly consent. It resumes if interrupted.+If OpenHuman finds memory from the earlier (v1) version, the Memory page offers a one-time import. It uploads that data to the engine you selected, so it starts only after you consent. It resumes if interrupted.-## Removed+## What is not here-The memory tree, graph view, goals list, people and contacts, learning profile, `MEMORY.md` and `PROFILE.md`, the Obsidian vault, the local TinyCortex engine and the Supermemory, Mem0, Cognee and agentMemory engines are gone, as is engine migration. The compiled `context.md` brief is replaced by the per-turn memory pack. See the [spec](https://github.com/tinyhumansai/openhuman/blob/main/docs/specs/memory-v2.md).+The current memory has no memory tree, graph view, goals list, people and contacts, learning profile, `MEMORY.md` or `PROFILE.md` files, or Obsidian vault. Other memory engines (Supermemory, Mem0, Cognee, agentMemory and the local TinyCortex engine) are gone, and so is migrating between engines. The per-turn memory pack replaces the old compiled `context.md` brief.## See alsodiff --git a/gitbooks/features/model-routing/local-ai.md b/gitbooks/features/model-routing/local-ai.mdindex 92b5e2c526..c97a810940 100644--- a/gitbooks/features/model-routing/local-ai.md+++ b/gitbooks/features/model-routing/local-ai.md@@ -1,60 +1,56 @@---description: >-- Use a local model runtime you run yourself (Ollama, LM Studio, MLX, OMLX, or- any OpenAI-compatible server) as an OpenHuman provider. OpenHuman does not- install the runtime or download models.+ Use a model runtime you run yourself (Ollama, LM Studio, MLX, OMLX, or any+ OpenAI-compatible server) as an OpenHuman provider. OpenHuman does not install+ the runtime or download models.icon: microchip---# Local AI (optional)-OpenHuman can send any workload to a model running on your own machine: chat, reasoning, agentic turns, coding, vision, and embeddings. Local AI is **opt-in** and **off** by default.+OpenHuman 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:+OpenHuman does not install, start, stop or update a local runtime, and it does not download model weights. You do three things:-1. install and run the runtime yourself (Ollama, LM Studio, MLX, OMLX, or another OpenAI-compatible server),-2. pull or load the models you want with that runtime's own tools (for example `ollama pull bge-m3`),-3. add the runtime's endpoint to OpenHuman as a provider and route workloads to it.+1. Install and run the runtime yourself (Ollama, LM Studio, MLX, OMLX, or another OpenAI-compatible server).+2. Pull or load the models you want with that runtime's own tools, for example `ollama pull bge-m3`.+3. Add the runtime's endpoint to OpenHuman as a provider and route workloads to it.-If a workload names a model the runtime does not have, the request fails with the runtime's error. Pull the model and retry; OpenHuman will not fetch it for you.+If a workload names a model the runtime does not have, the request fails with the runtime's error. Pull the model and retry. OpenHuman will not fetch it for you.## Supported runtimes-Every local runtime is reached over its OpenAI-compatible HTTP API. The provider string prefix decides which runtime a workload uses (`crates/openhuman-core/src/inference/provider/factory/local_runtime.rs`):+OpenHuman reaches every local runtime over its OpenAI-compatible HTTP API. The prefix of the provider string decides which runtime a workload uses.| Runtime | Provider string | Default endpoint | Endpoint overrides (highest first) || -------------------------------- | ---------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------- |-| [Ollama](https://ollama.com) | `ollama:<model>` | `http://127.0.0.1:11434` | `local_ai.base_url`, then `OPENHUMAN_OLLAMA_BASE_URL`, then `OLLAMA_HOST`. OpenHuman appends `/v1` for chat. |+| [Ollama](https://ollama.com) | `ollama:<model>` | `http://127.0.0.1:11434` | `local_ai.base_url`, then `OPENHUMAN_OLLAMA_BASE_URL`, then `OLLAMA_HOST`. OpenHuman appends `/v1` for chat. || [LM Studio](https://lmstudio.ai) | `lmstudio:<model>` | `http://localhost:1234/v1` | `OPENHUMAN_LM_STUDIO_BASE_URL`, then `LM_STUDIO_BASE_URL`, then `local_ai.base_url` || MLX (`mlx_lm.server`) | `mlx:<model>` | `http://127.0.0.1:8080/v1` | `OPENHUMAN_LOCAL_INFERENCE_URL`, then `MLX_SERVER_URL`, then `local_ai.base_url` || OMLX | `omlx:<model>` | `http://127.0.0.1:8000/v1` | `OPENHUMAN_LOCAL_INFERENCE_URL`, then `OMLX_SERVER_URL`, then `local_ai.base_url` || Any OpenAI-compatible server | `local-openai:<model>` | `http://127.0.0.1:8080/v1` | `OPENHUMAN_LOCAL_INFERENCE_URL`, then `LOCAL_OPENAI_URL`, then `local_ai.base_url` |-LM Studio, OMLX, and `local-openai` send `local_ai.api_key` as a Bearer token when one is set; Ollama and MLX send no auth. Local runtimes do not need an OpenHuman account.+LM Studio, OMLX and `local-openai` send `local_ai.api_key` as a Bearer token when one is set. Ollama and MLX send no auth. Local runtimes do not need an OpenHuman account.-The model part of the provider string is passed to the runtime unchanged, so it must match the runtime's own model id (for Ollama, the name you pulled, including the tag). An optional `@<temperature>` suffix pins a temperature, for example `ollama:qwen2.5:[email protected]`.+The model part of the provider string goes to the runtime unchanged, so it must match the runtime's own model id. For Ollama, that is the name you pulled, including the tag. An optional `@<temperature>` suffix pins a temperature, for example `ollama:qwen2.5:[email protected]`.## Multiple self-hosted servers-If you run several OpenAI-compatible model servers, a gateway can expose one-endpoint and use named model IDs to select the upstream. See-[Use multiple local LLM servers](../../guides/multiple-local-llm-servers.md) for an-optional community Model Router example with a Mac mini and Linux GPU PC.-OpenHuman does not bundle or supervise the gateway.+If you run several OpenAI-compatible model servers, a gateway can expose one endpoint and use named model ids to pick the upstream server. See [Use multiple local LLM servers](../../guides/multiple-local-llm-servers.md) for an optional community example with a Mac mini and a Linux GPU PC. OpenHuman does not bundle or supervise the gateway.## Adding a local runtime in the app1. Start the runtime and make sure its server is listening. For Ollama, `curl http://localhost:11434/api/tags` should return JSON.2. Pull or load the models you plan to use (see [Use OpenHuman with a local model](../../guides/local-model.md)).-3. Open **Connections → LLM**, choose **Add a provider**, and pick the runtime under **Local runtimes** (Ollama, LM Studio, OMLX). For MLX or another server, use **Add a custom provider** with its OpenAI-compatible endpoint.+3. Open **Connections > LLM**, choose **Add a provider**, and pick the runtime under **Local runtimes** (Ollama, LM Studio, OMLX). For MLX or another server, use **Add a custom provider** with its OpenAI-compatible endpoint.4. Confirm or edit the endpoint. On save, OpenHuman writes `local_ai.base_url` and `local_ai.provider`, turns on `local_ai.runtime_enabled`, and lists the endpoint's models. If the runtime is not reachable, the provider is not saved.5. Route workloads to it with **Custom routing**, choosing from the models the runtime reports.-The model list comes from the runtime. A model you have not pulled does not appear; pull it in the runtime and reopen the picker.+The model list comes from the runtime. A model you have not pulled does not appear. Pull it in the runtime and reopen the picker.## Configuration-The same setup by hand, in `config.toml`:+Here is the same setup by hand in `config.toml`:```toml[local_ai]@@ -66,7 +62,7 @@ embedding_model_id = "bge-m3"vision_model_id = "gemma3:4b-it-qat" # leave empty for no local vision```-Workload routing lives at the top level of `config.toml`; each field takes a provider string:+Workload routing sits at the top level of `config.toml`. Each field takes a provider string:```tomlchat_provider = "ollama:gemma3:4b-it-qat"@@ -74,67 +70,67 @@ reasoning_provider = "ollama:qwen2.5:14b"embeddings_provider = "ollama:bge-m3"```-The workload fields are `chat_provider`, `reasoning_provider`, `agentic_provider`, `coding_provider`, `vision_provider`, `memory_provider` and `embeddings_provider`. A field that is unset, blank, or `cloud` stays on the default route. For 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 workload fields are `chat_provider`, `reasoning_provider`, `agentic_provider`, `coding_provider`, `vision_provider`, `memory_provider` and `embeddings_provider`. A field that is unset, blank or `cloud` stays on the default route. For background workloads, a workload counts as local only when its field is `ollama:<model>`.-The legacy `local_ai.usage.*` booleans are kept only so older configs migrate. They do not override the workload fields.+The older `local_ai.usage.*` booleans remain only so older configs migrate. They do not override the workload fields.## What the local runtime is used for-| Workload | Configured by | Notes |-| ------------------------------------ | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |-| **Chat, reasoning, coding, agentic** | `chat_provider`, `reasoning_provider`, ... | Any local prefix from the table above. |-| **Vision** | `vision_provider`, `local_ai.vision_model_id` | Must be a vision-capable model. See [Local vision](#local-vision). |+| Workload | Configured by | Notes |+| -------------------------------- | --------------------------------------------- | ------------------------------------------------------------------ |+| Chat, reasoning, coding, agentic | `chat_provider`, `reasoning_provider`, ... | Any local prefix from the table above. |+| Vision | `vision_provider`, `local_ai.vision_model_id` | Must be a vision-capable model. See [Local vision](#local-vision). |-For lightweight chat hints (`hint:reaction`, `hint:classify`, `hint:format`, `hint:sentiment`, `hint:summarize`, `hint:medium`, `hint:tool_lite`), the [router](README.md) prefers the local provider when `local_ai.runtime_enabled = true` and 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.+For lightweight chat hints (`hint:reaction`, `hint:classify`, `hint:format`, `hint:sentiment`, `hint:summarize`, `hint:medium`, `hint:tool_lite`), the [router](README.md) prefers the local provider when `local_ai.runtime_enabled = true` and the runtime is reachable. Heavy hints (`hint:reasoning`, `hint:agentic`, `hint:coding`) stay on the default route unless the matching workload field points at a local provider.## What stays in the cloud by default-| Workload | Why |-| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |-| **STT** | Backend-proxied transcription (`crates/openhuman-core/src/voice/cloud_transcribe.rs`) or a third-party key. There is no local STT engine. |-| **TTS** | Hosted [text-to-speech](../native-tools/voice.md) by default. Local Piper works if you install it yourself and set `PIPER_BIN`. |-| **Web search** | Backend proxy, or your own search provider key. |+| Workload | Why |+| ---------- | -------------------------------------------------------------------------------------------------------------------- |+| STT | Transcription goes through the backend or a third-party key. There is no local speech-to-text engine. |+| TTS | [Text-to-speech](../native-tools/voice.md) is hosted by default. Local Piper works if you install it and set `PIPER_BIN`. |+| Web search | Backend proxy, or your own search provider key. |Any workload you have not pointed at a local provider keeps using the default route.### Local text-to-speech with Piper-Setting `local_ai.tts_provider = "piper"` runs [Piper](https://github.com/rhasspy/piper) for spoken replies. OpenHuman does not ship or install Piper or its voices: install the Piper binary and a voice model yourself and point the `PIPER_BIN` environment variable at the binary.+Setting `local_ai.tts_provider = "piper"` runs [Piper](https://github.com/rhasspy/piper) for spoken replies. OpenHuman does not ship or install Piper or its voices. Install the Piper binary and a voice model yourself, and point the `PIPER_BIN` environment variable at the binary.## Privacy-[Privacy Mode](../privacy-mode.md) set to `local_only` refuses every non-local chat provider at construction time and permits only the local prefixes above. It does not start a runtime or fetch models: with privacy mode on and no reachable local runtime, workloads fail rather than fall back to the cloud.+[Privacy mode](../privacy-mode.md) set to `local_only` refuses every non-local chat provider and permits only the local prefixes above. It does not start a runtime or fetch models. With privacy mode on and no reachable local runtime, workloads fail instead of falling back to the cloud.-Without privacy mode, lightweight hints routed to a local provider that turns out to be unreachable fall back to the remote provider. Use privacy mode if strict locality matters.+Without privacy mode, a lightweight hint routed to an unreachable local provider falls back to the remote provider. Use privacy mode if strict locality matters.-The backend URL guard in `crates/openhuman-tinyhumans/src/backend/url.rs` keeps the two kinds of endpoint apart. If `api_url` is set to something that looks like a local model server (a loopback or private host on a common runner port such as 11434, 1234, 8000, or 8080, or a `/v1/chat/completions` path), backend requests ignore it and go to the hosted API. Configure local endpoints through a provider or `local_ai.base_url`, not `api_url`.+OpenHuman also keeps local and hosted endpoints apart. If `api_url` looks like a local model server (a loopback or private host on a common runner port such as 11434, 1234, 8000 or 8080, or a `/v1/chat/completions` path), backend requests ignore it and go to the hosted API. Set local endpoints through a provider or `local_ai.base_url`, not `api_url`.## Local vision-Vision is a separate capability from chat, and most small local models cannot do it. Ollama does not reject an image sent to a text-only model: it drops the image and answers from the prompt text, which produces a description of something the model never saw. OpenHuman resolves the vision model through a capability check and refuses to route a vision request at a known chat-only model.+Vision is separate from chat, and most small local models cannot do it. Ollama does not reject an image sent to a text-only model. It drops the image and answers from the prompt text, so you get a description of something the model never saw. OpenHuman checks the vision model's capabilities and refuses to route a vision request to a known chat-only model.-- `vision_provider` and `local_ai.vision_model_id` must name a vision-capable model, and you must have pulled it. `moondream:1.8b-v2-q4_K_S` (about 1.7 GB) is a small option; `gemma3:4b-it-qat` handles chat and vision with one set of weights.-- Gemma 3 is text-only at 270M and 1B and multimodal from 4B up. Gemma 3n is a different model and is text-only at every size.+- `vision_provider` and `local_ai.vision_model_id` must name a vision-capable model that you have pulled. `moondream:1.8b-v2-q4_K_S` (about 1.7 GB) is a small option. `gemma3:4b-it-qat` handles chat and vision with one set of weights.+- Gemma 3 is text-only at 270M and 1B, and multimodal from 4B up. Gemma 3n is a different model and is text-only at every size.- Leaving `vision_model_id` empty is a valid "no local vision" setup.-- Attaching an image to a chat turn also needs the model's **vision** flag in the model registry. See [Local models & bring your own key](local-and-byok-models.md#attaching-images-in-chat-needs-one-more-flag).+- To attach an image to a chat turn, the model also needs its vision flag set in the model registry. See [Local models and bring your own key](local-and-byok-models.md#attaching-images-in-chat-needs-one-more-flag).## What you need- The runtime installed and running. OpenHuman does not manage it.- The models pulled or loaded in that runtime.-- Enough disk and RAM for the models you chose. As a rough guide, `bge-m3` is about 1.2 GB on disk and a 4B chat model about 4 GB; plan for 8 GB+ RAM, 16 GB+ for larger models.+- Enough disk and RAM for the models you chose. As a rough guide, `bge-m3` is about 1.2 GB on disk and a 4B chat model about 4 GB. Plan for 8 GB or more of RAM, and 16 GB or more for larger models.-### Troubleshooting+## Troubleshooting-- **Provider will not save, or the model list is empty.** The runtime is not reachable at the endpoint. Start it and check the port. For Ollama, run `curl http://localhost:11434/api/tags`.-- **The runtime reports the model is missing.** The model is not pulled or loaded. Run `ollama pull <model>`, or load it in LM Studio, then retry.-- **LM Studio on a different port.** Set `local_ai.base_url` or `OPENHUMAN_LM_STUDIO_BASE_URL`. Load the model in LM Studio before OpenHuman calls it.-- **Ollama context too small for agent turns.** Set `local_ai.num_ctx` to send `options.num_ctx` with each Ollama chat request.+- **The provider will not save, or the model list is empty.** The runtime is not reachable at the endpoint. Start it and check the port. For Ollama, run `curl http://localhost:11434/api/tags`.+- **The runtime says the model is missing.** The model is not pulled or loaded. Run `ollama pull <model>`, or load it in LM Studio, then retry.+- **LM Studio runs on a different port.** Set `local_ai.base_url` or `OPENHUMAN_LM_STUDIO_BASE_URL`. Load the model in LM Studio before OpenHuman calls it.+- **Ollama's context is too small for agent turns.** Set `local_ai.num_ctx` to send `options.num_ctx` with each Ollama chat request.## See also-- [Use OpenHuman with a local model](../../guides/local-model.md). Step-by-step setup.-- [Local models & bring your own key](local-and-byok-models.md). Per-model capability table and BYOK setup.-- [Memory](../memory.md). Memory is stored by its engine, not by a local model.-- [Automatic Model Routing](README.md). How lightweight chat hints prefer the local provider.-- [Privacy Mode](../privacy-mode.md). Enforcing local-only inference.+- [Use OpenHuman with a local model](../../guides/local-model.md): step-by-step setup.+- [Local models and bring your own key](local-and-byok-models.md): per-model capability table and BYOK setup.+- [Memory](../memory.md): memory is stored by its engine, not by a local model.+- [Model routing](README.md): how lightweight chat hints prefer the local provider.+- [Privacy mode](../privacy-mode.md): enforcing local-only inference.diff --git a/gitbooks/guides/local-model.md b/gitbooks/guides/local-model.mdindex 0eb43fd59a..87738902a0 100644--- a/gitbooks/guides/local-model.md+++ b/gitbooks/guides/local-model.md@@ -1,36 +1,32 @@---description: >-- Run a local model runtime yourself (Ollama, LM Studio, MLX, or any+ Run a local model runtime yourself (Ollama, LM Studio, MLX or anyOpenAI-compatible server), pull your own models, and add the endpoint to- OpenHuman as a provider. Includes checks and common failures.+ OpenHuman as a provider.icon: microchip---# Use OpenHuman with a local model-**Goal:** move some or all of OpenHuman's model work onto your own computer, so that the data used for those workloads never leaves the machine.+This guide moves some or all of OpenHuman's model work onto your own computer, so the data for those workloads never leaves the machine.-OpenHuman does not install a runtime, start it, or download models. You run the runtime, you pull the models, and OpenHuman calls the endpoint you give it. Local AI is **opt-in**; adding a local provider does not reroute anything until you point workloads at it.+OpenHuman does not install a runtime, start it or download models. You run the runtime and pull the models, and OpenHuman calls the endpoint you give it. Local AI is opt-in: adding a local provider reroutes nothing until you point workloads at it.-For the config reference (provider strings, endpoint overrides, every workload field), see [Local AI (optional)](../features/model-routing/local-ai.md). This guide is the task-oriented version.-----+For the config reference (provider strings, endpoint overrides and every workload field), see [Local AI](../features/model-routing/local-ai.md). This page is the task-oriented version.## Prerequisites- A local runtime you install and run yourself:- - [**Ollama**](https://ollama.com), default address `http://localhost:11434`.- - [**LM Studio**](https://lmstudio.ai) with its local server enabled, default `http://localhost:1234/v1`.+ - [Ollama](https://ollama.com), default address `http://localhost:11434`.+ - [LM Studio](https://lmstudio.ai) with its local server enabled, default `http://localhost:1234/v1`.- MLX (`mlx_lm.server`), OMLX, or any other OpenAI-compatible server.-- Disk and RAM for the models you pick. A small chat model plus `bge-m3` for embeddings is a few GB on disk; 8 GB+ RAM is a sensible floor.+- Disk and RAM for the models you pick. A small chat model plus `bge-m3` for embeddings takes a few GB on disk. 8 GB of RAM is a sensible minimum.## Privacy implications-- Workloads you route locally run on-device. Nothing about that work is sent out.-- Anything you leave on the default route still goes through the OpenHuman [model router](../features/model-routing/README.md). Local AI 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.-----+- Workloads you route locally run on-device, and nothing about that work is sent out.+- Anything you leave on the default route still goes through the OpenHuman [model router](../features/model-routing/README.md). Local AI changes only the workloads you move.+- Without [Privacy mode](../features/privacy-mode.md), lightweight hints routed locally can fall back to the remote provider if the runtime is unreachable. Turn on `local_only` privacy mode if strict locality matters. An unreachable runtime then makes the request fail instead.## Steps@@ -42,11 +38,11 @@ Install and launch the runtime so its server is running. For Ollama, confirm frocurl http://localhost:11434/api/tags```-A JSON list of models (even an empty one) means the server is reachable. For LM Studio or another OpenAI-compatible server, `curl http://localhost:1234/v1/models` (adjust the port) should return a model list.+A JSON list of models, even an empty one, means the server is reachable. For LM Studio or another OpenAI-compatible server, `curl http://localhost:1234/v1/models` (adjust the port) should return a model list.### 2. Pull the models yourself-OpenHuman never pulls models. Pull every model you plan to route to before you configure it. For Ollama:+OpenHuman never pulls models. Pull every model you plan to use before you configure it. For Ollama:```bashollama pull gemma3:4b-it-qat # chat, and vision from 4B up@@ -55,28 +51,26 @@ ollama pull bge-m3 # memory embeddings (1024 dimensions)In LM Studio, download the model in LM Studio and load it. For MLX or another server, start it with the model you want served.-See [Local models & bring your own key](../features/model-routing/local-and-byok-models.md) for which models can do chat, vision, and embeddings.+See [Local models and bring your own key](../features/model-routing/local-and-byok-models.md) for which models can do chat, vision and embeddings.### 3. Add the endpoint as a providerOpen **Connections → LLM** and choose **Add a provider**:-- For Ollama, LM Studio, or OMLX, pick it under **Local runtimes**. The default endpoint is filled in; change it if your runtime listens elsewhere.-- For MLX or another server, choose **Add a custom provider** and enter its OpenAI-compatible endpoint (for example `http://127.0.0.1:8080/v1`).+- For Ollama, LM Studio or OMLX, pick it under **Local runtimes**. The default endpoint is filled in. Change it if your runtime listens elsewhere.+- For MLX or another server, choose **Add a custom provider** and enter its OpenAI-compatible endpoint, for example `http://127.0.0.1:8080/v1`.-When you save, OpenHuman asks the endpoint for its model list. If the runtime isn't reachable, the provider isn't saved; fix step 1 and try again.+When you save, OpenHuman asks the endpoint for its model list. If the runtime is not reachable, the provider is not saved. Fix step 1 and try again.### 4. Route workloads to it-Use **Custom routing** on the workloads you want local (chat, reasoning, vision, and so on) and pick a model the runtime reported. Only models you have pulled or loaded appear.+Use **Custom routing** on the workloads you want local (chat, reasoning, vision and so on) and pick a model the runtime reported. Only models you have pulled or loaded appear.For memory embeddings, open **Connections → Embeddings** and choose Ollama with `bge-m3`, or set `embeddings_provider = "ollama:bge-m3"` in `config.toml`.### 5. Test that it answers-Send a short message on a workload you routed locally, or use the model test in the LLM panel. A coherent reply means the path works end to end (endpoint reachable, model present, inference running). For Ollama you can also watch `ollama ps` while the request runs.-----+Send a short message on a workload you routed locally, or use the model test in the LLM panel. A coherent reply means the path works end to end: the endpoint is reachable, the model is present and inference runs. For Ollama you can also watch `ollama ps` while the request runs.## Success checks@@ -84,34 +78,32 @@ Local AI is working when:- [ ] The local provider shows as connected under **Connections → LLM**, and its model list contains the models you pulled.- [ ] A turn routed to the local provider returns a real reply.-- [ ] For embeddings: after the next memory sync, new summaries keep appearing in the **Memory** tab with the runtime running.+- [ ] For embeddings, new summaries keep appearing in the Memory tab after the next memory sync, with the runtime running.## Common failures| What you see | Meaning | Fix || --------------------------------------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |-| Provider won't save; the endpoint is reported unreachable | OpenHuman can't reach the runtime at that address | Start the runtime; check the port with `curl`; correct the endpoint |-| The model you want isn't in the picker | The runtime doesn't have it | `ollama pull <model>`, or download and load it in LM Studio, then reopen the picker |+| The provider will not save and the endpoint is reported unreachable | OpenHuman cannot reach the runtime at that address | Start the runtime, check the port with `curl`, and correct the endpoint |+| The model you want is not in the picker | The runtime does not have it | `ollama pull <model>`, or download and load it in LM Studio, then reopen the picker || A request fails saying the model is not found | The workload names a model the runtime no longer has | Pull it again, or route the workload to a model you have || Ollama answers but every model call fails | Ollama's model runner is broken | Quit and relaunch Ollama, then retry |-| Embeddings fail with a dimension error | The embedding model doesn't produce 1024-dimension vectors | Use `bge-m3` |+| Embeddings fail with a dimension error | The embedding model does not produce 1024-dimension vectors | Use `bge-m3` || Agent turns lose context on Ollama | Ollama's default context window is small | Set `local_ai.num_ctx` (for example `8192`) |-| Answers feel cloud-quality | The runtime was unreachable and a lightweight hint fell back to remote | Fix reachability; use `local_only` privacy mode if fallback is unacceptable |+| Answers feel cloud-quality | The runtime was unreachable and a lightweight hint fell back to remote | Fix reachability. Use `local_only` privacy mode if fallback is unacceptable |## Recovery-- **Back to cloud:** set the routed workloads back to the default route in **Custom routing**, or remove the local provider. No data is lost.-- **Stuck runtime:** quit the runtime fully and relaunch it. OpenHuman reconnects on the next request.-- **Disk pressure:** model pulls happen in your runtime, not in OpenHuman. Free space and pull again with the runtime's own command.-----+- **Back to cloud.** Set the routed workloads back to the default route in **Custom routing**, or remove the local provider. No data is lost.+- **Stuck runtime.** Quit the runtime fully and relaunch it. OpenHuman reconnects on the next request.+- **Disk pressure.** Model pulls happen in your runtime, not in OpenHuman. Free space and pull again with the runtime's own command.-## Notes on what stays cloud anyway+## What stays in the cloud anyway-Some workloads use the backend unless you configure something else: speech-to-text and web search go through the backend proxy, and text-to-speech uses the hosted voice unless you install Piper yourself and set `PIPER_BIN`. See [what stays in the cloud](../features/model-routing/local-ai.md#what-stays-in-the-cloud-by-default).+Some workloads use the backend unless you configure something else. Speech-to-text and web search go through the backend proxy. Text-to-speech uses the hosted voice unless you install Piper yourself and set `PIPER_BIN`. See [what stays in the cloud](../features/model-routing/local-ai.md#what-stays-in-the-cloud-by-default).## See also-- [Local AI (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/README.md): how tasks get matched to models.+- [Local AI](../features/model-routing/local-ai.md): the config reference.+- [Keep sensitive data private](privacy-sensitive-data.md): what stays local and what leaves.+- [Automatic model routing](../features/model-routing/README.md): how tasks get matched to models.diff --git a/gitbooks/guides/personal-assistant.md b/gitbooks/guides/personal-assistant.mdindex 128af4122d..15f7d0fd19 100644--- a/gitbooks/guides/personal-assistant.md+++ b/gitbooks/guides/personal-assistant.md@@ -1,61 +1,54 @@---description: >-- Go from a fresh install to a working personal assistant that knows your- context, respects the boundaries you set, and, at the supervised tier, acts- only with your approval.+ Go from a fresh install to a personal assistant that knows your context,+ respects the boundaries you set, and acts only with your approval at the+ supervised tier.icon: robot---# Create my personal AI assistant-**Goal:** a working assistant that has some memory of your world, replies in a style you like, and, once you put it on the supervised tier, takes no real-world action without your say-so.--This is the "start here" guide. It assumes nothing beyond a downloaded app.-----+This is the start-here guide. By the end you have an assistant that remembers part of your world, replies in a style you like, and, on the supervised tier, takes no real-world action without your say-so. It assumes nothing beyond a downloaded app.## Prerequisites-- OpenHuman installed on macOS, Windows, or Linux. If you haven't installed yet, do [Getting Started](../overview/getting-started.md) first, then come back.-- 4 GB+ RAM (16 GB+ if you plan to connect very large mailboxes or run a [local model](local-model.md)).+- OpenHuman installed on macOS, Windows, or Linux. If you have not installed yet, do [Getting started](../overview/getting-started.md) first, then come back.+- 4 GB+ RAM (16 GB or more if you plan to connect very large mailboxes or run a [local model](local-model.md)).- An account to sign in with (social login works).- Optional: one account you'd like the assistant to know about (Gmail is the usual first one).## Privacy implications-- Signing in **does not** grant ongoing access to anything. Every integration is a separate, explicit OAuth approval you can revoke later.+- Signing in does not grant ongoing access to anything. Every integration is a separate OAuth approval that you can revoke later.- Your memory is stored by the engine you choose: hosted TinyHumans or your own CortexDB. With neither, memory is off.-- By default, chat/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).-----+- By default, chat and reasoning run through the OpenHuman-hosted [model router](../features/model-routing/README.md). If you want inference on-device instead, see [Use OpenHuman with a local model](local-model.md).+- For the full picture, see [Keep sensitive data private](privacy-sensitive-data.md).## Steps### 1. Sign in-Launch the app. The first screen is **"Sign in! Let's Cook"**. Choose a login option. There is an **Advanced** panel for pointing at a custom core; most people ignore it.+Launch the app. The first screen is **Sign in! Let's Cook**. Choose a login option. An **Advanced** panel lets you point at a custom core, which most people can ignore.### 2. Choose how AI runs-After sign-in you'll hit a **runtime choice**:+After sign-in you choose how AI runs:-- **Cloud**: one click, and the hosted model router handles inference. This is the fastest path to a working assistant.-- **Custom**: walk through choosing your inference provider, voice, integrations (OAuth), web search, and embeddings yourself.+- **Cloud** takes one click, and the hosted model router handles inference. It is the fastest way to a working assistant.+- **Custom** lets you choose your inference provider, voice, integrations (OAuth), web search and embeddings yourself.-If you're not sure, pick **Cloud**. You can change any of this later in **Settings**.+If you are not sure, pick Cloud. You can change any of this later in **Settings**.### 3. Give it something to remember-An assistant with no memory is just a chatbot. Connect at least one source so it has context to draw on:+An assistant with no memory is a chatbot. Connect at least one source so it has context:- Open **Settings** and connect an integration (Gmail is the common starting point). Each connection is a one-click OAuth approval.- Add folders, files or links as sources under **Connections → Memory** so they sync into [Memory](../features/memory.md) on a schedule.### 4. Set your boundaries-Open `config.toml` in your data folder (`~/.openhuman/config.toml`, or-`%USERPROFILE%\.openhuman\config.toml` on Windows) and turn the policy on:+Open `config.toml` in your data folder (`~/.openhuman/config.toml`, or `%USERPROFILE%\.openhuman\config.toml` on Windows) and turn the policy on:```toml[autonomy]@@ -63,78 +56,63 @@ enabled = truelevel = "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, unless its tool is on your always-allow list. |-| `full` | Routine actions run automatically; network, install and destructive actions still ask. |+| Tier | What it means |+| --- | --- |+| `readonly` | The assistant can observe and answer, but never acts: no sending, no file writes, no commands. |+| `supervised` | It can act, but any state-changing, network, install or destructive action waits for your approval first, unless its tool is on your always-allow list. |+| `full` | Routine actions run automatically. Network, install and destructive actions still ask. |{% hint style="warning" %}-**The policy is off until you set `enabled = true`.** 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.+The policy is off until you set `enabled = true`. There is no user-facing switch for the tier, because the panel that holds the radios is a developer-only deep link. Until you turn the policy on, acting tool calls run without a prompt. Credential stores (`~/.ssh`, `~/.gnupg`, `~/.aws`) and system roots stay blocked either way.{% endhint %}-`supervised` is the right starting point. With it on, nothing with an external-effect happens in a chat without you saying yes: that is the-[Approval Gate](../features/approval-gate.md). The one exception is a tool you-put on the always-allow list, by answering **Always allow** to a prompt. That-tool runs from then on without a fresh approval. Remove it from the list in-**Settings → Agent access** when you want per-call review back.+`supervised` is the right starting point. With it on, nothing with an external effect happens in a chat unless you say yes. That check is the [Approval Gate](../features/approval-gate.md). The one exception is a tool you add to the always-allow list by answering **Always allow** to a prompt. That tool then runs without a fresh approval. Remove it from the list in **Settings → Agent access** to get per-call review back.-**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.+Once the policy is on, **Settings → Agent access** holds the rest of the boundary: the trusted roots, the always-allow list, the action timeout and the workspace-only switch.### 5. Shape its personality (optional)-How the assistant talks and behaves is defined by an editable prompt called **`SOUL.md`** (its mission and values live in a companion **`IDENTITY.md`**). You don't have to touch these (they ship with sensible defaults), but you can:+An editable prompt called `SOUL.md` defines how the assistant talks and behaves. Its mission and values live in a companion file, `IDENTITY.md`. Both ship with sensible defaults, so you do not have to touch them, but you can:- Set a display name and short description in **Settings → Personality**.-- Edit the behavior itself via the **Brain** page (the raised center button in the bottom bar, `/brain`), where memory, goals, and intelligence live.+- Edit the behavior on the **Brain** page (the raised center button in the bottom bar, `/brain`), where memory, goals and intelligence live.-OpenHuman also **learns** durable preferences from how you correct it over time. See [Personalization & Self-Learning](../features/personalization.md).+OpenHuman also learns lasting preferences from how you correct it. See [Personalization and self-learning](../features/personalization.md).### 6. Run your first real request-Once a source has been ingested, try:+Once a source has synced, try:- "What do I need to know from the last 12 hours?"- "What's waiting on me?"- "Summarize what I missed today."-----## Success checks-You have a working assistant when **all** of these are true:+You have a working assistant when all of these are true:-- [ ] The app is signed in (you're past the welcome screen and in the chat/home view).-- [ ] At least one integration shows as **connected** in Settings.+- [ ] The app is signed in (you are past the welcome screen and in the chat or home view).+- [ ] At least one integration shows as connected in Settings.- [ ] A briefing prompt ("what's waiting on me?") returns something drawn from your actual data, not a generic answer.-- [ ] Opening **Connections → Memory → Brain** shows your source with an item count after it syncs.-- [ ] When you ask it to do something with an external effect (e.g. "draft and send an email"), you see an **Approval Request card** appear above the chat box rather than it silently acting.+- [ ] Connections → Memory → Brain shows your source with an item count after it syncs.+- [ ] When you ask it to do something with an external effect (for example "draft and send an email"), an Approval Request card appears above the chat box instead of the assistant acting silently.## Common failures| Symptom | What it means | Fix || ------------------------------------------------ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |-| Sign-in returns to the welcome screen | The OAuth callback didn't reach the app | Follow [Troubleshooting Sign-In](../overview/troubleshooting-sign-in.md) |+| Sign-in returns to the welcome screen | The OAuth callback did not reach the app | Follow [Troubleshooting sign-in](../overview/troubleshooting-sign-in.md) || Connected a source but memory stays empty | Source not added or not synced yet, or the OAuth scope is too narrow | Press sync on the source; re-check the connection in Settings |-| Assistant answers generically, ignores your data | It answered without recalling memory | Ask again and reference the source explicitly ("from my email…"); confirm the source is connected |-| 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` |+| Assistant answers generically, ignores your data | It answered without recalling memory | Ask again and name the source ("from my email"). Confirm the source is connected |+| It did something you did not expect | The autonomy policy is off, or `level` is `full` | Set `[autonomy] enabled = true` and `level = "supervised"` in `config.toml` |## Recovery-- **Reset boundaries fast:** if the assistant is doing too much, set both `enabled = true` and `level = "readonly"` in `config.toml`. The level alone changes nothing while `enabled` is `false`, because the whole policy is inert then. With both set, it takes effect on the next turn and blocks all acting immediately.-- **Nothing you connect is permanent:** revoke any integration from Settings; items already stored in your memory engine stay until you forget them (or tick **Also delete memory from this source** when disconnecting), 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.-----+- **Reset boundaries fast.** If the assistant is doing too much, set both `enabled = true` and `level = "readonly"` in `config.toml`. The level alone changes nothing while `enabled` is `false`, because the whole policy is off then. With both set, it takes effect on the next turn and blocks all acting.+- **Nothing you connect is permanent.** Revoke any integration from Settings. Items already in your memory engine stay until you forget them, or until you tick **Also delete memory from this source** when disconnecting. The next sync stops pulling that source.+- **If the app will not start,** see [Recover from a failed installation](recover-failed-installation.md). Your configuration is preserved by default.## Next steps- [Use OpenHuman with a local model](local-model.md): keep inference on-device.-- [Keep sensitive data private](privacy-sensitive-data.md): understand exactly what leaves your machine.+- [Keep sensitive data private](privacy-sensitive-data.md): see what leaves your machine.