Mozaik is a TypeScript framework for building autonomous teams of AI agents that are aware of each other, communicate through tools, and coordinate work in parallel.
Replace predefined agent workflows with autonomous teams that collaborate, adapt, and work together.
Give agents awareness of each other and the shared environment so they can react to what others are doing.
const agent = new Agent({// know exactly who is in the roomonParticipantJoin(peer) {greet(peer)},// react the moment a teammate leavesonParticipantLeft(peer) {reassign(peer.openTasks)},})
Let agents decide when to communicate, who to involve, and what context to share.
Enable multiple agents to work at the same time while staying coordinated through shared context.
Let collaboration paths emerge at runtime instead of predicting every handoff upfront.
Mozaik is built on a reactive, event-driven core: every message, tool call, reasoning step, and error is just an event on the bus. Agents subscribe to the events they care about and react in real time.
Run inference and move on — no waiting, no blocking. Results come back as events, and your agent reacts to the ones it cares about while everything else keeps running.
const agent = new Agent({// the model wants to call a toolasync onFunctionCall(call) {const result = await runTool(call.name, call.args)// fire the result back as an event — no blockingagent.send({type: "functionCallOutput",callId: call.id,result,})},})
Agents capture every event — including system errors. With onError and onParticipantError, a participant catches failures and resolves them in real time, retrying intelligently instead of crashing the run.
const agent = new Agent({// a tool threw or a participant crashedasync onError(error, ctx) {if (ctx.attempt < 3) {// back off and retry — the run keeps goingawait wait(backoff(ctx.attempt))return ctx.retry()}// escalate to a teammate instead of crashingagent.send({type: "message",to: "supervisor",text: `failed: ${error.message}`,})},})
Mozaik provides the missing collaboration layer for multi-agent systems. It gives autonomous agents the infrastructure to communicate, coordinate, and work together as a real team.
Mozaik powers products that turn agent collaboration into shipped software.
baro is a Claude agent orchestrator. Ten specialized participants work fully concurrently on the same goal over a single Mozaik bus.
Install Mozaik, join the environment, start streaming context items.