What makes something an “agent”
The word gets stretched to cover everything from a chatbot with a search button to fully autonomous software engineers. A useful, practical test: does the model decide which action to take next, based on what happened in the previous step? If yes, it’s agentic. If a developer scripted every step in advance, it’s a workflow — which is often the better choice.
Agency is a spectrum. At one end, an LLM picks one tool per request (a router). At the other, it plans a multi-hour task, spawns helpers and recovers from its own errors. Most valuable business agents sit in the middle: a few well-defined tools, a clear goal and a human in the loop for consequential actions.
The 4 building blocks of an AI agent
Model (the brain)
An LLM that reasons about the goal, chooses tools and writes the final result.
Tools
Functions it can call: web search, code execution, SQL, email, CRM, file systems.
Memory
Short-term (the conversation and tool results) and long-term (stored notes, RAG over past work).
Loop + guardrails
The runtime that executes calls, feeds results back, enforces limits and stops.
Tool calling is the key enabler. You describe each tool to the model with a name, a plain-language description and a JSON schema for its inputs. The model replies with a structured request like {"tool": "get_order", "args": {"order_id": "A-1042"}}; your code runs it and returns the result. The model never executes anything directly — your application stays in control.
Interactive: watch an agent loop
AI agents vs workflows vs chatbots
| Chatbot | Workflow (LLM in fixed steps) | AI agent | |
|---|---|---|---|
| Who decides the steps | N/A — one reply | The developer | The model, at runtime |
| Uses tools | Rarely | Yes, in a set order | Yes, chosen dynamically |
| Predictability | High | High | Lower — needs evals and limits |
| Cost / latency | Low | Medium | Higher — many model calls |
| Best for | Q&A, drafting | Known processes: extract → validate → file | Open-ended tasks: research, debugging, investigations |
Rule of thumb: if you can draw the flowchart, build a workflow. Reach for an agent only when the path genuinely depends on what the model discovers along the way.
Real AI agent examples
- Coding agents that read a repository, edit files, run tests and iterate until they pass.
- Research agents that search the web or internal docs, read sources and compile a cited report.
- Customer-support agents that look up orders, check policy via RAG and issue refunds up to a limit, escalating the rest.
- Data analysis agents that write and run SQL or Python to answer business questions — like the trace above.
- Browser and computer-use agents that operate web apps through clicks and typing when no API exists.
Multi-agent systems
Instead of one agent doing everything, a multi-agent system splits work across specialised agents — for example an orchestrator that plans and delegates to a researcher, a coder and a reviewer. Benefits: focused prompts and tools per role, parallel work, and independent review. Costs: more tokens, more coordination failure modes and harder debugging. Start with one agent and split only when a single context becomes overloaded.
Agent frameworks and protocols
You can build an agent loop in a few dozen lines against any model API that supports tool calling. Frameworks add orchestration, state, retries and tracing — popular options include LangGraph, CrewAI, Microsoft AutoGen and the agent SDKs that model providers publish. Two protocols are worth knowing:
- MCP (Model Context Protocol) — a standard way to expose tools and data to any compatible AI application.
- A2A (Agent2Agent) — a protocol for agents built by different vendors to communicate and delegate tasks.
Risks and guardrails
| Risk | Guardrail |
|---|---|
| Agent takes a harmful or irreversible action | Least-privilege tools; human approval for writes, payments, emails, deletions |
| Prompt injection from web pages, emails or documents | Treat tool output as untrusted data; never let content grant new permissions |
| Infinite loops and runaway cost | Max steps, token and time budgets, loop detection |
| Confident wrong conclusions | Require evidence/citations, verification steps, evals on real tasks |
| No audit trail | Log every thought, tool call, input and output |
Ready to build one? The AI Agent Developer path takes you from your first tool call to a guarded multi-step agent.
Discussion