Who this is for, and what you will be able to do
This guide is for readers who are new to AI agents and want to know what one actually is. By the end you should be able to state the definition in one sentence, separate the agent's "brain" from its "body," and follow how the think, act and observe loop runs.
What an agent is
An agent is a system that uses an AI model to interact with its environment in order to achieve a user-defined objective. It combines reasoning, planning and the execution of actions, which often happens through external tools[1].
Consider a butler-like agent. You ask it for a coffee. It understands the request, reasons about the steps (go to the kitchen, use the coffee machine, brew, bring the coffee back), and then uses the tools it has, such as the coffee machine, to finish the job. It is called an agent because it has agency: it can interact with its environment[1].
The brain and the body
An agent has two main parts[1]:
- The brain is the AI model. It handles reasoning and planning, and decides which actions to take based on the situation.
- The body is the set of capabilities and tools the agent has been equipped with. That set defines the range of actions available. Humans cannot fly, but they can walk, run, jump and grab.
The same brain with different tools can do very different things.
How much agency a system has
Agency is a spectrum, and five levels are commonly distinguished[1]:
- Simple processor: the output has no effect on program flow.
- Router: the output decides basic control flow, such as which branch runs.
- Tool caller: the output decides which function runs, for example
run_function(llm_chosen_tool, llm_chosen_args). - Multi-step agent: the output controls iteration and whether the program continues, for example
while llm_should_continue(): execute_next_step(). - Multi-agent: one agentic workflow can start another.
Higher levels give the model more control over the program's flow, and they are harder to predict and test.
Why agents need tools
The most common brain is a large language model (LLM), which takes text as input and produces text. GPT-4, Llama and Gemini are examples[1]. A vision language model (VLM) works like an LLM but also takes images as input[1].
An LLM can only generate text. Chat applications such as HuggingChat and ChatGPT can generate images because their developers added tools that the model can call[1].
Anything an agent does is done through tools. An action can involve several tools, so actions and tools are not the same thing[1]. Tool design matters a great deal. Some tasks need carefully designed tools, while others can be handled by general tools such as web_search[1].
Writing a tool and calling it
A tool is an ordinary Python function with a docstring. An e-mail tool might look like this[1]:
def send_message_to(recipient, message):
"""Useful to send an e-mail message to a recipient"""
...When the model needs the tool, it generates code that runs it, for example[1]:
send_message_to("Manager", "Can we postpone today's meeting?")This is how a personal assistant agent works: it understands the instruction, then decides which tool to call.
Thoughts: the agent's internal reasoning
A thought is the agent's internal reasoning and planning. The agent uses the LLM to analyze the information in its prompt, which amounts to an inner monologue as it works through a problem[2].
Thoughts let the agent assess what it has observed, choose the next action or actions, break a complex problem into smaller steps, and adjust its plan when new information arrives[2]. Common kinds of thought include planning, analysis, decision making, problem solving, memory integration, self-reflection, goal setting and prioritization[2].
Chain-of-Thought and ReAct
Chain-of-Thought (CoT) is a prompting technique. It asks the model to think through a problem step by step before giving a final answer, usually starting with "Let's think step by step." It suits logic and math, and it does not call external tools[2]. A CoT example looks like this:
Question: What is 15% of 200?
Thought: Let's think step by step. 10% of 200 is 20, and 5% of 200 is 10, so 15% is 30.
Answer: 30ReAct combines Reasoning (Think) with Acting (Act). It alternates between a thought, an action such as a tool call, and an observation of the tool's output. This lets an agent solve complex multi-step tasks[2]. A ReAct trace looks like this:
Thought: I need to find the latest weather in Paris.
Action: Search["weather in Paris"]
Observation: It's 18°C and cloudy.
Thought: Now that I know the weather...
Action: Finish["It's 18°C and cloudy in Paris."]The difference is that CoT does not use external tools, while ReAct uses actions and observations to interact with the outside world. CoT suits logic, math and purely internal tasks. ReAct suits information seeking and dynamic multi-step tasks[2].
Some newer models, such as DeepSeek R1 and OpenAI's o1, were fine-tuned to think before answering. They use <think> and </think> tokens to separate the reasoning phase from the final answer. This is a training-level technique, unlike the prompting strategies ReAct and CoT[2].
Common examples
- Personal virtual assistants such as Siri, Alexa and Google Assistant work as agents when they act on a user's behalf. They take queries, analyze context and retrieve information, then respond or start actions such as reminders, messages or smart-device control[1].
- Customer service chatbots answer questions, guide troubleshooting, open issues in internal databases, or complete transactions[1].
- Non-playable characters in video games can be powered by LLMs. They respond to context and adapt to player actions, instead of following rigid behavior trees[1].
The short version
An agent uses an AI model, typically an LLM, as its reasoning core. It understands natural language, reasons and plans, and interacts with its environment by gathering information, taking actions and observing the results[1].
Next steps
Get clear on how the brain and the tools divide the work before you study tool design. To try it yourself, write a small agent with two or three tools and check whether each round of thought and action does what you expect.
Adapted from unit 1 of Hugging Face's open-source *Agents Course*[1][2], released under the Apache-2.0 License.
Sources
- 1What is an Agent?Hugging Face agents-course (Apache-2.0)
- 2Thought: Internal Reasoning and the ReAct ApproachHugging Face agents-course (Apache-2.0)
Cite this page: What is an AI agent? The think, act, observe loop. TellWorld, https://www.tellworld.net/practice/practice-agent-what-are-agents. Updated 2026-11-14