open-multi-agent-orchestration
Expertise in using open-multi-agent, a TypeScript framework for building production-grade multi-agent AI teams with task scheduling, dependency graphs, and inter-agent communication.
What this skill does
# Open Multi-Agent Orchestration
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
`open-multi-agent` is a TypeScript framework for building AI agent teams where agents with different roles, models, and tools collaborate on complex goals. The framework handles task dependency resolution (DAG scheduling), parallel execution, shared memory, and inter-agent communication — all in-process with no subprocess overhead.
## Installation
```bash
npm install @jackchen_me/open-multi-agent
# or
pnpm add @jackchen_me/open-multi-agent
```
Set environment variables:
```bash
export ANTHROPIC_API_KEY=your_key_here
export OPENAI_API_KEY=your_key_here # optional, only if using OpenAI models
```
## Core Concepts
| Concept | Description |
|---------|-------------|
| `OpenMultiAgent` | Top-level orchestrator — entry point for all operations |
| `Team` | A named group of agents sharing a message bus, task queue, and optional shared memory |
| `AgentConfig` | Defines an agent's name, model, provider, system prompt, and allowed tools |
| `Task` | A unit of work with a title, description, assignee, and optional `dependsOn` list |
| `LLMAdapter` | Pluggable interface — built-in adapters for Anthropic and OpenAI |
| `ToolRegistry` | Registry of available tools; built-ins + custom tools via `defineTool()` |
## Quick Start — Single Agent
```typescript
import { OpenMultiAgent } from '@jackchen_me/open-multi-agent'
const orchestrator = new OpenMultiAgent({ defaultModel: 'claude-sonnet-4-6' })
const result = await orchestrator.runAgent(
{
name: 'coder',
model: 'claude-sonnet-4-6',
tools: ['bash', 'file_write'],
},
'Write a TypeScript function that reverses a string, save it to /tmp/reverse.ts, and run it.',
)
console.log(result.output)
```
## Multi-Agent Team
```typescript
import { OpenMultiAgent } from '@jackchen_me/open-multi-agent'
import type { AgentConfig } from '@jackchen_me/open-multi-agent'
const architect: AgentConfig = {
name: 'architect',
model: 'claude-sonnet-4-6',
systemPrompt: 'You design clean API contracts and file structures.',
tools: ['file_write'],
}
const developer: AgentConfig = {
name: 'developer',
model: 'claude-sonnet-4-6',
systemPrompt: 'You implement what the architect designs.',
tools: ['bash', 'file_read', 'file_write', 'file_edit'],
}
const reviewer: AgentConfig = {
name: 'reviewer',
model: 'claude-sonnet-4-6',
systemPrompt: 'You review code for correctness and clarity.',
tools: ['file_read', 'grep'],
}
const orchestrator = new OpenMultiAgent({
defaultModel: 'claude-sonnet-4-6',
onProgress: (event) => console.log(event.type, event.agent ?? event.task ?? ''),
})
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 in /tmp/todo-api/',
)
console.log(`Success: ${result.success}`)
console.log(`Output tokens: ${result.totalTokenUsage.output_tokens}`)
```
## Task Pipeline — Explicit DAG Control
Use `runTasks()` when you need precise control over task ordering, assignments, and parallelism:
```typescript
const result = await orchestrator.runTasks(team, [
{
title: 'Design the data model',
description: 'Write a TypeScript interface spec to /tmp/spec.md',
assignee: 'architect',
},
{
title: 'Implement the module',
description: 'Read /tmp/spec.md and implement the module in /tmp/src/',
assignee: 'developer',
dependsOn: ['Design the data model'], // blocked until design completes
},
{
title: 'Write tests',
description: 'Read the implementation and write Vitest tests.',
assignee: 'developer',
dependsOn: ['Implement the module'],
},
{
title: 'Review code',
description: 'Review /tmp/src/ and produce a structured code review.',
assignee: 'reviewer',
dependsOn: ['Implement the module'], // runs in parallel with "Write tests"
},
])
```
Tasks with no unresolved `dependsOn` entries run in parallel automatically. The framework cascades failures — if a task fails, dependent tasks are skipped.
## Multi-Model Teams (Claude + GPT)
```typescript
const claudeAgent: AgentConfig = {
name: 'strategist',
model: 'claude-opus-4-6',
provider: 'anthropic',
systemPrompt: 'You plan high-level approaches.',
tools: ['file_write'],
}
const gptAgent: AgentConfig = {
name: 'implementer',
model: 'gpt-5.4',
provider: 'openai',
systemPrompt: 'You implement plans as working code.',
tools: ['bash', 'file_read', 'file_write'],
}
const team = orchestrator.createTeam('mixed-team', {
name: 'mixed-team',
agents: [claudeAgent, gptAgent],
sharedMemory: true,
})
const result = await orchestrator.runTeam(team, 'Build a CLI tool that converts JSON to CSV.')
```
## Custom Tools with Zod Schemas
```typescript
import { z } from 'zod'
import {
defineTool,
Agent,
ToolRegistry,
ToolExecutor,
registerBuiltInTools,
} from '@jackchen_me/open-multi-agent'
// Define the tool
const weatherTool = defineTool({
name: 'get_weather',
description: 'Get current weather for a city.',
inputSchema: z.object({
city: z.string().describe('The city name.'),
units: z.enum(['celsius', 'fahrenheit']).optional().describe('Temperature units.'),
}),
execute: async ({ city, units = 'celsius' }) => {
// Replace with your actual weather API call
const data = await fetchWeatherAPI(city, units)
return { data: JSON.stringify(data), isError: false }
},
})
// Wire up registry
const registry = new ToolRegistry()
registerBuiltInTools(registry) // adds bash, file_read, file_write, file_edit, grep
registry.register(weatherTool) // add your custom tool
const executor = new ToolExecutor(registry)
const agent = new Agent(
{
name: 'weather-agent',
model: 'claude-sonnet-4-6',
tools: ['get_weather', 'file_write'],
},
registry,
executor,
)
const result = await agent.run('Get the weather for Tokyo and save a report to /tmp/weather.txt')
```
## Streaming Output
```typescript
import { Agent, ToolRegistry, ToolExecutor, registerBuiltInTools } from '@jackchen_me/open-multi-agent'
const registry = new ToolRegistry()
registerBuiltInTools(registry)
const executor = new ToolExecutor(registry)
const agent = new Agent(
{ name: 'writer', model: 'claude-sonnet-4-6', maxTurns: 3 },
registry,
executor,
)
for await (const event of agent.stream('Explain dependency injection in two paragraphs.')) {
if (event.type === 'text' && typeof event.data === 'string') {
process.stdout.write(event.data)
}
}
```
## Progress Monitoring
```typescript
const orchestrator = new OpenMultiAgent({
defaultModel: 'claude-sonnet-4-6',
onProgress: (event) => {
switch (event.type) {
case 'task:start':
console.log(`▶ Task started: ${event.task}`)
break
case 'task:complete':
console.log(`✓ Task done: ${event.task}`)
break
case 'task:failed':
console.error(`✗ Task failed: ${event.task}`)
break
case 'agent:thinking':
console.log(` [${event.agent}] thinking...`)
break
case 'agent:tool_use':
console.log(` [${event.agent}] using tool: ${event.tool}`)
break
}
},
})
```
## Built-in Tools Reference
| Tool | Key Options | Notes |
|------|-------------|-------|
| `bash` | `command`, `timeout`, `cwd` | Returns stdout + stderr |
| `file_read` | `path`, `offset`, `limit` | Use offset/limit for large files |
| `file_write` | `path`, `content` | Auto-creates parent directories |
| `file_edit` | `path`, `old_string`, `new_string` | Exact string match replacement |
| `grep` | `pattern`, `path`, `flags` | Uses ripgrep if available, falls back to Node.js |
## AgentConfig Options
```typescript
interface AgentConfig {
name: string // unique within a team
model: string // e.g. 'claude-sonnRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.