Deploy & Gateway.
Start on the local CLI — zero infra, fully on-device. Scale out by wrapping orchestrator.run behind a thin service. Keep the model local even when hosted, so the privacy story holds.
Local first. Hosted when you need it.
orchestrator.run behind a thin service — a run_agent MCP server for Claude Code (with driver / skill / systemPrompt parameters for configurable sub-agent runs), or an HTTP/SSE gateway for Telegram / Slack (POST /runs accepts history for multi-turn continuity). Put auth, rate-limits, and a per-tenant allowlist at the edge. Host only the thin orchestrator, not the brain; cloud secrets stay in tachibot-mcp.Async jobs + an SSE stream.
All requests require Authorization: Bearer <token>; run ids are namespaced per tenant (GATEWAY_TOKENS takes name:token pairs). The async-job + SSE shape survives disconnects — resume replay via Last-Event-ID.
1export GATEWAY_TOKEN="change-me" GATEWAY_PORT=87872export TACHIBOT_CMD="npx -y tachibot-mcp"3npm run build && node dist/frontends/gateway.js| Method & path | Response | Purpose |
|---|---|---|
| POST /runs {task, maxIterations?, driver?, systemPrompt?, allowTools?, history?} | 202 {run_id} | Start a run (async job). history = up to 40 {role: "user" | "assistant", content} turns, ≤ 32 KiB — chat continuity. |
| GET /runs/:id | state + result | Poll run state and the final result. |
| GET /runs/:id/events | SSE | Stream step / assistant / tool-result / final / error / heartbeat. |
| DELETE /runs/:id | cancel | Cooperative abort (Ctrl-C semantics). |
Long-running, attachable, resumable.
A long-running daemon reuses the gateway and lets thin clients attach mid-run. Set TACHI_DAEMON_URL and the CLI, REPL, Telegram and Slack front-ends attach to it instead of building a local runtime.
Last-Event-ID.POST /tasks), recurring schedules, per-task drivers, outcome notifications and durable run logs — read the Standalone page →Delegate over the gateway.
Let OpenClaw delegate tasks to tachi-agent over the gateway's HTTP/SSE API. Run the gateway (npm run gateway) with a GATEWAY_TOKEN, then use the bundled GatewayClient. See docs/openclaw-bridge.md for plugin / skill wiring.
1import { GatewayClient } from "tachi-agent";2 3const tachi = new GatewayClient({4 baseUrl: "http://127.0.0.1:8787",5 token: process.env.TACHI_GATEWAY_TOKEN!,6});7const answer = await tachi.runAndWait("research X");Local-first is the security model.
127.0.0.1 (no SSRF); tools run over local stdio. tachi-agent holds no cloud keys — the council's provider keys live in tachibot-mcp.*_CMD), never from a user or model message — no command injection. The McpToolHost({ allow }) allowlist keeps dangerous tools out unless granted.