01. Introduction to Agentic AI
What is an AI Agent?
An AI agent is a system that perceives context, decides what to do next, and acts toward a goal — often with tools, memory, and a control loop.
What you will learn
- Define an AI agent in one clear sentence with an example
- Explain perceive → decide → act in an environment
- Name the main parts of a modern software agent
- Contrast scripted bots, GenAI assistants, and AI agents
- Relate “AI agent” to Agentic AI without mixing the terms
- Answer common interview questions with short, solid answers
Definition
An AI agent is a software (or robotic) system that pursues a goal by perceiving information from an environment, deciding what to do next, and taking actions that change that environment or produce outputs for a user.
In today’s products, the “brain” is often a large language model, perception includes prompts, documents, and tool results, and actions include replies plus tool calls (APIs, search, code, files).
An agent is the concrete running system. Agentic AI is the design approach of building goal-driven, tool-using, looping systems. People use the words loosely — stay precise in interviews.
Introduction
This lesson (#5 in Introduction to Agentic AI) zooms from the Agentic AI approach to the unit you actually build: one agent (or several cooperating agents).
If Generative AI answers a prompt, an agent keeps ownership of progress: it may ask clarifying questions, call tools, update state, and stop when done criteria are met.
A useful habit: for any “agent” demo, ask — What is the goal? What can it observe? What actions are allowed? What memory persists? Who approves risky steps?
Classical idea vs modern LLM agents
Classical AI textbooks define agents with sensors and actuators in an environment. That model still holds. What changed is the decision engine and the action surface.
Modern LLM agents use language models to plan and choose tool calls. Sensors become APIs, user messages, and retrieved docs. Actuators become tools and side-effecting functions. The theory is old; the implementation is new.
- Classical — sensors, actuators, environment, performance measure
- Modern — prompts/docs/tools as perception; APIs/files as actuators
- Shared idea — closed loop toward a goal, not a single static answer
Why is it required?
Teams ship “AI agents” in marketing before they share a definition. Without a clear agent model you cannot design permissions, tests, or stop conditions.
- Shared vocabulary for architecture and interviews
- Separates chat UIs from goal-seeking systems
- Makes tool permissions and logging designable
- Foundation for later lessons on types, workflows, and multi-agent systems
Architecture / mental model
Picture three boxes: Environment → Agent → Actions (back into the environment). Inside the agent: a goal, perception of state, a decision policy (often an LLM + prompts), optional memory, and an action selector (tools or reply).
- Goal — what “done” means and constraints
- Perceive — user input, memory, tool observations, retrieved context
- Decide — plan or choose the next action (policy / LLM)
- Act — reply, call tool, update files/tickets/APIs
- Memory — short-term state; optional long-term store
- Guardrails — allowed tools, budgets, human approval
How does an agent work?
Runtime is a loop. The agent starts with a goal, builds a view of the current state, decides an action, executes it, observes the result, and either continues or stops.
- Receive goal and constraints
- Gather observations (prompt, history, tool outputs, docs)
- Decide: answer, ask user, or invoke a tool with arguments
- Execute the action safely (validate args, enforce permissions)
- Update memory/logs with the observation
- Check done criteria, step budget, or escalation — then loop or stop
Bot vs GenAI assistant vs AI agent
Not every “bot” is an AI agent. Scripted bots follow menus. GenAI assistants generate strong replies but usually wait for the next user turn. An AI agent owns progress toward a goal with decide–act loops and tools.
- Scripted bot — fixed flows; predictable; limited intelligence
- GenAI assistant — creates content; user usually drives each next ask
- AI agent — goal + decision loop + actions/tools + state
- Hybrid — assistants gain agent features when they call tools across steps
Autonomy levels (practical scale)
Autonomy is a spectrum. Level matters for safety design: higher autonomy needs stronger guardrails.
- L0 — human does all work; AI only suggests offline
- L1 — AI drafts; human applies every change
- L2 — AI may call read-only tools; human confirms writes
- L3 — AI runs multi-step tools within a sandbox and budget
- L4 — AI acts broadly with monitoring (rare in early products; high risk)
Types overview (preview)
Later lessons cover agent types in depth. For now, know that agents differ by how they decide: simple reflexes, goal-based planning, utility trade-offs, learning agents, and multi-agent teams.
- Simple / model-based reflex — map observations to actions with limited planning
- Goal-based — search or plan toward an explicit goal
- Utility-based — choose among goals/actions using preferences or scores
- Learning — improve behavior from feedback over time
- LLM tool agents — language model selects tools in a loop (common today)
What an agent can and cannot do
Agents excel when goals are clear and tools are reliable. They fail when goals are vague, observations are wrong, or actions are under-constrained.
- Can: multi-step research, coding with tests, ticket triage with APIs
- Can: reduce manual glue work between apps
- Cannot: guarantee correct world models without good tools/data
- Cannot: safely take unbounded irreversible actions
- Should not: run without step limits, logs, and permission scopes
Real-world examples
Name the goal, perceptions, and actions for each example.
- Coding agent — goal: tests green; perceive: repo + errors; act: edit/run tests
- Research agent — goal: brief with sources; perceive: search results; act: fetch/summarize
- Support agent — goal: resolve request; perceive: CRM data; act: reply or escalate
- Ops agent — goal: diagnose alert; perceive: metrics/logs; act: query + open ticket
- Personal workflow agent — goal: schedule prep; perceive: calendar/mail; act: draft agenda
Program / implementation notes
Implement an agent as software with explicit state and typed tools. The LLM proposes; your runtime validates and executes. Frameworks help with orchestration, but the agent contract comes first.
- Define goal schema and done checks
- Register tools with names, JSON schemas, and side-effect levels
- Keep a transcript/state object for every step
- Enforce max steps, timeouts, and cost budgets
- Require human approval for high-impact tools
- Evaluate on task suites — not only chat demos
Advantages and limitations
- Advantage: owns multi-step progress toward a goal
- Advantage: can use live tools instead of only model memory
- Advantage: composable unit for multi-agent systems later
- Limitation: more moving parts than a single GenAI call
- Limitation: tool errors and loops need careful handling
- Limitation: harder to audit without structured logs
Key points
- An AI agent perceives, decides, and acts toward a goal in an environment.
- Modern agents often use an LLM brain plus tools and memory in a loop.
- Agent = the system; Agentic AI = the design approach.
- Not every bot or chat assistant is an agent — look for goal + action loop.
- Autonomy is a spectrum; match guardrails to the level you ship.
- Design goal, tools, state, and stop rules before picking a framework.
FAQs
Is a ChatGPT chat window an AI agent?
Usually it is a GenAI assistant. It becomes more agent-like when it repeatedly plans, calls tools, keeps state, and works a goal across steps without you pasting every result.
What is the difference between an AI agent and Agentic AI?
An AI agent is the running system. Agentic AI is the style of building goal-driven, tool-using, looping systems. One approach; many possible agents.
Do agents require robotics?
No. Most product agents are software agents acting on APIs, files, browsers, and databases. Robots are agents in physical environments.
Can one LLM call be called an agent?
Rarely. A single completion with no loop or tools is generation. Agency shows up when the system can take further actions based on observations.
Interview questions
- What is an AI agent?
Answer An AI agent is a system that perceives context from an environment, decides the next step, and acts toward a goal — often using tools and memory in a loop.
- How is an AI agent different from a chatbot?
Answer A chatbot mainly responds to messages. An agent owns a goal, may call tools, update state, and continue until done criteria or stop rules fire.
- What are the main parts of an AI agent?
Answer Goal, perception, decision policy (often an LLM), actions/tools, memory/state, and guardrails such as permissions and step limits.
- How does an agent use tools?
Answer After deciding, it calls an allowed tool with arguments, observes the result, updates state, and either continues planning or stops.
- Give two examples of AI agents.
Answer A coding agent that edits code and runs tests until they pass, and a research agent that searches sources and produces a cited summary.
- What makes an agent unsafe?
Answer Unscoped tools, no step/cost limits, missing validation, and irreversible actions without human approval or logging.
- How do AI agent and Agentic AI relate?
Answer Agentic AI is the approach; an AI agent is a concrete system built that way — perceive, decide, act, loop toward a goal.
Related topics
Practice task
Complete each numbered practice step in a notebook or doc before opening the next lesson.
- Write a one-sentence definition of an AI agent, then expand with one software example.
- Sketch Environment ↔ Agent ↔ Actions and label perceive / decide / act.
- Fill five boxes — Goal, Perceive, Decide, Act, Memory — for a support agent.
- Write three bullets distinguishing a scripted bot, a GenAI assistant, and an AI agent.
- Answer interview questions 1, 2, and 6 in two sentences each (90 seconds each).