SuperAPIAI Directory

kaiban-distributed

github.com · AI agents

Kaiban Distributed is an open-source multi-agent AI system runtime that combines an enterprise-grade messaging layer (Kafka/Redis), distributed Actor model isolation, AI multi-agent orchestration, and Kanban visualization. It allows multiple AI agent teams to run as independently deployed Node.js processes, enabling real-time visibility and multi-agent orchestration through Redis/Kafka publish/subscribe, A2A, and MCP. The project treats agents as stateful Actors, with each agent having its own independent process, identity, and mailbox, and supports horizontal scaling. It integrates the KaibanJS system, external agent systems, and any service that can be published via A2A/MCP/Redis/Kafka. It provides a Docker Compose demo, a React Kanban board, A2A protocol support, MCP integration, and multiple message drivers (BullMQ/Redis and Kafka). It is suitable for scalable AI workflows ranging from local use to enterprise-grade systems.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux · API

About this tool

Kaiban Distributed is a distributed multi-agent AI platform implemented with the Actor model and a Kanban framework, featuring enterprise-grade messaging layer state (Redis/Kafka) and independently deployed AI nodes (Node.js/TypeScript). It is one of the first open-source projects to combine enterprise messaging (Kafka/Redis), distributed Actor model isolation, AI multi-agent orchestration, and Kanban visualization into a single JavaScript ecosystem runtime, designed for both agents and humans.

Purpose

Kaiban Distributed is designed to run multiple AI agent teams, with each agent as an independently deployed Node.js process, providing real-time visibility and multi-agent orchestration through Redis/Kafka publish/subscribe, A2A, and MCP. It supports creating agent teams to handle various tasks, system integration, and data processing/analysis, providing scalable AI workflows from local use to customizable enterprise-grade systems.

Key Capabilities

  • Distributed Actor Model: Each agent runs as a stateful Actor in an independent process, with its own identity and mailbox, as well as process-level state (such as token counts and circuit breakers). Tasks run in a fresh Team, and conversation state is not retained between tasks.
  • Messaging Abstraction Layer: Supports Kafka or BullMQ/Redis as message drivers, which can be switched in a pluggable manner. BullMQ is suitable for development, small-to-medium scale, reliable delivery, and job history; Kafka is suitable for large scale, event streaming, message replay, and multi-data-center deployments.
  • Multi-Agent Orchestration: Supports inter-agent communication and coordination through Redis/Kafka publish/subscribe, the A2A protocol, and MCP.
  • Kanban Visualization: Provides a React Kanban board (board/ directory) and a static HTML viewer that display agent activity, task status, and workflow status in real time. The Kanban board supports human-in-the-loop (HITL) controls such as approve, modify, and reject.
  • A2A Protocol Support: The edge gateway exposes a JSON-RPC interface compliant with the A2A v0.3 specification, using the official @a2a-js/sdk v0.3.x, and supports methods such as message/send, message/stream (SSE), tasks/get, and tasks/cancel, and provides AgentCard.
  • MCP integration: Any Model Context Protocol tool server can be attached to agents, such as Redis and Kafka MCP servers, enabling AI agents to intercept and query real-time data streams.
  • KaibanJS integration: Can be integrated with existing KaibanJS systems and agents, following the docs/KAIBANJS_INTEGRATION.md documentation.
  • Horizontal scaling: Horizontal scaling is achieved through independently deployed Node.js processes and a messaging layer, with support for Docker and Docker Compose deployment.
  • Human-in-the-loop (HITL): Supports programmatic human-in-the-loop interrupts (such as budget checks) at any point in workflows/tasks, and the board provides interactive HITL controls.
  • Economics and governance: Provides economic dashboards and governance features such as token budgets and cost tracking.

Usage

  • Quick start (full demo): Refer to EXAMPLES.md to run the examples. Requires Docker + Docker Compose (for Redis, Kafka, and multi-node demos) and LLM API keys (such as OPENAI_API_KEY, OPENROUTER_API_KEY, or other compatible APIs).
  • Use as a library: The package has two entry points: kaiban-distributed (actor, driver, bridge, security, governance, economics) and kaiban-distributed/shared (driver factory, state publishing factory, scheduling, completion router, orchestration helpers). It is recommended to use createDriver() instead of manually constructing BullMQDriver, so that the user, password, database, and rediss:// in REDIS_URL and the REDIS_TLS_* files are handled correctly.
  • Run the gateway: Edit .env to select the LLM provider, start the infrastructure, and build and run the gateway. To run tasks, start worker nodes (such as ROLE=worker AGENT_IDS=researcher,writer,editor node dist/src/main/index.js) or use the full demo.
  • React board: board/ subdirectory is an independent React + Vite + TypeScript dashboard that visualizes distributed agent activity in real time via Socket.io. Start the board in development mode; the production build outputs static files to board/dist/, which can be deployed anywhere (nginx, CDN, etc.), and requires setting Content-Security-Policy and X-Content-Type-Options response headers.
  • Static HTML viewer: Open examples/blog-team/viewer/board.html directly; it automatically connects to http://localhost:3000,显示智能体状态和事件流。
  • Custom Socket.io client: optional.
  • A2A protocol: the gateway provides a JSON-RPC interface compliant with A2A v0.3; the AgentCard is located at /.well-known/agent-card.json and supports methods such as message/send, message/stream, tasks/get, and tasks/cancel. Agent status can be obtained via GET /a2a/agents/:agentId/status.
  • MCP integration: attach MCP tool servers to agents, such as the Redis and Kafka MCP servers.
  • Message-driven switching: set MESSAGING_DRIVER=kafka or bullmq; the IMessagingDriver interface provides the abstraction, and the worker code is the same for both drivers.
  • Docker Compose: used for Redis, Kafka, and multi-node demos; some environment variables are passed via the compose file, see docs/deployment/DOCKER.md for details.

Applicable scenarios

  • Multi-agent AI workflows that require horizontal scaling.
  • Enterprise-grade system integration leveraging the Kafka/Redis messaging layer.
  • Agent team collaboration that requires real-time dashboard visualization and human intervention.
  • Interoperability with external agent systems via A2A or MCP.
  • AI multi-agent orchestration from local development to production deployment.

Limitations

  • Tasks themselves run in a brand-new Team, and conversation state is not preserved between tasks (stateful in the Actor model sense refers only to process-level state).
  • Under the Kafka driver, if a genuine consumer group rebalance occurs while a task is running, offset commits may fail and the task may be redelivered to another worker node; task-level deduplication is planned on the roadmap (roadmap §7.2 item 5). BullMQ has its own lock renewal and is unaffected.
  • Using KaibanTeamBridge (local Team + distributed worker nodes) is deprecated; for single tasks, createKaibanTaskHandler should be used. On this path, STOP ALL will not cancel in-progress model calls.
  • The dashboard token is not sent to the gateway selected by the link; when VITE_BOARD_TOKEN is built in, the React dashboard only honors ?gateway= for the origin of VITE_BOARD_URL, and other values are ignored.
  • Only the literal value unlimited removes the spending cap; 0, negative numbers, or text will yield the default value and log a single warning.
  • For the full list of environment variables, see .env.example; Docker Compose passes only some variables, so refer to the documentation to add the remaining variables.
  • The project documentation mentions that the book "Agentic AI Architectures: Multi-Agent System Patterns with TypeScript" is planned for publication in 2026, and the companion repository bundles an earlier version (1.4.0); the current repository is the maintained version.
  • Some features (such as task-level deduplication) are still on the roadmap and not yet implemented.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools