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 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."
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:
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.
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.
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.
# 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}")
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.