Epitomsoft Academy · Module 2 of 6

Agentic AI & autonomous systems

Move from chatbots that answer to agents that act: planning, tool use, memory, multi-agent teams and the Model Context Protocol (MCP).

What you will learn

Designing AI that plans, acts and checks its work

An AI agent is a model running in a loop: it reasons about a goal, chooses a tool, observes the result and decides what to do next. This module teaches you to design agents that are useful, predictable and safe.

  • Explain the reason → act → observe loop behind every agent
  • Give models tools through function calling and the Model Context Protocol
  • Choose between workflows, single agents and multi-agent systems
  • Add memory, guardrails and human approval steps
  • Evaluate agents on real tasks, not just demos

Module at a glance

  • Format: live online sessions + hands-on lab
  • Level: Intermediate
  • Prerequisites: Module 1; Python; basic APIs (REST/JSON)
  • You will build: A tool-using agent connected to an MCP server

Animated video lesson

How an AI agent works – explained by Epi

Press play: our presenter walks you through the full agent loop with a 3D animated diagram and a real example. Captions and a transcript are included.

1 2 3 4 5 6 7 8 9 Instructions Goal & rules Context Built for each call Model (LLM) Interprets & decides Memory Persistent storage Planning & Reasoning LLM + controller Tool / Action Search · Email · APIs Evaluation Rules · Validators · Tests
Live example
Read the full transcript
  1. Welcome: Hi, I am Epi from Epitomsoft Academy! In this lesson you will see how an AI agent works, step by step. We will follow one real task: find three remote Python internships, and draft a cover email.
  2. Step 1 · Instructions: Everything starts with instructions. The system prompt and your request define the agent’s goal, its rules and its limits. For example: find three remote Python internships posted this week, and never apply without my approval.
  3. Step 2 · Memory: Next, the agent checks its memory. Memory lives outside the model, in persistent storage such as a database, and the relevant memories are added to the current context. Here, it remembers that you are a final-year student who knows Python and SQL.
  4. Step 3 · Context: Before every model call, the context is built fresh. The instructions, memories, tool descriptions and earlier results are assembled into one package. Remember: the model only knows what is in its context.
  5. Step 4 · Model: Now the model interprets the situation and decides the next steps. Planning and reasoning are done together by the language model and an agent controller, the code that runs the loop. The plan: search job boards, filter for remote Python roles, then draft the email.
  6. Step 5 · Action: The agent executes the selected action by calling a tool. Tools are external capabilities, like web search, GitHub, Slack, email or a company database. Here, it calls a job search tool with: Python intern, remote, posted this week.
  7. Step 6 · Evaluation: The results are checked with rules, validators or tests. Are there really three roles? Are they all remote? Was each one posted this week? Good agents never assume their results are correct.
  8. Step 7 · Re-plan: If the results are incomplete, the agent creates a new plan and loops again. Only two roles matched, so it widens the search to include data and automation internships that use Python.
  9. Step 8 · Fill the gaps: When information is missing, the agent identifies the gap and searches again, in memory or in other sources. Here, it looks up your résumé summary, so the email can highlight your strongest project.
  10. Step 9 · Update memory: Finally, the agent updates its memory with what it learned, such as useful sources and your preferences, so the next task is faster and more personal. Then it returns the answer: three internships, and a draft email waiting for your approval.
  11. Recap: That is the agent loop: instructions, memory, context, model, planning, action and evaluation, repeated until the goal is met, with a human in control of important actions. You will build your own agent in Module 2 of the Epitomsoft Academy. See you there!

Topics

Key concepts, explained with examples

The agent loop (ReAct)

Agents alternate between reasoning (“thought”), acting (calling a tool) and observing the result, until the goal is met or a limit is reached.

Example: Goal “find a free 30-minute slot with the client next week”: check calendar → propose times → draft invite → ask a human to confirm.

Tool use and function calling

