Decision model
| Event lane | Surface | Use when |
|---|---|---|
| Run-scoped control events | GET /v2/control/events/subscribe | One workflow should react to ingest, reflection, handoff, feedback, checkpoint, or outcome events |
| Memory read/write loop | remember, recall, getContext, checkpoint | Most application behavior |
Minimal implementation example
- Python
- Node / TS
event_driven_agents.py
Failure modes and troubleshooting
| Symptom | Root cause | Fix |
|---|---|---|
| Workers still poll constantly | Event stream is not wired to the orchestration loop | Move wakeup logic to the control stream |
| Event stream is noisy | Too many memory writes without filtering in the worker | Filter by event type in the consumer |
| Recovery is hard after compaction | Events fire but context is not rebuilt | Re-read with getContext() after the wakeup |
Next steps
- Add planner state at Stateful task trees.
- Add branch-safe experimentation at Branching memory.