stophardcodingagentcollaboration

Mozaik is an open-source agentic runtime built in TypeScript, where AI agents communicate, coordinate, and act autonomously.

agent-01architectagent-02coderagent-03idleagent-04testeryou describea featurein plain EnglishPull Request3 / 4 agents active

from workflows to autonomous collaboration

You don’t need to define workflows or handoffs in advance. Agents communicate and coordinate as collaboration emerges at runtime.

Agent awareness

Give agents awareness of each other and the shared environment so they can react to what others are doing.

agent.ts
const agent = new Agent({
// know exactly who is in the room
onParticipantJoin(peer) {
greet(peer)
},
// react the moment a teammate leaves
onParticipantLeft(peer) {
reassign(peer.openTasks)
},
})

Intelligent communication

Let agents decide when to communicate, who to involve, and what context to share.

route message2 picked
Researcher+ context
Writerskip
Critic+ context
Auditorskip

Parallel by default

Enable multiple agents to work at the same time while staying coordinated through shared context.

agent.searchrunning
agent.draftrunning
agent.reviewrunning
agent.shiprunning

Adaptive runtime coordination

Let collaboration paths emerge at runtime instead of predicting every handoff upfront.

task

event-driven AI agents

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 the moment they fire.

fire and forget

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.

agent.ts
const agent = new Agent({
// the model wants to call a tool
async onFunctionCall(call) {
const result = await runTool(call.name, call.args)
// fire the result back as an event no blocking
agent.send({
type: "functionCallOutput",
callId: call.id,
result,
})
},
})

intelligent recovery

Agents capture every event — including system errors. With onError and onParticipantError, a participant catches failures and resolves them at runtime, retrying intelligently instead of crashing the run.

agent.ts
const agent = new Agent({
// a tool threw or a participant crashed
async onError(error, ctx) {
if (ctx.attempt < 3) {
// back off and retry the run keeps going
await wait(backoff(ctx.attempt))
return ctx.retry()
}
// escalate to a teammate instead of crashing
agent.send({
type: "message",
to: "supervisor",
text: `failed: ${error.message}`,
})
},
})

collaboration layer for agents

Mozaik is the runtime layer multi-agent systems are missing — the infrastructure autonomous agents need to communicate, coordinate, and work together as a real team.

built on mozaik

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.

your agent team, coordinating at runtime

Read the docs and start building agents that don’t wait on each other.

Newsletter

For developers who want to learn how to build self-organizing agents.

Mozaik is live on Product Hunt

Check it out