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(developing): add agent observability and agentbox deployment guides
Steven Enamakelc00753da1569
diff --git a/gitbooks/developing/agent-observability.md b/gitbooks/developing/agent-observability.mdindex d90be4bcac..5cc7e850c6 100644--- a/gitbooks/developing/agent-observability.md+++ b/gitbooks/developing/agent-observability.md@@ -1,18 +1,17 @@----description: Artifact-capture layer that makes E2E tests debuggable. Logs, traces, screenshots.+description: >-+ How to see what the app and the agent did: E2E artifacts, the inference+ capture proxy, and Langfuse traces.icon: eye----# Agent Observability+# Agent observability-This doc describes the artifact-capture layer that makes the desktop app-inspectable by coding agents (Codex, Claude Code, Cursor) through the-existing WDIO / tauri-driver E2E harness (see [E2E Testing](e2e-testing.md)).+This page covers three ways to see what OpenHuman did. E2E artifacts let a coding agent (Codex, Claude Code, Cursor) inspect the desktop app through the WDIO harness (see [E2E testing](e2e-testing.md)). The capture proxy shows what the core sent to inference. Langfuse traces cover real agent runs.-It is intentionally narrow: one canonical onboarding + privacy flow with-on-disk screenshots, page-source dumps, and mock backend request logs.+The E2E layer is narrow on purpose. It covers one onboarding and privacy flow and saves screenshots, page-source dumps and mock backend request logs to disk.-## TL;DR+## Quick start```bashbash app/scripts/e2e-agent-review.sh@@ -46,7 +45,7 @@ The script prints the resolved artifact directory at the end.| ---------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- || Helper | `app/test/e2e/helpers/artifacts.ts` | Run dir, `captureCheckpoint`, `captureFailureArtifacts`, `saveMockRequestLog` || WDIO hook | `app/test/wdio.conf.ts` (`afterTest`) | Always dumps screenshot + source on any failing test |-| Canonical spec | `app/test/e2e/specs/agent-review.spec.ts` | Welcome → onboarding → privacy panel with named checkpoints |+| Canonical spec | `app/test/e2e/specs/agent-review.spec.ts` | Welcome, onboarding, then the privacy panel, with named checkpoints || Wrapper script | `app/scripts/e2e-agent-review.sh` | Build + run + print artifact dir || Stable selectors | `data-testid` on `OnboardingNextButton`, `Onboarding` overlay + skip button, `WelcomeStep`, `PrivacyPanel` | Agent-reliable navigation anchors |@@ -70,11 +69,11 @@ saveMockRequestLog("after-connect-click", getRequestLog());`captureCheckpoint` numbers captures so the run dir reads chronologically.`captureFailureArtifacts` is wired into `wdio.conf.ts` and fires-automatically on any failing test, specs should not call it directly.+automatically on any failing test. Specs should not call it directly.## Inference on the wire: the capture proxy-Logs tell you a turn was slow; they do not tell you what the harness sent or+Logs tell you a turn was slow. They do not tell you what the harness sent orwhich endpoint answered. `scripts/debug/capture-first-inference.mjs`(`pnpm debug capture`) is a loopback proxy between the core and its inferencebackend that records both sides:@@ -101,17 +100,19 @@ route instead of the hosted backend. Non-2xx response bodies are saved next tothe request dumps so an HTML 503 from an ingress is not lost behind a generic"model error".-What to look for across the turns of one thread: `cache_key` must stay-identical (it is the harness's stable-prefix fingerprint and OpenRouter's-sticky-routing key), `served_by` should not change, and `cached` should-approach `prompt` from the second call on. Each of those drifting has been a-real bug (openhuman#6434). The proxy binds loopback only and refuses a-plaintext non-loopback upstream unless overridden, because it forwards the-bearer verbatim; `--help` lists every `CAPTURE_*` knob.+Across the turns of one thread, check three things. `cache_key` must stay+identical, because it is the harness's stable-prefix fingerprint and+OpenRouter's sticky-routing key. `served_by` should not change. `cached`+should approach `prompt` from the second call on. A drift in any of them has+been a real bug.-## Production agent traces are a separate mechanism+The proxy binds loopback only. It refuses a plaintext non-loopback upstream+unless you override that, because it forwards the bearer token verbatim.+`--help` lists every `CAPTURE_*` option.-Everything above is about E2E artifacts on disk. For a real agent run, the+## Production agent traces++Everything above is about local artifacts. For a real agent run, thecore can export trace spans to Langfuse instead: when`observability.share_usage_data` is on (the default), a completed run's spansgo to the OpenHuman backend's Langfuse ingestion proxy over the same session@@ -123,11 +124,11 @@ metadata (names, timings, token and cost figures) but drops content. See`crates/openhuman-core/src/agent/progress_tracing/langfuse.rs` and`crates/openhuman-core/src/config/schema/observability.rs`.-## What is intentionally out of scope+## Out of scope for the E2E layer-- Visual baselines / image diffs across every component state.+- Visual baselines and image diffs across every component state.- Screenshot capture on every click (too noisy).- Live integrations (Gmail, Notion, Telegram); mock server only.-- New test framework / reporter.+- A new test framework or reporter.-Widen to more flows only after this loop proves out.+Add more flows only after this loop proves itself.diff --git a/gitbooks/developing/agentbox-deployment.md b/gitbooks/developing/agentbox-deployment.mdindex b88441f211..7f79fafc84 100644--- a/gitbooks/developing/agentbox-deployment.md+++ b/gitbooks/developing/agentbox-deployment.md@@ -1,87 +1,66 @@---description: >-- The removed AgentBox container deployment surface, kept as the record of- what it was and which test pins its absence.+ The removed AgentBox container surface, kept for anyone debugging an older+ build.icon: box-archive----# AgentBox marketplace deployment (historical)+# AgentBox deployment (removed)-This page describes a container surface that no longer exists in-`openhuman-core`. A regression test,-`agentbox_run_and_jobs_paths_are_no_longer_public` in-`crates/openhuman-rpc/src/server/auth_tests.rs`, asserts that `/run` and-`/jobs/{job_id}` are gone and pins the reason in a comment: the AgentBox-marketplace surface moved out of this codebase. `OPENHUMAN_AGENTBOX_MODE`-has no remaining reader anywhere in `crates/openhuman-core/src` today, even-though the Dockerfile and `.env.example` still mention it; those references-are themselves stale and due for cleanup.+OpenHuman once shipped a container surface for the GMI Cloud AgentBox marketplace. It is gone from `openhuman-core`. A regression test, `agentbox_run_and_jobs_paths_are_no_longer_public` in `crates/openhuman-rpc/src/server/auth_tests.rs`, checks that `/run` and `/jobs/{job_id}` no longer exist.-If you need to run OpenHuman on GMI Cloud's AgentBox marketplace today, this-is not the current integration path; check with the team that owns the-GMI Cloud deployment for where that surface lives now. The rest of this page-is kept as a historical record of how the integration worked before removal,-in case you are debugging an older build that still has it.+`OPENHUMAN_AGENTBOX_MODE` has no reader left in `crates/openhuman-core/src`. The Dockerfile and `.env.example` still mention it, and those mentions are stale. If you need to run OpenHuman on AgentBox today, ask the team that owns the GMI Cloud deployment where that surface lives now.-## Container contract (as it worked before removal)+The rest of this page describes how the old surface worked. Read it only if you are debugging an older build that still has it.-When `OPENHUMAN_AGENTBOX_MODE=1`, the core HTTP server exposes:+## Container contract-- `POST /run`: accept work, return `202 { "job_id": "<uuid>" }`. Body shape:- `{ "payload": { "message": "<string>", "thread_id": "<optional string>" } }`.-- `GET /jobs/{job_id}`: return `{ "status": "pending|running|completed|failed", "result": ..., "error": ... }`.-- `GET /health`: liveness.+With `OPENHUMAN_AGENTBOX_MODE=1`, the core HTTP server exposed three routes:-Both `/run` and `/jobs/*` are unauthenticated at the container boundary;-AgentBox's edge handles auth before traffic reaches us.+- `POST /run` accepts work and returns `202 { "job_id": "<uuid>" }`. The body is `{ "payload": { "message": "<string>", "thread_id": "<optional string>" } }`.+- `GET /jobs/{job_id}` returns `{ "status": "pending|running|completed|failed", "result": ..., "error": ... }`.+- `GET /health` is a liveness check.-## The 4-step register wizard+`/run` and `/jobs/*` were unauthenticated at the container boundary. AgentBox's edge handled auth before traffic reached the container.-In the AgentBox console:+## Registering in the AgentBox console-1. **Basic Info**: name `OpenHuman`, description, listing identity.-2. **Infrastructure**: Docker image source (push tagged builds to your- chosen registry, see "Image push" below), compute tier, region. Enable the- "GMI MaaS" toggle so the platform injects `GMI_MAAS_BASE_URL` and- `GMI_MAAS_API_KEY` at runtime.-3. **Env Variables**: set:+The console has a four-step wizard.++1. **Basic info.** Name it `OpenHuman` and add a description.+2. **Infrastructure.** Pick the Docker image source, compute tier and region. Turn on the "GMI MaaS" toggle so the platform injects `GMI_MAAS_BASE_URL` and `GMI_MAAS_API_KEY` at runtime.+3. **Env variables.** Set these:- `OPENHUMAN_AGENTBOX_MODE=1`- - (optional) `OPENHUMAN_AGENTBOX_JOB_TIMEOUT_SECS` (default 600)- - `GMI_MODELS` to the marketplace-approved model id (e.g.- `deepseek-ai/DeepSeek-V4-Pro`).- - `OPENHUMAN_WORKSPACE` to a writable container path (e.g. `/home/openhuman/.openhuman`).- - `RUST_LOG=info` (or `debug` while shaking out the first deploy).-4. **Review & Register**: confirm and test from the console panel.+ - `OPENHUMAN_AGENTBOX_JOB_TIMEOUT_SECS` (optional, default 600)+ - `GMI_MODELS`, the marketplace-approved model id, for example `deepseek-ai/DeepSeek-V4-Pro`+ - `OPENHUMAN_WORKSPACE`, a writable container path such as `/home/openhuman/.openhuman`+ - `RUST_LOG=info` (use `debug` for the first deploy)+4. **Review and register.** Confirm, then test from the console panel.-> ⚠️ The platform API key is shown ONCE on the registration confirmation-> screen. Save it to your secrets manager immediately. It is NOT recoverable-> from the console after that.+The platform API key is shown once, on the registration confirmation screen. Save it to your secrets manager right away. The console cannot show it again.-## Image push+## Pushing the image-Build and push from `main` using the existing `Dockerfile`:+Build from `main` with the existing `Dockerfile` and push to your registry:```bashdocker build -t <registry>/openhuman-core:<tag> .docker push <registry>/openhuman-core:<tag>```-First deploy takes 10 to 25 minutes to reach `running`; later deploys are faster.+The first deploy takes 10 to 25 minutes to reach `running`. Later deploys are faster.## Long-running requests-AgentBox treats requests >2 min as long-running. OpenHuman handles this with-**polling** per AgentBox's documented pattern: the agent runtime is invoked-inside the worker task, capped by `OPENHUMAN_AGENTBOX_JOB_TIMEOUT_SECS`-(default 10 minutes). No streaming.+AgentBox treats requests over 2 minutes as long-running, so OpenHuman used polling. The agent ran inside a worker task, capped by `OPENHUMAN_AGENTBOX_JOB_TIMEOUT_SECS` (10 minutes by default). There was no streaming.-Polling clients should:+A polling client should:-1. `POST /run` and capture `job_id`.-2. `GET /jobs/{job_id}` every 1 to 3 seconds.+1. Send `POST /run` and keep the `job_id`.+2. Call `GET /jobs/{job_id}` every 1 to 3 seconds.3. Stop when `status` is `completed` or `failed`.-4. Note: terminal jobs are retained for 1 hour after completion, then- garbage-collected. Long pauses between poll and read may return `404`.++Finished jobs were kept for one hour, then garbage-collected. A long pause between polling and reading can return `404`.## Local smoke test@@ -102,17 +81,8 @@ curl http://127.0.0.1:7788/jobs/<job_id>## Troubleshooting-- `404 job not found` after a successful submit: retention window (1h) has- elapsed, or the container restarted (in-memory store is not durable in v1).-- `status: "failed"`, `error: "agentbox: agent runtime bridge not wired"`:- the production invoker stub from before Task 9 landed; rebuild against a- current `main`.-- `status: "failed"`, `error: "job timeout after Ns"`: the agent invocation- exceeded `OPENHUMAN_AGENTBOX_JOB_TIMEOUT_SECS`. Bump the env var on the- next deploy.-- `[agentbox::gmi] not registering GMI MaaS provider: missing/blank: GMI_MAAS_API_KEY`:- the platform did not inject the key. Re-check the wizard's "MaaS- integration toggle" in Step 2.-- `[agentbox::gmi] current-thread runtime detected, skipping provider registration`:- the core was booted in a single-threaded tokio runtime. Use the standard- `serve` subcommand, which spawns a multi-thread runtime.+- `404 job not found` after a successful submit: the one-hour retention window passed, or the container restarted. The job store was in memory only.+- `status: "failed"` with `error: "agentbox: agent runtime bridge not wired"`: you are on a build from before the runtime bridge landed. Rebuild from a current `main`.+- `status: "failed"` with `error: "job timeout after Ns"`: the agent ran past `OPENHUMAN_AGENTBOX_JOB_TIMEOUT_SECS`. Raise it on the next deploy.+- `[agentbox::gmi] not registering GMI MaaS provider: missing/blank: GMI_MAAS_API_KEY`: the platform did not inject the key. Check the MaaS toggle in step 2 of the wizard.+- `[agentbox::gmi] current-thread runtime detected, skipping provider registration`: the core booted in a single-threaded tokio runtime. Use the standard `serve` subcommand, which starts a multi-thread runtime.