EMZETT.
Login

Agent design patterns

In short: Proven patterns exist for AI agents: ReAct (think, act, observe), plan and execute, reflection (checking own work), routing and several agents with roles.

In more detail: Usually the simplest solution is best: a single model call with good instructions, then fixed workflows, and only if necessary free agent loops.

In detail

  • Prompt chain: fixed steps, the output becomes the input of the next (outline → draft → check).
  • Routing: a model sorts the request into the matching branch (invoice question → invoice agent).
  • Parallelisation: subtasks at once or the same task several times with voting.
  • ReAct: thought → action (tool) → observation → next thought.
  • Planner and executor: one model breaks down into steps, others carry them out.
  • Reflection/critic: a second call rates the result and requests improvement.
  • Orchestrator with helpers: a main agent hands out subtasks to sub-agents with their own context.
  • Memory: short-term (context), long-term (notes, vector database), see Vector databases and similarity search.
  • Safety: limit permissions, step limits, human confirms risky actions, see Prompt injection.
  • Testing: with scenario tests (“evals”), see AI evaluation: tests, benchmarks and LLM-as-judge.

See also: Tool use, agents and MCP, Reasoning models and chain of thought