AI Agents and Agentic Systems
Intermediate 15 min Module 1 of 6
Module 1 of 6

What Is an AI Agent?

You have probably heard the word "agent" used to describe everything from a customer support bot to an autonomous research assistant. By the end of this module you will know exactly what separates a real agent from a chatbot, and why that distinction matters for anyone building or buying AI systems today.

By the end of this module you will be able to

Start Here: A Vending Machine versus a Personal Shopper

A chatbot is like a vending machine. You press a button (send a message) and it gives you the item that matches that button (a response). It does not remember your last visit. It does not adapt if you say the machine is out of stock. It does not call a supplier to reorder. You get one response per one input, and then the transaction is over.

An AI agent is like a personal shopper. You tell it what you need. It goes to the store, checks prices at multiple locations, picks up the best option, handles the payment, arranges delivery, and sends you a receipt. It took many actions across many systems to complete a goal you stated once. That is the core difference.

The one-sentence definition An AI agent is a system that perceives its environment, reasons about what to do, takes action using tools, and adjusts based on the results of those actions, repeatedly, until a goal is met.

The Four Properties of an Agent

Every true agent has four properties. If any of these four is missing, the system is something simpler: a chatbot, a workflow, or an API call. Understanding these four is the fastest way to cut through the marketing noise around "agentic AI."

Property 1
Perception
The agent can read inputs from its environment: text, files, search results, database records, sensor data, or the output of other agents.
Property 2
Reasoning
The agent decides what to do next based on its goal and what it has perceived so far. It breaks complex goals into steps and chooses which tool to use.
Property 3
Action
The agent calls tools, APIs, functions, or other agents. It does things in the world, not just describes them. Actions have real-world effects.
Property 4
Feedback
The agent observes the result of its action and updates its next step accordingly. It learns within the current task, not just from training data.

These four properties together form what researchers call the agent loop: perceive, reason, act, observe, repeat. The loop continues until the goal is complete, a constraint is hit, or the agent hands off to a human.

The ReAct Framework

In 2022, researchers at Google and Princeton introduced a formal description of how to build agents that think and act in interleaved steps. They called it ReAct (Reasoning and Acting). The key insight was that agents perform better when they write out their reasoning before choosing each action, rather than jumping straight to action (Yao et al., arXiv:2210.03629).

Here is what a single ReAct step looks like for an agent asked to book a restaurant:

ReAct step example Thought: The user wants a table for two on Friday at 7pm near downtown. I should search for available restaurants first.

Action: search_restaurants(location="downtown", date="Friday", time="19:00", party_size=2)

Observation: Found 3 available restaurants: Bistro Norte (4.6 stars), Casa del Mar (4.4 stars), The Larder (4.8 stars).

Thought: The Larder has the highest rating. I should check availability and price range before booking.

The agent writes a thought (reasoning), chooses an action (tool call), reads the observation (tool result), and writes another thought. This loop repeats until the task is done. The paper showed this approach outperformed systems that either only reasoned or only acted, because each step informed the next.

Fig 1 · The ReAct Agent Loop
Perceive read inputs Reason plan next step Act call a tool Observe read result repeat until goal is met
Why do you think writing reasoning before acting makes agents more reliable?
When an agent writes out its reasoning, it creates a record that can be checked. If the reasoning is wrong, it often reveals itself before the action is taken, which means fewer costly mistakes. It also forces the model to commit to a specific interpretation of the task rather than picking an action based on a vague intent. Think of it as the AI equivalent of writing out your work in math class.

Two Real-World Examples

Customer support agent. A software company deploys an agent to handle refund requests. The agent reads the customer's message, checks the order database via API, verifies the purchase date against the refund policy, determines eligibility, processes the refund through the payment system, and sends a confirmation email. A human only sees the ticket if the agent flags it as a complex case. Each of those steps involves a different tool, and the agent decides which to call in what order.

Research assistant agent. A consulting team deploys an agent to compile competitive intelligence. The agent accepts a company name, searches public filings, extracts financial data, reads recent news, identifies relevant analyst reports, and produces a structured summary. The task that would take a junior analyst four hours completes in under ten minutes, with citations for every fact.

Both examples share the same structure: one stated goal, many sequential actions across multiple tools, and real-world effects (a refund processed, a document written). Neither is just answering a question.

Why Agents Are More Risky Than Chatbots

Because agents take action, they can cause harm in ways a chatbot cannot. A chatbot that hallucinates a wrong answer is embarrassing. An agent that hallucinates a wrong action might delete a file, send an email to the wrong person, or approve a payment that should not have been approved.

This is the central tension in agentic AI: the same autonomy that makes agents useful also makes them dangerous when they go wrong. Module 5 covers failure modes in detail. For now, the key point is that deploying an agent requires thinking about what happens when each action fails, not just what happens when it succeeds.

A Second Analogy: GPS Navigation

