Architecture ยท 11.04
The EventBus: What's Happening Now
The realtime publish bridge for workspace, run, and workflow rooms, and why subscribe-before-read is the rule.
The complement to the ledger, not a duplicate of it
Where the ledger is the durable record of what already happened, the EventBus is the live bridge for what's happening right now โ publishing into workspace, run, and workflow rooms after JWT validation, so a connected client hears about a state change the moment it occurs rather than discovering it on the next poll.
The standing rule across every subsystem that uses it: subscribe to a room before reading current state, never after. Reading state first and subscribing second leaves a real window where an event can fire in between โ and get missed entirely. The event-driven agentis.run.await is built directly on this discipline: it joins the run's room first, then checks whether the run has already settled, so a run that finishes in the split second between the check and the subscribe still can't be missed.
Continue
How Agentis keeps active work fast while preserving completed run state, ledger events, and observability traces in compressed archives.
How recoverInterruptedRuns rehydrates mid-flight work at boot, and why snapshots are content-hashed for safe, cheap resume.