Skip to main content
Module 03 of 05Intermediate35 min

Building Your First Agent.

Open the box: the four building blocks of every agent, and how to design one step by step — no code required to follow along.

  1. Module 1
  2. Module 2
  3. Module 3 (current)
  4. Module 4
  5. Module 5

After this module you can

  • Name the four building blocks of an agent
  • Design tools with clear inputs, outputs and permissions
  • Choose between a single agent and a multi-agent system
  • Plan evaluation before deployment

The four building blocks

M

Model

The reasoning engine. Decides the next step.

T

Tools

The hands. Search, APIs, databases, code.

M

Memory

What the agent knows across steps and sessions.

G

Guardrails

What it may and may not do — and when to ask.

Remove any one of these and you no longer have a reliable agent: without tools it can only talk, without memory it forgets, without guardrails it is a risk.

Designing tools

The model only knows a tool by its description. Write it like documentation for a new colleague: one clear purpose, explicit inputs and outputs, and the smallest permission that does the job.

Namesearch_invoices
PurposeFind invoices by supplier, date range or amount.
Inputssupplier (text), from / to (date), min_amount (number)
OutputList of invoice IDs with date, amount, status
PermissionRead-only

Open standards such as the Model Context Protocol (MCP) let you describe a tool once and reuse it across agents.

Memory & context

Short-term memory is the context window: everything the agent sees in the current run. Long-term memory is stored outside the model — notes, past results, a knowledge base retrieved when needed (RAG).

More context is not always better: it costs tokens (Module 04) and can distract the model. Give the agent what it needs for the next step, not everything you have.

Guardrails

  • Permissions: read-only by default; write access only where needed.
  • Approval points: irreversible actions (payments, emails to customers) require a human.
  • Limits: maximum steps, budget and time per run.
  • Logging: every action is recorded and can be audited.

One agent or many?

Start with a single agent. Split into several specialised agents only when sub-tasks need clearly different roles, tools or permissions — for example a “researcher” that may read the web and a “clerk” that may write to the ERP. Every additional agent adds coordination overhead and new ways to fail.

Evaluate before you deploy

Write test cases before you build: a realistic input and what a correct outcome looks like. Run the agent on them after every change. Track three numbers: success rate, cost per task and how often a human had to step in.

Exercise · 10–15 min

Design an agent on paper

  1. 1Choose the task you mapped in Module 01.
  2. 2List the tools the agent needs and what each may read or change.
  3. 3Write the agent brief (Module 02).
  4. 4Define three test cases and what a correct result looks like.

Key takeaways

  • An agent = model + tools + memory + guardrails.
  • Tools are the agent’s hands: narrow, well-described, least privilege.
  • Start with one agent; split into several only when roles truly differ.
  • No evaluation, no deployment.

Check yourself

Answer in your head first, then reveal.

Q1What are the four building blocks of an agent?Reveal

Model, tools, memory and guardrails.

Q2When is a multi-agent system worth the added complexity?Reveal

When sub-tasks need clearly different roles, tools or permissions — not by default.