Mental model
- Register planner identity.
- Create a goal tree.
- Record actions and reasoning cycles.
- Save checkpoints before major transitions.
- Retrieve the goal tree and action history when you need to replay or diagnose the run.
Minimal implementation example
- Python
- Node / TS
stateful_task_tree.py
Failure modes and troubleshooting
| Symptom | Root cause | Fix |
|---|---|---|
| Planner decisions are hard to replay | Actions and cycles were not stored | Record both action logs and cycle history |
| Goal hierarchy becomes flat and noisy | Parent-child goals were not used | Build explicit goal trees and read them through goals/tree |
| Compaction loses planner intent | No checkpoint before the transition | Save checkpoints at major decision boundaries |
Next steps
- Add event handling at Building event-driven agents.
- Review the explicit state surface at State management endpoints.