What are AI agents?
The shift from one-turn chatbots to multi-step agents that read files, run commands, and operate in a loop.
- Explain the difference between a chatbot and an agent
- Describe the perceive-plan-act-observe loop that agents follow
- List the categories of tools an agent can use
- Articulate the mental model shift required when directing an agent
Every previous lesson in this track treated AI as a conversational partner: you send a message, it replies, you read the reply and decide what to do next. That model is useful for a great deal — drafting, explaining, debugging small functions. But it has a ceiling. The model can only work with what you paste into the chat window, and acting on its suggestions still falls entirely to you.
Agents remove that ceiling. An AI agent is a system that does not just respond — it perceives its environment, makes a plan, takes actions in the real world, observes the results, and repeats. You shift from receiving advice to directing a system that executes.
The agentic loop
The core pattern is a tight loop that runs until the task is complete:
perceive → plan → act → observe → repeatPerceive. The agent reads the state of the world: the files in your project, the output of a command you ran earlier, the error message the compiler produced. It is not working from memory — it is reading the actual current state.
Plan. Given what it perceives, the agent decides what to do next. This may be a single tool call ("read this file") or a multi-step sequence ("read the file, identify the failing test, find the function it calls, propose a fix").
Act. The agent executes a tool call — reading a file, writing new content, running a shell command, calling an API. This is real action with real consequences, not a simulated response.
Observe. The output of the action — the file contents, the command's stdout, the API response — is fed back into the agent's context. It now knows more than it did before, and can plan the next step.
Repeat. The loop continues until the agent judges the goal achieved, or until it hits a limit and stops for human review.
This is fundamentally different from a chatbot. A chatbot's "world" is the conversation window. An agent's world is your actual file system, your terminal, the internet, and any API it has credentials for.
What agents can do
The capabilities of a specific agent depend on which tools it has been given access to. Common tool categories:
- File system access — read and write files, list directories, search for patterns. This is the foundation of coding agents: they can see your entire project.
- Shell execution — run commands:
npm test,python manage.py migrate,git diff. An agent that can run your test suite can check its own work. - Web search — look up documentation, error messages, library APIs.
- API calls — call external services, query databases, retrieve structured data.
- Browser automation — navigate web pages, fill forms, click buttons.
Not every agent has every tool. Claude Code runs in your terminal and has file and shell access. A browser-based chat assistant has none of those unless explicitly extended.
Real examples
Claude Code (the tool used throughout this course) is a CLI agent. You give it a goal in plain English. It reads your project files, makes a plan, writes code, runs your tests, reads the test output, fixes what failed, and repeats until the tests pass — or until it gets stuck and asks for your input.
Cursor is an IDE with an embedded agent. The "Composer" mode lets it read your entire codebase, propose multi-file changes, and apply them in one click.
GitHub Copilot (workspace mode) can index a repository, answer questions about the codebase, and generate changes across many files at once.
The differences are in where they live (terminal, IDE, browser extension) and what tools they can access — not in the fundamental loop.
The mental model shift
Here is the most important thing to internalize before going further:
You are no longer writing code. You are directing a system that writes code.
This is not just a difference in who presses the keys. It is a difference in your role. When you write code, you are the implementer — you track every detail, you know why every line is there. When you direct an agent, you become the architect and reviewer: you define the goal, scope the task, and verify the result.
That means the skills that make you effective change:
- Less: remembering syntax, typing fast.
- More: specifying goals clearly, recognising what the agent got wrong, knowing enough about the system to verify the output.
The fundamentals you have built — understanding programs, decomposing problems, validating outputs — are precisely the skills you need here. Directing an agent well is applied critical thinking at the speed of execution.
The next lesson surveys the concrete tools available, so you know what you are working with before you start directing anything.
Agents make mistakes confidently. An agent that runs in a loop without human review can overwrite files, introduce subtle bugs, and compound errors across many steps before you notice. The loop that makes agents powerful is the same loop that makes careless use dangerous. You will learn to control this.
What are AI agents?
- 1.What is the key structural difference between a chatbot and an agent?
- 2.Which of the following are typical tool categories available to coding agents like Claude Code?
- 3.When directing an AI agent, your primary role becomes implementation — writing the actual code — rather than architecture and review.
Where to go next
Now that you have the mental model, the next lesson takes a practical tour of the AI coding tools available today — what distinguishes them and when to reach for each one.