0 XP
L1
?
Lessons
Anatomy of an Agent
concept ⏱ 15m
2/3

Anatomy of an Agent

Every agent, from a simple script to a complex multi-agent system, is composed of five fundamental components. Understanding these components lets you design agents deliberately instead of accidentally.

The Five Components

1. The Brain (LLM)

The language model is the reasoning engine. It processes context, generates plans, and decides which tool to call. Different models have different strengths:

  • Claude Opus: Deep reasoning, complex multi-step tasks, careful analysis
  • Claude Sonnet: Fast, good balance of quality and speed, great for most tasks
  • Claude Haiku: Ultra-fast, simple tasks, high-volume classification

Choosing the right model per task is a design decision. Not everything needs Opus.

❓ Quiz 1
Why would you choose Claude Haiku over Opus for part of an agent system?
Model selection per task is a key agent design decision. Use the cheapest model that gets the job done — reserve expensive models for complex reasoning.
Answer to continue ↓

2. Tools

Tools are how agents interact with the world. Without tools, an LLM is just a text generator. With tools, it can:

  • Read and write files
  • Query databases
  • Call APIs
  • Send messages
  • Execute code

In your setup, MCP servers provide 50+ tools: Notion pages, Calendar events, Slack messages, Linear issues, Figma designs. Each tool extends what the agent can do.

3. Memory

Agents need memory at three levels:

  • Short-term: The current conversation context window
  • Working: Relevant information pulled in for the current task (like loading knowledge/projects.md)
  • Long-term: Persistent information across sessions (your knowledge/ directory, CLAUDE.md, memory graph)

Your workspace already implements all three. The soul.md and CLAUDE.md files are long-term memory that shapes every interaction.

❓ Quiz 2
Which component does your knowledge/ directory primarily serve?
The knowledge/ directory is long-term memory. It persists across sessions and provides context the model wouldn't otherwise have.
Answer to continue ↓

4. Planning

How the agent breaks down complex goals into steps. This can be:

  • Implicit: The model figures it out turn by turn (most common)
  • Explicit: The agent generates a plan first, then executes it (Claude Code's plan mode)
  • Hierarchical: High-level plans broken into sub-plans

Extended thinking is where planning happens inside the model — it reasons before acting, which reduces errors on complex tasks.

5. Environment

The world the agent operates in. For Claude Code, this is your filesystem, terminal, and connected services. The environment provides:

  • Observations: File contents, command outputs, API responses
  • Constraints: Permissions, rate limits, file access boundaries
  • Feedback: Test results, error messages, user corrections

Review

Time to consolidate what you learned.

Now match them

You've learned all 5. Can you connect each to your actual setup?

🎮 Match the Component
Click a left item, then click its match on the right.
Brain (LLM)
Tools
Memory
Planning
Environment
MCP servers + Bash + file ops
Filesystem + terminal + APIs
Extended thinking + plan mode
Claude Opus/Sonnet model
knowledge/ + CLAUDE.md + memory graph
Complete to continue ↓

How Claude Code Implements Each Component

┌─────────────────────────────────────────────────┐
│  CLAUDE CODE AGENT ARCHITECTURE                  │
├─────────────────────────────────────────────────┤
│  Brain:        Claude Opus/Sonnet               │
│  Tools:        Bash, Read, Write, Edit, Grep,   │
│                Glob, MCP servers (10+)          │
│  Memory:       CLAUDE.md, soul.md, knowledge/,  │
│                memory graph, conversation        │
│  Planning:     Extended thinking, plan mode,     │
│                TodoWrite for task tracking        │
│  Environment:  Filesystem, terminal, APIs,       │
│                browser (via MCP)                 │
└─────────────────────────────────────────────────┘

The key insight: you configure agent behavior by shaping these components, not by writing agent code. Your CLAUDE.md rules, knowledge/ files, and MCP server connections are the agent design.

🛠 Exercise 1
Design an agent for one of your products (Muno Labs, The Growth System, or a client project). Map each of the 5 components: what model for the brain, what tools it needs, what memory it should have, how it plans, and what environment it operates in.
✓ Saved
advance · ? shortcuts 01.02
Claude — Tutor
select text for context
Ask me anything about this lesson.
I can see your quiz answers and decisions.

💡 Select text in the lesson to use it as context.
CONTEXT