Key takeaways
- An agent is a language model that repeatedly decides on an action, uses a tool and reads the result.
- Tools give agents reach (search, code, files); permissions decide how much damage a mistake can do.
- Good agents keep a human in the loop for anything irreversible.
What is an AI agent?#
A chatbot answers a message and stops. An AI agent keeps going: it receives a goal, decides on a next step, uses a tool to carry it out, looks at the result and decides again. The language model is the reasoning engine; the loop around it is what turns it into an agent.
Researchers described this pattern clearly in the 2022 ReAct paper, which interleaves reasoning steps (“thoughts”) with actions such as a search query. The idea is simple, but it changes what software can do on its own.
01 / 05
Goal
The user describes the outcome they want.
The agent loop, step by step#
- Goal — the user describes an outcome, for example “summarise the open issues in this project”.
- Plan — the model decides what to do first, often breaking the goal into smaller tasks.
- Act — it calls a tool: a web search, a code interpreter, a file reader or an API.
- Observe — the tool’s output is fed back into the model’s context.
- Repeat or finish — the model either takes another step or returns the final answer.
Tools give an agent reach#
A tool is a function the model is allowed to call, described with a name, a purpose and the inputs it expects. The model never runs anything itself — the application around it executes the call and returns the result. That boundary is where safety rules belong.
Memory keeps work on track#
Short-term memory is simply the conversation so far. Longer tasks need more: notes the agent writes for itself, or a search index over documents (often called retrieval-augmented generation). Without memory, agents repeat steps or lose the thread.
Why it matters#
Agents move AI from answering questions to doing work: triaging email, refactoring code, comparing documents. That is useful — and it also means mistakes can have consequences outside the chat window.
What you can do#
- Give agents the smallest set of permissions that gets the job done.
- Require confirmation before sending, deleting, paying or publishing.
- Review the agent’s steps, not only its final answer.
- Keep sensitive data out of tasks that touch untrusted websites.
Where to learn more#
Read the original ReAct and Toolformer papers listed in the sources, then try our tutorial on running a model locally — a safe sandbox for experimenting with tools.



