| name | open-multi-agent |
| description | TypeScript multi-agent orchestration framework. One runTeam() call from goal to result — auto task decomposition, dependency DAG, parallel execution, model-agnostic. |
| risk | none |
| source | https://github.com/JackChen-me/open-multi-agent |
| date_added | 2026-04-03 |
open-multi-agent
TypeScript-native multi-agent orchestration framework. 3 runtime dependencies (@anthropic-ai/sdk, openai, zod). 27 source files. Model-agnostic (Claude, GPT, Grok, Ollama/vLLM/LM Studio).
USE WHEN
- Building multi-agent systems in TypeScript/Node.js
- Need auto task decomposition from a natural language goal
- Need dependency-aware parallel agent execution
- Want model-agnostic agent orchestration (Claude + GPT + local models in one team)
- Integrating multi-agent pipelines into Express, Next.js, or serverless
- Implementing fan-out/aggregate patterns with multiple agents
- Need structured output (Zod schema validation) from agents
- GRAFTKIT Graftline orchestration via Inngest
Architecture
OpenMultiAgent (Orchestrator)
createTeam() runTeam() runTasks() runAgent() getStatus()
│
Team
AgentConfig[]
MessageBus (pub/sub, point-to-point + broadcast)
TaskQueue (dependency DAG, auto-unblock, cascade failure)
SharedMemory (namespaced key-value, agent-attributed)
│
AgentPool (Semaphore-controlled concurrency)
Agent → AgentRunner → LLMAdapter (Anthropic/OpenAI/Grok/Copilot)
→ ToolExecutor → ToolRegistry (5 built-in + custom)
Three Execution Modes
| Mode | Method | Use Case |
|---|
| Single agent | runAgent(config, prompt) | One-shot query |
| Auto-orchestrated team | runTeam(team, goal) | Goal in, result out — framework plans and executes |
| Explicit pipeline | runTasks(team, tasks[]) | You define the task graph and assignments |
Core API
runTeam() — The Killer Feature
const orchestrator = new OpenMultiAgent({ defaultModel: 'claude-sonnet-4-6' })
const team = orchestrator.createTeam('api-team', {
name: 'api-team',
agents: [architect, developer, reviewer],
sharedMemory: true,
})
const result = await orchestrator.runTeam(team, 'Create a REST API for a todo list')
Internal flow:
- Coordinator agent decomposes goal into JSON task array with
title, description, assignee, dependsOn
- Tasks loaded into TaskQueue with title-based dependency resolution
- Scheduler auto-assigns unassigned tasks (4 strategies: round-robin, least-busy, capability-match, dependency-first)
- Independent tasks execute in parallel (Semaphore-capped at
maxConcurrency, default 5)
- Results persisted to SharedMemory after each task
- Coordinator synthesizes final answer from all task outputs
runTasks() — Explicit Pipeline
await orchestrator.runTasks(team, [
{ title: 'Design API', description: '...', assignee: 'architect' },
{ title: 'Implement', description: '...', assignee: 'developer', dependsOn: ['Design API'] },
{ title: 'Review', description: '...', assignee: 'reviewer', dependsOn: ['Implement'] },
])
AgentConfig
interface AgentConfig {
name: string
model: string
provider?: 'anthropic' | 'copilot' | 'grok' | 'openai'
baseURL?: string
apiKey?: string
systemPrompt?: string
tools?: string[]
maxTurns?: number
maxTokens?: number
temperature?: number
outputSchema?: ZodSchema
}
Custom Tools
import { defineTool } from '@jackchen_me/open-multi-agent'
import { z } from 'zod'
const myTool = defineTool({
name: 'fetch_data',
description: 'Fetch JSON from a URL',
inputSchema: z.object({ url: z.string().url() }),
execute: async ({ url }) => {
const res = await fetch(url)
return { data: await res.text() }
},
})
Task System
Task Lifecycle
pending -> in_progress -> completed | failed
pending -> blocked (unresolved deps) -> pending (deps complete) -> ...
Dependency Resolution
- Kahn's algorithm for topological sort
- Title-based dependency references resolved to UUIDs
- Cascade failure: failed task marks all transitive dependents as failed
- Cycle detection via DFS colouring
Retry
{ maxRetries: 3, retryDelayMs: 1000, retryBackoff: 2 }
Message Bus
- Point-to-point:
team.sendMessage(from, to, content)
- Broadcast:
team.broadcast(from, content) (to='*', delivered to all except sender)
- Read/unread tracking per agent
- Conversation retrieval between any two agents
- Subscribe callbacks for real-time notification
Shared Memory
- Namespaced writes:
<agentName>/<key> prevents collisions
- Any agent can read any entry
getSummary() produces markdown digest injected into agent prompts
- Truncates values > 200 chars in summary for context window management
Observability
Progress Events (onProgress)
agent_start, agent_complete, task_start, task_complete, task_retry, message, error
Trace Events (onTrace)
Structured spans: llm_call (model, turn, tokens), tool_call (tool, isError), task (success, retries), agent (turns, tokens, toolCalls). All share runId for correlation.
Scheduling Strategies
| Strategy | How It Works |
|---|
round-robin | Distribute tasks by index, advancing cursor |
least-busy | Agent with fewest in_progress tasks |
capability-match | Keyword overlap between task description and agent systemPrompt |
dependency-first | Prioritize tasks that unblock the most dependents (critical path) |
Dependencies
Only 3 runtime:
@anthropic-ai/sdk ^0.52.0
openai ^4.73.0
zod ^3.23.0
GRAFTKIT Integration Map
| open-multi-agent | GRAFTKIT Equivalent |
|---|
OpenMultiAgent | Grafter (orchestrator) |
runTeam(team, goal) | Graftline pipeline execution |
| Coordinator decomposition | Phase Zero (gap analysis + task planning) |
AgentConfig workers | Builder, Classifier, Validator, Documenter |
TaskQueue | Graftline stage ordering |
SharedMemory | Cross-stage context (shared Grafthouse state) |
MessageBus | Observability events / inter-agent coordination |
onTrace callback | Inngest step telemetry |
onProgress callback | Inngest event emission |
Scheduler strategies | Grafter routing logic |
AgentPool + Semaphore | Concurrency control (respects PAI 3-agent limit) |
Inngest Integration Design
See references/README.md for the full Inngest integration architecture.
Related Skills
Works well with: inngest, event-driven-serverless-systems, multi-agent-orchestration, single-file-agents, observability-designer