Skip to content

Agent Anatomy: Components of an Agentic System

Definition

An agent is an autonomous software system composed of four core components working together to perceive an environment, reason about it, take action, and learn from outcomes.

Formal Definition: A situated, goal-directed system capable of perceiving its environment, maintaining internal state, deciding on actions, and executing those actions to change the environment.


The Four Core Components

1. The Large Language Model (LLM)

Purpose: The cognitive engine providing reasoning and decision-making

Aspect Details
Role Reasoning, planning, decision-making
Input Current state + history + goal
Output Next action(s) or decision
2025 Status Frontier models (Claude 3.5, GPT-4o, Gemini 2.0)

What it does: - Interprets the current situation - Considers available actions - Chooses actions based on goals and constraints - Generates explanations and reasoning traces

Key insight: The LLM is NOT doing reasoning through hidden weightsβ€”it's generating reasoning step-by-step through tokens, making it debuggable and verifiable.

# Example: LLM decision-making
system_prompt = """You are a research agent. Given a goal and available tools, 
decide what action to take next."""

response = llm.generate(
    system_prompt=system_prompt,
    user_message=f"Goal: {goal}\nAvailable tools: {tools}\nCurrent state: {state}"
)
# Output: "I should use the search tool to find recent papers on..."

2. Memory System

Purpose: Maintain context, store experiences, enable learning across time

Type Duration Purpose Storage
Short-term Current task Current context window LLM context
Episodic Hours/days What happened before Vector DB
Procedural Long-term How to do things Learned patterns
Semantic Persistent General knowledge External KB

What it does: - Maintains the agent's "working memory" (current task state) - Stores past interactions for learning and context - Enables information retrieval when needed - Provides grounding in reality

# Example: Multi-tier memory
class AgentMemory:
    def __init__(self):
        self.context_window = []  # Short-term
        self.episodic_store = VectorDB()  # What happened
        self.knowledge_base = RAGSystem()  # What to know
        self.procedures = ProcedureCache()  # How to do things

    def remember(self, event: str):
        """Store an event"""
        self.episodic_store.add(event)

    def recall(self, query: str):
        """Retrieve relevant memories"""
        return self.episodic_store.retrieve(query)

3. Planning System

Purpose: Decompose complex goals into executable action sequences

Component Function
Goal Parser Understand what the user wants
Task Decomposer Break goals into sub-goals
Action Planner Decide sequence of actions
Constraint Handler Apply limitations and rules

What it does: - Takes high-level goals and breaks them into sub-tasks - Determines action sequences - Handles dependencies between tasks - Adjusts plans when obstacles arise

# Example: Planning
planner = AgentPlanner()

goal = "Find and summarize recent research on quantum error correction"
plan = planner.decompose(goal)
# Output:
# 1. Search for recent papers on quantum error correction
# 2. Filter results for last 6 months
# 3. Retrieve full texts
# 4. Summarize key findings
# 5. Compile report

4. Tool Use / Action Execution

Purpose: Interact with external systems and environments

Type Examples
APIs Web search, database query, LLM calls
File systems Read/write documents, code
Computational Math, code execution, data analysis
Communication Email, messaging, notifications

What it does: - Translates LLM decisions into executable actions - Calls external APIs and tools - Handles tool responses and errors - Grounds reasoning in reality

# Example: Tool use
tools = {
    "search": lambda query: google_search(query),
    "fetch": lambda url: fetch_content(url),
    "summarize": lambda text: llm.summarize(text),
    "save": lambda file, content: save_to_file(file, content)
}

# Agent uses tools:
result = tools["search"]("quantum error correction 2024")
content = tools["fetch"](result[0]["url"])
summary = tools["summarize"](content)
tools["save"]("report.md", summary)

System Architecture Diagram

- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    - USER GOAL / ENVIRONMENT             β”‚
  - β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    - PERCEPTION        β”‚
    - (Parse goal, state) β”‚
  - β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    - MEMORY            β”‚ ◄─── Store/Retrieve
    - (Context mgmt)      β”‚      Past experiences
  - β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    - LLM REASONING     β”‚ ◄─── Cognitive engine
    - (What should I do?) β”‚
  - β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    - PLANNING          β”‚ ◄─── Decomposition
    - (Action sequence)   β”‚
  - β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    - ACTION / TOOLS    β”‚ ◄─── External systems
    - (Execute decision)  β”‚
  - β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    - REFLECTION        β”‚
    - (Did it work?)      β”‚
  - β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    - FEEDBACK LOOP     β”‚ ──┐
      - (Update context)    β”‚   β”‚
    - β”˜   β”‚
  - β–²               β”‚
  - β”˜

Agent vs Other System Types

Chat Application

User Input β†’ LLM Response β†’ User Output
(No internal state, no tools, responds to queries)

RAG System

User Query β†’ Retrieve Docs β†’ Augment Prompt β†’ LLM Response
(Better answers through retrieval, but still just responds)

Agentic System

Goal β†’ Perceive β†’ Reason β†’ Plan β†’ Act β†’ Reflect β†’ Loop
(Autonomous, goal-directed, takes initiative)

Anatomy Checklist

Before claiming a system is "agentic," verify:

βœ… Has an LLM - Core reasoning engine
βœ… Has memory - Maintains state across time
βœ… Has planning - Decomposes goals
βœ… Has tools - Can take action
βœ… Has a loop - Repeats until goal achieved
βœ… Is autonomous - Doesn't wait for prompts
βœ… Has goals - Works toward objectives
βœ… Can reflect - Evaluates results

If it only responds to queries = Chat/RAG
If it has all above = Agent


The Minimum Viable Agent

A minimal agentic system needs:

class MinimalAgent:
    def __init__(self, llm, tools):
        self.llm = llm
        self.tools = tools
        self.memory = []

    def run(self, goal):
        """Execute agent loop until goal achieved"""
        while not self.done(goal):
            # Perceive: What's the current state?
            state = self.get_state()

            # Reason: What should I do?
            action = self.llm.decide(goal, state, self.memory)

            # Act: Execute the action
            result = self.tools[action.tool](*action.args)

            # Reflect: Did it work?
            self.memory.append((state, action, result))

            if self.goal_achieved(goal, result):
                return result

Complexity Spectrum

Complexity Components Use Case
Minimal LLM + Simple tools Prototypes
Basic LLM + Memory + Tools Production agents
Advanced + Planning + Reflection Complex tasks
Enterprise + Multi-agent + Safety Mission-critical

Key Takeaways

  1. Agents are not monolithic - They're systems of 4 distinct components
  2. Each component matters - Missing any one breaks agency
  3. LLM is the brain, not the whole organism - Other parts are critical
  4. Memory is often underestimated - Context management is hard
  5. Tools ground reasoning - Without tools, agents can only talk

Next Steps


Last Updated: August 9, 2026