Plan Before You Build: Deterministic Planning Patterns for AI Agents
Dan Dobrin - Google
In the age of Agentic AI, we tend to dive straight into implementation. Connect an LLM, add some tools and resources, then let it “figure it out.” The result? Agents that loop endlessly or burn through API budgets before delivering value.
Task implementation is the easy part. Planning how to execute tasks is where agents succeed or fail.
What separates deterministic planning from probabilistic guesswork? When your agent makes many decisions, how does the developer maintain control of agent behaviour?
This session covers a spectrum of five planning patterns:
- Workflows: Deterministic DAGs where compliance is non-negotiable
- HTN (Hierarchical Task Networks): Top-down decomposition using domain “recipes” to prune search space
- GOAP(Goal-Oriented Action Planning): A* graph search when you have the goal but not the path
- Utility AI: Scoring-based exploration without a predetermined goal
- Supervisor: LLM-orchestrated delegation when rules permit non-deterministic action invocation
Production systems rarely use a single pattern. The most robust architectures are all hybrid: Supervisors delegate to HTN for known procedures, falling back to GOAP for discovery. Workflows orchestrate Supervisors for control with bounded flexibility.
The plan is your source of truth. As developers on a project, you are the subject matter experts — your impact is shaping the plan that governs tool usage, not wiring tools to models.
Live demos with Java 25 and Spring AI show each pattern. Write actions once; combine planners for compliance, procedures, goal-seeking, exploration, or flexibility.
Takeaways:
- Master planning patterns, learn why and when to employ them
- Design hybrid deterministic and exploratory architectures
- Build plans as source of truth guiding agent behaviour
- Leverage Java 25 and Spring AI for type-safe development
Stop building agents that improvise. Build agents that plan.
