Quick Start
Requires Node.js >= 18.
The fastest way to see a multi-agent run — scaffold a project and start it in one command:
npm create oma-app@latestThe first run shows the coordinator decompose one goal into a multi-agent DAG, then opens a dashboard of the run. To add the library to an existing project instead:
npm install @open-multi-agent/coreMigrating from @jackchen_me/open-multi-agent? That package is deprecated; install @open-multi-agent/core instead.
import { OpenMultiAgent, type AgentConfig } from '@open-multi-agent/core'
// Works with any OpenAI-compatible provider. Set OPENAI_API_KEY for OpenAI, or// set OPENAI_BASE_URL + OMA_MODEL for Groq, DeepSeek, Ollama, etc.const model = process.env.OMA_MODEL ?? 'gpt-5.4'
// Built-in tools are opt-in (default-deny): each agent gets only the tools it// lists in `tools` (or a `toolPreset`). List neither and the agent gets none.const agents: AgentConfig[] = [ { name: 'architect', model, systemPrompt: 'Design clean API contracts.', tools: ['file_write'] }, { name: 'developer', model, systemPrompt: 'Implement runnable TypeScript.', tools: ['bash', 'file_read', 'file_write', 'file_edit'] }, { name: 'reviewer', model, systemPrompt: 'Review correctness and security.', tools: ['file_read', 'grep'] },]
const orchestrator = new OpenMultiAgent({ defaultProvider: 'openai', defaultModel: model, defaultBaseURL: process.env.OPENAI_BASE_URL, // unset = OpenAI onProgress: (event) => console.log(event.type, event.task ?? event.agent ?? ''),})
const team = orchestrator.createTeam('api-team', { name: 'api-team', agents, sharedMemory: true })
// Built-in filesystem tools default to a `<cwd>/.agent-workspace` sandbox.const result = await orchestrator.runTeam( team, `Create a REST API for a todo list in ${process.cwd()}/.agent-workspace/todo-api/`,)
console.log(result.success, result.totalTokenUsage.output_tokens)Run an example locally
Section titled “Run an example locally”git clone https://github.com/open-multi-agent/open-multi-agent && cd open-multi-agentnpm installexport OPENAI_API_KEY=sk-...npx tsx packages/core/examples/basics/team-collaboration.tsThree agents collaborate on a REST API while onProgress streams the coordinator’s task DAG:
agent_start coordinatortask_start design-apitask_complete design-apitask_start implement-handlerstask_start scaffold-tests // independent tasks run in paralleltask_complete scaffold-teststask_complete implement-handlerstask_start review-code // unblocked after implementationtask_complete review-codeagent_complete coordinator // synthesizes final resultSuccess: trueTokens: 12847 output tokensLocal models via Ollama need no API key. For hosted providers (OPENAI_API_KEY, GEMINI_API_KEY, etc.) and local tool-calling, see Providers.
Next: Three Ways to Run covers single agents, auto-orchestrated teams, and explicit pipelines.