shareAI-lab/kode-agent-sdk
Open runtime for building Claude Code & Manus like Agent Product
What it solves
Building AI agents that must run for a long time, survive failures, and cooperate with other agents is hard. KODE SDK tackles three problems at once: it keeps long-running agent work resumable after crashes, it gives multiple agents clean ways to talk and delegate to each other, and it adds enterprise-grade persistence (SQLite or PostgreSQL, with a unified write-ahead log) so state is never lost. It also addresses safety for code execution by plugging into cloud sandboxes.
How it works
Agents are driven by a three-channel event system that separates progress updates, control signals, and monitoring events. The lifecycle is split into seven checkpoints with a Safe-Fork-Point, so a crashed run can resume or branch from a consistent state. Multiple agents coordinate through AgentPool, Room messaging, and task delegation. For storage, the framework supports JSONStore, SQLite, or PostgreSQL behind a unified write-ahead log. You bring your own model provider: Anthropic, OpenAI, Gemini, or any OpenAI-compatible service via a custom base URL. Code that agents need to run can execute in an isolated cloud sandbox (E2B or OpenSandbox) or in a local sandbox with a configurable work directory. For scaling to many users, the README recommends a Worker Microservice Pattern: a stateless API layer, stateful workers running the SDK, a shared distributed store, and a message queue to decouple requests from execution.
Who it's for
TypeScript developers (Node.js 20.18.1–25.x) building production AI agents that need to run long, resume after crashes, and scale horizontally. It also suits teams that want multi-agent collaboration, enterprise-grade persistence, and support for multiple model providers — from Anthropic and OpenAI to OpenAI-compatible services like DeepSeek or Qwen. A quick mock run works offline with no credentials, so evaluators can try the lifecycle without touching a model.
Highlights
- Three-channel event architecture (Progress/Control/Monitor) keeps concerns separated
- Seven-stage checkpoints with a Safe-Fork-Point enable crash recovery and branching
- Multi-agent collaboration via AgentPool, Room messaging, and task delegation
- Enterprise persistence with SQLite/PostgreSQL and a unified write-ahead log
- Cloud sandbox integration (E2B and OpenSandbox) for isolated remote code execution
- Extensible ecosystem: MCP tools, custom providers, and a reusable Skills system
- Worker Microservice Pattern for scaling to many users, with a stateless API layer and stateful agents
- MIT-licensed
Related
- Project
- Project
- Project
- Project