{"name":"SandBase Harness: Local-First AI Agent Runtime with Sandboxed Sessions","description":"SandBase Harness is a local-first, self-hosted runtime for AI agents, offering sandboxed sessions, memory, and credentials. This TypeScript-based project provides a robust infrastructure for managing and observing AI agents, ensuring auditability and secure execution on your own machine or infrastructure.","github":"https://github.com/sandbaseai/sandbase-harness","url":"https://osrepos.com/repo/sandbaseai-sandbase-harness","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/sandbaseai-sandbase-harness","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/sandbaseai-sandbase-harness.md","json":"https://osrepos.com/repo/sandbaseai-sandbase-harness.json","topics":["AI Agents","Agent Runtime","Self-Hosted","TypeScript","Docker","Kubernetes","Local-First","AI Infrastructure"],"keywords":["AI Agents","Agent Runtime","Self-Hosted","TypeScript","Docker","Kubernetes","Local-First","AI Infrastructure"],"stars":null,"summary":"SandBase Harness is a local-first, self-hosted runtime for AI agents, offering sandboxed sessions, memory, and credentials. This TypeScript-based project provides a robust infrastructure for managing and observing AI agents, ensuring auditability and secure execution on your own machine or infrastructure.","content":"## Introduction\n\nSandBase Harness is a local-first, self-hosted runtime for AI agents, developed by sandbaseai. This TypeScript-based project provides a robust infrastructure for managing and observing AI agents, featuring sandboxed sessions, memory, credentials, audit/replay capabilities, and a built-in local Console. It is designed to run on your local machine or within your own infrastructure, offering complete control over your AI agent deployments.\n\n## Why Use It and Key Benefits\n\nWhile Agent SDKs handle the core model loop, production-grade AI agents require more sophisticated capabilities. SandBase Harness addresses these needs by providing a comprehensive runtime layer, not just a visual workflow builder or another model SDK.\n\nKey benefits include:\n\n*   **Secure Code Execution**: Run generated code safely within local, Docker, Kubernetes, or self-hosted worker sandboxes.\n*   **Agent Observability**: Inspect long-running agents with persistent sessions, resumable event streams, audit trails, and replay functionality.\n*   **Granular Tool Access Control**: Manage tool access using Model Context Protocol (MCP) toolsets, credential vaults, permission policies, and approval mechanisms.\n*   **Broad Model Compatibility**: Operate with various models, including OpenAI, Anthropic, MiniMax, and OpenAI-compatible providers like DeepSeek V4.\n*   **Data Sovereignty**: Maintain control over your infrastructure with local-first SQLite and file storage, eliminating the need for a hosted control plane.\n*   **Comprehensive API and Console**: Features a Claude Managed Agents-style `/v1` API and a user-friendly local Console for management.\n*   **TypeScript SDK**: A dedicated SDK for seamless integration and development.\n\n## Installation\n\nTo get started with SandBase Harness, ensure you have Node.js 22+ and npm 10+ installed. Docker is optional, required only for Docker-backed sandboxes.\n\n**Quick Start (Local)**:\n\nbash\ngit clone --branch v0.3.8 --depth 1 https://github.com/sandbaseai/sandbase-harness.git\ncd sandbase-harness\nnpm ci\nnpm run build\nmkdir ../my-agents && cd ../my-agents\nnode ../sandbase-harness/dist/index.js init\nnode ../sandbase-harness/dist/index.js start\n\n\nOpen `http://127.0.0.1:3000/dashboard`, navigate to **Settings > Models**, paste your API key, and you're ready to run agents.\n\n**Docker MCP Bridge**:\n\nThe six-tool MCP bridge is available as a multi-architecture OCI image. Start the Harness API, then add this stdio command to an MCP client:\n\nbash\ndocker pull ghcr.io/sandbaseai/sandbase-harness-mcp:0.3.8\ndocker run --rm -i \\\n  -e MANAGED_AGENTS_URL=http://host.docker.internal:3000 \\\n  ghcr.io/sandbaseai/sandbase-harness-mcp:0.3.8\n\n\nFor an authenticated remote runtime, also pass `MANAGED_AGENTS_API_KEY`.\n\n## Examples\n\n**CLI Examples**:\n\nbash\nmanaged-agents init\nmanaged-agents start [--host 127.0.0.1] [--port 3000]\nmanaged-agents list\nmanaged-agents reload\nmanaged-agents chat <agent-id> --message \"hello\"\nmanaged-agents template list | install <name> | create <name>\n\n\n**API Examples**:\n\nCreate an agent:\n\nbash\ncurl -X POST http://127.0.0.1:3000/v1/agents \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Incident commander\",\n    \"model\": \"gpt-4o\",\n    \"system\": \"You are an on-call incident commander.\",\n    \"tools\": [{ \"type\": \"agent_toolset_20260401\" }]\n  }'\n\n\nCreate a Docker-isolated environment:\n\nbash\ncurl -X POST http://127.0.0.1:3000/v1/environments \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Docker sandbox\",\n    \"config\": {\n      \"sandbox_provider\": \"docker\",\n      \"image\": \"node:22-slim\",\n      \"resources\": { \"memory\": \"1g\", \"cpu\": 1 }\n    }\n  }'\n\n\nStart a session:\n\nbash\ncurl -X POST http://127.0.0.1:3000/v1/sessions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"agent\": \"agent_...\",\n    \"environment_id\": \"env_...\",\n    \"title\": \"Triage SENTRY-123\"\n  }'\n\n\n**SDK Example**:\n\ntypescript\nimport { ManagedAgentsClient } from 'managed-agents/sdk';\n\nconst client = new ManagedAgentsClient({\n  baseUrl: 'http://127.0.0.1:3000',\n});\n\nconst session = await client.sessions.create({\n  agent: 'agent_...',\n  environment_id: 'env_...',\n});\n\nfor await (const event of client.sessions.chat(session.id, 'Hello')) {\n  if (event.type === 'agent.message_chunk') {\n    process.stdout.write(event.delta ?? '');\n  }\n}\n\n\n## Links\n\n*   **GitHub Repository**: [sandbaseai/sandbase-harness](https://github.com/sandbaseai/sandbase-harness)\n*   **Official MCP Registry**: [registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.sandbaseai%2Fsandbase-harness)\n*   **DeepSeek Harness Handbook**: [sandbaseai/deepseek-harness-handbook](https://github.com/sandbaseai/deepseek-harness-handbook)\n*   **SandBase CLI**: [sandbaseai/cli](https://github.com/sandbaseai/cli)\n*   **SandBase Skills**: [sandbaseai/sandbase-skills](https://github.com/sandbaseai/sandbase-skills)\n*   **SandBase (Hosted Services)**: [www.sandbase.ai](https://www.sandbase.ai)\n*   **Installation Guide**: [llms-install.md](https://github.com/sandbaseai/sandbase-harness/blob/main/llms-install.md)\n*   **API Reference**: [docs/api.md](https://github.com/sandbaseai/sandbase-harness/blob/main/docs/api.md)\n*   **Architecture Overview**: [docs/spec/architecture.md](https://github.com/sandbaseai/sandbase-harness/blob/main/docs/spec/architecture.md)","metrics":{"detailViews":2,"githubClicks":0},"dates":{"published":null,"modified":"2026-09-13T19:24:02.000Z"}}