Skip to content

An open-source, faster Devin alternative

TypeScript

docs: remove Hosted Agents + Agent SDK; keep Background Agents hidden

Igor Zalutski5bb981e8ed5d
diff --git a/docs/agent-sessions/api-reference.mdx b/docs/agent-sessions/api-reference.mdx
index 85d172fa..65a7197c 100644
--- a/docs/agent-sessions/api-reference.mdx
+++ b/docs/agent-sessions/api-reference.mdx
@@ -102,4 +102,4 @@ ClientToken = { token, scopes, expires_at }
## Errors & rate limits
-Errors use one envelope: `{ "error": { "type", "message", "code", "param?", "request_id" } }`. Cross-owner resources return `404` (not `403`). Over a rate or concurrency limit, calls return **`429`** with a **`Retry-After`** header — back off and retry.
+Errors use one envelope: `{ "error": { "type", "message", "code", "param?", "request_id" } }`. Cross-owner resources return `404` (not `403`). Rate and concurrency limits are not enforced at launch; clients should still treat a `429` (with a `Retry-After` header, when present) as a signal to back off and retry, since limits may be introduced later.
diff --git a/docs/agents-api/agents.mdx b/docs/agents-api/agents.mdx
deleted file mode 100644
index 60da459f..00000000
--- a/docs/agents-api/agents.mdx
+++ /dev/null
@@ -1,77 +0,0 @@
----
-title: "Agents"
-description: "Create and manage agent definitions — snapshot, entrypoint, secrets, elasticity"
----
-
-An Agent is configuration, not compute. It defines what snapshot to boot, what entrypoint to run, which secrets to inject, and how elasticity works. The same agent can back both Instances and Sessions.
-
-## Create agent
-
-```
-POST /v1/agents
-```
-
-```json
-{
- "id": "issue-resolver",
- "display_name": "Issue Resolver",
- "config": {
- "snapshot": "agent-snapshot-v1",
- "entrypoint": "node /workspace/agent/index.js",
- "env": { "LOG_LEVEL": "info" },
- "elasticity": { "baseline_mb": 1024, "max_mb": 8192 },
- "idle_timeout_s": 600
- }
-}
-```
-
-`id` must be DNS-safe (lowercase alphanumeric + hyphens). Returns `201` with the agent object.
-
-**Entrypoint vs agent_config**: if `config.entrypoint` is set, the platform runs it via `sandbox.exec.start()`. If `config.agent_config` is set instead, the platform uses `sandbox.agent.start()` with the provided `system_prompt` and `allowed_tools`. They are mutually exclusive.
-
-## CRUD
-
-```
-GET /v1/agents List all agents
-GET /v1/agents/:agentId Get agent
-PATCH /v1/agents/:agentId Update (accepts display_name, config)
-DELETE /v1/agents/:agentId Delete (cascades to instances and sessions)
-```
-
-## Agent object
-
-```json
-{
- "id": "issue-resolver",
- "display_name": "Issue Resolver",
- "secret_store": "agent:issue-resolver",
- "config": { ... },
- "created_at": "2026-04-09T...",
- "updated_at": "2026-04-09T..."
-}
-```
-
-## Secrets
-
-Convenience wrapper over OpenComputer's [secret store](/sandboxes/secrets). Values are AES-256-GCM encrypted at rest, injected as sealed tokens at sandbox creation. Values are never returned via API.
-
-```
-PUT /v1/agents/:agentId/secrets/:key Set a secret
-GET /v1/agents/:agentId/secrets List keys (values never returned)
-DELETE /v1/agents/:agentId/secrets/:key Remove a secret
-```
-
-**Set secret:**
-
-```json
-PUT /v1/agents/issue-resolver/secrets/ANTHROPIC_API_KEY
-{ "value": "sk-ant-...", "allowed_hosts": ["api.anthropic.com"] }
-```
-
-The first `PUT` auto-creates a backing OC secret store named `agent:{agentId}`. `allowed_hosts` is optional — restricts which outbound hosts can receive the decrypted value.
-
-**List secrets** returns keys and metadata only:
-
-```json
-{ "secrets": [{ "key": "ANTHROPIC_API_KEY", "allowed_hosts": ["api.anthropic.com"], "set_at": "..." }] }
-```
diff --git a/docs/agents-api/gbrain.mdx b/docs/agents-api/gbrain.mdx
deleted file mode 100644
index e3fac764..00000000
--- a/docs/agents-api/gbrain.mdx
+++ /dev/null
@@ -1,101 +0,0 @@
----
-title: "gbrain Package"
-description: "Install persistent memory on a managed agent with gbrain"
----
-
-[gbrain](https://github.com/garrytan/gbrain) is a personal knowledge system that gives your agent persistent memory backed by Postgres with vector search. When installed on a managed agent, it's wired as an MCP server — the agent gets 34 tools for storing, searching, and organizing knowledge.
-
-## Install
-
-```bash
-oc agent install my-hermes gbrain
-```
-
-This runs through five phases:
-
-| Phase | What happens |
-|-------|-------------|
-| **Allocate** | Creates a managed Postgres database (with `pgvector` and `pg_trgm` extensions) for this agent |
-| **Provision** | Clones gbrain from GitHub into the sandbox and installs dependencies |
-| **Initialize** | Runs `gbrain init` against the managed database to create the schema |
-| **Wire** | Adds gbrain as an MCP server in the core's config and restarts the gateway |
-| **Verify** | Runs `gbrain doctor` to confirm the installation |
-
-Install is **idempotent** — re-running it after a partial failure is safe. The allocate phase skips if the database exists, provision skips if gbrain is already cloned, and so on.
-
-## What the agent gets
-
-After install, the agent has these tool groups available:
-
-| Group | Tools | What they do |
-|-------|-------|-------------|
-| **Pages** | `put_page`, `get_page`, `delete_page`, `list_pages` | Store and retrieve knowledge pages with Markdown content |
-| **Search** | `query` (vector + keyword hybrid), `search` (full-text) | Find pages by meaning or keywords |
-| **Versions** | `get_versions`, `revert_version` | Page version history |
-| **Graph** | `add_link`, `remove_link`, `get_links`, `get_backlinks`, `traverse_graph` | Link pages into a knowledge graph |
-| **Tags** | `add_tag`, `remove_tag`, `get_tags` | Categorize pages |
-| **Timeline** | `add_timeline_entry`, `get_timeline` | Chronological event log |
-| **Files** | `file_upload`, `file_list`, `file_url` | Attach files to the knowledge base |
-| **System** | `get_stats`, `get_health`, `sync_brain` | Health checks and maintenance |
-
-## Test it
-
-After installing, message your agent on Telegram:
-
-```
-You: What new tools do you have?
-Agent: I now have gbrain tools — search, put_page, timeline...
-
-You: Use gbrain to remember that our deployment target is Kubernetes on GCP
-Agent: Saved to knowledge base.
-
-You: Use gbrain to search for deployment
-Agent: You deploy to Kubernetes on GCP.
-```
-
-## Managed database
-
-The database that backs gbrain is **managed by OpenComputer** — you don't need to provision or configure Postgres yourself. The database:
-
-- Lives outside the sandbox on a shared Postgres cluster
-- Survives instance restarts and sandbox recreation
-- Is preserved when you uninstall gbrain (your data isn't deleted)
-- Is restored when you reinstall gbrain on the same agent
-
-The connection URL is passed to gbrain via the MCP server's environment config, not as a sandbox-level secret.
-
-## Uninstall
-
-```bash
-oc agent uninstall my-hermes gbrain
-```
-
-This removes the MCP wiring from the core's config and restarts the gateway. The agent loses access to gbrain tools, but the **database is preserved**. Reinstalling gbrain on the same agent reconnects to the existing data.
-
-## Debugging
-
-Shell into the sandbox to inspect the installation:
-
-```bash
-oc shell my-hermes
-```
-
-```bash
-# Check if gbrain is cloned
-ls ~/.gbrain/src/cli.ts
-
-# Check the MCP config
-cat ~/.hermes/config.yaml
-
-# Check gateway logs for MCP connection status
-tail -20 ~/.hermes/logs/gateway.log
-
-# Run gbrain directly
-~/.bun/bin/bun run ~/.gbrain/src/cli.ts doctor
-```
-
-Common issues:
-
-- **"missing executable 'bun'"** in gateway logs — the MCP config needs absolute paths (e.g., `/home/sandbox/.bun/bin/bun`), not bare `bun`
-- **Embedding failures** — gbrain uses OpenAI for vector embeddings. If `OPENAI_API_KEY` is missing from the MCP env config, pages are stored but semantic search won't work
-- **Gateway didn't pick up MCP** — check if the gateway restarted after the wire phase. Run `hermes gateway run --replace` from the shell to force a restart
diff --git a/docs/agents-api/instances.mdx b/docs/agents-api/instances.mdx
deleted file mode 100644
index 76a6edcf..00000000
--- a/docs/agents-api/instances.mdx
+++ /dev/null
@@ -1,67 +0,0 @@
----
-title: "Instances"
-description: "Persistent sandboxes that multiplex conversations, hibernate when idle, and wake on demand"
----
-
-An Instance is a persistent sandbox bound to an Agent. It stays alive across conversations, accumulates state (filesystem, installed tools, running processes), and hibernates when idle. Multiple conversations are multiplexed onto one instance via `conversation_id`.
-
-**Typical mapping:** one Instance per user or team. The caller owns conversation identity (e.g., Slack thread timestamp).
-
-## Create instance
-
-```
-POST /v1/agents/:agentId/instances
-```
-
-```json
-{ "metadata": { "slack_user": "U123", "team": "engineering" } }
-```
-
-Returns `201` with `status: "creating"`. The platform provisions a sandbox from the agent's snapshot in the background. Status becomes `"running"` once ready.
-
-## List / Get / Delete
-
-```
-GET /v1/agents/:agentId/instances List instances for an agent
-GET /v1/agents/:agentId/instances/:id Get instance
-DELETE /v1/agents/:agentId/instances/:id Destroy (kills sandbox)
-```
-
-## Instance object
-
-```json
-{
- "id": "inst_98adcc7e...",
- "agent_id": "slack-coworker",
- "status": "creating | running | error",
- "metadata": { "slack_user": "U123" },
- "created_at": "2026-04-09T...",
- "updated_at": "2026-04-09T..."
-}
-```
-
-## Send message
-
-```
-POST /v1/agents/:agentId/instances/:id/messages
-```
-
-```json
-{ "content": "analyze the auth service repo", "conversation_id": "1712345678.123456" }
-```
-
-Returns `200` with `Content-Type: text/event-stream`. If the instance is still `creating`, waits up to 30s for it to become ready.
-
-**SSE events:**
-
-```
-data: {"type":"text","content":"Cloning the repo now...","conversation_id":"1712345678.123456"}
-data: {"type":"text","content":"Found 3 issues...","conversation_id":"1712345678.123456"}
-data: {"type":"done"}
-```
-
-The stream closes after the agent completes one turn. The caller collects `text` events and concatenates their `content` for the full response.
-
-## Recovery
-
-If the caller process restarts, rebuild instance mappings from `GET /v1/agents/:agentId/instances` using `metadata` to match external identities (e.g., Slack user IDs) back to instance IDs.
diff --git a/docs/agents-api/managed-agents.mdx b/docs/agents-api/managed-agents.mdx
deleted file mode 100644
index 9e5912c1..00000000
--- a/docs/agents-api/managed-agents.mdx
+++ /dev/null
@@ -1,105 +0,0 @@
----
-title: "Managed Agents"
-description: "Cores, channels, and packages — the building blocks of a managed agent"
----
-
-A managed agent is an agent with a **core** — a blessed runtime that OpenComputer knows how to configure, connect, and extend. Instead of managing snapshots and entrypoints yourself, you pick a core and build up from there.
-
-```
-ManagedAgent = Core + Channels + Packages + Secrets
-```
-
-## Cores
-
-A core is the AI runtime that powers your agent. When you create a managed agent with `--core`, OpenComputer boots a sandbox with that runtime pre-installed, an LLM key configured, and a gateway ready to accept channels.
-
-```bash
-oc agent create my-agent --core hermes
-# or
-oc agent create my-agent --core openclaw
-```
-
-| Core | Runtime | What you get |
-|------|---------|-------------|
-| `hermes` | [Hermes Agent](https://github.com/NousResearch/hermes-agent) | Self-improving AI agent with skill creation, memory, multi-channel gateway, browser, code execution |
-| `openclaw` | [OpenClaw](https://openclaw.ai) | Multi-channel AI gateway with rich plugin SDK, native MCP support, hot-reload config, 6 built-in channels + 20 plugin channels |
-
-Without `--core`, the agent uses the raw sandbox path — you provide your own `snapshot` and `entrypoint` via the API. Managed and raw agents coexist on the same platform.
-
-## Channels
-
-A channel is a messaging platform connected to your agent. You **connect** and **disconnect** channels.
-
-```bash
-oc agent connect my-agent telegram --bot-token <token>
-oc agent disconnect my-agent telegram
-```
-
-| Channel | How it works |
-|---------|-------------|
-| `telegram` | Registers a webhook with Telegram. Messages flow through the OpenComputer gateway to your agent's sandbox. The agent replies directly to Telegram. |
-
-Channels are stateless — disconnecting removes the webhook and config. Nothing to clean up.
-
-When you connect a channel, the platform:
-
-1. Stores the channel secret (bot token) in the agent's secret store
-2. Registers the webhook with the channel provider
-3. Configures the core for webhook mode
-4. Restarts the gateway
-
-## Packages
-
-A package extends what the agent can do beyond its core. You **install** and **uninstall** packages.
-
-```bash
-oc agent install my-agent gbrain
-oc agent uninstall my-agent gbrain
-```
-
-| Package | What it adds |
-|---------|-------------|
-| `gbrain` | Personal knowledge system — 34 MCP tools for pages, vector search, graph links, timeline, files. Backed by a managed Postgres database. |
-
-Packages can be **stateful**. When you install gbrain, OpenComputer creates a managed Postgres database for that agent. The database lives outside the sandbox and survives instance restarts, uninstall/reinstall cycles, and even agent recreation.
-
-Uninstalling a package removes the wiring (MCP config) but preserves the data by default.
-
-## Putting it together
-
-Three commands to a personal AI agent on Telegram with persistent memory:
-
-```bash
-# Boot an agent (pick a core)
-oc agent create my-agent --core hermes # or --core openclaw
-
-# Connect Telegram (create a bot via @BotFather first)
-oc agent connect my-agent telegram --bot-token <token>
-
-# Install persistent memory
-oc agent install my-agent gbrain
-```
-
-The user journey is the same regardless of core. The adapter handles the differences — Hermes uses YAML config + gateway restart, OpenClaw uses JSON5 config + hot-reload.
-
-See the [Create a Hermes Agent](/guides/create-hermes-agent) guide for a step-by-step walkthrough, and the [gbrain package](/agents-api/gbrain) page for details on persistent memory.
-
-## The manual path
-
-Managed agents are sugar over OpenComputer sandboxes. You can always drop to the sandbox level:
-
-```bash
-# Shell into any agent's sandbox
-oc shell my-agent
-
-# From there: edit config, install software, debug, run native commands
-# Hermes:
-cat ~/.hermes/config.yaml
-hermes skill list
-
-# OpenClaw:
-cat ~/.openclaw/openclaw.json
-openclaw mcp list
-```
-
-The managed path and the manual path coexist. Channels and packages that you wire manually (via `oc shell`) won't appear in the managed state, but they work fine.
diff --git a/docs/agents-api/overview.mdx b/docs/agents-api/overview.mdx
deleted file mode 100644
index a7dc3a31..00000000
--- a/docs/agents-api/overview.mdx
+++ /dev/null
@@ -1,84 +0,0 @@
----
-title: "Overview"
-description: "Run AI agents on OpenComputer — pick a core, connect channels, install packages"
----
-
-A managed agent on OpenComputer is a **core** plus the **channels** and **packages** you bolt onto it. Pick a runtime, connect the messaging platforms you want, install the capabilities you need.
-
-<Info>
- **There are two ways to run agents on OpenComputer.** This page covers **hosted agents** — platform-managed agent definitions you reach through persistent instances or ephemeral sessions, and connect to messaging channels or a public API. If you'd rather create a sandbox yourself and drive a Claude session inside it directly with the SDK, see the [Agent SDK](/agents/overview).
-</Info>
-
-```
-ManagedAgent = Core + Channels + Packages + Secrets
-```
-
-## Cores
-
-The AI runtime that powers your agent. OpenComputer ships two blessed cores:
-
-| Core | What you get |
-|------|-------------|
-| [`hermes`](/agents/cores/hermes) | Self-improving agent with skill creation, memory, multi-channel gateway, browser, code execution |
-| [`openclaw`](/agents/cores/openclaw) | Multi-channel AI gateway with plugin SDK, native MCP support, hot-reload config |
-
-Picking a core is the one decision that matters most — it determines the agent's capabilities, config model, and extension surface.
-
-## Packages
-
-Stateful extensions beyond the core — installed via `oc agent install`. Packages can provision infrastructure (managed databases, vector stores) and wire it into the agent transparently.
-
-| Package | What it adds |
-|---------|-------------|
-| [`gbrain`](/agents/packages/gbrain) | Persistent memory — 34 MCP tools for pages, vector search, graph, timeline, files. Backed by a managed Postgres database. |
-
-## Channels
-
-Messaging platforms connected to your agent.
-
-| Channel | How it works |
-|---------|-------------|
-| [`telegram`](/agents/channels/telegram) | Webhook-based. Messages flow through the OpenComputer gateway to your agent and back. |
-
-## Three commands to a running agent
-
-```bash
-oc agent create my-agent --core hermes # boot an agent
-oc agent connect my-agent telegram # connect Telegram
-oc agent install my-agent gbrain # add persistent memory
-```
-
-## Two ways to interact
-
-Everything you can do with the CLI you can do with the REST API, and vice versa.
-
-<CardGroup cols={2}>
- <Card title="CLI" icon="terminal" href="/cli/agents">
- `oc agent` commands — create, connect, install, inspect
- </Card>
- <Card title="REST API" icon="code" href="/agents/rest/agents">
- HTTP endpoints for agents, instances, sessions
- </Card>
-</CardGroup>
-
-## Agents, instances, sessions
-
-An **agent** is configuration. Its actual compute runs in one of two modes:
-
-| Concept | What it is | Use case |
-|---------|-----------|----------|
-| [**Agent**](/agents/rest/agents) | Configuration — core, snapshot, entrypoint, secrets | Define once, reuse |
-| [**Instance**](/agents/rest/instances) | Persistent sandbox, hibernates/wakes, multiplexes conversations | AI coworkers on Slack, Teams, Telegram |
-| [**Session**](/agents/rest/sessions) | Ephemeral sandbox, runs to completion | Batch jobs, webhook handlers |
-
-Managed agents (those with a core) get an instance automatically on creation. Raw agents — which have no core and use your own `snapshot` and `entrypoint` — create instances or sessions explicitly via the REST API. Managed and raw agents coexist on the same platform.
-
-## Authentication
-
-All requests require an OpenComputer API key via `X-API-Key` header or `--api-key` CLI flag.
-
-```
-X-API-Key: osb_your_api_key
-```
-
-Base URL for REST: `https://api.opencomputer.dev`
diff --git a/docs/agents-api/sessions.mdx b/docs/agents-api/sessions.mdx
deleted file mode 100644
index de75b47c..00000000
--- a/docs/agents-api/sessions.mdx
+++ /dev/null
@@ -1,74 +0,0 @@
----
-title: "Sessions"
-description: "Ephemeral sandboxes for fire-and-forget agent tasks with input/result"
----
-
-A Session is an ephemeral sandbox bound to an Agent. One session = one task = one sandbox. The sandbox is created, the agent runs to completion, and the sandbox is destroyed. For process-mode agents that take input and produce a result.
-
-**Typical mapping:** one Session per webhook, API call, or batch job.
-
-## Create session
-
-```
-POST /v1/agents/:agentId/sessions
-```
-
-```json
-{
- "input": {
- "repo": "acme/backend",
- "issue_number": 42,
- "webhook_payload": { "..." }
- },
- "metadata": { "trigger": "github_webhook" }
-}
-```
-
-The platform creates a sandbox, writes `input` to `/tmp/agent_input.json`, sets `AGENT_INPUT_PATH` as an env var, and runs the agent's entrypoint. The agent reads input, does work, writes its result to `/tmp/agent_result.json`, and exits.
-
-Returns `201` with `status: "creating"`.
-
-## Get / Delete
-
-```
-GET /v1/agents/:agentId/sessions/:id Get session
-DELETE /v1/agents/:agentId/sessions/:id End session (kills sandbox)
-```
-
-## Get result
-
-```
-GET /v1/agents/:agentId/sessions/:id/result
-```
-
-Returns the agent's output after completion. The platform reads `/tmp/agent_result.json` from the sandbox.
-
-```
--- While running: 409 { "error": { "type": "conflict", "message": "Session still running" } }
--- When complete: 200 { "data": { "pr_url": "https://..." }, "completed_at": "2026-04-09T..." }
--- If no result written: 200 { "data": null, "completed_at": "2026-04-09T..." }
-```
-
-## Session object
-
-```json
-{
- "id": "sess_98adcc7e...",
- "agent_id": "issue-resolver",
- "status": "creating | running | completed | failed",
- "input": { "..." },
- "result": null,
- "preview_url": null,
- "metadata": {},
- "created_at": "2026-04-09T...",
- "updated_at": "2026-04-09T..."
-}
-```
-
-## Lifecycle
-
-```
-creating → running → completed (exit 0) | failed (non-zero exit)
-```
-
-Terminal states are final. The sandbox is destroyed when the session ends.
diff --git a/docs/agents/channels/telegram.mdx b/docs/agents/channels/telegram.mdx
deleted file mode 100644
index bef78365..00000000
--- a/docs/agents/channels/telegram.mdx
+++ /dev/null
@@ -1,82 +0,0 @@
----
-title: "Telegram"
-description: "Connect your agent to Telegram via webhook"
----
-
-The Telegram channel connects your agent to a Telegram bot. Messages flow through the OpenComputer gateway to your agent's sandbox, and the agent replies directly to Telegram.
-
-## Connect
-
-<CodeGroup>
-
-```bash CLI
-oc agent connect my-agent telegram --bot-token <token>
-```
-
-```bash REST API
-curl -X POST https://api.opencomputer.dev/v1/agents/my-agent/channels/telegram \
- -H "X-API-Key: $OC_API_KEY" \
- -H "Content-Type: application/json" \
- -d '{"bot_token": "<token>"}'
-```
-
-</CodeGroup>
-
-If you omit `--bot-token`, the CLI prompts for it interactively.
-
-### What happens
-
-1. The bot token is stored in the agent's secret store
-2. A webhook is registered with Telegram pointing to `https://<gateway>/gw/agents/<id>/telegram`
-3. The core config is updated for webhook mode
-4. The gateway is restarted (Hermes) or hot-reloaded (OpenClaw)
-
-## Prerequisites
-
-Create a Telegram bot first:
-
-1. Open Telegram and message [@BotFather](https://t.me/BotFather)
-2. Send `/newbot`, choose a name and username
-3. Copy the bot token
-
-## Disconnect
-
-<CodeGroup>
-
-```bash CLI
-oc agent disconnect my-agent telegram
-```
-
-```bash REST API
-curl -X DELETE https://api.opencomputer.dev/v1/agents/my-agent/channels/telegram \
- -H "X-API-Key: $OC_API_KEY"
-```
-
-</CodeGroup>
-
-Disconnecting removes the webhook registration and config entry. The bot token is removed from the secret store.
-
-## List channels
-
-<CodeGroup>
-
-```bash CLI
-oc agent channels my-agent
-```
-
-```bash REST API
-curl https://api.opencomputer.dev/v1/agents/my-agent/channels \
- -H "X-API-Key: $OC_API_KEY"
-```
-
-</CodeGroup>
-
-## How it works
-
-```
-Telegram → webhook POST → OpenComputer gateway → agent sandbox → reply → Telegram
-```
-
-The gateway receives Telegram updates at `/gw/agents/:agentId/telegram` and enqueues them for the agent. The agent processes the message through its core runtime and sends a response back via the Telegram Bot API.
-
-Channels are **stateless** from the platform's perspective — disconnecting removes the webhook and config. Nothing to clean up inside the sandbox.
diff --git a/docs/agents/cores/hermes.mdx b/docs/agents/cores/hermes.mdx
deleted file mode 100644
index bb187455..00000000
--- a/docs/agents/cores/hermes.mdx
+++ /dev/null
@@ -1,79 +0,0 @@
----
-title: "Hermes"
-description: "Self-improving AI agent with skill creation, memory, and multi-channel gateway"
----
-
-[Hermes Agent](https://github.com/NousResearch/hermes-agent) is an AI runtime that gives your agent self-improvement capabilities, automatic skill creation, built-in memory, browser access, and code execution — all behind a multi-channel gateway.
-
-## What you get
-
-| Capability | Description |
-|-----------|-------------|
-| **Gateway** | HTTP gateway that accepts webhooks from connected channels and routes them to the agent |
-| **Skill creation** | Agent can create, edit, and invoke reusable skills to extend its own capabilities |
-| **Memory** | Built-in conversation memory with configurable retention |
-| **Browser** | Headless browser for web navigation and scraping |
-| **Code execution** | Sandboxed code execution for computation tasks |
-| **Multi-channel** | Single agent instance serves multiple channels simultaneously |
-
-## Create a Hermes agent
-
-<CodeGroup>
-
-```bash CLI
-oc agent create my-hermes --core hermes
-```
-
-```bash REST API
-curl -X POST https://api.opencomputer.dev/v1/agents \
- -H "X-API-Key: $OC_API_KEY" \
- -H "Content-Type: application/json" \
- -d '{"id": "my-hermes", "core": "hermes"}'
-```
-
-</CodeGroup>
-
-This boots a sandbox with Hermes pre-installed, an LLM key configured, and the gateway running. An instance is created automatically.
-
-## Configuration
-
-Hermes uses YAML configuration at `~/.hermes/config.yaml` inside the sandbox. When you connect channels or install packages via `oc agent`, the platform updates this config and restarts the gateway.
-
-To inspect or edit manually:
-
-```bash
-oc shell my-hermes
-cat ~/.hermes/config.yaml
-```
-
-## Gateway
-
-The Hermes gateway listens for incoming webhooks and dispatches them to the agent. When you [connect a channel](/agents/channels/telegram), the platform:
-
-1. Registers the channel's webhook with the provider
-2. Adds the channel config to `~/.hermes/config.yaml`
-3. Restarts the gateway with `hermes gateway run --replace`
-
-Gateway logs are at `~/.hermes/logs/gateway.log`.
-
-## Skills
-
-Hermes can create skills — reusable functions it builds and invokes on its own. To see what skills an agent has created:
-
-```bash
-oc shell my-hermes
-hermes skill list
-```
-
-## Extending with packages
-
-Hermes supports [packages](/agents/packages/gbrain) that add capabilities via MCP servers. When a package is installed, the platform adds it to the Hermes MCP config and restarts the gateway.
-
-<CardGroup cols={2}>
- <Card title="Create a Hermes Agent" icon="rocket" href="/guides/create-hermes-agent">
- Step-by-step guide
- </Card>
- <Card title="oc agent CLI" icon="terminal" href="/cli/agents">
- CLI commands for managing agents
- </Card>
-</CardGroup>
diff --git a/docs/agents/cores/openclaw.mdx b/docs/agents/cores/openclaw.mdx
deleted file mode 100644
index 3e6ce6d9..00000000
--- a/docs/agents/cores/openclaw.mdx
+++ /dev/null
@@ -1,69 +0,0 @@
----
-title: "OpenClaw"
-description: "Multi-channel AI gateway with plugin SDK, native MCP support, and hot-reload config"
----
-
-[OpenClaw](https://openclaw.ai) is a multi-channel AI gateway with a rich plugin SDK, native MCP support, and hot-reload configuration. It comes with 6 built-in channels and 20+ plugin channels.
-
-## What you get
-
-| Capability | Description |
-|-----------|-------------|
-| **Multi-channel gateway** | Serves Telegram, Slack, Discord, and more from a single agent |
-| **Plugin SDK** | Extend the agent with custom plugins |
-| **Native MCP** | First-class Model Context Protocol support for tool servers |
-| **Hot-reload config** | Configuration changes take effect without gateway restart |
-| **Built-in channels** | 6 built-in channel types out of the box |
-| **Plugin channels** | 20+ additional channels via the plugin ecosystem |
-
-## Create an OpenClaw agent
-
-<CodeGroup>
-
-```bash CLI
-oc agent create my-claw --core openclaw
-```
-
-```bash REST API
-curl -X POST https://api.opencomputer.dev/v1/agents \
- -H "X-API-Key: $OC_API_KEY" \
- -H "Content-Type: application/json" \
- -d '{"id": "my-claw", "core": "openclaw"}'
-```
-
-</CodeGroup>
-
-This boots a sandbox with OpenClaw pre-installed, an LLM key configured, and the gateway running. An instance is created automatically.
-
-## Configuration
-
-OpenClaw uses JSON5 configuration at `~/.openclaw/openclaw.json` inside the sandbox. Unlike Hermes, OpenClaw supports **hot-reload** — config changes take effect without restarting the gateway.
-
-To inspect or edit manually:
-
-```bash
-oc shell my-claw
-cat ~/.openclaw/openclaw.json
-```
-
-## MCP servers
-
-OpenClaw has native MCP support. When you [install a package](/agents/packages/gbrain) like gbrain, the platform adds it as an MCP server in the OpenClaw config. To see what MCP servers are configured:
-
-```bash
-oc shell my-claw
-openclaw mcp list
-```
-
-## Extending with packages
-
-OpenClaw supports [packages](/agents/packages/gbrain) that add capabilities via MCP servers. Because of hot-reload, package installation takes effect immediately without a gateway restart.
-
-<CardGroup cols={2}>
- <Card title="Create an OpenClaw Agent" icon="rocket" href="/guides/create-openclaw-agent">
- Step-by-step guide
- </Card>
- <Card title="oc agent CLI" icon="terminal" href="/cli/agents">
- CLI commands for managing agents
- </Card>
-</CardGroup>
diff --git a/docs/agents/events.mdx b/docs/agents/events.mdx
deleted file mode 100644
index aebc162d..00000000
--- a/docs/agents/events.mdx
+++ /dev/null
@@ -1,150 +0,0 @@
----
-title: "Events"
-description: "Understanding the agent event stream"
----
-
-Agent sessions emit events via the `onEvent` callback. Each event has a `type` field. The wrapper forwards Claude Agent SDK messages as-is — tolerate unknown event types and preserve unknown fields for forward compatibility.
-
-```typescript
-const session = await sandbox.agent.start({
- prompt: "Build a REST API",
- onEvent: (event) => {
- switch (event.type) {
- case "assistant":
- process.stdout.write(String(event.message ?? ""));
- break;
- case "result":
- console.log("Done:", event);
- break;
- default:
- // Log unknown events rather than ignoring them
- console.log(`[${event.type}]`, event);
- }
- },
-});
-```
-
-## Event Lifecycle
-
-A typical successful session emits events in this order:
-
-```
-ready → configured → assistant / system / tool_use_summary → result → turn_complete
-```
-
-This is illustrative — the exact sequence depends on what the agent does. Multiple `assistant`, `system`, and `tool_use_summary` events may interleave as the agent works.
-
-## Event Reference
-
-### `ready`
-
-The agent process started and is waiting for configuration. Emitted once at session start.
-
-### `configured`
-
-Configuration applied, agent is working on the prompt.
-
-### `assistant`
-
-Claude's text output. This is the agent "thinking out loud" or explaining what it's doing. The `message` field contains the text, but the exact payload shape comes from the upstream Claude SDK and may evolve.
-
-### `system`
-
-System-level messages from the SDK. Common subtypes include initialization, task progress, and status updates.
-
-### `tool_use_summary`
-
-Summary of a tool the agent just used — typically includes tool name and a brief description of what it did.
-
-### `tool_progress`
-
-Progress updates from long-running tools. Common fields include `tool_name` and `elapsed_time_seconds`.
-
-### `result`
-
-Final result of the agent's work. The `subtype` field indicates the kind of result. Payload varies by run mode — may include structured output, a summary, or error details.
-
-### `turn_complete`
-
-The agent finished its current turn. Includes `claude_session_id` which you can use to [resume the conversation](/agents/multi-turn#resuming-across-sessions) in a new session.
-
-```typescript
-onEvent: (event) => {
- if (event.type === "turn_complete") {
- savedSessionId = event.claude_session_id;
- }
-}
-```
-
-### `interrupted`
-
-The agent was stopped via `session.interrupt()`.
-
-### `error`
-
-The agent emitted an error. The `message` field describes what went wrong.
-
-## Filtering Events
-
-Common patterns:
-
-<CodeGroup>
-
-```typescript TypeScript
-// Capture only assistant output
-const session = await sandbox.agent.start({
- prompt: "Explain this codebase",
- onEvent: (event) => {
- if (event.type === "assistant") {
- process.stdout.write(String(event.message ?? ""));
- }
- },
-});
-```
-
-```python Python
-# Collect all events and filter afterward
-session = await sandbox.agent.start(prompt="Explain this codebase")
-events = await session.collect_events()
-
-assistant_messages = [e for e in events if e.type == "assistant"]
-result = next((e for e in events if e.type == "result"), None)
-```
-
-</CodeGroup>
-
-## Error Handling
-
-There are three error surfaces:
-
-| Surface | When | Example |
-| --- | --- | --- |
-| `error` event | Agent reports an error during execution | Invalid tool use, model error |
-| `onError` callback | Raw stderr output from the agent process | Crash logs, unhandled exceptions |
-| Promise rejection | WebSocket or API failure | Network error, auth expired |
-
-Handle all three for robust agent monitoring:
-
-```typescript
-const session = await sandbox.agent.start({
- prompt: "...",
- onEvent: (event) => {
- if (event.type === "error") {
- console.error("Agent error:", event.message);
- }
- },
- onError: (data) => {
- console.error("Process stderr:", data);
- },
-});
-
-try {
- await session.done;
-} catch (err) {
- console.error("Connection error:", err);
-}
-```
-
-<Tip>
- Back to [Agents overview](/agents/overview). Full reference: [TypeScript SDK](/reference/typescript-sdk#agent) · [Python SDK](/reference/python-sdk#agent).
-</Tip>
diff --git a/docs/agents/multi-turn.mdx b/docs/agents/multi-turn.mdx
deleted file mode 100644
index a87612d0..00000000
--- a/docs/agents/multi-turn.mdx
+++ /dev/null
@@ -1,177 +0,0 @@
----
-title: "Multi-turn"
-description: "Follow-ups, resume, and session management"
----
-
-Agent conversations can extend beyond a single prompt. Send follow-up prompts within the same session, resume a conversation in a new session, or reconnect to a running agent.
-
-## Follow-up Prompts
-
-Use `sendPrompt()` to continue a conversation within the same running session:
-
-<CodeGroup>
-
-```typescript TypeScript
-const session = await sandbox.agent.start({
- prompt: "Create a REST API with Express",
- onEvent: (event) => console.log(`[${event.type}]`, event),
-});
-
-await session.done;
-
-// Send a follow-up in the same session
-session.sendPrompt("Now add input validation to all endpoints");
-await session.done;
-```
-
-```python Python
-session = await sandbox.agent.start(
- prompt="Create a REST API with Express",
- on_event=lambda event: print(f"[{event.type}]", event),
-)
-
-await session.wait()
-
-# Send a follow-up in the same session
-session.send_prompt("Now add input validation to all endpoints")
-await session.wait()
-```
-
-</CodeGroup>
-
-## Resuming Across Sessions
-
-Resume continues a previous conversation in a **new** agent session. This is useful when the original session has ended or you want to fork the conversation.
-
-Capture the `claude_session_id` from the `turn_complete` event, then pass it as `resume` when starting a new session:
-
-```typescript
-let claudeSessionId: string;
-
-const session1 = await sandbox.agent.start({
- prompt: "Set up a Next.js project with Tailwind",
- onEvent: (event) => {
- if (event.type === "turn_complete") {
- claudeSessionId = event.claude_session_id;
- }
- },
-});
-await session1.done;
-
-// Later — possibly in a different sandbox forked from the same checkpoint
-const session2 = await sandbox.agent.start({
- prompt: "Now add a dark mode toggle",
- resume: claudeSessionId,
- onEvent: (event) => console.log(event),
-});
-await session2.done;
-```
-
-<Note>
- `resume` is available in the TypeScript SDK only. Python SDK support is planned — use the [HTTP API](/reference/api#agent-sessions) directly to pass the `resume` field.
-</Note>
-
-### Attach vs Resume
-
-| | Attach | Resume |
-| --- | --- | --- |
-| Session state | Still running | Ended or running |
-| What happens | Reconnect to event stream | New session, continues conversation |
-| SDK support | TypeScript, Python | TypeScript only |
-
-## Interrupting
-
-Stop the agent's current turn:
-
-<CodeGroup>
-
-```typescript TypeScript
-session.interrupt();
-// The session emits an "interrupted" event
-```
-
-```python Python
-session.interrupt()
-```
-
-</CodeGroup>
-
-The agent stops working but the session stays alive — you can send a new prompt to continue.
-
-## Reconfiguring Mid-Session
-
-Change model, tools, or working directory while the session is running:
-
-<CodeGroup>
-
-```typescript TypeScript
-session.configure({
- model: "claude-sonnet-4-20250514",
- maxTurns: 20,
- allowedTools: ["Read", "Bash"],
-});
-```
-
-```python Python
-session.configure(
- model="claude-sonnet-4-20250514",
- max_turns=20,
- allowed_tools=["Read", "Bash"],
-)
-```
-
-</CodeGroup>
-
-The new configuration takes effect on the next turn.
-
-## Managing Sessions
-
-### Listing Sessions
-
-<CodeGroup>
-
-```typescript TypeScript
-const sessions = await sandbox.agent.list();
-for (const s of sessions) {
- console.log(s.sessionID, s.running ? "running" : "stopped");
-}
-```
-
-```python Python
-sessions = await sandbox.agent.list()
-for s in sessions:
- print(s.session_id, "running" if s.running else "stopped")
-```
-
-</CodeGroup>
-
-### Attaching to a Running Session
-
-Reconnect to an agent session that's already running — useful after a network disconnect or when monitoring from a different client:
-
-<CodeGroup>
-
-```typescript TypeScript
-const session = await sandbox.agent.attach(sessionId, {
- onEvent: (event) => console.log(event),
- onError: (data) => console.error(data),
-});
-```
-
-```python Python
-session = await sandbox.agent.attach(
- session_id,
- on_event=lambda event: print(event),
- on_error=lambda data: print("error:", data),
-)
-```
-
-</CodeGroup>
-
-<Note>
- Agent sessions are SDK-only — there is no CLI command for agents yet.
-</Note>
-
-<Tip>
- Back to [Agents overview](/agents/overview). See also: [Events](/agents/events) · [Tools](/agents/tools).
-</Tip>
diff --git a/docs/agents/overview.mdx b/docs/agents/overview.mdx
deleted file mode 100644
index ef87cda8..00000000
--- a/docs/agents/overview.mdx
+++ /dev/null
@@ -1,149 +0,0 @@
----
-title: "Run an agent in a sandbox"
-sidebarTitle: "Overview"
-description: "Run Claude inside a sandbox you control, with the SDK"
----
-
-An agent session is a Claude Agent SDK instance running inside a [sandbox](/sandboxes/overview). You send a prompt, the agent works autonomously — writing files, running commands, iterating on errors — and streams events back to your code. You own the sandbox and drive the loop directly: no deploy step, no hosting.
-
-<Info>
- **There are two ways to run agents on OpenComputer.** This is the **SDK** path — you create a sandbox yourself and drive a Claude session inside it directly, owning the sandbox and the loop. If you'd instead like the platform to manage an agent *definition* for you — reached through persistent instances or ephemeral sessions, and connectable to messaging channels or a public API — see [Hosted Agents](/agents-api/overview) (Hermes, OpenClaw).
-</Info>
-
-<CodeGroup>
-
-```typescript TypeScript
-import { Sandbox } from "@opencomputer/sdk";
-
-const sandbox = await Sandbox.create();
-const session = await sandbox.agent.start({
- prompt: "Create a Next.js app with a landing page",
- onEvent: (event) => console.log(`[${event.type}]`, event),
-});
-
-const exitCode = await session.done;
-await sandbox.kill();
-```
-
-```python Python
-from opencomputer import Sandbox
-
-sandbox = await Sandbox.create()
-session = await sandbox.agent.start(
- prompt="Create a Next.js app with a landing page",
- on_event=lambda event: print(f"[{event.type}]", event),
-)
-
-exit_code = await session.wait()
-await sandbox.kill()
-```
-
-</CodeGroup>
-
-## How It Works
-
-The SDK spawns the Claude Agent SDK inside the sandbox VM as a regular process. Claude gets bash and file tools, then works in a think → act → observe loop. Events stream back to your code over WebSocket as JSON lines.
-
-The agent has full access to the sandbox filesystem, network, and shell — the same environment you'd get with `sandbox.exec` or `oc shell`.
-
-## Starting an Agent
-
-`sandbox.agent.start()` creates an agent session and returns immediately. Events arrive via callbacks.
-
-### Parameters
-
-| Parameter | Type | Description |
-| --- | --- | --- |
-| `prompt` | string | Initial prompt for the agent |
-| `model` | string | Claude model (default: `claude-sonnet-4-20250514`) |
-| `systemPrompt` | string | System prompt |
-| `allowedTools` | string[] | Restrict which tools the agent can use |
-| `permissionMode` | string | Permission mode for tool use |
-| `maxTurns` | number | Maximum conversation turns (default: 50) |
-| `cwd` | string | Working directory inside the sandbox |
-| `mcpServers` | object | MCP server configuration (see [Tools](/agents/tools)) |
-| `onEvent` | callback | Called for each [event](/agents/events) |
-| `onError` | callback | Called on error |
-
-**TypeScript only:**
-
-| Parameter | Type | Description |
-| --- | --- | --- |
-| `resume` | string | Resume a previous session by ID |
-| `onExit` | callback | Called when agent process exits |
-| `onScrollbackEnd` | callback | Called when scrollback replay completes |
-
-<Note>
- Python uses snake_case: `system_prompt`, `allowed_tools`, `permission_mode`, `max_turns`, `mcp_servers`, `on_event`, `on_error`.
-</Note>
-
-## AgentSession
-
-The returned session object lets you interact with the running agent.
-
-| Method | TypeScript | Python | Description |
-| --- | --- | --- | --- |
-| Send follow-up | `sendPrompt(text)` | `send_prompt(text)` | Send a follow-up prompt |
-| Wait for completion | `await session.done` | `await session.wait()` | Returns exit code |
-| Collect all events | — | `await session.collect_events()` | Collect events until exit |
-| Interrupt | `session.interrupt()` | `session.interrupt()` | Stop the current turn |
-| Reconfigure | `session.configure(opts)` | `session.configure(...)` | Update model, tools, cwd |
-| Kill | `await session.kill()` | `await session.kill()` | Terminate the process (SIGKILL) |
-| Close | `session.close()` | `await session.close()` | Close WebSocket connection |
-
-| Property | TypeScript | Python |
-| --- | --- | --- |
-| Session ID | `session.sessionId` | `session.session_id` |
-
-## Attaching to an Existing Session
-
-Reconnect to a running agent session to resume receiving events:
-
-<CodeGroup>
-
-```typescript TypeScript
-const session = await sandbox.agent.attach(sessionId, {
- onEvent: (event) => console.log(event),
-});
-```
-
-```python Python
-session = await sandbox.agent.attach(
- session_id,
- on_event=lambda event: print(event),
-)
-```
-
-</CodeGroup>
-
-## Listing Sessions
-
-<CodeGroup>
-
-```typescript TypeScript
-const sessions = await sandbox.agent.list();
-// [{ sessionID, sandboxID, running, startedAt }]
-```
-
-```python Python
-sessions = await sandbox.agent.list()
-# [AgentSessionInfo(session_id, sandbox_id, running, started_at)]
-```
-
-</CodeGroup>
-
-<CardGroup cols={3}>
- <Card title="Events" icon="stream" href="/agents/events">
- Understanding the event stream
- </Card>
- <Card title="Tools" icon="wrench" href="/agents/tools">
- Configure tools and MCP servers
- </Card>
- <Card title="Multi-turn" icon="comments" href="/agents/multi-turn">
- Follow-ups, resume, session management
- </Card>
-</CardGroup>
-
-<Tip>
- Full reference: [TypeScript SDK](/reference/typescript-sdk#agent) · [Python SDK](/reference/python-sdk#agent) · [HTTP API](/reference/api#agent-sessions).
-</Tip>
diff --git a/docs/agents/packages/gbrain.mdx b/docs/agents/packages/gbrain.mdx
deleted file mode 100644
index 712508aa..00000000
--- a/docs/agents/packages/gbrain.mdx
+++ /dev/null
@@ -1,122 +0,0 @@
----
-title: "gbrain Package"
-description: "Install persistent memory on a managed agent with gbrain"
----
-
-[gbrain](https://github.com/garrytan/gbrain) is a personal knowledge system that gives your agent persistent memory backed by Postgres with vector search. When installed on a managed agent, it's wired as an MCP server — the agent gets 34 tools for storing, searching, and organizing knowledge.
-
-## Install
-
-<CodeGroup>
-
-```bash CLI
-oc agent install my-agent gbrain
-```
-
-```bash REST API
-curl -X POST https://api.opencomputer.dev/v1/agents/my-agent/packages/gbrain \
- -H "X-API-Key: $OC_API_KEY"
-```
-
-</CodeGroup>
-
-This runs through five phases:
-
-| Phase | What happens |
-|-------|-------------|
-| **Allocate** | Creates a managed Postgres database (with `pgvector` and `pg_trgm` extensions) for this agent |
-| **Provision** | Clones gbrain from GitHub into the sandbox and installs dependencies |
-| **Initialize** | Runs `gbrain init` against the managed database to create the schema |
-| **Wire** | Adds gbrain as an MCP server in the core's config and restarts the gateway |
-| **Verify** | Runs `gbrain doctor` to confirm the installation |
-
-Install is **idempotent** — re-running it after a partial failure is safe. The allocate phase skips if the database exists, provision skips if gbrain is already cloned, and so on.
-
-## What the agent gets
-
-After install, the agent has these tool groups available:
-
-| Group | Tools | What they do |
-|-------|-------|-------------|
-| **Pages** | `put_page`, `get_page`, `delete_page`, `list_pages` | Store and retrieve knowledge pages with Markdown content |
-| **Search** | `query` (vector + keyword hybrid), `search` (full-text) | Find pages by meaning or keywords |
-| **Versions** | `get_versions`, `revert_version` | Page version history |
-| **Graph** | `add_link`, `remove_link`, `get_links`, `get_backlinks`, `traverse_graph` | Link pages into a knowledge graph |
-| **Tags** | `add_tag`, `remove_tag`, `get_tags` | Categorize pages |
-| **Timeline** | `add_timeline_entry`, `get_timeline` | Chronological event log |
-| **Files** | `file_upload`, `file_list`, `file_url` | Attach files to the knowledge base |
-| **System** | `get_stats`, `get_health`, `sync_brain` | Health checks and maintenance |
-
-## Test it
-
-After installing, message your agent on Telegram:
-
-```
-You: What new tools do you have?
-Agent: I now have gbrain tools — search, put_page, timeline...
-
-You: Use gbrain to remember that our deployment target is Kubernetes on GCP
-Agent: Saved to knowledge base.
-
-You: Use gbrain to search for deployment
-Agent: You deploy to Kubernetes on GCP.
-```
-
-## Managed database
-
-The database that backs gbrain is **managed by OpenComputer** — you don't need to provision or configure Postgres yourself. The database:
-
-- Lives outside the sandbox on a shared Postgres cluster
-- Survives instance restarts and sandbox recreation
-- Is preserved when you uninstall gbrain (your data isn't deleted)
-- Is restored when you reinstall gbrain on the same agent
-
-The connection URL is passed to gbrain via the MCP server's environment config, not as a sandbox-level secret.
-
-## Uninstall
-
-<CodeGroup>
-
-```bash CLI
-oc agent uninstall my-agent gbrain
-```
-
-```bash REST API
-curl -X DELETE https://api.opencomputer.dev/v1/agents/my-agent/packages/gbrain \
- -H "X-API-Key: $OC_API_KEY"
-```
-
-</CodeGroup>
-
-This removes the MCP wiring from the core's config and restarts the gateway. The agent loses access to gbrain tools, but the **database is preserved**. Reinstalling gbrain on the same agent reconnects to the existing data.
-
-## Debugging
-
-Shell into the sandbox to inspect the installation:
-
-```bash
-oc shell my-agent
-```
-
-```bash
-# Check if gbrain is cloned
-ls ~/.gbrain/src/cli.ts
-
-# Check the MCP config (Hermes)
-cat ~/.hermes/config.yaml
-
-# Check the MCP config (OpenClaw)
-cat ~/.openclaw/openclaw.json
-
-# Check gateway logs for MCP connection status
-tail -20 ~/.hermes/logs/gateway.log
-
-# Run gbrain directly
-~/.bun/bin/bun run ~/.gbrain/src/cli.ts doctor
-```
-
-Common issues:
-
-- **"missing executable 'bun'"** in gateway logs — the MCP config needs absolute paths (e.g., `/home/sandbox/.bun/bin/bun`), not bare `bun`
-- **Embedding failures** — gbrain uses OpenAI for vector embeddings. If `OPENAI_API_KEY` is missing from the MCP env config, pages are stored but semantic search won't work
-- **Gateway didn't pick up MCP** — check if the gateway restarted after the wire phase. Run `hermes gateway run --replace` from the shell to force a restart
diff --git a/docs/agents/rest/agents.mdx b/docs/agents/rest/agents.mdx
deleted file mode 100644
index 2db7e625..00000000
--- a/docs/agents/rest/agents.mdx
+++ /dev/null
@@ -1,144 +0,0 @@
----
-title: "Agents"
-description: "Create and manage agent definitions — snapshot, entrypoint, secrets, elasticity"
----
-
-An Agent is configuration, not compute. It defines what core or snapshot to boot, what entrypoint to run, which secrets to inject, and how elasticity works. The same agent can back both Instances and Sessions.
-
-<Tip>
- **Prefer the CLI?** All operations below have [`oc agent`](/cli/agents) equivalents.
-</Tip>
-
-## Create agent
-
-```
-POST /v1/agents
-```
-
-```json
-{
- "id": "issue-resolver",
- "display_name": "Issue Resolver",
- "config": {
- "snapshot": "agent-snapshot-v1",
- "entrypoint": "node /workspace/agent/index.js",
- "env": { "LOG_LEVEL": "info" },
- "elasticity": { "baseline_mb": 1024, "max_mb": 8192 },
- "idle_timeout_s": 600
- }
-}
-```
-
-`id` must be DNS-safe (lowercase alphanumeric + hyphens). Returns `201` with the agent object.
-
-**Managed agents** — pass `core` instead of `config` to create a managed agent:
-
-```json
-{
- "id": "my-hermes",
- "core": "hermes"
-}
-```
-
-**CLI equivalent:** `oc agent create my-hermes --core hermes`
-
-**Entrypoint vs agent_config**: if `config.entrypoint` is set, the platform runs it via `sandbox.exec.start()`. If `config.agent_config` is set instead, the platform uses `sandbox.agent.start()` with the provided `system_prompt` and `allowed_tools`. They are mutually exclusive.
-
-## CRUD
-
-```
-GET /v1/agents List all agents
-GET /v1/agents/:agentId Get agent
-PATCH /v1/agents/:agentId Update (accepts display_name, config)
-DELETE /v1/agents/:agentId Delete (cascades to instances and sessions)
-```
-
-| Operation | CLI equivalent |
-|-----------|---------------|
-| List | `oc agent list` |
-| Get | `oc agent get <id>` |
-| Update | — (REST only) |
-| Delete | `oc agent delete <id>` |
-
-## Agent object
-
-```json
-{
- "id": "issue-resolver",
- "display_name": "Issue Resolver",
- "secret_store": "agent:issue-resolver",
- "config": { ... },
- "created_at": "2026-04-09T...",
- "updated_at": "2026-04-09T..."
-}
-```
-
-## Secrets
-
-Convenience wrapper over OpenComputer's [secret store](/sandboxes/secrets). Values are AES-256-GCM encrypted at rest, injected as sealed tokens at sandbox creation. Values are never returned via API.
-
-```
-PUT /v1/agents/:agentId/secrets/:key Set a secret
-GET /v1/agents/:agentId/secrets List keys (values never returned)
-DELETE /v1/agents/:agentId/secrets/:key Remove a secret
-```
-
-**Set secret:**
-
-```json
-PUT /v1/agents/issue-resolver/secrets/ANTHROPIC_API_KEY
-{ "value": "sk-ant-...", "allowed_hosts": ["api.anthropic.com"] }
-```
-
-The first `PUT` auto-creates a backing OC secret store named `agent:{agentId}`. `allowed_hosts` is optional — restricts which outbound hosts can receive the decrypted value.
-
-**List secrets** returns keys and metadata only:
-
-```json
-{ "secrets": [{ "key": "ANTHROPIC_API_KEY", "allowed_hosts": ["api.anthropic.com"], "set_at": "..." }] }
-```
-
-**CLI note:** Secrets can be set at creation time with `oc agent create --secret KEY=VALUE`. There is no standalone `oc agent secret` command yet.
-
-## Channels
-
-```
-POST /v1/agents/:agentId/channels/:channel Connect a channel
-DELETE /v1/agents/:agentId/channels/:channel Disconnect a channel
-GET /v1/agents/:agentId/channels List connected channels
-```
-
-| Operation | CLI equivalent |
-|-----------|---------------|
-| Connect | `oc agent connect <id> <channel>` |
-| Disconnect | `oc agent disconnect <id> <channel>` |
-| List | `oc agent channels <id>` |
-
-See [Telegram channel](/agents/channels/telegram) for details.
-
-## Packages
-
-```
-POST /v1/agents/:agentId/packages/:pkg Install a package
-DELETE /v1/agents/:agentId/packages/:pkg Uninstall a package
-GET /v1/agents/:agentId/packages List installed packages
-```
-
-| Operation | CLI equivalent |
-|-----------|---------------|
-| Install | `oc agent install <id> <pkg>` |
-| Uninstall | `oc agent uninstall <id> <pkg>` |
-| List | `oc agent packages <id>` |
-
-See [gbrain package](/agents/packages/gbrain) for details.
-
-## Errors
-
-```json
-{
- "error": {
- "type": "invalid_request | not_found | conflict | internal_error",
- "message": "Human-readable description"
- }
-}
-```
diff --git a/docs/agents/rest/instances.mdx b/docs/agents/rest/instances.mdx
deleted file mode 100644
index 76a6edcf..00000000
--- a/docs/agents/rest/instances.mdx
+++ /dev/null
@@ -1,67 +0,0 @@
----
-title: "Instances"
-description: "Persistent sandboxes that multiplex conversations, hibernate when idle, and wake on demand"
----
-
-An Instance is a persistent sandbox bound to an Agent. It stays alive across conversations, accumulates state (filesystem, installed tools, running processes), and hibernates when idle. Multiple conversations are multiplexed onto one instance via `conversation_id`.
-
-**Typical mapping:** one Instance per user or team. The caller owns conversation identity (e.g., Slack thread timestamp).
-
-## Create instance
-
-```
-POST /v1/agents/:agentId/instances
-```
-
-```json
-{ "metadata": { "slack_user": "U123", "team": "engineering" } }
-```
-
-Returns `201` with `status: "creating"`. The platform provisions a sandbox from the agent's snapshot in the background. Status becomes `"running"` once ready.
-
-## List / Get / Delete
-
-```
-GET /v1/agents/:agentId/instances List instances for an agent
-GET /v1/agents/:agentId/instances/:id Get instance
-DELETE /v1/agents/:agentId/instances/:id Destroy (kills sandbox)
-```
-
-## Instance object
-
-```json
-{
- "id": "inst_98adcc7e...",
- "agent_id": "slack-coworker",
- "status": "creating | running | error",
- "metadata": { "slack_user": "U123" },
- "created_at": "2026-04-09T...",
- "updated_at": "2026-04-09T..."
-}
-```
-
-## Send message
-
-```
-POST /v1/agents/:agentId/instances/:id/messages
-```
-
-```json
-{ "content": "analyze the auth service repo", "conversation_id": "1712345678.123456" }
-```
-
-Returns `200` with `Content-Type: text/event-stream`. If the instance is still `creating`, waits up to 30s for it to become ready.
-
-**SSE events:**
-
-```
-data: {"type":"text","content":"Cloning the repo now...","conversation_id":"1712345678.123456"}
-data: {"type":"text","content":"Found 3 issues...","conversation_id":"1712345678.123456"}
-data: {"type":"done"}
-```
-
-The stream closes after the agent completes one turn. The caller collects `text` events and concatenates their `content` for the full response.
-
-## Recovery
-
-If the caller process restarts, rebuild instance mappings from `GET /v1/agents/:agentId/instances` using `metadata` to match external identities (e.g., Slack user IDs) back to instance IDs.
diff --git a/docs/agents/rest/sessions.mdx b/docs/agents/rest/sessions.mdx
deleted file mode 100644
index de75b47c..00000000
--- a/docs/agents/rest/sessions.mdx
+++ /dev/null
@@ -1,74 +0,0 @@
----
-title: "Sessions"
-description: "Ephemeral sandboxes for fire-and-forget agent tasks with input/result"
----
-
-A Session is an ephemeral sandbox bound to an Agent. One session = one task = one sandbox. The sandbox is created, the agent runs to completion, and the sandbox is destroyed. For process-mode agents that take input and produce a result.
-
-**Typical mapping:** one Session per webhook, API call, or batch job.
-
-## Create session
-
-```
-POST /v1/agents/:agentId/sessions
-```
-
-```json
-{
- "input": {
- "repo": "acme/backend",
- "issue_number": 42,
- "webhook_payload": { "..." }
- },
- "metadata": { "trigger": "github_webhook" }
-}
-```
-
-The platform creates a sandbox, writes `input` to `/tmp/agent_input.json`, sets `AGENT_INPUT_PATH` as an env var, and runs the agent's entrypoint. The agent reads input, does work, writes its result to `/tmp/agent_result.json`, and exits.
-
-Returns `201` with `status: "creating"`.
-
-## Get / Delete
-
-```
-GET /v1/agents/:agentId/sessions/:id Get session
-DELETE /v1/agents/:agentId/sessions/:id End session (kills sandbox)
-```
-
-## Get result
-
-```
-GET /v1/agents/:agentId/sessions/:id/result
-```
-
-Returns the agent's output after completion. The platform reads `/tmp/agent_result.json` from the sandbox.
-
-```
--- While running: 409 { "error": { "type": "conflict", "message": "Session still running" } }
--- When complete: 200 { "data": { "pr_url": "https://..." }, "completed_at": "2026-04-09T..." }
--- If no result written: 200 { "data": null, "completed_at": "2026-04-09T..." }
-```
-
-## Session object
-
-```json
-{
- "id": "sess_98adcc7e...",
- "agent_id": "issue-resolver",
- "status": "creating | running | completed | failed",
- "input": { "..." },
- "result": null,
- "preview_url": null,
- "metadata": {},
- "created_at": "2026-04-09T...",
- "updated_at": "2026-04-09T..."
-}
-```
-
-## Lifecycle
-
-```
-creating → running → completed (exit 0) | failed (non-zero exit)
-```
-
-Terminal states are final. The sandbox is destroyed when the session ends.
diff --git a/docs/agents/tools.mdx b/docs/agents/tools.mdx
deleted file mode 100644
index 913613e7..00000000
--- a/docs/agents/tools.mdx
+++ /dev/null
@@ -1,159 +0,0 @@
----
-title: "Tools"
-description: "Configure what tools an agent can use"
----
-
-By default, the agent has access to bash, file read/write, and Python — the same tools available in [Claude Code](https://docs.anthropic.com/en/docs/agents/claude-code-sdk-overview). You can restrict these and add custom tools via MCP servers.
-
-## Default Tools
-
-The agent runs with all Claude Code tools enabled. To restrict which tools the agent can use, pass `allowedTools`:
-
-<CodeGroup>
-
-```typescript TypeScript
-const session = await sandbox.agent.start({
- prompt: "Analyze the CSV files in /data",
- allowedTools: ["Read", "Bash"],
-});
-```
-
-```python Python
-session = await sandbox.agent.start(
- prompt="Analyze the CSV files in /data",
- allowed_tools=["Read", "Bash"],
-)
-```
-
-</CodeGroup>
-
-## MCP Servers
-
-[Model Context Protocol](https://modelcontextprotocol.io/) servers give the agent access to custom tools. MCP servers run inside the sandbox — the agent discovers available tools via the protocol.
-
-Pass MCP server configuration when starting the agent:
-
-<CodeGroup>
-
-```typescript TypeScript
-const session = await sandbox.agent.start({
- prompt: "Query the users table and summarize the results",
- mcpServers: {
- sqlite: {
- command: "npx",
- args: ["-y", "@modelcontextprotocol/server-sqlite", "/data/app.db"],
- },
- },
-});
-```
-
-```python Python
-session = await sandbox.agent.start(
- prompt="Query the users table and summarize the results",
- mcp_servers={
- "sqlite": {
- "command": "npx",
- "args": ["-y", "@modelcontextprotocol/server-sqlite", "/data/app.db"],
- },
- },
-)
-```
-
-</CodeGroup>
-
-### McpServerConfig
-
-| Field | Type | Required | Description |
-| --- | --- | --- | --- |
-| `command` | string | Yes | Command to start the MCP server |
-| `args` | string[] | No | Command arguments |
-| `env` | object | No | Environment variables for the server process |
-
-### Example: Custom API Tool
-
-```typescript
-const session = await sandbox.agent.start({
- prompt: "Fetch the latest deployment status",
- mcpServers: {
- deploy: {
- command: "node",
- args: ["/tools/deploy-server.js"],
- env: { DEPLOY_API_KEY: process.env.DEPLOY_API_KEY },
- },
- },
-});
-```
-
-## System Prompt
-
-Steer agent behavior with a custom system prompt:
-
-<CodeGroup>
-
-```typescript TypeScript
-const session = await sandbox.agent.start({
- prompt: "Review the codebase for security issues",
- systemPrompt: "You are a security auditor. Focus on OWASP Top 10 vulnerabilities. Output findings as a markdown checklist.",
-});
-```
-
-```python Python
-session = await sandbox.agent.start(
- prompt="Review the codebase for security issues",
- system_prompt="You are a security auditor. Focus on OWASP Top 10 vulnerabilities. Output findings as a markdown checklist.",
-)
-```
-
-</CodeGroup>
-
-## Permission Mode
-
-Controls how the agent handles tool permissions:
-
-<CodeGroup>
-
-```typescript TypeScript
-const session = await sandbox.agent.start({
- prompt: "Set up the project",
- permissionMode: "bypassPermissions", // default — agent runs freely
-});
-```
-
-```python Python
-session = await sandbox.agent.start(
- prompt="Set up the project",
- permission_mode="bypassPermissions",
-)
-```
-
-</CodeGroup>
-
-The default is `bypassPermissions` — the agent can use any available tool without confirmation. This is safe because the agent runs inside an isolated sandbox VM.
-
-## Max Turns
-
-Limit how many think → act → observe iterations the agent can perform:
-
-<CodeGroup>
-
-```typescript TypeScript
-const session = await sandbox.agent.start({
- prompt: "Fix the failing test",
- maxTurns: 10, // default: 50
-});
-```
-
-```python Python
-session = await sandbox.agent.start(
- prompt="Fix the failing test",
- max_turns=10,
-)
-```
-
-</CodeGroup>
-
-Lower `maxTurns` to prevent runaway agents on simple tasks. The default is 50.
-
-<Tip>
- Back to [Agents overview](/agents/overview). See also: [Events](/agents/events) · [Multi-turn](/agents/multi-turn).
-</Tip>
diff --git a/docs/api-reference/agents/connect-channel.mdx b/docs/api-reference/agents/connect-channel.mdx
deleted file mode 100644
index e37c9a1c..00000000
--- a/docs/api-reference/agents/connect-channel.mdx
+++ /dev/null
@@ -1,29 +0,0 @@
----
-title: 'Connect Channel'
-api: 'POST /v1/agents/{agentId}/channels/{channel}'
----
-
-Connect a messaging channel to an agent.
-
-**CLI equivalent:** `oc agent connect <id> <channel>`
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField path="channel" type="string" required>
- Channel type (e.g. `telegram`)
-</ParamField>
-
-<ParamField body="bot_token" type="string">
- Bot token (required for Telegram)
-</ParamField>
-
-<ResponseExample>
-```json 200
-{
- "channel": "telegram",
- "status": "connected"
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/create-instance.mdx b/docs/api-reference/agents/create-instance.mdx
deleted file mode 100644
index 75e9be41..00000000
--- a/docs/api-reference/agents/create-instance.mdx
+++ /dev/null
@@ -1,27 +0,0 @@
----
-title: 'Create Instance'
-api: 'POST /v1/agents/{agentId}/instances'
----
-
-Create a persistent instance for an agent. The platform provisions a sandbox from the agent's snapshot in the background.
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField body="metadata" type="object">
- Arbitrary metadata for matching instances to external identities (e.g. Slack user IDs)
-</ParamField>
-
-<ResponseExample>
-```json 201
-{
- "id": "inst_98adcc7e",
- "agent_id": "my-hermes",
- "status": "creating",
- "metadata": { "slack_user": "U123" },
- "created_at": "2026-04-09T10:30:00Z",
- "updated_at": "2026-04-09T10:30:00Z"
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/create-session.mdx b/docs/api-reference/agents/create-session.mdx
deleted file mode 100644
index 5efac600..00000000
--- a/docs/api-reference/agents/create-session.mdx
+++ /dev/null
@@ -1,34 +0,0 @@
----
-title: 'Create Session'
-api: 'POST /v1/agents/{agentId}/sessions'
----
-
-Create an ephemeral session. The platform creates a sandbox, writes `input` to `/tmp/agent_input.json`, sets `AGENT_INPUT_PATH`, and runs the agent's entrypoint.
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField body="input" type="object">
- Input data written to `/tmp/agent_input.json` in the sandbox
-</ParamField>
-
-<ParamField body="metadata" type="object">
- Arbitrary metadata
-</ParamField>
-
-<ResponseExample>
-```json 201
-{
- "id": "sess_98adcc7e",
- "agent_id": "issue-resolver",
- "status": "creating",
- "input": { "repo": "acme/backend", "issue_number": 42 },
- "result": null,
- "preview_url": null,
- "metadata": { "trigger": "github_webhook" },
- "created_at": "2026-04-09T10:30:00Z",
- "updated_at": "2026-04-09T10:30:00Z"
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/create.mdx b/docs/api-reference/agents/create.mdx
deleted file mode 100644
index 6804b3a8..00000000
--- a/docs/api-reference/agents/create.mdx
+++ /dev/null
@@ -1,68 +0,0 @@
----
-title: 'Create Agent'
-api: 'POST /v1/agents'
----
-
-Create a new agent. For managed agents, pass `core` to get a pre-configured runtime. For raw agents, pass `config` with your own snapshot and entrypoint.
-
-**CLI equivalent:** `oc agent create <id> [--core <core>] [--secret KEY=VALUE]`
-
-<ParamField body="id" type="string" required>
- Agent ID. Must be DNS-safe (lowercase alphanumeric + hyphens).
-</ParamField>
-
-<ParamField body="display_name" type="string">
- Human-readable display name
-</ParamField>
-
-<ParamField body="core" type="string">
- Managed core (`hermes` or `openclaw`). Mutually exclusive with `config`.
-</ParamField>
-
-<ParamField body="config" type="object">
- Raw agent configuration. Mutually exclusive with `core`.
-</ParamField>
-
-<ParamField body="config.snapshot" type="string">
- Snapshot to boot the sandbox from
-</ParamField>
-
-<ParamField body="config.entrypoint" type="string">
- Command to run on sandbox start
-</ParamField>
-
-<ParamField body="config.agent_config" type="object">
- Alternative to entrypoint — uses `sandbox.agent.start()` with `system_prompt` and `allowed_tools`
-</ParamField>
-
-<ParamField body="config.env" type="object">
- Environment variables
-</ParamField>
-
-<ParamField body="config.elasticity" type="object">
- Memory elasticity. `baseline_mb` and `max_mb`.
-</ParamField>
-
-<ParamField body="config.idle_timeout_s" type="integer">
- Idle timeout in seconds
-</ParamField>
-
-<ParamField body="secrets" type="object">
- Key-value map of secrets to set on creation
-</ParamField>
-
-<ResponseExample>
-```json 201
-{
- "id": "my-hermes",
- "display_name": "my-hermes",
- "core": "hermes",
- "channels": [],
- "packages": [],
- "secret_store": "agent:my-hermes",
- "config": null,
- "created_at": "2026-04-09T10:30:00Z",
- "updated_at": "2026-04-09T10:30:00Z"
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/delete-instance.mdx b/docs/api-reference/agents/delete-instance.mdx
deleted file mode 100644
index 2980acbf..00000000
--- a/docs/api-reference/agents/delete-instance.mdx
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: 'Delete Instance'
-api: 'DELETE /v1/agents/{agentId}/instances/{id}'
----
-
-Delete an instance. Kills the backing sandbox.
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField path="id" type="string" required>
- Instance ID
-</ParamField>
-
-<ResponseExample>
-```json 200
-{}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/delete-secret.mdx b/docs/api-reference/agents/delete-secret.mdx
deleted file mode 100644
index 9398340c..00000000
--- a/docs/api-reference/agents/delete-secret.mdx
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: 'Delete Secret'
-api: 'DELETE /v1/agents/{agentId}/secrets/{key}'
----
-
-Remove a secret from an agent.
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField path="key" type="string" required>
- Secret key name
-</ParamField>
-
-<ResponseExample>
-```json 200
-{}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/delete-session.mdx b/docs/api-reference/agents/delete-session.mdx
deleted file mode 100644
index 52408db1..00000000
--- a/docs/api-reference/agents/delete-session.mdx
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: 'Delete Session'
-api: 'DELETE /v1/agents/{agentId}/sessions/{id}'
----
-
-Delete a session. Kills the backing sandbox if still running.
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField path="id" type="string" required>
- Session ID
-</ParamField>
-
-<ResponseExample>
-```json 200
-{}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/delete.mdx b/docs/api-reference/agents/delete.mdx
deleted file mode 100644
index df81ef0d..00000000
--- a/docs/api-reference/agents/delete.mdx
+++ /dev/null
@@ -1,18 +0,0 @@
----
-title: 'Delete Agent'
-api: 'DELETE /v1/agents/{agentId}'
----
-
-Delete an agent. Cascades to all instances and sessions — their sandboxes are destroyed.
-
-**CLI equivalent:** `oc agent delete <id>`
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ResponseExample>
-```json 200
-{}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/disconnect-channel.mdx b/docs/api-reference/agents/disconnect-channel.mdx
deleted file mode 100644
index 783453ee..00000000
--- a/docs/api-reference/agents/disconnect-channel.mdx
+++ /dev/null
@@ -1,22 +0,0 @@
----
-title: 'Disconnect Channel'
-api: 'DELETE /v1/agents/{agentId}/channels/{channel}'
----
-
-Disconnect a channel from an agent. Removes webhook registration and config.
-
-**CLI equivalent:** `oc agent disconnect <id> <channel>`
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField path="channel" type="string" required>
- Channel type (e.g. `telegram`)
-</ParamField>
-
-<ResponseExample>
-```json 200
-{}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/get-instance.mdx b/docs/api-reference/agents/get-instance.mdx
deleted file mode 100644
index 80321a0a..00000000
--- a/docs/api-reference/agents/get-instance.mdx
+++ /dev/null
@@ -1,27 +0,0 @@
----
-title: 'Get Instance'
-api: 'GET /v1/agents/{agentId}/instances/{id}'
----
-
-Get a specific instance.
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField path="id" type="string" required>
- Instance ID
-</ParamField>
-
-<ResponseExample>
-```json 200
-{
- "id": "inst_98adcc7e",
- "agent_id": "my-hermes",
- "status": "running",
- "metadata": { "slack_user": "U123" },
- "created_at": "2026-04-09T10:30:00Z",
- "updated_at": "2026-04-09T10:30:00Z"
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/get-session-result.mdx b/docs/api-reference/agents/get-session-result.mdx
deleted file mode 100644
index c115e856..00000000
--- a/docs/api-reference/agents/get-session-result.mdx
+++ /dev/null
@@ -1,34 +0,0 @@
----
-title: 'Get Session Result'
-api: 'GET /v1/agents/{agentId}/sessions/{id}/result'
----
-
-Get the result of a completed session. The platform reads `/tmp/agent_result.json` from the sandbox.
-
-Returns `409` if the session is still running.
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField path="id" type="string" required>
- Session ID
-</ParamField>
-
-<ResponseExample>
-```json 200
-{
- "data": { "pr_url": "https://github.com/acme/backend/pull/43" },
- "completed_at": "2026-04-09T10:35:00Z"
-}
-```
-
-```json 409
-{
- "error": {
- "type": "conflict",
- "message": "Session still running"
- }
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/get-session.mdx b/docs/api-reference/agents/get-session.mdx
deleted file mode 100644
index 5b29c817..00000000
--- a/docs/api-reference/agents/get-session.mdx
+++ /dev/null
@@ -1,30 +0,0 @@
----
-title: 'Get Session'
-api: 'GET /v1/agents/{agentId}/sessions/{id}'
----
-
-Get a specific session.
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField path="id" type="string" required>
- Session ID
-</ParamField>
-
-<ResponseExample>
-```json 200
-{
- "id": "sess_98adcc7e",
- "agent_id": "issue-resolver",
- "status": "running",
- "input": { "repo": "acme/backend", "issue_number": 42 },
- "result": null,
- "preview_url": null,
- "metadata": { "trigger": "github_webhook" },
- "created_at": "2026-04-09T10:30:00Z",
- "updated_at": "2026-04-09T10:30:00Z"
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/get.mdx b/docs/api-reference/agents/get.mdx
deleted file mode 100644
index 82eb692a..00000000
--- a/docs/api-reference/agents/get.mdx
+++ /dev/null
@@ -1,28 +0,0 @@
----
-title: 'Get Agent'
-api: 'GET /v1/agents/{agentId}'
----
-
-Get details for a specific agent.
-
-**CLI equivalent:** `oc agent get <id>`
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ResponseExample>
-```json 200
-{
- "id": "my-hermes",
- "display_name": "my-hermes",
- "core": "hermes",
- "channels": ["telegram"],
- "packages": ["gbrain"],
- "secret_store": "agent:my-hermes",
- "config": null,
- "created_at": "2026-04-09T10:30:00Z",
- "updated_at": "2026-04-09T10:30:00Z"
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/install-package.mdx b/docs/api-reference/agents/install-package.mdx
deleted file mode 100644
index c052d206..00000000
--- a/docs/api-reference/agents/install-package.mdx
+++ /dev/null
@@ -1,25 +0,0 @@
----
-title: 'Install Package'
-api: 'POST /v1/agents/{agentId}/packages/{pkg}'
----
-
-Install a package on an agent.
-
-**CLI equivalent:** `oc agent install <id> <package>`
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField path="pkg" type="string" required>
- Package name (e.g. `gbrain`)
-</ParamField>
-
-<ResponseExample>
-```json 200
-{
- "package": "gbrain",
- "status": "installed"
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/list-channels.mdx b/docs/api-reference/agents/list-channels.mdx
deleted file mode 100644
index 68d91d53..00000000
--- a/docs/api-reference/agents/list-channels.mdx
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: 'List Channels'
-api: 'GET /v1/agents/{agentId}/channels'
----
-
-List channels connected to an agent.
-
-**CLI equivalent:** `oc agent channels <id>`
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ResponseExample>
-```json 200
-{
- "channels": ["telegram"]
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/list-instances.mdx b/docs/api-reference/agents/list-instances.mdx
deleted file mode 100644
index b77406fd..00000000
--- a/docs/api-reference/agents/list-instances.mdx
+++ /dev/null
@@ -1,27 +0,0 @@
----
-title: 'List Instances'
-api: 'GET /v1/agents/{agentId}/instances'
----
-
-List all instances for an agent.
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ResponseExample>
-```json 200
-{
- "instances": [
- {
- "id": "inst_98adcc7e",
- "agent_id": "my-hermes",
- "status": "running",
- "metadata": { "slack_user": "U123" },
- "created_at": "2026-04-09T10:30:00Z",
- "updated_at": "2026-04-09T10:30:00Z"
- }
- ]
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/list-packages.mdx b/docs/api-reference/agents/list-packages.mdx
deleted file mode 100644
index 4c76b7d6..00000000
--- a/docs/api-reference/agents/list-packages.mdx
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: 'List Packages'
-api: 'GET /v1/agents/{agentId}/packages'
----
-
-List packages installed on an agent.
-
-**CLI equivalent:** `oc agent packages <id>`
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ResponseExample>
-```json 200
-{
- "packages": ["gbrain"]
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/list-secrets.mdx b/docs/api-reference/agents/list-secrets.mdx
deleted file mode 100644
index ab31829f..00000000
--- a/docs/api-reference/agents/list-secrets.mdx
+++ /dev/null
@@ -1,24 +0,0 @@
----
-title: 'List Secrets'
-api: 'GET /v1/agents/{agentId}/secrets'
----
-
-List secret keys for an agent. Values are never returned.
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ResponseExample>
-```json 200
-{
- "secrets": [
- {
- "key": "ANTHROPIC_API_KEY",
- "allowed_hosts": ["api.anthropic.com"],
- "set_at": "2026-04-09T10:30:00Z"
- }
- ]
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/list.mdx b/docs/api-reference/agents/list.mdx
deleted file mode 100644
index d659f361..00000000
--- a/docs/api-reference/agents/list.mdx
+++ /dev/null
@@ -1,28 +0,0 @@
----
-title: 'List Agents'
-api: 'GET /v1/agents'
----
-
-List all agents owned by the authenticated API key.
-
-**CLI equivalent:** `oc agent list`
-
-<ResponseExample>
-```json 200
-{
- "agents": [
- {
- "id": "my-hermes",
- "display_name": "my-hermes",
- "core": "hermes",
- "channels": ["telegram"],
- "packages": ["gbrain"],
- "secret_store": "agent:my-hermes",
- "config": null,
- "created_at": "2026-04-09T10:30:00Z",
- "updated_at": "2026-04-09T10:30:00Z"
- }
- ]
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/send-message.mdx b/docs/api-reference/agents/send-message.mdx
deleted file mode 100644
index ecd6874c..00000000
--- a/docs/api-reference/agents/send-message.mdx
+++ /dev/null
@@ -1,34 +0,0 @@
----
-title: 'Send Message'
-api: 'POST /v1/agents/{agentId}/instances/{id}/messages'
----
-
-Send a message to an agent instance. Returns a server-sent event stream with the agent's response.
-
-If the instance is still `creating`, waits up to 30s for it to become ready.
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField path="id" type="string" required>
- Instance ID
-</ParamField>
-
-<ParamField body="content" type="string" required>
- Message content
-</ParamField>
-
-<ParamField body="conversation_id" type="string">
- Conversation identifier for multiplexing. The caller owns this identity (e.g. Slack thread timestamp).
-</ParamField>
-
-<ResponseExample>
-```text 200
-Content-Type: text/event-stream
-
-data: {"type":"text","content":"Cloning the repo now...","conversation_id":"1712345678.123456"}
-data: {"type":"text","content":"Found 3 issues...","conversation_id":"1712345678.123456"}
-data: {"type":"done"}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/set-secret.mdx b/docs/api-reference/agents/set-secret.mdx
deleted file mode 100644
index 819bbc2b..00000000
--- a/docs/api-reference/agents/set-secret.mdx
+++ /dev/null
@@ -1,34 +0,0 @@
----
-title: 'Set Secret'
-api: 'PUT /v1/agents/{agentId}/secrets/{key}'
----
-
-Set or update a secret on an agent. The first call auto-creates a backing secret store. Values are AES-256-GCM encrypted at rest and never returned via API.
-
-**CLI equivalent:** `oc agent create --secret KEY=VALUE` (at creation time only)
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField path="key" type="string" required>
- Secret key name
-</ParamField>
-
-<ParamField body="value" type="string" required>
- Secret value
-</ParamField>
-
-<ParamField body="allowed_hosts" type="string[]">
- Restrict which outbound hosts can receive the decrypted value
-</ParamField>
-
-<ResponseExample>
-```json 200
-{
- "key": "ANTHROPIC_API_KEY",
- "allowed_hosts": ["api.anthropic.com"],
- "set_at": "2026-04-09T10:30:00Z"
-}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/uninstall-package.mdx b/docs/api-reference/agents/uninstall-package.mdx
deleted file mode 100644
index 443ff0e3..00000000
--- a/docs/api-reference/agents/uninstall-package.mdx
+++ /dev/null
@@ -1,22 +0,0 @@
----
-title: 'Uninstall Package'
-api: 'DELETE /v1/agents/{agentId}/packages/{pkg}'
----
-
-Uninstall a package from an agent. Data is preserved by default — reinstalling reconnects to existing data.
-
-**CLI equivalent:** `oc agent uninstall <id> <package>`
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField path="pkg" type="string" required>
- Package name (e.g. `gbrain`)
-</ParamField>
-
-<ResponseExample>
-```json 200
-{}
-```
-</ResponseExample>
diff --git a/docs/api-reference/agents/update.mdx b/docs/api-reference/agents/update.mdx
deleted file mode 100644
index 8ffa5e87..00000000
--- a/docs/api-reference/agents/update.mdx
+++ /dev/null
@@ -1,36 +0,0 @@
----
-title: 'Update Agent'
-api: 'PATCH /v1/agents/{agentId}'
----
-
-Update an agent's display name or configuration.
-
-**CLI equivalent:** none (REST only)
-
-<ParamField path="agentId" type="string" required>
- Agent ID
-</ParamField>
-
-<ParamField body="display_name" type="string">
- New display name
-</ParamField>
-
-<ParamField body="config" type="object">
- Updated configuration (partial update)
-</ParamField>
-
-<ResponseExample>
-```json 200
-{
- "id": "my-hermes",
- "display_name": "My Hermes Agent",
- "core": "hermes",
- "channels": ["telegram"],
- "packages": ["gbrain"],
- "secret_store": "agent:my-hermes",
- "config": null,
- "created_at": "2026-04-09T10:30:00Z",
- "updated_at": "2026-04-10T08:15:00Z"
-}
-```
-</ResponseExample>
diff --git a/docs/cli/agents.mdx b/docs/cli/agents.mdx
deleted file mode 100644
index 44acdb99..00000000
--- a/docs/cli/agents.mdx
+++ /dev/null
@@ -1,100 +0,0 @@
----
-title: "Agent Management"
-description: "Create, inspect, and manage agents, channels, and packages from the CLI"
----
-
-## Creating an Agent
-
-`oc agent create` provisions a managed agent with a core runtime:
-
-```bash
-oc agent create my-agent --core hermes
-oc agent create my-agent --core openclaw
-oc agent create my-agent --core hermes --secret OPENAI_API_KEY=sk-...
-```
-
-`--core` is required. OpenComputer boots a sandbox with the runtime pre-installed and an instance running. To create a raw agent with your own `snapshot` and `entrypoint`, use the [REST API](/agents/rest/agents) directly.
-
-## Listing & Inspecting
-
-```bash
-# List all agents
-oc agent ls
-
-# Detailed info for a specific agent
-oc agent get my-agent
-```
-
-`oc agent ls` shows a table with ID, core, channels, packages, and age. Add `--json` for machine-readable output.
-
-`oc agent get` also shows instance status if one exists.
-
-## Connecting Channels
-
-Connect messaging platforms to your agent. Currently supports Telegram.
-
-```bash
-# Connect — prompts for bot token on TTY, or pass via flag for scripts
-oc agent connect my-agent telegram
-oc agent connect my-agent telegram --bot-token 123:ABC
-
-# Disconnect (use --yes in scripts)
-oc agent disconnect my-agent telegram
-
-# List connected channels
-oc agent channels my-agent
-```
-
-See [Telegram channel](/agents/channels/telegram) for setup details.
-
-## Installing Packages
-
-Extend what the agent can do with packages like [gbrain](/agents/packages/gbrain) for persistent memory.
-
-```bash
-# Install
-oc agent install my-agent gbrain
-
-# Uninstall (data preserved)
-oc agent uninstall my-agent gbrain
-
-# List installed packages
-oc agent packages my-agent
-```
-
-## Deleting an Agent
-
-```bash
-oc agent delete my-agent # prompts for confirmation
-oc agent delete my-agent --yes # non-interactive (scripts, CI)
-```
-
-Cascades to instances and sessions — the sandbox is destroyed. The command refuses to delete without `--yes` when stdin is not a TTY, so a typo in a script can't silently destroy state.
-
-## Shell Access
-
-Any agent is also a sandbox. Drop into it for manual inspection and debugging:
-
-```bash
-oc shell my-agent
-```
-
-## Common Patterns
-
-### Create a full agent setup
-
-```bash
-oc agent create my-agent --core hermes
-oc agent connect my-agent telegram
-oc agent install my-agent gbrain
-```
-
-### Script with JSON output
-
-```bash
-oc agent ls --json | jq -r '.[].id'
-```
-
-<Tip>
- Full flag reference: [CLI Reference](/reference/cli/agent). REST API equivalents: [Agents REST](/agents/rest/agents).
-</Tip>
diff --git a/docs/cli/overview.mdx b/docs/cli/overview.mdx
index 6f6c8a5a..f4cd7177 100644
--- a/docs/cli/overview.mdx
+++ b/docs/cli/overview.mdx
@@ -126,7 +126,6 @@ oc exec $ID2 --wait -- ./test-b.sh
| Command | Description |
| --- | --- |
-| [`oc agent`](/cli/agents) | Create, manage, connect channels, install packages |
| [`oc sandbox`](/cli/sandbox) | Create, list, kill, hibernate, wake |
| [`oc exec`](/cli/exec) | Run commands, manage exec sessions |
| [`oc shell`](/cli/shell) | Interactive PTY terminal |
diff --git a/docs/docs.json b/docs/docs.json
index 1ea46db4..1e6d647c 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -76,24 +76,6 @@
"agent-sessions/api-reference"
]
},
- {
- "group": "Background Agents",
- "tag": "Preview",
- "pages": [
- "background-agents/overview",
- "background-agents/quickstart",
- "background-agents/how-it-works",
- "background-agents/agents",
- "background-agents/sessions",
- "background-agents/workspaces",
- "background-agents/triggers",
- "background-agents/channels",
- "background-agents/models",
- "background-agents/runtimes",
- "background-agents/observability",
- "background-agents/api"
- ]
- },
{
"group": "Reserved Capacity",
"pages": [
@@ -104,54 +86,10 @@
"reserved-capacity/usage-and-overage"
]
},
- {
- "group": "Agent SDK",
- "pages": [
- "agents/overview",
- "agents/tools",
- "agents/events",
- "agents/multi-turn"
- ]
- },
- {
- "group": "Hosted Agents",
- "pages": [
- "agents-api/overview",
- {
- "group": "Cores",
- "pages": [
- "agents/cores/hermes",
- "agents/cores/openclaw"
- ]
- },
- {
- "group": "Packages",
- "pages": [
- "agents/packages/gbrain"
- ]
- },
- {
- "group": "Channels",
- "pages": [
- "agents/channels/telegram"
- ]
- },
- "cli/agents",
- {
- "group": "REST API",
- "pages": [
- "agents/rest/agents",
- "agents/rest/instances",
- "agents/rest/sessions"
- ]
- }
- ]
- },
{
"group": "CLI",
"pages": [
"cli/overview",
- "cli/agents",
"cli/sandbox",
"cli/exec",
"cli/shell",
@@ -164,12 +102,9 @@
{
"group": "Guides",
"pages": [
- "guides/create-hermes-agent",
- "guides/create-openclaw-agent",
"guides/build-a-lovable-clone",
"guides/browser-automation",
- "guides/agent-skill",
- "guides/deploy-openclaw"
+ "guides/agent-skill"
]
},
{
@@ -212,7 +147,6 @@
"group": "CLI Reference",
"pages": [
"reference/cli/overview",
- "reference/cli/agent",
"reference/cli/sandbox",
"reference/cli/scaling",
"reference/cli/exec",
@@ -227,44 +161,6 @@
"group": "API Reference",
"pages": [
"api-reference/overview",
- {
- "group": "Agents",
- "pages": [
- "api-reference/agents/create",
- "api-reference/agents/list",
- "api-reference/agents/get",
- "api-reference/agents/update",
- "api-reference/agents/delete",
- "api-reference/agents/set-secret",
- "api-reference/agents/list-secrets",
- "api-reference/agents/delete-secret",
- "api-reference/agents/connect-channel",
- "api-reference/agents/disconnect-channel",
- "api-reference/agents/list-channels",
- "api-reference/agents/install-package",
- "api-reference/agents/uninstall-package",
- "api-reference/agents/list-packages"
- ]
- },
- {
- "group": "Instances",
- "pages": [
- "api-reference/agents/create-instance",
- "api-reference/agents/list-instances",
- "api-reference/agents/get-instance",
- "api-reference/agents/delete-instance",
- "api-reference/agents/send-message"
- ]
- },
- {
- "group": "Sessions",
- "pages": [
- "api-reference/agents/create-session",
- "api-reference/agents/get-session",
- "api-reference/agents/delete-session",
- "api-reference/agents/get-session-result"
- ]
- },
{
"group": "Sandboxes",
"pages": [
diff --git a/docs/guides/browser-automation.mdx b/docs/guides/browser-automation.mdx
index bc337528..f82524d8 100644
--- a/docs/guides/browser-automation.mdx
+++ b/docs/guides/browser-automation.mdx
@@ -281,4 +281,4 @@ OC's preview-URL edge buffers response bodies — streaming chunks don't reach t
- Read the [libretto docs](https://libretto.sh/docs) for the full CLI + library reference.
- See [Snapshots](/sandboxes/snapshots) for how to checkpoint a warmed-up browser VM.
-- See [Secret Stores](/agents-api/secret-stores) for scoping egress and sealing real credentials.
+- See [Secret Stores](/sandboxes/secrets) for scoping egress and sealing real credentials.
diff --git a/docs/guides/build-a-lovable-clone.mdx b/docs/guides/build-a-lovable-clone.mdx
index 9c9f5134..24adce0e 100644
--- a/docs/guides/build-a-lovable-clone.mdx
+++ b/docs/guides/build-a-lovable-clone.mdx
@@ -169,7 +169,7 @@ This makes the deployment model practical for sharing prototypes and demos witho
Several features mentioned as limitations now exist in OpenComputer:
-- **In-sandbox agent loop** — [Agent sessions](/agents/overview) now run the Claude Agent SDK inside the sandbox. The agent reads files, runs commands, and iterates on errors locally without leaving the VM. This is the recommended approach for new projects.
+- **In-sandbox agent loop** — [Agent sessions](/agent-sessions/overview) now run the Claude Agent SDK inside the sandbox. The agent reads files, runs commands, and iterates on errors locally without leaving the VM. This is the recommended approach for new projects.
- **Preview URL authentication** — `authConfig` on [preview URLs](/sandboxes/preview-urls) supports restricting access. Not full private link sharing yet, but a step toward it.
- **Checkpoints** — [Checkpoint and fork](/sandboxes/checkpoints) workflows are available for snapshotting sandbox state, restoring, and branching.
- **Custom templates** — Define [custom environments](/sandboxes/templates) with the Image builder and pre-built snapshots.
diff --git a/docs/guides/create-hermes-agent.mdx b/docs/guides/create-hermes-agent.mdx
deleted file mode 100644
index 163e87d1..00000000
--- a/docs/guides/create-hermes-agent.mdx
+++ /dev/null
@@ -1,129 +0,0 @@
----
-title: "Create a Hermes Agent"
-description: "Deploy a personal AI agent on Telegram with persistent memory using the oc CLI"
----
-
-This guide walks through creating a managed Hermes agent on OpenComputer, connecting it to Telegram, and chatting with it. By the end you'll have a personal AI agent running Claude via OpenRouter, reachable from your phone.
-
-## Prerequisites
-
-- An **OpenComputer API key** from [app.opencomputer.dev](https://app.opencomputer.dev)
-- The **oc CLI** installed and configured
-- **Telegram** installed on your phone or desktop ([download here](https://telegram.org/apps))
-
-### Install the CLI
-
-Install the `oc` binary from the [CLI installation guide](/cli/overview#installation).
-
-```bash
-oc config set api-key YOUR_API_KEY
-```
-
----
-
-## Step 1: Create the agent
-
-```bash
-oc agent create my-hermes --core hermes
-```
-
-This creates the agent, provisions its environment, configures the LLM provider, and starts the Hermes gateway.
-
-Check that the agent is running:
-
-```bash
-oc agent get my-hermes
-```
-
-```
-ID: my-hermes
-Name: my-hermes
-Core: hermes
-Channels: -
-Packages: -
-Instance: inst_... (running)
-```
-
-Wait for the status to show `running` before proceeding. Provisioning typically takes 20–30 seconds.
-
----
-
-## Step 2: Create a Telegram bot
-
-Open [this link to BotFather](https://t.me/BotFather) in Telegram (or search for `@BotFather` in the app). Then:
-
-1. Tap **Start** if it's your first time
-2. Send `/newbot`
-3. Enter a display name when prompted (e.g. "My Hermes Agent")
-4. Enter a username — must end in `bot` (e.g. `my_hermes_test_bot`)
-5. BotFather replies with a token like `110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw` — copy it
-
----
-
-## Step 3: Connect Telegram
-
-```bash
-oc agent connect my-hermes telegram
-```
-
-The CLI will prompt you to paste the bot token. Alternatively, use the API directly:
-
-```bash
-curl -X POST https://api.opencomputer.dev/v1/agents/my-hermes/channels/telegram \
- -H "Content-Type: application/json" \
- -H "X-API-Key: YOUR_API_KEY" \
- -d '{"bot_token": "YOUR_BOT_TOKEN"}'
-```
-
-This registers a webhook with Telegram, configures Hermes for webhook mode, and restarts the gateway. Verify it worked:
-
-```bash
-oc agent get my-hermes
-```
-
-```
-Channels: telegram
-```
-
----
-
-## Step 4: Chat with your agent
-
-Open Telegram, find your bot by its username, and send a message. The agent responds using Claude (via OpenRouter) with the full Hermes personality — memory, tool use, and multi-turn conversation.
-
-If the bot suggests setting a home channel (`/sethome`), do it — this is where Hermes delivers cron job results and cross-platform messages.
-
----
-
-## Shell access
-
-You can shell into the agent's sandbox at any time:
-
-```bash
-oc shell my-hermes
-```
-
-This opens an interactive terminal inside the agent's environment. You have full access — inspect logs, edit Hermes config, install tools, change the model, add skills. Anything you can do with Hermes locally, you can do here. See the [Hermes docs](https://hermes-agent.nousresearch.com/docs/) for what's possible.
-
----
-
-## Cleanup
-
-Disconnect the channel and delete the agent:
-
-```bash
-oc agent disconnect my-hermes telegram
-oc agent delete my-hermes
-```
-
-Disconnecting deregisters the Telegram webhook and removes the channel config from Hermes. Deleting the agent tears down the sandbox.
-
----
-
-## What's next
-
-- **[Install gbrain](/agents/packages/gbrain)** for persistent memory: `oc agent install my-hermes gbrain`
-- **Connect Slack** instead of Telegram (planned)
-- **[Create an OpenClaw Agent](/guides/create-openclaw-agent)** — same journey, different core: multi-channel gateway with plugin SDK and hot-reload config
-- **Custom cores** — bring your own agent runtime with `oc shell` and the raw sandbox API
-- **Hermes docs** — see the full [Hermes documentation](https://hermes-agent.nousresearch.com/docs/) for skills, cron jobs, voice, browser tools, and more
diff --git a/docs/guides/create-openclaw-agent.mdx b/docs/guides/create-openclaw-agent.mdx
deleted file mode 100644
index 54daf022..00000000
--- a/docs/guides/create-openclaw-agent.mdx
+++ /dev/null
@@ -1,162 +0,0 @@
----
-title: "Create an OpenClaw Agent"
-description: "Deploy a personal AI agent on Telegram using OpenClaw — a multi-channel gateway with native plugin support"
----
-
-This guide walks through creating a managed [OpenClaw](https://openclaw.ai) agent on OpenComputer, connecting it to Telegram, and chatting with it. By the end you'll have a personal AI agent running Claude via OpenRouter, reachable from your phone.
-
-OpenClaw is a multi-channel AI gateway with a rich plugin SDK, native MCP support, and hot-reload configuration. It supports Telegram, Discord, Slack, Signal, WhatsApp, and more out of the box.
-
-## Prerequisites
-
-- An **OpenComputer API key** from [app.opencomputer.dev](https://app.opencomputer.dev)
-- The **oc CLI** installed and configured
-- **Telegram** installed on your phone or desktop ([download here](https://telegram.org/apps))
-
-### Install the CLI
-
-Install the `oc` binary from the [CLI installation guide](/cli/overview#installation).
-
-```bash
-oc config set api-key YOUR_API_KEY
-```
-
----
-
-## Step 1: Create the agent
-
-```bash
-oc agent create my-claw --core openclaw
-```
-
-This creates the agent, provisions an OpenClaw sandbox with Node 22 and the OpenRouter LLM provider pre-configured, and starts the OpenClaw gateway.
-
-Check that the agent is running:
-
-```bash
-oc agent get my-claw
-```
-
-```
-ID: my-claw
-Name: my-claw
-Core: openclaw
-Channels: -
-Packages: -
-Instance: inst_... (running)
-```
-
-Wait for the status to show `running` before proceeding. Provisioning typically takes 20-30 seconds.
-
----
-
-## Step 2: Create a Telegram bot
-
-Open [this link to BotFather](https://t.me/BotFather) in Telegram (or search for `@BotFather` in the app). Then:
-
-1. Tap **Start** if it's your first time
-2. Send `/newbot`
-3. Enter a display name when prompted (e.g. "My OpenClaw Agent")
-4. Enter a username -- must end in `bot` (e.g. `my_claw_test_bot`)
-5. BotFather replies with a token like `110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw` -- copy it
-
----
-
-## Step 3: Connect Telegram
-
-```bash
-oc agent connect my-claw telegram
-```
-
-The CLI will prompt you to paste the bot token. Alternatively, use the API directly:
-
-```bash
-curl -X POST https://api.opencomputer.dev/v1/agents/my-claw/channels/telegram \
- -H "Content-Type: application/json" \
- -H "X-API-Key: YOUR_API_KEY" \
- -d '{"bot_token": "YOUR_BOT_TOKEN"}'
-```
-
-This registers a webhook with Telegram and configures OpenClaw's built-in Telegram channel. OpenClaw hot-reloads the config automatically -- no gateway restart needed. Verify it worked:
-
-```bash
-oc agent get my-claw
-```
-
-```
-Channels: telegram
-```
-
----
-
-## Step 4: Chat with your agent
-
-Open Telegram, find your bot by its username, and send a message. The agent responds using Claude (via OpenRouter).
-
----
-
-## Shell access
-
-You can shell into the agent's sandbox at any time:
-
-```bash
-oc shell my-claw
-```
-
-This opens an interactive terminal inside the agent's environment. Some useful commands:
-
-```bash
-# Check the gateway health
-curl -s http://localhost:18789/health
-
-# View the config
-cat ~/.openclaw/openclaw.json
-
-# List MCP servers (packages wired as tool providers)
-openclaw mcp list
-
-# Check channel status
-openclaw channels status
-
-# View gateway logs
-cat /tmp/openclaw/openclaw-*.log
-```
-
-See the [OpenClaw docs](https://openclaw.ai) for the full feature set: plugins, canvas, voice, browser tools, and more.
-
----
-
-## Cleanup
-
-Disconnect the channel and delete the agent:
-
-```bash
-oc agent disconnect my-claw telegram
-oc agent delete my-claw
-```
-
-Disconnecting removes the Telegram channel config. Deleting the agent tears down the sandbox.
-
----
-
-## OpenClaw vs Hermes
-
-Both cores support the same user journey (`create` / `connect` / `install`). The differences are under the hood:
-
-| | Hermes | OpenClaw |
-|---|---|---|
-| Config format | YAML | JSON5 |
-| Config reload | Gateway restart | Hot-reload (file watcher) |
-| Channel support | One at a time, adapter-configured | 6 built-in + 20 plugin channels |
-| Plugin model | Skills (files) + MCP | Rich plugin SDK with manifests |
-| MCP support | `mcp_servers` in YAML | `mcp.servers` in JSON5 |
-
-Choose Hermes for its self-improving skill loop and built-in memory. Choose OpenClaw for its breadth of channels and native plugin ecosystem.
-
----
-
-## What's next
-
-- **[Install gbrain](/agents/packages/gbrain)** for persistent memory: `oc agent install my-claw gbrain`
-- **[Create a Hermes Agent](/guides/create-hermes-agent)** -- try the other managed core
-- **Custom cores** -- bring your own agent runtime with `oc shell` and the raw sandbox API
diff --git a/docs/guides/deploy-openclaw.mdx b/docs/guides/deploy-openclaw.mdx
deleted file mode 100644
index 440ec0f6..00000000
--- a/docs/guides/deploy-openclaw.mdx
+++ /dev/null
@@ -1,165 +0,0 @@
----
-title: "Deploy OpenClaw"
-description: "Run managed, per-user OpenClaw AI agent instances inside OpenComputer sandboxes"
----
-
-In this guide you'll deploy [OpenClaw](https://openclaw.ai) — a multi-platform AI agent gateway — as a managed, per-user service running inside OpenComputer sandboxes. Each user gets their own isolated OpenClaw instance with a web chat UI and optional Telegram integration.
-
-<Card title="GitHub Repository" icon="github" href="https://github.com/diggerhq/oc-openclaw-template">
- Source code and provisioning scripts.
-</Card>
-
----
-
-## Prerequisites
-
-- **Node.js 20+** installed locally
-- An **Anthropic API key** (for Claude, used by the OpenClaw agent)
-- An **OpenComputer API key**
-
----
-
-## Step 1: Sign Up for OpenComputer
-
-Go to [app.opencomputer.dev](https://app.opencomputer.dev) and create an account.
-
-## Step 2: Generate an API Token
-
-From the OpenComputer dashboard, generate an API token. You'll use this to authenticate SDK calls that create and manage sandboxes.
-
-## Step 3: Set Up the Project
-
-Clone the template repository and install dependencies:
-
-```bash
-git clone https://github.com/diggerhq/oc-openclaw-template.git
-cd oc-openclaw-template
-npm install
-```
-
-Set your OpenComputer API key:
-
-```bash
-export OPENCOMPUTER_API_KEY="your-opencomputer-token"
-```
-
-## Step 4: Build the Snapshot
-
-The snapshot is a reusable base image with Node.js and OpenClaw pre-installed. Building it takes a few minutes but only needs to happen once.
-
-```bash
-npx tsx src/build-snapshot.ts
-```
-
-This installs Node.js 22, OpenClaw, and Telegram dependencies into a snapshot called `openclaw-ready`. All future sandboxes boot from this snapshot in seconds.
-
-## Step 5: Provision an Agent
-
-Provision an OpenClaw instance for a user:
-
-```bash
-npx tsx src/provision-claw.ts \
- --employee-id emp-001 \
- --anthropic-api-key "sk-ant-..."
-```
-
-This creates a sandbox from the snapshot, writes the OpenClaw config with a unique gateway token, and starts the gateway. The gateway binds to loopback only — no ports are exposed externally.
-
-Optional parameters:
-
-```bash
---model "anthropic/claude-sonnet-4-6" # LLM model (default)
---timeout 600 # idle timeout in seconds
---memory 4096 # sandbox memory in MB
-```
-
-## Step 6: Start the Chat Server
-
-The chat server is a lightweight proxy that serves a web UI per user and routes messages to their sandbox via the OpenComputer SDK. No gateway URLs or tokens are exposed to the browser.
-
-```bash
-npx tsx src/chat-server.ts
-```
-
-Open `http://localhost:3000/emp-001` in your browser to start chatting with the agent.
-
-The landing page at `http://localhost:3000` lists all running agents.
-
-## Step 7: (Optional) Add Telegram
-
-Each agent can be connected to its own Telegram bot. First, create a bot via [@BotFather](https://t.me/BotFather) on Telegram, then configure it:
-
-```bash
-npx tsx src/configure-telegram.ts \
- --employee-id emp-001 \
- --tg-bot-token "123456:ABC..." \
- --tg-user-id "987654321"
-```
-
-To find your Telegram user ID, message [@userinfobot](https://t.me/userinfobot).
-
----
-
-## How It Works
-
-### Provisioning Flow
-
-1. **Sandbox is created** from the pre-built snapshot using `Sandbox.create()` — this takes seconds, not minutes.
-2. **OpenClaw config** is written with a unique gateway auth token, the selected model, and security settings (exec auto-approval, loopback-only binding).
-3. **API key** is written to an env file sourced by the gateway process.
-4. **Gateway starts** via a startup script that launches OpenClaw in the background and waits for it to become ready.
-5. **Device pairings** are auto-approved so internal connections (cron jobs, Telegram) work without manual intervention.
-
-### Chat Proxy Architecture
-
-The chat server uses the OpenComputer SDK to execute commands inside each sandbox. When a user sends a message:
-
-1. The browser sends a `POST /api/chat/:employeeId` to the chat server.
-2. The server looks up the sandbox ID from the fleet registry.
-3. It connects to the sandbox via `Sandbox.connect()` and reads the gateway token from the config file.
-4. It writes the message payload to a temp file inside the sandbox and runs `curl` against the gateway's `/v1/chat/completions` endpoint on `127.0.0.1`.
-5. The SSE response is streamed back to the browser.
-
-The gateway URL and auth token never leave the server. The browser only knows the employee ID.
-
-### Security Model
-
-- **Loopback-only gateway** — the OpenClaw gateway binds to `127.0.0.1`, not accessible from outside the sandbox.
-- **No preview URLs** — unlike other OpenComputer use cases, no ports are exposed. All access is proxied through the OC SDK.
-- **Per-sandbox tokens** — each sandbox gets a unique gateway auth token generated at provision time using `crypto.randomBytes()`.
-- **Exec auto-approval** — since agents run in fully isolated sandboxes, tool execution is auto-approved (`tools.exec.security: "full"`).
-
-### Fleet Management
-
-The template includes scripts for managing multiple agents:
-
-```bash
-# Check health of all running agents
-npx tsx src/fleet-health.ts
-
-# Rolling update across the fleet
-npx tsx src/fleet-update.ts --version latest
-```
-
-All agent metadata is stored in `fleet-registry.json` (swap for a database in production).
-
----
-
-## Customization
-
-### Changing the Model
-
-Pass `--model` when provisioning, or update an existing agent's config:
-
-```bash
-oc exec <sandbox-id> --wait -- openclaw config set agents.defaults.model.primary "anthropic/claude-sonnet-4-6"
-```
-
-### Adding More Channels
-
-OpenClaw supports WhatsApp, Discord, Slack, and more. Configure them via `openclaw config set` inside the sandbox:
-
-```bash
-oc exec <sandbox-id> --wait -- openclaw config set channels.discord.enabled true
-```
-
diff --git a/docs/reference/cli/agent.mdx b/docs/reference/cli/agent.mdx
deleted file mode 100644
index 2066116f..00000000
--- a/docs/reference/cli/agent.mdx
+++ /dev/null
@@ -1,158 +0,0 @@
----
-title: "oc agent"
-description: "Manage agents, channels, and packages"
----
-
-## `oc agent create <id>`
-
-Create a new agent. [HTTP API →](/api-reference/agents/create)
-
-<ParamField query="--core" type="string" required>
- Managed core to use (e.g. `hermes`, `openclaw`). Required — a core-less agent has no runtime and can't connect channels or install packages. To create a raw agent with your own snapshot, use the [REST API](/api-reference/agents/create) directly.
-</ParamField>
-
-<ParamField query="--secret" type="string">
- Secret `KEY=VALUE` (repeatable). Secrets are stored encrypted and injected at sandbox creation.
-</ParamField>
-
-<ParamField query="--no-wait" type="boolean">
- Return immediately after the agent record is created, without polling for sandbox readiness. The `async` JSON field indicates the caller should re-check with `oc agent get`.
-</ParamField>
-
-```bash
-oc agent create my-hermes --core hermes
-oc agent create my-hermes --core hermes --secret OPENAI_API_KEY=sk-...
-```
-
----
-
-## `oc agent list`
-
-List all agents. **Alias:** `oc agent ls`
-
-[HTTP API →](/api-reference/agents/list)
-
-Output columns: `ID`, `CORE`, `CHANNELS`, `PACKAGES`, `CREATED`
-
-```bash
-oc agent ls
-oc agent ls --json
-```
-
----
-
-## `oc agent get <id>`
-
-Show detailed information for an agent, including instance status. [HTTP API →](/api-reference/agents/get)
-
-Output: ID, Name, Core, Channels, Packages, Created, Instance (ID + status).
-
-```bash
-oc agent get my-hermes
-```
-
----
-
-## `oc agent delete <id>`
-
-Delete an agent. Cascades to instances and sessions — the sandbox is destroyed. [HTTP API →](/api-reference/agents/delete)
-
-<ParamField query="--yes" type="boolean">
- Skip the confirmation prompt. Required when stdin is not a TTY (e.g. running from a script) — the command otherwise refuses rather than destroying state silently on a typo.
-</ParamField>
-
-```bash
-oc agent delete my-hermes # interactive: prompts "Delete agent my-hermes? [y/N]"
-oc agent delete my-hermes --yes # script-safe: no prompt
-```
-
----
-
-## `oc agent connect <id> <channel>`
-
-Connect a messaging channel to an agent. [HTTP API →](/api-reference/agents/connect-channel)
-
-<ParamField query="--bot-token" type="string">
- Telegram bot token (Telegram channel only). If omitted and stdin is a TTY, the CLI prompts interactively. If omitted and stdin is not a TTY (scripts, CI, agent callers), the command exits with an error — pass the flag explicitly.
-</ParamField>
-
-```bash
-oc agent connect my-hermes telegram # interactive prompt
-oc agent connect my-hermes telegram --bot-token 123:ABC # script-safe
-```
-
----
-
-## `oc agent disconnect <id> <channel>`
-
-Disconnect a channel from an agent. Removes webhook registration and config. [HTTP API →](/api-reference/agents/disconnect-channel)
-
-<ParamField query="--yes" type="boolean">
- Skip the confirmation prompt. Required when stdin is not a TTY.
-</ParamField>
-
-```bash
-oc agent disconnect my-hermes telegram
-oc agent disconnect my-hermes telegram --yes
-```
-
----
-
-## `oc agent channels <id>`
-
-List channels connected to an agent. [HTTP API →](/api-reference/agents/list-channels)
-
-```bash
-oc agent channels my-hermes
-```
-
----
-
-## `oc agent install <id> <package>`
-
-Install a package on an agent. [HTTP API →](/api-reference/agents/install-package)
-
-```bash
-oc agent install my-hermes gbrain
-```
-
----
-
-## `oc agent uninstall <id> <package>`
-
-Uninstall a package from an agent. Data is preserved by default. [HTTP API →](/api-reference/agents/uninstall-package)
-
-<ParamField query="--yes" type="boolean">
- Skip the confirmation prompt. Required when stdin is not a TTY.
-</ParamField>
-
-```bash
-oc agent uninstall my-hermes gbrain
-oc agent uninstall my-hermes gbrain --yes
-```
-
----
-
-## `oc agent packages <id>`
-
-List packages installed on an agent. [HTTP API →](/api-reference/agents/list-packages)
-
-```bash
-oc agent packages my-hermes
-```
-
----
-
-## Exit codes
-
-`oc agent` commands use a class-based exit code scheme so scripts and agent callers can branch on failure type without parsing stderr.
-
-| Code | Class | Meaning |
-|------|----------------|--------------------------------------------------------------|
-| 0 | Success | Command completed successfully |
-| 1 | General error | Unclassified failure, bad args/flags, aborted confirmation |
-| 3 | Upstream 4xx | Not found, unauthorized, org mismatch, bad request |
-| 4 | Conflict | Already exists, invalid state transition |
-| 5 | Transient | Timeout, retry-safe — try again |
-
-Codes 3–5 are emitted by `create`, `install`, and `get` when the failure carries a known error code. Other subcommands exit 0 on success and 1 on any failure.
diff --git a/docs/reference/cli/overview.mdx b/docs/reference/cli/overview.mdx
index 65d5eaec..fd00e480 100644
--- a/docs/reference/cli/overview.mdx
+++ b/docs/reference/cli/overview.mdx
@@ -22,9 +22,6 @@ These flags apply to all commands.
## Commands
<CardGroup cols={2}>
- <Card title="oc agent" icon="robot" href="/reference/cli/agent">
- Manage agents, channels, and packages
- </Card>
<Card title="oc sandbox" icon="box" href="/reference/cli/sandbox">
Manage sandbox lifecycle
</Card>
diff --git a/docs/sandboxes/overview.mdx b/docs/sandboxes/overview.mdx
index ebf34c41..685cceb3 100644
--- a/docs/sandboxes/overview.mdx
+++ b/docs/sandboxes/overview.mdx
@@ -171,7 +171,7 @@ Content-Type: application/json
| Sandbox ID | `sandbox.sandboxId` | `sandbox.sandbox_id` | Unique identifier |
| Status | `sandbox.status` | `sandbox.status` | Current lifecycle state |
| Domain | `sandbox.domain` | — | Preview URL domain for port 80 |
-| Agent | `sandbox.agent` | `sandbox.agent` | [Agent sessions](/agents/overview) |
+| Agent | `sandbox.agent` | `sandbox.agent` | [Agent sessions](/agent-sessions/overview) |
| Exec | `sandbox.exec` | `sandbox.exec` | [Command execution](/sandboxes/running-commands) |
| Files | `sandbox.files` | `sandbox.files` | [Filesystem](/sandboxes/working-with-files) |
| PTY | `sandbox.pty` | `sandbox.pty` | [Interactive terminals](/sandboxes/interactive-terminals) |