Skip to content

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

chore: files changed crates/openhuman-embed/examples/README.md,crates/openhuman-embed/tests/README.m

Steven Enamakel1456eba9e572
diff --git a/crates/openhuman-embed/examples/README.md b/crates/openhuman-embed/examples/README.md
index cad252069c..d5e8ade1bf 100644
--- a/crates/openhuman-embed/examples/README.md
+++ b/crates/openhuman-embed/examples/README.md
@@ -2,7 +2,7 @@
Runnable programs that use `openhuman-embed` the way a host product would.
Cargo discovers them, so they run with `cargo run -p openhuman-embed
---example <name>`. Both build their tokio runtime by hand with
+--example <name>`. Each builds its tokio runtime by hand with
`AGENT_WORKER_STACK_BYTES` and `MAX_BLOCKING_THREADS` instead of
`#[tokio::main]`, because a turn overflows tokio's default worker stack. Set
`RUST_LOG=debug` to see the `[embed]` log lines around each turn.
@@ -46,6 +46,21 @@ URL, so on the managed path also set `OPENHUMAN_EXAMPLE_BACKEND_URL` to the
backend's inference base, or managed calls answer `BACKEND_UNAVAILABLE:`. A
real host would build with `openhuman_tinyhumans::RuntimeBuilder` instead.
+## profiles
+
+Two users, alice and bob, each with their own SaaS profile in one process,
+both chatting on a thread they call `t1`. Each reads `t1` back and sees only
+their own messages: a thread id is unique per profile. It builds a
+`ProfileRuntime` on a temporary root and runs fully offline, against a local
+mock that answers `echo: <your message>` through a stub backend transport:
+
+```bash
+cargo run -p openhuman-embed --example profiles
+```
+
+Building a `ProfileRuntime` locks the process into SaaS mode, so this example
+cannot share a process with the other two.
+
## Optional settings
| Variable | Effect |
@@ -53,7 +68,7 @@ real host would build with `openhuman_tinyhumans::RuntimeBuilder` instead.
| `OPENHUMAN_EXAMPLE_BACKEND_URL` | Points the core's non-inference backend calls at your own backend. |
| `OPENHUMAN_EXAMPLE_SKILLS_DIR` | Skill bundles to copy in (the reviewer only, in `two_agents`). Ignored without the `skills` feature. |
-These programs make real network calls to the endpoint you configure. The
+`run_turn` and `two_agents` make real network calls to the endpoint you configure; `profiles` makes none. The
tests in [`../tests/`](../tests/README.md) cover the same paths against mocks.
The repository-root [`examples/embed_headless.rs`](../../../examples/embed_headless.rs) and [`examples/embed_kernel.rs`](../../../examples/embed_kernel.rs)
use `CoreBuilder` directly, without this crate; run them with
diff --git a/crates/openhuman-embed/tests/README.md b/crates/openhuman-embed/tests/README.md
index 381e54f020..400c8a6900 100644
--- a/crates/openhuman-embed/tests/README.md
+++ b/crates/openhuman-embed/tests/README.md
@@ -26,7 +26,7 @@ recorded on the wrong server.
| File | What it proves |
| --- | --- |
-| [`common/mod.rs`](common/mod.rs) | Shared helpers: `runtime()`, `offline_config()`, `provider(reply)`, `stub_backend()`, `chat_completion`, `tool_call_completion`, and request inspectors (`chat_requests`, `tool_names`, `tool_results`). |
+| [`common/mod.rs`](common/mod.rs) | Shared helpers: `runtime()`, `offline_config()`, `provider(reply)`, `stub_backend()`, `chat_completion`, `tool_call_completion`, `echo_inference()` with `PointedTransport` (managed inference to a mock), and request inspectors (`chat_requests`, `tool_names`, `tool_results`, `last_user_message`). |
| [`facades.rs`](facades.rs) | The runtime-free curated facades (`artifacts`, `chat_surface`, `identity`, `config` helpers, `modules`), the compile-status constants and `schema_for_rpc_method`. |
| [`seams_runtime.rs`](seams_runtime.rs) | A controller extension is invokable after a real `build()`, a `live_policy` is applied after boot, and hooks are removed on drop while the extension outlives the runtime. |
| [`harness_embed.rs`](harness_embed.rs) | A `Harness` runs a real turn with no transport and no background services, routes it to the mock provider, and binds nothing. |
@@ -35,6 +35,7 @@ recorded on the wrong server.
| [`attached_tools.rs`](attached_tools.rs) | `Agent::attach_tools` sources survive clones and session resume, and name collisions are refused. |
| [`composio_agents.rs`](composio_agents.rs) | Two agents with their own `ComposioHostCredential` reach Composio with their own key only. |
| [`memory_facade.rs`](memory_facade.rs) | `Runtime::memory` over TinyMemory's in-memory reference engine keeps two tenant roots apart. |
+| [`saas_profiles.rs`](saas_profiles.rs) | A `ProfileRuntime` (SaaS mode, in-process): two users on thread `t1` see only their own messages and ride their own credential, a held `ProfileHandle` keeps its profile from release, a relayed Telegram message lands on the user's `channel:` thread with its `channel_outbound` reply on that user's events only, and the process refuses any other core afterwards. Inference is `common::echo_inference` behind `common::PointedTransport`. |
| [`public_api.rs`](public_api.rs) | Compile-time check that the host-facing types and signatures stay exported. |
## Running