What makes an AI agent
Agentic AI Foundations · Lesson 1 of 20 · 3:06
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Oracle Agentic AI Foundations Associate exam (1Z0-1157-26). In this lesson: chatbots, rule-based workflows, and agents, the large language model as the agent's brain, tools described by JSON schemas (the model asks for a tool, your code runs it), and the agent loop: perceive, reason, act, and observe, until the goal is reached or a safety limit stops it. Includes three original practice questions, with Fairhaven Furniture, a fictional furniture seller, as the example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Why an agent?
Fairhaven Furniture gets thousands of customer messages a week: where is my sofa, how do I return a chair, can I change my delivery date? Its website chatbot answers simple questions, but it cannot look up an order or book a new delivery slot. The engineering team wants an AI agent instead, and the first question is: what exactly makes software an agent?
Chatbots, workflows, and agents
A traditional chatbot takes a message, generates one response, and stops. A rule-based workflow follows a fixed sequence of steps that someone defined in advance, so it cannot handle a case that nobody planned. An AI agent receives a goal, decides its next step dynamically, uses tools to gather information or take actions, and keeps going until the goal is reached. So agents are goal-directed, autonomous, tool-using, and iterative. And an agent is not a new kind of model: it's an architecture pattern, a language model wrapped in a decision loop, with three core components: the model, tools, and the loop, also called orchestration.
The LLM, the brain
The language model is the brain, the reasoning engine at the center of the agent. It understands the user's intent, plans the steps, decides which tool to call with which arguments, interprets the results, and writes the final answer. Choosing it is a trade-off between capability, cost, and latency: it must follow instructions reliably, handle a large context, because every step adds to the prompt, and reason well over several steps. Some teams use two tiers: a small, fast model for simple routing, and a more capable model for complex reasoning.
Tools, the hands
Tools are the hands of the agent: without them, a language model only generates text, and with them, it can query a database, call an API, or run code. Here's how tool calling works. The agent sends the user's message together with tool definitions, written as JSON schemas with a name, a description, and the parameters. The model either answers directly, or returns a structured tool call: the name of the tool and its arguments. Then the agent's code validates the call, runs the function, and sends the result back to the model as an observation. The model never runs a tool itself: your code does, and that's a critical security boundary.
The loop
The third component is the loop, also called the orchestration layer: think of it as the agent's nervous system, or its operating system. Every agent runs the same cycle: perceive the input or the latest observation, reason about what to do next, act by calling a tool or answering, then observe the result, and repeat. The loop also tracks state, manages memory, routes tool calls, and applies safety rules that override the model's decisions. It stops when the model has enough information to give a final answer, or when it reaches a maximum number of iterations, a safety limit. That limit matters, because every iteration is a model call that costs money and time, and a confused agent could call tools forever.
Recap
Let's recap. A chatbot answers once, a workflow follows fixed steps, and an agent pursues a goal, choosing its next step and using tools. An agent is an architecture pattern: a language model, tools, and a loop. The model is the brain: choose it for capability, cost, and latency. Tools are the hands: the model asks for a tool call, and your code runs it. And the loop perceives, reasons, acts, and observes, until a final answer or a safety limit.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
Fairhaven’s chatbot follows a fixed script: a message with the word return shows the return policy page. The team wants software that can look up the order, check the return window, and decide what to do next. What are they describing?
- A rule-based workflow with more branches
- A larger language model with no tools
- An AI agent with tools and a loop
- A chatbot that answers in one response
Show the answer
An AI agent with tools and a loop
An agent works toward a goal, chooses its next step dynamically, and uses tools, here to look up the order. “A rule-based workflow with more branches” would still follow paths defined in advance, so it fails on cases that nobody planned. “A larger language model with no tools” is only a model: without tools, it cannot read the order. And “A chatbot that answers in one response” is the chatbot pattern: one message in, one response out, then it stops.
Fairhaven’s agent has a tool that returns the status of an order. A customer asks where order 4417 is, and the model decides that it needs the tool. What does the model produce at this point?
- A tool call: the status tool, order 4417
- The order status, read from the database
- A new tool definition for the order database
- A SQL query that it runs on the database
Show the answer
A tool call: the status tool, order 4417
The model returns a structured tool call, with the name of the tool and its arguments. “The order status, read from the database” would mean that the model reads the database itself, but your code runs the tool and returns the result. “A new tool definition for the order database” is backwards: tool definitions are sent to the model, not written by it. And “A SQL query that it runs on the database” would let the model run queries on its own, which crosses the security boundary.
During testing, Fairhaven’s agent keeps calling the same delivery tool again and again, and the bill for model calls climbs. Which part of the agent should stop this?
- The tool definitions, with a longer description
- The language model, with a larger context window
- The delivery API, with a faster response time
- The loop, with a maximum number of iterations
Show the answer
The loop, with a maximum number of iterations
The loop controls when the agent continues or stops, and a maximum number of iterations is its safety limit. “The tool definitions, with a longer description” could help the model choose its tools, but nothing would stop a loop that runs away. “The language model, with a larger context window” would let each call hold more text, while the agent keeps calling. And “The delivery API, with a faster response time” would make each call faster, not fewer.