Mozaik Shifts to Reactive Agent Architecture with Typed Event Handlers
Key Takeaways
- ▸Reactive agents replace non-blocking as the primary framing, enabling agents to declare dependencies on specific event types
- ▸Typed event handlers reduce boilerplate by allowing agents to override only the handlers they care about, with sensible no-op defaults
- ▸The new API is smaller and more declarative, reducing the dispatch logic developers must write in each agent
Summary
Mozaik has introduced a major conceptual and API redesign around reactive agents—collaborative agents that adapt to their environment and each other in real time. The framework previously emphasized non-blocking architecture, but now frames agent behavior around responding to typed events, eliminating the need for centralized controllers. This shift simplifies the developer experience by replacing a single interception point with dedicated event handlers for different context items (messages, function calls, tool outputs, reasoning traces), allowing agents to declare which events they care about rather than implementing complex dispatch logic. The new API results in cleaner, more declarative code where agents read as straightforward "when this happens, I do that" patterns rather than complex switch statements. Along with these architectural improvements, Mozaik now supports agent swarms—multi-agent systems that coordinate through shared event-driven environments.
- Agent swarms emerge naturally from the event-driven architecture, enabling multi-agent collaboration without centralized coordination


