Mozaik

Introduction

Mozaik is a TypeScript framework for building reactive agents that collaborate in an event-driven agentic environment.

Humans, agents, observers, and tools are all Participants of the same AgenticEnvironment. Each participant emits events — plain-text messages, typed ContextItems for model internals (function calls, outputs, reasoning, model messages), and SemanticEvent<T> stream chunks when inference is streaming — and every other participant sees those events as they arrive and decides whether to react, intercept, or stay silent. No central scheduler.

Get started

Why Mozaik

  • Reactive agents — Agents react to events in the environment instead of following a hard-coded pipeline. Drop in a new participant and behavior emerges from how it reacts to what others emit.
  • Event-driven agentic environmentAgenticEnvironment is a broadcast bus. Participants join() and listen for the specific events they care about: onMessage, onFunctionCall, onReasoning, onModelMessage, and their onExternal* counterparts.
  • Collaborative by default — Multiple agents share one environment and adapt to each other in real time. Add a critic, a planner, or an observer without rewiring the existing ones.
  • Reaction over orchestration — Every handler defaults to a no-op. Override only the ones you care about. Compose behaviors by joining participants, not by editing a central controller.
  • Non-blocking under the hood — Capability methods stream items as they are produced, so a slow inference or tool call never holds up other participants.
  • OpenResponses-aligned typesContextItem mirrors the OpenResponses vocabulary, so your domain types stay stable across providers.

Explore the framework

Advanced

Resources

License

Mozaik is released under the MIT License by the JigJoy team.

On this page