What agentic AI means
An agent is an LLM that can act, not just answer. Here's what that actually involves — and how it changes the engineering.
What you'll learn
- ✓ The minimum-viable definition of "agent"
- ✓ The four common agentic patterns (reflection, tool use, planning, multi-agent)
- ✓ When you need an agent vs. a single LLM call
An LLM by itself only produces text. An agent is an LLM that can do something with that text — call a function, look something up, write a file, ask a human, call another agent — and then continue the conversation with the result.
The simplest agent loop is:
1. LLM receives a prompt.
2. LLM responds with EITHER a final answer OR a tool call.
3. If it's a tool call → run the tool → feed the result back to step 1.
4. Repeat until the LLM produces a final answer.
That’s the whole structural change. Everything else — frameworks, patterns, observability — is just managing this loop well.
The four patterns
Most agent designs combine one or more of these:
1. Reflection
The agent looks at its own output and critiques it before producing a final answer. Often: “Generate a draft → Generate critique → Generate revision.” Adds latency and cost; can dramatically improve quality on complex tasks.
2. Tool use
The agent has access to functions (search, code execution, database queries, APIs). It decides which to call. This is where most production value comes from — most LLM weakness (math, freshness, accuracy) is fixed by giving them the right tool.
3. Planning
The agent breaks a complex task into subtasks before executing. “Plan → Execute step 1 → Execute step 2 → …”. Useful when the task is long, but adds failure modes (the plan can be wrong).
4. Multi-agent
Several specialized agents collaborate, each with its own role and tools. A “researcher” agent gathers info, a “writer” agent drafts, a “critic” agent reviews. Powerful but operationally complex.
When do you actually need an agent?
You don’t need an agent when:
- A single LLM call answers the question.
- The task is purely transformation (summarize, translate, classify).
- You can do it with a rules-based pipeline plus one LLM step.
You do need an agent when:
- The model needs current information (search, database).
- The model needs to compute something exactly (calculator, code).
- The model needs to act in the world (send email, update record).
- The task requires multiple decisions where each depends on the previous result.
The first two are tool use with a single LLM-tool-LLM cycle. The last two need a multi-step loop.
The frameworks you’ll see
There are four major frameworks covered in this section:
| Framework | From | Strength |
|---|---|---|
| LangChain | LangChain | Easiest entry point, huge ecosystem |
| LangGraph | LangChain | Explicit state machines — ideal for complex flows |
| MS Agent Framework (MAF) | Microsoft | Azure-first, replaces AutoGen and Semantic Kernel |
| Google ADK | Gemini-first, deploys onto Google Cloud easily |
They all do roughly the same things; the choice usually comes down to which cloud you’re on and whether your team prefers declarative or imperative code.
What’s hard about agents
The honest answer: evaluating them. A single LLM call has one input and one output — easy to test. An agent has a loop, side effects, and non-deterministic intermediate states. Building good evals for agents is a discipline of its own (covered in the Evals lesson).
You’ll also fight:
- Latency: 3–10 LLM calls per agent run is normal.
- Cost: same — multiply by the number of users.
- Reliability: tools fail, models hallucinate tool calls, JSON parsing breaks.
These are all solvable, but they’re real engineering work. Mostly you’ll notice that an agent is mostly plumbing — the LLM is a small part.
Next
The next lessons go through the design patterns above in detail, then into each framework, starting with LangChain.
Finished the lesson?
Mark it complete to track your progress and keep your streak alive. +20 XP