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
chore(docs,scripts): remove subconscious references and stale test script
Steven Enamakela783bb90b107
diff --git a/docs/library-benchmarking.md b/docs/library-benchmarking.mdindex 66cbb8f125..396a5fc875 100644--- a/docs/library-benchmarking.md+++ b/docs/library-benchmarking.md@@ -6,19 +6,19 @@RPC server, no Tauri shell, just the core linked in-process and drivendirectly. That changes what "resource usage" means. There is no single steadyprocess to profile; there are per-use-case workloads (a long-running agent-loop, a delegated multi-agent turn, a saved workflow run, a background-subconscious pass, a memory ingest, a bare embed) that each have their own+loop, a delegated multi-agent turn, a saved workflow run, a memory ingest,+a bare embed) that each have their ownstartup cost, steady-state footprint, and growth curve.This document describes the benchmark environment built to measure that: a-pinned `library-profile` binary with eight scenarios, the driver scripts+pinned `library-profile` binary with seven scenarios, the driver scriptsunder `scripts/profile/`, and the comparison point the team cares about(ZeroClaw). It builds on an earlier manual investigation into deep memory/CPUattribution (removed from the tree; see git history at `0017c58d86~1` for theoriginal write-up). This document is about running repeatable benchmarks, notre-deriving those findings.-## The eight scenarios+## The seven scenariosAll scenarios run in `target/release/library-profile <scenario>`, replacenetwork inference with a deterministic provider (`rss-bench` feature), and@@ -32,7 +32,6 @@ stderr). Each models a distinct embedding use case:| `agent-turn` | The minimal embed case: one agent, one turn, no delegation, no workflow. The smallest useful "hello world" for a host that just wants a single reply. || `long-agent` | A long-running agent loop (`OPENHUMAN_PROFILE_TURNS`, default 25) in one process, to see whether RSS plateaus or grows per turn. || `workflow` | A saved automation run (`flows_create` + `flows_run`), representing the flows/automation embedding path rather than ad hoc chat. |-| `subconscious` | A background subconscious turn (the always-on reflective pass), distinct from an interactive chat turn. || `cold-phases` | Bootstrap attribution: per-phase checkpoints (config load, registry init, agent build, memory construction, first turn) so cold-start cost can be attributed to a phase instead of one lump sum. || `fleet` | N concurrent live agents with latency-realistic mock inference — the "100-1000 agents in a 2 GB / 2 vCPU server" question. See [below](#the-2-gb--2-vcpu-server-budget). |@@ -119,7 +118,7 @@ behavior, not linked code size.| Variable | Effect || --- | --- || `OPENHUMAN_PROFILE_TURNS` | Turn count for `long-agent` (default 25). |-| `OPENHUMAN_PROFILE_PREWARM_SUBAGENTS=1` | Run one warm-up turn before measuring (`subagents`/`subconscious`), isolating first-use cost from steady state. |+| `OPENHUMAN_PROFILE_PREWARM_SUBAGENTS=1` | Run one warm-up turn before measuring (`subagents`), isolating first-use cost from steady state. || `OPENHUMAN_PROFILE_DISABLE_MEMORY_WRITES=1` | Disable `memory.auto_save` and episodic capture, isolating orchestration from persistence. || `OPENHUMAN_PROFILE_FORCE_UTC=1` | Skip `iana_time_zone`/CoreFoundation timezone resolution. || `OPENHUMAN_PROFILE_HOLD_SECS` / `HOLD_BEFORE_SECS` | Pause the process at settled/baseline state for external inspection (`vmmap`, `heap`, `malloc_history`, Instruments). |@@ -299,7 +298,6 @@ fresh-process repeats, 2026-07-21, Apple Silicon macOS):| Scenario | Build | Median settled RSS | Median retained Δ | Median duration || --- | --- | ---: | ---: | ---: || `agent-turn` (cold, 1 turn) | default | 47.6 MiB | 29.5 MiB | 102 ms |-| `subconscious` (cold, no delegation) | default | 47.9 MiB | 29.8 MiB | 138 ms || `subagents` (cold, 2 children) | default | 48.0 MiB | 29.9 MiB | 142 ms || `workflow` (`flows_create` + `flows_run`) | default | 50.9 MiB | 29.9 MiB | 110 ms || `long-agent` (25 warmed turns) | default | 65.8 MiB | 18.5 MiB | 1,361 ms |@@ -312,7 +310,7 @@ Notable structure behind these medians:and the 25-turn total (~16.8 MiB first-to-last) is dominated by two asyncpersistence/compaction bursts of 6-8 MiB each, matching the prior session'swarmed-repeat outlier observation. Steady-state growth is not linear.-- Cold `agent-turn`, `subconscious`, `subagents`, and `workflow` all retain+- Cold `agent-turn`, `subagents`, and `workflow` all retainapproximately the same ~29-30 MiB, confirming the cost is shared bootstrap(code paging, registries, detectors, allocator high water), not thespecific workload on top of it.diff --git a/examples/embed_headless.rs b/examples/embed_headless.rsindex 13f86492d5..d7f836e3b1 100644--- a/examples/embed_headless.rs+++ b/examples/embed_headless.rs@@ -1,7 +1,7 @@//! Embed the OpenHuman core as a library — no HTTP, no background services.//!//! Demonstrates the pluggable-core API: build a fully-initialized core with-//! [`ServiceSet::none`] (no ports bound, no cron/channels/heartbeat) AND+//! [`ServiceSet::none`] (no ports bound, no cron/channels/login-gated services) AND//! [`DomainSet::harness`] (only the agent + memory + threads + config + security//! domain families are live — the gate families flows/skills/mcp/meet/channels///! web3/voice/media and the catch-all `platform` are off, so their controllersdiff --git a/gitbooks/developing/architecture/flows-on-tinyagents.md b/gitbooks/developing/architecture/flows-on-tinyagents.mdindex e52715b04d..847ffc4a7c 100644--- a/gitbooks/developing/architecture/flows-on-tinyagents.md+++ b/gitbooks/developing/architecture/flows-on-tinyagents.md@@ -175,7 +175,7 @@ A flow `agent` node names a **registered agent kind** through a trusted- **A harness `AgentDefinition` exists** → build a full harness `Agent`(`Agent::from_config_for_agent`) and run the node's request through- `run_single`. That is the _same_ entry the builder/scout and cron/subconscious+ `run_single`. That is the _same_ entry the builder/scout and cronjobs use, and internally it drives `run_turn_via_tinyagents_shared`([`crates/openhuman-core/src/agent/tinyagents/mod.rs`](../../../crates/openhuman-core/src/agent/tinyagents/mod.rs)) -the tinyagents `AgentHarness` tool-call loop. The definition's ToolScope,diff --git a/gitbooks/guides/move-to-new-pc.md b/gitbooks/guides/move-to-new-pc.mdindex 9d579b1e22..84ef80c21f 100644--- a/gitbooks/guides/move-to-new-pc.md+++ b/gitbooks/guides/move-to-new-pc.md@@ -34,7 +34,7 @@ Inside it, the things you care about migrating:| ------------------------------------------------------ | --------------------------------------------- | --------------------------------- || **Memory Tree** (the database) | `…/memory_tree/chunks.db` | ✅ Yes || **Obsidian vault** (readable memory) | `…/wiki/` | ✅ Yes |-| **Persona & behavior** | `SOUL.md`, `IDENTITY.md`, `HEARTBEAT.md` | ✅ Yes |+| **Persona & behavior** | `SOUL.md`, `IDENTITY.md`, `ROLE.md` | ✅ Yes || **Config** (models, providers, routing, autonomy) | `config.toml` | ✅ Yes || **Session history** | `sessions/`, `session_raw/` | ✅ Yes || **Approval history** | `approval/approval.db` | ✅ Yes |diff --git a/scripts/kernel-floor.limits b/scripts/kernel-floor.limitsindex 51ee434dd8..b58ae8b916 100644--- a/scripts/kernel-floor.limits+++ b/scripts/kernel-floor.limits@@ -436,7 +436,7 @@# that touch git2), the impls written against `Ledger`,# and `DiffEngine` sit behind the feature. OpenHuman# mirrors the split: `memory::diff::types` compiles in-# both directions because the always-on subconscious+# both directions because the always-on memory# profile renders those types into prompts.# Off-state: `memory_diff` is unknown-method, the# `memory_diff` agent tool is absent, the embedded driverdiff --git a/scripts/life-scenarios/run.mjs b/scripts/life-scenarios/run.mjsindex dfe0fe134b..92e464ae7a 100644--- a/scripts/life-scenarios/run.mjs+++ b/scripts/life-scenarios/run.mjs@@ -606,7 +606,7 @@ class ApprovalResponder {/*** `openhuman.cost_get_usage_log` returns one row per provider call. Diffing* row ids across a turn is exact where a timestamp window would not be: the- * background services (memory, learning, heartbeat) bill against the same log+ * background services (memory, learning) bill against the same log* while a turn runs, and a window would sweep them in.*/async function usageIds(core) {diff --git a/scripts/profile/library-bench.sh b/scripts/profile/library-bench.shindex bbbdfef2c1..f21d9843c1 100755--- a/scripts/profile/library-bench.sh+++ b/scripts/profile/library-bench.sh@@ -33,11 +33,10 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"# The scenarios `library-profile` actually dispatches — keep in sync with# `crates/openhuman-cli/src/bin/library_profile/scenarios/mod.rs`, which is the source of truth.#-# This list had drifted before openhuman#6161 touched it: `subagents` and-# `subconscious` are named here and neither has been a scenario for some time-# (the subconscious domain was removed from the product outright). `dispatch`-# answers "unknown scenario: …" for those, so a full sweep exited non-zero on-# two entries that could never run. `memory-ingest` and `cold-phases` leave now+# This list had drifted before openhuman#6161 touched it: it named two+# scenarios that had not existed for some time. `dispatch` answers "unknown+# scenario: …" for those, so a full sweep exited non-zero on two entries that+# could never run. `memory-ingest` and `cold-phases` leave now# for a different reason: both measured the in-process memory engine, which# this binary no longer links.ALL_SCENARIOS="agent-turn,long-agent,workflow,fleet,skill-run,subagent-storm"diff --git a/scripts/test-subconscious-ticks.sh b/scripts/test-subconscious-ticks.shdeleted file mode 100755index f081aafb35..0000000000--- a/scripts/test-subconscious-ticks.sh+++ /dev/null@@ -1,128 +0,0 @@-#!/usr/bin/env bash-# End-to-end subconscious loop test with real local AI (Ollama).-# Ingests data, runs ticks, verifies decisions.-set -euo pipefail--CORE_BIN="./crates/openhuman-app/binaries/openhuman-core-x86_64-pc-windows-msvc.exe"-RPC_PORT=7810-RPC_URL="http://127.0.0.1:${RPC_PORT}/rpc"-FIXTURES="./tests/fixtures/subconscious"--# Pre-seed the RPC bearer token so curl calls authenticate correctly.-# The core reads OPENHUMAN_CORE_TOKEN at startup and skips writing a token file.-RPC_TOKEN="$(openssl rand -hex 32 2>/dev/null || python3 -c 'import secrets; print(secrets.token_hex(32))')"--if [ ! -f "$CORE_BIN" ]; then echo "ERROR: Core binary not found"; exit 1; fi--# Check Ollama-if ! curl -s --max-time 3 http://localhost:11434/ >/dev/null 2>&1; then- echo "ERROR: Ollama not running. Start with: ollama serve"- exit 1-fi--echo "=== Subconscious Loop E2E Test ==="-echo ""--# Start core server-echo "[setup] Starting core on port $RPC_PORT..."-OPENHUMAN_CORE_PORT="$RPC_PORT" OPENHUMAN_CORE_TOKEN="$RPC_TOKEN" "$CORE_BIN" serve > /tmp/subconscious-test.log 2>&1 &-SERVER_PID=$!-cleanup() { kill "$SERVER_PID" 2>/dev/null || true; wait "$SERVER_PID" 2>/dev/null || true; }-trap cleanup EXIT--for i in $(seq 1 15); do- if curl -s "$RPC_URL" -H "Content-Type: application/json" -H "Authorization: Bearer $RPC_TOKEN" \- -d '{"jsonrpc":"2.0","id":0,"method":"openhuman.health_snapshot","params":{}}' 2>/dev/null | grep -q "result"; then- echo "[setup] Server ready."- break- fi- [ "$i" -eq 15 ] && { echo "ERROR: Server timeout"; exit 1; }- sleep 1-done--rpc() {- curl -s --max-time 120 "$RPC_URL" \- -H "Content-Type: application/json" \- -H "Authorization: Bearer $RPC_TOKEN" \- -d "$1" 2>&1-}--# Write HEARTBEAT.md to the workspace-echo "[setup] Writing HEARTBEAT.md to workspace..."-WORKSPACE="$HOME/.openhuman/workspace"-mkdir -p "$WORKSPACE"-cp "$FIXTURES/heartbeat.md" "$WORKSPACE/HEARTBEAT.md"-echo "[setup] HEARTBEAT.md written: $(cat "$WORKSPACE/HEARTBEAT.md" | grep "^- " | wc -l) tasks"--echo ""-echo "========================================="-echo " PHASE 1: Ingest tick 1 data"-echo "========================================="--# Ingest tick1 gmail-GMAIL1=$(cat "$FIXTURES/tick1_gmail.txt")-GMAIL1_ESC=$(echo "$GMAIL1" | python3 -c "import sys,json; print(json.dumps(sys.stdin.read()))")-RESULT=$(rpc "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"openhuman.memory_doc_ingest\",\"params\":{\"namespace\":\"skill-gmail\",\"key\":\"tick1-gmail\",\"title\":\"Deadline reminder and meeting invite\",\"content\":$GMAIL1_ESC,\"source_type\":\"gmail\",\"priority\":\"high\",\"category\":\"core\"}}")-echo "Gmail tick1 ingested: $(echo "$RESULT" | python3 -c "import sys,json;d=json.load(sys.stdin);r=d.get('result',{});print(f\"{r.get('entityCount',0)} entities, {r.get('relationCount',0)} relations\")" 2>/dev/null || echo "$RESULT" | head -c 200)"--# Ingest tick1 notion-NOTION1=$(cat "$FIXTURES/tick1_notion.txt")-NOTION1_ESC=$(echo "$NOTION1" | python3 -c "import sys,json; print(json.dumps(sys.stdin.read()))")-RESULT=$(rpc "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"openhuman.memory_doc_ingest\",\"params\":{\"namespace\":\"skill-notion\",\"key\":\"tick1-notion\",\"title\":\"Q1 Delivery Tracker\",\"content\":$NOTION1_ESC,\"source_type\":\"notion\",\"priority\":\"high\",\"category\":\"core\"}}")-echo "Notion tick1 ingested: $(echo "$RESULT" | python3 -c "import sys,json;d=json.load(sys.stdin);r=d.get('result',{});print(f\"{r.get('entityCount',0)} entities, {r.get('relationCount',0)} relations\")" 2>/dev/null || echo "$RESULT" | head -c 200)"--# Check what's in memory-echo ""-echo "Namespaces after tick1 ingest:"-rpc '{"jsonrpc":"2.0","id":3,"method":"openhuman.memory_list_namespaces","params":{}}' | python3 -c "import sys,json;d=json.load(sys.stdin);print(d.get('result',{}).get('data',{}).get('namespaces',[]))" 2>/dev/null--echo ""-echo "========================================="-echo " PHASE 2: Subconscious Tick 1"-echo "========================================="-echo "(Calling local AI via Ollama — may take 30-60s)"--TICK1=$(rpc '{"jsonrpc":"2.0","id":10,"method":"openhuman.subconscious_trigger","params":{}}')-echo "Tick 1 result:"-echo "$TICK1" | python3 -c "import sys,json; print(json.dumps(json.load(sys.stdin), indent=2))" 2>/dev/null || echo "$TICK1" | head -c 500--echo ""-echo "========================================="-echo " PHASE 3: Ingest tick 2 data (state change)"-echo "========================================="--# Ingest tick2 gmail (deadline moved)-GMAIL2=$(cat "$FIXTURES/tick2_gmail.txt")-GMAIL2_ESC=$(echo "$GMAIL2" | python3 -c "import sys,json; print(json.dumps(sys.stdin.read()))")-RESULT=$(rpc "{\"jsonrpc\":\"2.0\",\"id\":4,\"method\":\"openhuman.memory_doc_ingest\",\"params\":{\"namespace\":\"skill-gmail\",\"key\":\"tick2-gmail\",\"title\":\"URGENT deadline moved to tomorrow\",\"content\":$GMAIL2_ESC,\"source_type\":\"gmail\",\"priority\":\"high\",\"category\":\"core\"}}")-echo "Gmail tick2 ingested: $(echo "$RESULT" | python3 -c "import sys,json;d=json.load(sys.stdin);r=d.get('result',{});print(f\"{r.get('entityCount',0)} entities, {r.get('relationCount',0)} relations\")" 2>/dev/null || echo "$RESULT" | head -c 200)"--# Ingest tick2 notion (tracker updated)-NOTION2=$(cat "$FIXTURES/tick2_notion.txt")-NOTION2_ESC=$(echo "$NOTION2" | python3 -c "import sys,json; print(json.dumps(sys.stdin.read()))")-RESULT=$(rpc "{\"jsonrpc\":\"2.0\",\"id\":5,\"method\":\"openhuman.memory_doc_ingest\",\"params\":{\"namespace\":\"skill-notion\",\"key\":\"tick2-notion\",\"title\":\"Q1 Tracker updated - unblocked\",\"content\":$NOTION2_ESC,\"source_type\":\"notion\",\"priority\":\"high\",\"category\":\"core\"}}")-echo "Notion tick2 ingested: $(echo "$RESULT" | python3 -c "import sys,json;d=json.load(sys.stdin);r=d.get('result',{});print(f\"{r.get('entityCount',0)} entities, {r.get('relationCount',0)} relations\")" 2>/dev/null || echo "$RESULT" | head -c 200)"--echo ""-echo "========================================="-echo " PHASE 4: Subconscious Tick 2"-echo "========================================="-echo "(Calling local AI via Ollama — may take 30-60s)"--TICK2=$(rpc '{"jsonrpc":"2.0","id":11,"method":"openhuman.subconscious_trigger","params":{}}')-echo "Tick 2 result:"-echo "$TICK2" | python3 -c "import sys,json; print(json.dumps(json.load(sys.stdin), indent=2))" 2>/dev/null || echo "$TICK2" | head -c 500--echo ""-echo "========================================="-echo " PHASE 5: Status check"-echo "========================================="--STATUS=$(rpc '{"jsonrpc":"2.0","id":12,"method":"openhuman.subconscious_status","params":{}}')-echo "Subconscious status:"-echo "$STATUS" | python3 -c "import sys,json; print(json.dumps(json.load(sys.stdin), indent=2))" 2>/dev/null || echo "$STATUS" | head -c 500--echo ""-echo "========================================="-echo " DONE"-echo "========================================="