StudyVisuallyStart studying
AI developers · Part 04

Agents

The agent loop: think, call a tool, observe, repeat until the goal is met.

Last updated

  1. AgentAn LLM running in a loop with tools. It decides which tool to call, looks at the result, and decides again until the goal is done.
  2. The agent loopCall the model with tools. If it asks for tools, run them, append the results and call again. If it answers in text, stop.
  3. Stop conditionsThe loop ends in one of two ways: the model answers without asking for a tool, or you hit a maximum number of steps.
  4. Agent vs workflowA workflow runs steps you fixed in advance. An agent lets the model choose the next step at runtime.
  5. Use the simplest thing that worksIf you can draw the steps as a fixed flowchart, build a workflow. Reach for an agent only when the steps depend on what it finds.
  6. The model plans the stepsAsk "which PRs are blocked?" and the agent lists open PRs, notices two are old, and fetches their reviews. You never wrote that sequence.
  7. ReActReason + Act: think, call a tool, observe the result, repeat. The basic agent loop is ReAct.
  8. RouterA first step classifies the request and sends it to the right specialist prompt or agent.
  9. Plan-and-executeThe model writes a plan first, then works through each step of it.
  10. Multi-agentSeveral specialist agents (code agent, tickets agent) coordinated by a supervisor.
  11. Human-in-the-loopThe agent pauses before a risky action and waits for a person to approve it.