Connects DSH over stdio MCP to a running SandBase Harness for agents, sessions, streamed turns, artifacts, and cancellation; requires Node.js 22+, stdio MCP support, and a reachable runtime.
Review the source and trust level before running this DSH plugin command.
README status: fetch_failed — GitHub metadata HTTP 403 · Showing previous excerpt fetched2026-11-05T00:18:50.160Z
SandBase Harness
English | 中文
GitHub stars
Listed on deepseek-plugin.org
Release
Official MCP Registry
Discussions
CodeQL
License
AI-readable project metadata: llms.txt · installation guide
A local-first runtime for AI agents. Sessions, sandboxed tools, memory,
credentials, audit trails, and a built-in Console — all running on your
machine or in your own infrastructure.
SandBase Harness architecture
Why
Agent SDKs handle the model loop. Production agents need more: persistent
sessions, tool governance, sandbox boundaries, credential handling, memory,
auditability, and a UI for humans to inspect what happened. managed-agents
is that runtime layer — not a visual workflow builder and not another model SDK.
| Need |
What Harness provides |
| Run generated code safely |
Local, Docker, Kubernetes, and self-hosted worker sandboxes |
| Inspect long-running agents |
Persistent sessions, resumable event streams, audit, and replay |
| Control tool access |
MCP toolsets, credential vaults, permission policies, and approvals |
| Operate any model |
OpenAI, Anthropic, MiniMax, and OpenAI-compatible providers, including DeepSeek V4 |
| Keep infrastructure yours |
Local-first SQLite and file storage with no required hosted control plane |
Features
- Claude Managed Agents-style
/v1 API and local Console
- SQLite metadata by default for agents, sessions, environments, credential
vaults, memory stores, files, skills, and API keys — local file/skill bytes
in the workspace state directory
- Resumable Server-Sent Events for session replay and debugging
- One active model provider boundary configured through Settings V2
- Sandbox backends: local process, Docker (per-session containers), Kubernetes
(kubectl exec/cp), self-hosted worker queue
- MCP toolsets, permission policies, built-in tools, and skill packages
- TypeScript SDK at
managed-agents/sdk
- Release gate:
npm run release:check
Quick Start
Requirements: Node.js 22+, npm 10+, and a model provider API key (OpenAI,
Anthropic, MiniMax, or any OpenAI-compatible endpoint). Docker is optional and
only needed for Docker-backed sandboxes.
git clone --branch v0.3.8 --depth 1 https://github.com/sandbaseai/sandbase-harness.git
cd sandbase-harness
npm ci
npm run build
mkdir ../my-agents && cd ../my-agents
node ../sandbase-harness/dist/index.js init
node ../sandbase-harness/dist/index.js start
init writes a workspace into the directory you run it from: an agent, a skills
folder, and config.yaml, whose provider reference is the ${OPENAI_API_KEY}
environment variable. start serves the API and the Console on
http://127.0.0.1:3000.
Two steps finish the setup, both on Settings > Setup at
http://127.0.0.1:3000/dashboard:
- The provider. Paste your API key into the provider form and save. The page
then reports that the saved configuration is not active yet, so restart the
runtime — stop it with Ctrl+C and run the
start command again, or use the
restart button. A saved setting only takes effect at startup. If your provider
is not in the list, choose the OpenAI-compatible vendor and set its base URL.
- The model. In the Agent models panel, set the model ID your provider
actually serves —
deepseek-chat for DeepSeek, for example. An agent carries
its own model ID, so the gpt-4o that init writes is not valid for every
provider, and a wrong ID fails the turn with model_not_found.
Send the first message from the Console: open Sessions, create a session for
the agent, and type into the composer. From a terminal it is one command:
node ../sandbase-harness/dist/index.js chat agent_assistant --message "hello" --tool-approval allow
chat sends that one message and exits once the turn settles; without
--message it keeps the session open and streams until you interrupt it.
--tool-approval allow
preauthorizes the tool calls the agent may make, which the init template
otherwise parks for approval and waits for a person to answer; see CLI.
The unscoped managed-agents name on npm is not this project. Until an
official scoped package is announced in this repository, install only from the
tagged GitHub source release shown above. Do not run npx managed-agents or
npm install managed-agents.
Try it in Codespaces
Open in GitHub Codespaces
The included development container installs dependencies and builds the runtime.
When the terminal is ready, start the server on the forwarded port:
node dist/index.js start --host 0.0.0.0
Open the forwarded SandBase Harness Console port, then configure a model in
Settings > Setup. Codespaces usage may be billed by GitHub; the local
quick start above remains free and keeps all runtime data on your machine.
Screenshots
Use the Official SDK
The runtime answers its own /v1 API on that same port, and an official
Anthropic TypeScript SDK client drives it unchanged: point the client's
baseURL at the runtime, give it the runtime API key, and the quickstart in
examples/official-sdk runs a whole turn —
message, tool call, tool result, final reply — against it. That example is
executed on every pull request by
tests/conformance/official-sdk-quickstart.test.ts, so the compatibility it
describes is compatibility that is tested rather than claimed.
The same surface is specified in docs/api.md, and this
repository's own TypeScript SDK is documented under SDK below.
CMA compatibility
Coverage of the published Claude Managed Agents contract is declared entry by
entry in src/core/capabilities/matrix.ts:
of the official SDK's route surface (110 method/path pairs as of SDK
0.132.1), 90 routes are mounted and 20 refuse by name; no route is deferred.
Partial and Unsupported entries always name their reason.
The table below is generated by npm run docs:compat, and a contract-honesty
test fails when it drifts from the matrix.
<details>
<summary><strong>Full compatibility table (generated)</strong></summary>
<!-- compat-table:start -->
| Area |
Official capability |
Status |
Notes |
| headers |
compatibility-header-admission |
Partial |
Version, beta, and mutual-exclusion rules are enforced for any request that carries a compatibility header. A request with no compatibility header is accepted as a local caller, which the published contract does not define; this header-free path is a deliberate local-first extension for a self-hosted single-tenant runtime, recorded as such in the headers contract §4, and it is why this entry stays partial. |
| headers |
extension-namespace-exclusion |
Supported |
|
| pagination |
opaque-cursors |
Partial |
A collection's envelope follows the mount: the operations router serves /v1 with {data, prev_page, next_page} and its /v1/x mirror with the local {data, has_more, first_id, last_id}, chosen through one pager so no handler emits both spellings, and cursors that are readable base64url JSON rather than opaque binary. Every canonical /v1 collection serves the canonical envelope, with no exceptions: the complete-set listings carry {data, prev_page: null, next_page: null} and the windowed ones carry a followable cursor — /v1/sessions pages by number under {order, created_at bounds, page} and rejects a cursor replayed under another ordering or creation window, /v1/sessions/{id}/events carries {order, filter, after_id}, /v1/skills and the credential audit listings use {offset, filter} — so a cut page says so instead of looking complete. The one listing that is neither shape is /v1/environments/{id}/work-items, a windowed extension that adds a counts object and is named in the contract. |
| pagination |
cursor-query-binding |
Supported |
|
| errors |
structured-error-envelope |
Supported |
|
| agents |
agent-crud |
Supported |
|
| agents |
model-object-profile |
Partial |
String and object model forms parse field by field. effort and speed are stored, returned by the read projection (the agent read, the version read, and the session snapshot), and executed on the Anthropic provider under a model capability table — effort becomes output_config.effort, fast becomes speed: "fast" with the fast-mode beta, and adaptive-thinking models receive thinking: {type: "adaptive", display: "omitted"}; a listed model refused a level or speed it cannot take fails admission, an unknown model id or non-Anthropic provider sends nothing, and a deployment's own reasoning_effort model setting is operator-level and separate. inference_geo is refused by name with unsupported_model_field because this runtime has no inference-geography control; and a canonical multiagent roster is refused by name rather than executed. |
| agents |
multiagent-roster |
Unsupported |
In scope but not implemented (decisions/0002): a canonical multiagent block (multiagent_20261001 or any other shape) is refused by name on both agent create and agent update, because no thread, subagent, workflow, or advisor surface exists to honour it and the surface is a protocol of its own this runtime does not implement; accepting it would let a caller believe delegation or workflow runs are in effect. Local delegation is registered separately as an extension. |
| agents |
local-delegation-subagent |
Supported |
|
| sessions |
session-lifecycle |
Supported |
|
| sessions |
initial-events |
Supported |
|
| sessions |
prompt-caching |
Supported |
|
| sessions |
session-update |
Supported |
|
| budget |
session-budget |
Partial |
Consumption is priced in integer microcents from the append-only log, and a session may declare a max_list_cost ceiling at creation. The builtin loop checks the ceiling inside a turn: the step that crossed the cap is the last one, the session idles with stop_reason budget_reached and a session.usage immediately before it, and an accepted budget update or removal resumes the session on its own — a tool call the ceiling stranded is settled so the resumed turn sees a paired transcript. At the ceiling the next work-starting event is refused with budget_reached while events that settle work already in flight are still accepted, so the next model request does not start; a declared outcome's revision loop reads the same spend and stops at the ceiling too, closing the outcome with result budget_reached rather than starting another grading p |
README excerpt; see the original.
By zh667
Attributes DSH token usage to relay sites, project directories, and models, with balance or subscription views, cost estimates, exports, and diagnostics. It usually needs no setup; balance checks use host credentials. README screenshots use demo data.
By Noob-stupid
Manages DSH plugin activation and version gating, with a configurable plugin and skill browser; failed upgrades can roll back.
By dingkaihu63
Provides DSH workflows for robot assets, MuJoCo simulation, fault injection, diagnostics, and experiment reports; requires DSH, pnpm, and Python 3.10, while hardware adapters remain unvalidated.
By yyyyukari
Adds a DSH Web sidebar for browsing and searching plugins, sorting discovery results, and managing installed plugins without a separate market service.
By multica-ai
Bridges Multica to DeepSeek Harness through a private out-of-tree runtime using a versioned JSONL protocol over standard input and output.
By feiyang-dev
Tracks per-call token and cache usage and estimated costs in DSH, with balance lookup, a calendar view, and CSV, JSON, or PNG exports.