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

Agent trace

Goal: “Why did our EU revenue drop last week? Post a summary to #finance.”

A data agent with three tools: run_sql, search_docs and post_message (requires approval).

Illustrative trace with invented figures. Notice the agent chose every query based on the previous result — that’s what makes it an agent.

AI agents vs workflows vs chatbots

ChatbotWorkflow (LLM in fixed steps)AI agent
Who decides the stepsN/A — one replyThe developerThe model, at runtime
Uses toolsRarelyYes, in a set orderYes, chosen dynamically
PredictabilityHighHighLower — needs evals and limits
Cost / latencyLowMediumHigher — many model calls
Best forQ&A, draftingKnown processes: extract → validate → fileOpen-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

RiskGuardrail
Agent takes a harmful or irreversible actionLeast-privilege tools; human approval for writes, payments, emails, deletions
Prompt injection from web pages, emails or documentsTreat tool output as untrusted data; never let content grant new permissions
Infinite loops and runaway costMax steps, token and time budgets, loop detection
Confident wrong conclusionsRequire evidence/citations, verification steps, evals on real tasks
No audit trailLog every thought, tool call, input and output
Quick quiz

Agent or not?

Ready to build one? The AI Agent Developer path takes you from your first tool call to a guarded multi-step agent.