# Planner-Executor-Observer

> Add an explicit Observer role between Planner and Executor so progress is checked against the plan instead of trusted blindly.

- **Category**: Agentic AI
- **Subcategory**: Planning & Control Flow
- **Canonical URL**: https://designpattern.fyi/patterns/planner_executor_observer/

---

## Description
**Intent**: Add an explicit Observer role between Planner and Executor so progress is checked against the plan instead of trusted blindly.
**Context**: A team runs a Plan-and-Execute agent. The executor's work needs to be checked against the original intent — does the cumulative output still match what the planner asked for, or has the executor wandered onto an adjacent topic? The team is willing to spend a small amount of supervision overhead to catch drift early.
**Solution**: - Three roles: Planner produces a plan; Executor runs steps; Observer reads the cumulative result and decides: loop (continue), respond (done), or replan (start over with new evidence). - Each role has its own prompt and optionally its own model.


## Use Cases
- Plan quality must be checked against execution evidence rather than trusted blindly.
- Three roles (planner, executor, observer) can be defined with their own prompts.
- Observer signals (loop, respond, replan) drive the agent's next move.





## Trade-offs


### Advantages

- Catches plan failure earlier than end-of-run, saving wasted tokens.

- Cleaner separation of concerns than ReAct''s monolithic step.




### Considerations & Drawbacks

- Three coordinated prompts to maintain and keep aligned.

- Latency adds up if Observer runs after every single step.







---
**Reference**: [Original Source](https://www.agentpatternscatalog.org/patterns/planner-executor-observer/)