The vending machine versus personal shopper analogy captures the goal-completion difference, but there is a second analogy that captures the adaptive-loop quality of agents even better: GPS navigation compared to a printed map.

A printed map gives you all the information at once. You plan a route before you leave. If a road is closed, the map cannot tell you. You have to figure it out yourself. A GPS navigation system, by contrast, is an agent. It perceives your current position (GPS signal), reasons about the fastest route to your destination given current conditions (routing algorithm), takes action (gives you a turn instruction), observes what actually happened (did you take the turn?), and adjusts when you deviate. It does not give you a complete plan upfront and expect you to follow it perfectly. It continuously re-routes based on what is actually happening.

This adaptive quality, re-planning based on observed reality, is the heart of what makes agents different from static systems. Agents are not programs that execute a fixed script. They are systems that read reality and adjust their plan as they go.

Common misconception "An AI agent is just a chatbot with memory." This is wrong in an important way. Memory helps, but it is not the defining property. What makes a system an agent is the ability to take actions in the world and observe their results. A chatbot with a long conversation history is still just a chatbot. An agent actively does things and adapts based on what it discovers.

A Healthcare Example

Consider a clinical documentation agent at a hospital. After a physician completes a patient visit, the agent reads the voice recording of the consultation, checks the patient's EHR for existing diagnoses and current medications, cross-references ICD-10 codes for the conditions mentioned, drafts a clinical note in the format required by that hospital's system, flags any drug interactions identified in the current medication list, and submits the draft for the physician to review and sign. Each of those is a separate tool call, a separate observation, and a separate decision. The agent does not know upfront exactly which ICD-10 codes will be needed or which medications will have interactions. It discovers these facts during the task and responds accordingly.

This is why agents are spreading rapidly in healthcare administration: the tasks that consume physician time are not knowledge tasks (the physician already knows the medicine) but coordination tasks across multiple systems, exactly the kind of multi-step, multi-tool work agents are built for. Research on clinical AI systems suggests that documentation tasks can account for a substantial portion of administrative time, making this one of the clearest ROI cases for agentic deployment.

Python · Minimal ReAct Agent Loop
# Minimal ReAct-style agent loop
import openai

def react_agent(goal: str, tools: list, max_steps: int = 10):
    messages = [{"role": "system",
                 "content": f"You are an agent. Goal: {goal}"}]

    for step in range(max_steps):
        # REASON: ask the model what to do next
        response = openai.chat.completions.create(
            model="gpt-4o", messages=messages, tools=tools
        )
        msg = response.choices[0].message
        messages.append(msg)

        # If no tool call, the agent has finished reasoning
        if not msg.tool_calls:
            return msg.content  # final answer

        # ACT: execute each tool the model chose
        for call in msg.tool_calls:
            result = run_tool(call.function.name,
                              call.function.arguments)

            # OBSERVE: feed the result back into context
            messages.append({
                "role": "tool",
                "tool_call_id": call.id,
                "content": str(result)
            })

    return "Step limit reached. Stopping."

def run_tool(name: str, args: dict) -> str:
    # Replace with your actual tool registry
    if name == "search_web":
        return web_search(args.get("query", ""))
    raise ValueError(f"Unknown tool: {name}")
Try this

Pick a repetitive task you do at work that involves three or more steps across different tools. Write down: (1) what inputs the agent would need to perceive, (2) what it would reason about at each step, (3) what actions it would take and which tools each action requires, (4) what it would observe after each action. You have just designed an agent. Notice how quickly the task maps onto the Perceive-Reason-Act-Observe loop.

Knowledge check
Which of the four agent properties describes the agent's ability to call APIs and external tools?
Correct. Action is the property that makes agents more than just text generators. They do things in the world.
Not quite. Action is the property that covers tool calls, API calls, and real-world effects. Perception is reading inputs, reasoning is deciding, feedback is observing results.
In the ReAct framework, what does the agent do between each action?
Exactly right. ReAct interleaves reasoning and acting. The thought step before each action improves reliability because the model commits to an interpretation before executing.
Not quite. ReAct stands for Reasoning and Acting. The agent writes a thought before each action, observes the result, writes another thought, and so on.
Why is an agent that makes a wrong decision more risky than a chatbot that gives a wrong answer?
Correct. An agent that approves the wrong payment or sends the wrong email causes real harm. Chatbot mistakes are embarrassing but usually reversible by the reader.
The key difference is irreversibility. When an agent takes an action like processing a refund or deleting a file, that action may be hard to undo, unlike a chatbot response the reader can simply ignore.
Interactive 1: Live ReAct Loop Try it

Set the task complexity to see how many times the agent loops through Perceive, Reason, Act, and Observe. Press Play to watch the agent work through the loop step by step.

3
Steps taken: 0    Tools called: 0
Before you go
Reflection: Think of a task you do repeatedly that involves more than three steps across different tools or systems. What would an agent need to know to do that task safely, and which step would you require human approval for?
You might also like
Was this module helpful?
← Previous Module 2: Tool Use and Function Calling →