Agents and tools extend chains from fixed workflows to adaptive execution. A chain follows predefined steps; an agent decides what to do next at runtime.
Concept split:
- Agent = decision policy (reason about next action).
- Tool = bounded capability (API call, calculator, search, DB lookup).
Core loop: reason -> select tool -> execute -> observe -> decide whether to continue.
Why this is useful: real tasks often require dynamic action choice. A static chain cannot always decide upfront which external operation is needed.
Safety requirements before production:
- Strict tool schemas and clear descriptions.
- Timeouts, retries, and failure fallbacks.
- Permission-scoped actions for write operations.
- Trace logging for each decision/action step.
Interview-Ready Deepening
Source-backed reinforcement: these points add detail beyond short-duration UI hints and emphasize production tradeoffs.
- Agents and tools extend chains from fixed workflows to adaptive execution.
- More agent autonomy increases adaptability but also increases non-determinism and debugging effort.
- Tool-heavy loops improve grounding, but latency and failure surfaces rise with each external dependency.
- Safety requirements before production: Strict tool schemas and clear descriptions.
- Agent = decision policy (reason about next action).
- Tool = bounded capability (API call, calculator, search, DB lookup).
- A chain follows predefined steps; an agent decides what to do next at runtime.
- Concept split: Agent = decision policy (reason about next action).
Tradeoffs You Should Be Able to Explain
- More agent autonomy increases adaptability but also increases non-determinism and debugging effort.
- Tool-heavy loops improve grounding, but latency and failure surfaces rise with each external dependency.
- Fine-grained state graphs improve control, but poor state contracts can create brittle routing behavior.
First-time learner note: Build deterministic baseline chains first (prompt -> model -> parser), then add retrieval, memory, or tools only when the baseline is stable.
Production note: Keep contracts explicit at each boundary: input variables, output schema, retries, and logs. This is what keeps orchestration reliable at scale.
The introduction reframes agents in simple terms: an agent is a decision-maker, and a tool is a bounded capability the agent can choose when it needs help. Chains and RAG pipelines follow predefined paths. Agents go a step further because they decide at runtime which action to take, and whether another step is still needed after observing the result.
The ReAct pattern is the heart of this lesson. Think, act, observe, repeat. The transcript's weather-plus-math example is useful because it shows why agents feel more flexible than chains. The model first realizes it needs weather information, then it uses a weather tool, then it reasons again and uses a calculator. That is not one fixed pipeline; it is runtime control flow guided by intermediate observations.
Production note: the power of agents comes from tool choice, but their reliability also depends on tool descriptions, schema quality, iteration limits, and guardrails. Without those controls, an agent is just a loop with too much freedom.