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.

🧠LLMthe brain📚RAGthe library🔌MCPthe nervoussystem💪Skillsmuscle memory🤖Agentbrain + hands
The five building blocks of an AI agent.
BlockThink of it asWhat it does
LLMThe brainReads, writes and reasons. Clever, but knows nothing about your business on its own.
RAGThe libraryLooks up your documents before answering, so answers come from your data instead of guesses.
MCPThe nervous systemOne standard plug that carries signals between the brain and your apps, files and databases.
SkillsMuscle memoryKnow-how written down once and reused every time, so you never re-explain the task.
AI agentBrain + handsPlans 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.

MCPRAGAI agent
Main jobConnect the AI to tools and data in a standard wayFind the right context so the answer is accurateReach a goal by reasoning and using tools
How it worksAn app (host) talks to MCP servers, each wrapping a tool such as GitHub, a database or filesSearch a knowledge base, pick the best chunks, add them to the promptPlan → act → observe the result → adjust, in a loop until done
Is it a product?No, a protocol (a set of rules)No, a techniqueYes, a system you build or use
Everyday pictureA universal power socketAn open-book examAn 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 min

Draw your agent's body

  1. Pick an agent idea, e.g. a travel booking helper.
  2. Fill in the five blocks: which LLM, which documents (RAG), which apps (MCP), which skills, which actions.
  3. 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.

Build it for real · guided projectBuild an AI workflow that summarises feedback for youAbout 75 min · No coding needed · step by step
Test what you learned

Take a quick quiz, or look up any word in the glossary.