SLIDE 13: Section Intro, Agent Architecture and Execution Patterns

Section 3: Agent Architecture and Execution Patterns

Before building individual components like tools, RAG pipelines, or memory systems, you need to see the full picture of how agents are structured and how they execute. This section covers the major architectural patterns for agent execution. Each pattern makes different trade-offs between control, flexibility, and reliability. In interviews, you will be tested on whether you can choose the right pattern for a given problem, and more importantly, justify why.

What We’ll Cover:

  1. Deterministic workflows vs autonomous agents
  2. The ReAct pattern (Reasoning + Acting)
  3. Chain-of-thought as a reasoning technique
  4. Prompt chaining and sequential workflows
  5. Router and dispatcher pattern
  6. Reflection and self-correction
  7. Choosing the right pattern for the right problem

Where This Fits in the Customer Support Agent:

The customer support agent we are building needs an execution pattern. Should the agent follow a fixed sequence of steps for every customer message? Should it decide on its own what to do next? Should different types of messages go to different handlers? The patterns in this section answer these questions. By the end, you will know which pattern fits our support agent and why.


SLIDE 14: Deterministic Workflows vs Autonomous Agents

Two Ends of a Spectrum

Every agent system sits somewhere on a spectrum between fully deterministic and fully autonomous. Understanding where your system should sit is one of the most important architectural decisions you will make.

Deterministic Workflow

The developer defines every step in advance. The LLM executes each step, but it does not decide what to do next. Step 1 always leads to Step 2, which always leads to Step 3. The sequence is fixed at development time.