You describe tools (name, purpose, input schema) and the model returns structured calls your code executes. The model never runs code by itself.

Example: A support agent calls get_order_status(order_id=”A1043″) and replies “Your order shipped yesterday and arrives Thursday.”

Model Context Protocol (MCP)

MCP is an open standard for connecting AI applications to tools and data sources through reusable “servers” – like USB-C for AI integrations.

Example: One MCP server for your ticketing system can be used by different assistants and IDEs without rewriting the integration.

Workflows vs. autonomous agents

Many problems are best solved with predictable, fixed workflows; open-ended problems may need agents that choose their own steps. Start simple.

Example: Invoice processing: a fixed extract → validate → approve workflow. Research tasks: an agent that decides which sources to read next.

Multi-agent systems

Several specialised agents (planner, researcher, coder, reviewer) collaborate and check each other’s work.

Example: A “coder” agent writes a function; a “tester” agent writes and runs tests; a “reviewer” agent decides whether to merge.

Memory and state

Short-term memory lives in the context; long-term memory is stored in databases and retrieved when relevant.

Example: A sales assistant remembers a customer’s preferred contact time from last month by retrieving notes from a CRM.

Guardrails and human-in-the-loop

Limit permissions, cap steps and cost, validate outputs and require human approval for risky actions.

Example: An agent may draft a refund, but a human must approve any refund above $500.

Evaluating agents

Measure task success rate, number of steps, cost, latency and safety violations across many realistic scenarios.

Example: Run 100 recorded customer requests through the agent and compare its outcomes with what a human agent did.

Worked example

An agent loop and an MCP tool definition

The heart of every agent framework – shown as simple, illustrative Python – plus how a tool is described to a model.

Example 1 – The reason → act → observe loop with a human approval step

# Illustrative agent loop (framework-neutral pseudocode in Python)
tools = {"search_calendar": search_calendar, "send_invite": send_invite}

def run_agent(goal, llm, max_steps=6):
    history = [f"Goal: {goal}"]
    for step in range(max_steps):
        decision = llm.decide(history, tools=list(tools))   # think: choose the next action
        if decision.action == "finish":
            return decision.answer
        if decision.action == "send_invite" and not human_approves(decision.args):
            history.append("Observation: human rejected the invite")  # guardrail
            continue
        result = tools[decision.action](**decision.args)    # act
        history.append(f"Observation: {result}")             # observe, then loop
    return "Stopped: step limit reached - escalating to a human"

Example 2 – A tool as an MCP server exposes it (JSON Schema input)

{
  "name": "get_order_status",
  "description": "Look up the shipping status of a customer order",
  "inputSchema": {
    "type": "object",
    "properties": {
      "order_id": { "type": "string", "description": "Order number, e.g. A1043" }
    },
    "required": ["order_id"]
  }
}

Hands-on lab

Build a “project assistant” agent

Using an open-source framework such as LangGraph, you build an agent that manages a small task board through an MCP server.

  • Write a small MCP server exposing list_tasks, create_task and update_task
  • Connect it to an agent using LangGraph (or another open-source framework)
  • Add a step limit, a cost limit and human approval for deletions
  • Create 20 test scenarios and measure the success rate
  • Present the failures you found and how you fixed them

Key terms

Vocabulary to master

  • Agent
  • ReAct
  • Tool / function calling
  • Model Context Protocol
  • MCP server
  • Planner
  • Orchestrator
  • Multi-agent
  • Memory
  • State
  • Guardrail
  • Human-in-the-loop
  • Step limit
  • Agent evaluation

Check your understanding

Module 2 quiz

Score 70% or more to pass. Pass all six module quizzes to unlock your Frontier AI certificate on My progress.

Further learning

Free & open-source references

Original research, open-source projects and free courses – all free to access.

Ready to master frontier AI?

Join the Epitomsoft Academy advanced programme – tell us about yourself and we will be in touch.