Topic 1
What an agent is
“Agent” means different things in different places. AI Engineering (Ch. 6, "Agent Overview") starts from the classic definition: an agent is anything that can perceive its environment and act upon it. An agent is characterised by the environment it works in and the set of actions it can take.
By that definition, you've already built one. The book counts RAG systems as agents, with retrievers and SQL executors as their tools, and counts ChatGPT, which can search the web, run Python and generate images.
Predict first
Scroll sideways to see the whole diagram
AI Engineering defines an agent as anything that can perceive its environment and act upon it. In an AI agent, the model is the brain: it plans, reads feedback, and decides when the task is done.
Text version
- AI Engineering defines an agent as anything that can perceive its environment and act upon it. In an AI agent, the model is the brain: it plans, reads feedback, and decides when the task is done.
- The environment is set by the use case: a game, the internet, a kitchen, or a computer's terminal and file system.
- Tools let it perceive the environment: read-only actions like searching, querying, or listing files.
- And act on it: write actions like editing a file, sending an email, or issuing a refund. The tools define what the agent can do.
In an AI agent, the book says, the model is the brain: it processes the task and the feedback from the environment, plans a sequence of actions, and determines whether the task is done.
The environment and the tools constrain each other. A chess environment allows only legal moves; a robot whose only action is swimming is confined to water. In practice that means: an agent can't do anything its tools don't allow, and that's the strongest control you have over it.
Quick check