[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-93320":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},93320,"managed-agents","sandbaseai\u002Fmanaged-agents","sandbaseai","Open-source CMA-compatible agent runtime. Run multi-agent systems locally with any model (Ollama\u002FvLLM\u002FClaude\u002FGPT), MCP tools, scenario templates, and a beautiful dashboard. One command start. Built for enterprise teams.",null,"TypeScript",168,7,3,0,58,68.51,"Other",false,"main",true,[],"2026-07-22 04:02:08","# managed-agents\n\n**SandBase managed-agents is the safe, local-first runtime layer for enterprise\nAI agents.**\n\n`managed-agents` helps teams move AI agents from demos to production with\nruntime infrastructure for sessions, tools, approvals, sandboxed execution,\nmemory, credential vaults, audit trails, replayable events, and operational\nvisibility. It exposes a Claude Managed Agents-compatible Console and `\u002Fv1`\nresource API while keeping runtime metadata in SQLite outside your project by\ndefault.\n\nUse it to build and operate self-hosted AI agents, local developer agents,\ndesktop agent runtimes, MCP-enabled workflows, and enterprise proofs of concept\nwithout locking your runtime layer to a single model provider.\n\n## Why managed-agents?\n\nAgent SDKs are great for writing an agent loop. Production agents need more:\nstate, session history, tool governance, sandbox boundaries, credential handling,\nmemory, auditability, and a Console for humans to inspect what happened.\n\n`managed-agents` focuses on that runtime layer. It is not a visual workflow\nbuilder and it is not another model SDK. It is an open-source control plane for\nrunning, observing, and governing AI agents locally or in self-hosted\nenvironments.\n\n## Features\n\n- Claude Managed Agents-style Console and `\u002Fv1` resource APIs\n- SQLite-backed agents, skills, sessions, environments, credential vaults,\n  memory stores, API keys, and file metadata\n- Resumable Server-Sent Events for session timelines, debugging, audit, and\n  replay\n- File resources, memory stores, credential vaults, and environment templates\n- Local API keys and bearer-token authentication for shared local runtimes\n- Optional seed\u002Fimport folders for `agents\u002F*.yaml` and `skills\u002F*\u002FSKILL.md`\n- Local, Docker, and self-hosted sandbox provider support\n- MCP toolsets, built-in tools, permission policies, and skill packages\n- OpenAI-compatible, Ollama-compatible, and Anthropic model adapters\n- Optional TypeScript convenience SDK at `managed-agents\u002Fsdk`\n\n## Common Use Cases\n\n- Run a local Claude Managed Agents-style Console for agent development\n- Build self-hosted enterprise AI agents with auditable sessions and tool calls\n- Prototype customer support, incident response, research, data analysis, and\n  software engineering agents\n- Package reusable agent templates, MCP connectors, permission policies, and\n  skills for field deployments\n- Embed an agent runtime in a future desktop app or private internal platform\n\n## Requirements\n\n- Node.js 22 or newer\n- npm 10 or newer\n- A configured model provider key or local OpenAI-compatible endpoint\n\nDocker is optional and is only needed when you want Docker-backed sandboxes.\n\n## Install\n\nUse the CLI with `npx`:\n\n```bash\nnpx managed-agents init\nnpx managed-agents start\n```\n\nOr install it globally:\n\n```bash\nnpm install -g managed-agents\nmanaged-agents init\nmanaged-agents start\n```\n\nFor source builds:\n\n```bash\ngit clone git@github.com:sandbaseai\u002Fmanaged-agents.git\ncd managed-agents\nnpm ci\nnpm run build\n```\n\nThen create and run an agent workspace outside the source checkout:\n\n```bash\nmkdir ..\u002Fmy-agents\ncd ..\u002Fmy-agents\nnode ..\u002Fmanaged-agents\u002Fdist\u002Findex.js init\nnode ..\u002Fmanaged-agents\u002Fdist\u002Findex.js start\n```\n\n## Quick Start\n\nCreate a workspace:\n\n```bash\nmkdir my-agents\ncd my-agents\nnpx managed-agents init\n```\n\nIf you are running from a source checkout, replace `npx managed-agents` with\n`node \u002Fpath\u002Fto\u002Fmanaged-agents\u002Fdist\u002Findex.js`.\n\nStart the runtime:\n\n```bash\nnpx managed-agents start\n# source checkout:\n# node \u002Fpath\u002Fto\u002Fmanaged-agents\u002Fdist\u002Findex.js start\n```\n\nOpen the Dashboard:\n\n```text\nhttp:\u002F\u002F127.0.0.1:3000\u002Fdashboard\n```\n\nOpen `Settings > Models` and add a model provider. A provider stores the runtime\nname, provider type, model id, base URL, and API key in SQLite. Mark one\nprovider as default; agents that use `model: default` will run through that\nprovider. No source-controlled file changes are required for normal local use.\n\nThe API is available at:\n\n```text\nhttp:\u002F\u002F127.0.0.1:3000\u002Fv1\n```\n\nInside the Dashboard, open `Settings > API reference` for a Claude-style\ndeveloper reference page. It shows the active base URL, authentication mode,\ngrouped endpoints, parameter descriptions, return fields, and copyable `curl`\nand TypeScript SDK examples generated from your running runtime.\n\n## Workspace Layout\n\n```text\nmy-agents\u002F\n+-- agents\u002F                  # Optional seed agent definitions\n|   +-- assistant.yaml\n+-- skills\u002F                  # Optional seed skill packages\n|   +-- example-skill\u002F\n|       +-- SKILL.md\n+-- managed-agents.config.yaml\n```\n\nRuntime state is stored outside the repository by default:\n\n```text\n~\u002F.managed-agents\u002F\u003Cworkspace-name>-\u003Chash>\u002F\n+-- data.db                  # SQLite metadata store\n+-- files\u002F                   # Uploaded file bytes\n+-- skills\u002F                  # Uploaded custom skill package assets\n+-- snapshots\u002F               # Session workspace snapshots\n+-- sandbox\u002F                 # Local session workspaces\n```\n\nSet `MANAGED_AGENTS_HOME` or pass `--data-dir` to override this location.\n\n## Agent Definition\n\nAgents use the Claude Managed Agents-style shape below. The Console\u002FAPI generate\nstable `agent_...` IDs. `name` is a human-readable label, not a filesystem path\nor uniqueness key.\n\n```yaml\nname: Incident commander\ndescription: Triages alerts, opens incident tickets, and coordinates status updates.\nmodel: default\nsystem: |-\n  You are an on-call incident commander. Be decisive, cite the evidence you used,\n  and recommend rollback when confidence is high.\nmcp_servers:\n  - name: sentry\n    type: url\n    url: https:\u002F\u002Fmcp.sentry.dev\u002Fmcp\n  - name: linear\n    type: url\n    url: https:\u002F\u002Fmcp.linear.app\u002Fmcp\ntools:\n  - type: agent_toolset_20260401\n    default_config:\n      enabled: true\n      permission_policy:\n        type: always_ask\n    configs:\n      - name: read\n        enabled: true\n      - name: grep\n        enabled: true\n      - name: bash\n        enabled: true\n        permission_policy:\n          type: always_ask\n  - type: mcp_toolset\n    mcp_server_name: sentry\n    default_config:\n      permission_policy:\n        type: always_allow\n  - type: mcp_toolset\n    mcp_server_name: linear\n    default_config:\n      permission_policy:\n        type: always_allow\nskills:\n  - type: anthropic\n    skill_id: pdf\nmetadata:\n  template: incident-commander\n```\n\nUse `model: default` for the common path. The Dashboard default provider maps\nthat name to a concrete provider model id such as `claude-opus-4-8`, `gpt-4o`,\nor an OpenAI-compatible model name. Provider settings are stored in SQLite under\nthe runtime data directory. API clients may also send a model configuration\nobject when they need additional controls such as `speed`.\n\n## Dashboard\n\nThe Dashboard provides a local console for:\n\n- Creating and editing agents\n- Starting sessions and viewing transcripts\n- Inspecting session debug events\n- Creating environments\n- Managing credential vaults\n- Uploading files\n- Creating and editing memory stores\n- Uploading skills\n- Creating and archiving local API keys\n- Reading the built-in API reference for `\u002Fv1` endpoints, SDK snippets, and\n  Skill upload examples\n- Reviewing Settings for models, loop engine behavior, storage, sandboxing,\n  API keys, API reference, logs, and monitoring\n- Restarting the runtime and viewing recent structured logs from Settings\n\nOpen `Settings > API reference` in the Dashboard to see the active base URL,\nauthentication mode, core service endpoints, copyable `curl` examples, SDK\nsnippets, and the required Skill package shape.\n\n## CLI\n\n```bash\nmanaged-agents init\nmanaged-agents start --host 127.0.0.1 --port 3000\nmanaged-agents list\nmanaged-agents reload\nmanaged-agents chat \u003Cagent-id> --message \"hello\"\nmanaged-agents template list\nmanaged-agents template install \u003Ctemplate-name-or-path>\nmanaged-agents template create \u003Cname>\n```\n\n## API Example\n\nCreate an agent:\n\n```bash\ncurl -X POST http:\u002F\u002F127.0.0.1:3000\u002Fv1\u002Fagents \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"Incident commander\",\n    \"description\": \"Triages alerts and coordinates incident response.\",\n    \"model\": \"default\",\n    \"system\": \"You are an on-call incident commander.\",\n    \"tools\": [{ \"type\": \"agent_toolset_20260401\" }],\n    \"metadata\": { \"template\": \"incident-commander\" }\n  }'\n```\n\nThe response contains the stable `agent_...` id to use for sessions. Agent\nnames are display labels; Console\u002FAPI-created agents receive server-generated\nids and do not rely on name-derived identifiers.\n\nCreate an environment:\n\n```bash\ncurl -X POST http:\u002F\u002F127.0.0.1:3000\u002Fv1\u002Fenvironments \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"Default cloud\",\n    \"config\": {\n      \"type\": \"cloud\",\n      \"networking\": {\n        \"type\": \"limited\",\n        \"allow_mcp_servers\": true,\n        \"allow_package_managers\": true,\n        \"allowed_hosts\": [\"api.github.com\"]\n      },\n      \"packages\": {\n        \"type\": \"packages\",\n        \"pip\": [\"pytest\"],\n        \"npm\": [\"typescript\"]\n      }\n    }\n  }'\n```\n\nThe response contains the stable `env_...` id to use for sessions. Environment\nnames are display labels and do not need to be unique.\n\nCreate a memory store:\n\n```bash\ncurl -X POST http:\u002F\u002F127.0.0.1:3000\u002Fv1\u002Fmemory_stores \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"Incident notes\",\n    \"description\": \"Long-lived incident context and follow-up notes.\",\n    \"metadata\": { \"team\": \"platform\" }\n  }'\n```\n\nUpload a Skill package:\n\n```bash\nzip -r code-review-assistant.zip code-review-assistant\n\ncurl -X POST http:\u002F\u002F127.0.0.1:3000\u002Fv1\u002Fskills \\\n  -F \"files=@code-review-assistant.zip\"\n```\n\nThe archive must contain one top-level directory and a root `SKILL.md` file:\n\n```text\ncode-review-assistant\u002F\n+-- SKILL.md\n+-- references\u002F\n    +-- checklist.md\n```\n\n`SKILL.md` must start with YAML frontmatter that includes `name` and\n`description`. The server generates the stable `skill_...` id; the Skill name is\nread from the package metadata and can then be attached to agents:\n\n```yaml\nskills:\n  - type: custom\n    skill_id: skill_...\n```\n\nMemory store names are labels for humans and prompts; they do not need to be\nunique. Use the returned `memstore_...` id when mounting a store into a session.\n\nCreate a credential vault and add a credential:\n\n```bash\ncurl -X POST http:\u002F\u002F127.0.0.1:3000\u002Fv1\u002Fcredential-vaults \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"name\": \"production-tools\" }'\n\ncurl -X POST http:\u002F\u002F127.0.0.1:3000\u002Fv1\u002Fcredential-vaults\u002Fvlt_...\u002Fcredentials \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"github-token\",\n    \"auth_type\": \"environment_variable\",\n    \"variable_name\": \"GITHUB_TOKEN\",\n    \"value\": \"ghp_example\",\n    \"network\": {\n      \"type\": \"limited\",\n      \"allowed_hosts\": [\"api.github.com\"]\n    },\n    \"injection_locations\": [\"request_headers\"]\n  }'\n```\n\nCredential records use `auth_type` values `mcp_oauth`, `bearer_token`, or\n`environment_variable`. Secret values are encrypted at rest and never returned\nby list or retrieve responses.\n\nCreate a session:\n\n```bash\ncurl -X POST http:\u002F\u002F127.0.0.1:3000\u002Fv1\u002Fsessions \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"agent\": \"agent_...\",\n    \"environment_id\": \"env_...\",\n    \"title\": \"Sentry alert triage\",\n    \"resources\": [\n      {\n        \"type\": \"memory_store\",\n        \"memory_store_id\": \"memstore_...\",\n        \"access\": \"read_write\",\n        \"instructions\": \"Use this store for incident timelines and decisions.\"\n      }\n    ]\n  }'\n```\n\nSend a user event:\n\n```bash\ncurl -X POST http:\u002F\u002F127.0.0.1:3000\u002Fv1\u002Fsessions\u002FSESSION_ID\u002Fevents \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"events\": [\n      {\n        \"type\": \"user.message\",\n        \"content\": [{ \"type\": \"text\", \"text\": \"Investigate SENTRY-123.\" }]\n      }\n    ]\n  }'\n```\n\nResume the event stream:\n\n```bash\ncurl -N http:\u002F\u002F127.0.0.1:3000\u002Fv1\u002Fsessions\u002FSESSION_ID\u002Fevents\u002Fstream \\\n  -H \"Last-Event-ID: 42\"\n```\n\n## SDK Usage\n\nThe public API is designed to follow Claude Managed Agents resource shapes. When\nyour SDK supports the managed-agent beta resources, point the official Anthropic\nSDK at the local runtime with `baseURL`:\n\n```typescript\nimport Anthropic from '@anthropic-ai\u002Fsdk';\n\nconst client = new Anthropic({\n  apiKey: process.env.MANAGED_AGENTS_API_KEY ?? 'local-dev-key',\n  baseURL: 'http:\u002F\u002F127.0.0.1:3000',\n});\n\nconst session = await client.beta.sessions.create({\n  agent: 'agent_...',\n  environment_id: 'env_...',\n  title: 'SDK smoke test',\n});\n\nawait client.beta.sessions.events.send(session.id, {\n  events: [\n    {\n      type: 'user.message',\n      content: [{ type: 'text', text: 'Hello' }],\n    },\n  ],\n});\n```\n\nFor local-only helpers such as message streaming convenience methods, the package\nalso exports a small TypeScript wrapper over the same HTTP API:\n\n```typescript\nimport { ManagedAgentsClient } from 'managed-agents\u002Fsdk';\n\nconst client = new ManagedAgentsClient({\n  baseUrl: 'http:\u002F\u002F127.0.0.1:3000',\n});\n\nconst session = await client.sessions.create({\n  agent: 'agent_...',\n  environment_id: 'env_...',\n  title: 'SDK smoke test',\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## Authentication\n\nLocal development is open by default. Authentication turns on when at least one\nAPI key exists. You can create managed keys from the Console\u002FAPI, or configure a\nstatic key:\n\n```bash\nexport MANAGED_AGENTS_API_KEY=sk-local-example\n```\n\nStatic keys can also be configured in `managed-agents.config.yaml`:\n\n```yaml\napi_keys:\n  - ${MANAGED_AGENTS_API_KEY}\n```\n\nCreate a managed key through the API:\n\n```bash\ncurl -X POST http:\u002F\u002F127.0.0.1:3000\u002Fv1\u002Fapi-keys \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"name\": \"Local Console\" }'\n```\n\nClients then send:\n\n```text\nAuthorization: Bearer sk-local-example\n```\n\n## Documentation\n\n- [Installation](docs\u002Finstallation.md)\n- [Usage Guide](docs\u002Fusage.md)\n- [API Reference](docs\u002Fapi.md)\n- [Skills](docs\u002Fskills.md)\n- [Architecture](docs\u002Fspec\u002Farchitecture.md)\n- [Technical Design](docs\u002Fspec\u002Fdesign.md)\n- [Contributing](CONTRIBUTING.md)\n\n## Project Keywords\n\n`enterprise-ai-agents`, `ai-agent-runtime`, `managed-agents`,\n`claude-managed-agents`, `self-hosted-ai`, `local-first`, `mcp`,\n`sandboxed-execution`, `agent-memory`, `credential-vaults`, `audit-log`,\n`session-replay`, `typescript`, `sqlite`\n\n## Development\n\n```bash\nnpm ci\nnpm run typecheck\nnpm test\nnpm run build\n```\n\nRun the runtime and Dashboard during development:\n\n```bash\nnpm run dev\nnpm run dev:console\n```\n\nThe Dashboard's `Settings > Logs` page can restart the CLI-managed server and\ndisplay the current process log buffer. Runtime configuration is organized\nunder `Settings > Models`, `Settings > Loop engine`, `Settings > Storage`, and\n`Settings > Sandbox`. Model providers created in `Settings > Models` are stored\nin SQLite and applied to new agent runs immediately. The same log controls are\navailable through `POST \u002Fv1\u002Fx\u002Frestart` and `GET \u002Fv1\u002Fx\u002Flogs`.\n\n## Release Checks\n\nBefore publishing a release:\n\n```bash\nnpm ci\nnpm run typecheck\nnpm test\nnpm run build\n```\n\nSmoke test the example project:\n\n```bash\ncd examples\u002Fbasic\nnpx managed-agents start --config managed-agents.config.yaml --agents-dir agents --skills-dir skills\n```\n\n## License\n\n[Apache-2.0](LICENSE)\n","managed-agents 是一个开源的、本地优先的企业级 AI 代理运行时框架，专为安全、可审计的多代理系统生产部署而设计。它提供符合 Claude Managed Agents（CMA）规范的控制台与 API，支持 Ollama\u002FvLLM\u002FOpenAI\u002FAnthropic 等多种模型后端，集成 MCP 工具集、沙箱执行、凭证保险库、会话状态持久化（SQLite）、内存管理、审批流及可回放事件日志。适用于需自主可控、合规审计和本地化部署的场景，如企业内部智能客服、运维响应、数据分析代理及桌面级 AI 应用开发。",2,"2026-07-16 02:30:05","CREATED_QUERY"]