What are planning and reflection in agents, and when do they help?
Agents and tools · Intermediate 3
Short answer
Planning means the agent breaks a goal into steps before acting, then follows or revises the plan. Reflection means it reviews its own output or progress, such as checking a draft against criteria or noticing a failed step, and tries again. Both help on multi-step tasks with clear checks, but they add calls, cost and latency, so measure the gain.
Deeper answer
ReAct interleaves reasoning and actions; plan-and-execute writes a plan first; reflection patterns add a critique step, sometimes with a separate grader model. Modern reasoning models do much of this internally, so explicit loops matter most when you can check against something external, such as running tests or validating a schema.
Cap the number of reflection rounds, because models can talk themselves into worse answers or loop.
What a strong answer covers
- Planning breaks a goal into steps
- Reflection reviews and retries
- Works best with an external check
- Costs extra calls and latency
- Cap the rounds; measure the gain
Answer it out loud in the mock interview about 1.5 min
Follow-ups to expect
- Why does reflection work better with an external check?
- How would you stop endless revision?
Common mistakes
- Adding reflection without measuring
- Unlimited revise loops
Learn it
- What are common failure modes of agents, and how do you guard against them?
- What kinds of memory can an agent have, and how do you implement them?
- Your agent ran overnight and ran up a large API bill. What probably happened, and what do you change?
- How would you design a harness for an agent that has to work on one task for several hours?
- What is the difference between an agent and a workflow?
- What are computer-use or browser agents good for, and what are their risks?
- What is context engineering, and why does it matter for agents?
- An agent completes a task correctly most of the time but sometimes goes badly wrong. How do you debug it?
- What makes a good tool for an agent?
- Design an agent that handles refund requests for an online store.
- You changed your agent's harness. How do you prove the change made it better?
- What are verification gates in an agent harness, and how would you add them to a coding agent?
- How does tool calling work?
- When should an AI agent ask a human for approval before acting?
- Explain state, nodes, edges and checkpoints in LangGraph.
- Two coding agents use the same model, but one solves far more of your tasks. Why could that be, and how would you find out?
- What is an agent harness, and what is harness engineering?
- What is the Model Context Protocol, and why does it matter?
- When is a multi-agent system worth it, and what are the risks?