Tutorials AI & LLM Engineering for .NET Architects
Planner & Orchestration: Automating complex multi-step AI tasks
On this page
AI Planning & Autonomy
What if you ask the AI to "Send a summary of my last 5 emails to my boss"? This requires multiple steps. A Planner is an AI model that looks at your prompt, looks at your available plugins, and writes its own "To-Do" list.
1. Function Calling Stepwise Planner
This is the most modern planner in SK. It acts like a loop:
- Thought: "I need to fetch the emails first." (Call Plugin A)
- Observation: "Got 5 emails."
- Thought: "Now I need to summarize them." (Call Plugin B)
- Thought: "Now I need the boss's email address." (Call Plugin C)
- Final Action: "Send email."
2. The Risk of Self-Orchestration
Planners are powerful but dangerous. They can get stuck in infinite loops or hallucinate function calls. As an architect, you must set **MaxIterations** and provide a very limited, secure set of tools to the planner.
4. Interview Mastery
Q: "What is the difference between a 'Static' and 'Dynamic' Planner?"
Architect Answer: "A **Static Planner** (like the old Sequential Planner) creates the whole plan upfront and then executes it. It's fast but brittle—if one step fails, the whole plan is ruined. A **Dynamic Planner** (like Stepwise) decides the next step ONLY after seeing the result of the previous one. It is much smarter and more resilient to errors, but it uses more tokens and takes longer to finish."