Event-driven agent architectures replace the monolithic request/response loop with durable events: a trigger enters a queue, a worker consumes it, and every state transition is recorded as a fact that survives crashes.
The in-process agent loop has a brutal failure mode in production: the process dies at step 14 of 30 and everything — context, progress, spent tokens — evaporates. Event-driven designs fix this by making each step a message on durable infrastructure. An ObjectiveSubmitted event spawns a run; each completed action emits ActionCompleted; subscribers react. Kafka, SQS, or even a Postgres table used as a queue all work — the transport matters far less than the durability guarantee.
This is event sourcing applied to cognition. The append-only event log is the agent's history: replay it to reconstruct state after a crash, to debug a bad decision step-by-step, or to fork a run at any past point and try a different strategy. Temporal and Restate have productized exactly this for code workflows, and agent frameworks are converging on the same shape.
Why the Pattern Wins
- Durability: a crashed worker's event is unacknowledged, so another consumer picks it up — the run outlives any single process.
- Backpressure: queues absorb burst load; consumers drain at a sustainable rate instead of melting the model API.
- Auditability: compliance stops being a feature you add and becomes a property you get — the log is already there.
- Loose coupling: a new capability (say, a post-run cost analyzer) subscribes to existing events without touching the agent.
The costs are real: eventual consistency complicates UIs, idempotency keys become mandatory under at-least-once delivery, and tracing a request across queues demands correlation IDs from step one. Teams adopting this pattern late — after their first unrecoverable 40-step run — almost always say the same thing: it should have been event-driven from the start.