Anatomy of an AI agent: the five building blocks
An AI agent is more than an LLM. A useful agent is built from five blocks that work together: the LLM thinks, RAG brings in your knowledge, MCP connects it to your tools, skills store repeatable know-how, and the agent loop turns all of it into action.
Everyday analogy
A new employee. Their brain is the LLM, the company handbook they look things up in is RAG, their phone and laptop logins are MCP, the routines they have practised are skills, and actually getting the job done is the agent.
Example
Ask an agent to "prepare a summary of last week's customer complaints". The LLM understands the request, a skill tells it your preferred report format, MCP connects it to the ticketing system, RAG pulls the relevant policy text, and the agent loop collects, groups and writes the summary.
| Block | Think of it as | What it does |
|---|---|---|
| LLM | The brain | Reads, writes and reasons. Clever, but knows nothing about your business on its own. |
| RAG | The library | Looks up your documents before answering, so answers come from your data instead of guesses. |
| MCP | The nervous system | One standard plug that carries signals between the brain and your apps, files and databases. |
| Skills | Muscle memory | Know-how written down once and reused every time, so you never re-explain the task. |
| AI agent | Brain + hands | Plans the steps, then carries them out using the tools it is connected to. |
MCP vs RAG vs AI agent
These three are often mixed up because they work together. They solve different problems.
| MCP | RAG | AI agent | |
|---|---|---|---|
| Main job | Connect the AI to tools and data in a standard way | Find the right context so the answer is accurate | Reach a goal by reasoning and using tools |
| How it works | An app (host) talks to MCP servers, each wrapping a tool such as GitHub, a database or files | Search a knowledge base, pick the best chunks, add them to the prompt | Plan → act → observe the result → adjust, in a loop until done |
| Is it a product? | No, a protocol (a set of rules) | No, a technique | Yes, a system you build or use |
| Everyday picture | A universal power socket | An open-book exam | An assistant who does the errand for you |
Remember: MCP is how an agent reaches things, RAG is how it knows things, and the agent is what does things.
Try it yourself
About 10 minDraw your agent's body
- Pick an agent idea, e.g. a travel booking helper.
- Fill in the five blocks: which LLM, which documents (RAG), which apps (MCP), which skills, which actions.
- Mark anything risky that needs human approval.
What you should see: A complete blueprint of an agent in five boxes.
Use any free AI chatbot (ChatGPT, Claude, Gemini or Copilot). Never paste private or confidential information.