AI Agents are revolutionizing the way we approach complex tasks, leveraging the power of large language models (LLM).
Essentially, AI Agents are LLM-based systems designed to achieve multiple step goals by using the tools we provide as needed.
In its simplest form, an Agent is composed of 3 elements:
- An LLM model, which enables the Agent to reason and make decisions
- A set of tools made available to help it achieve its goals
- A set of instructions, which are explicit explanations of how we want it to behave and what objectives it should pursue.
For example, we can define a very simple Agent that simply performs internet searches.
root_agent = Agent(
name="basic_search_agent",
model="gemini-2.5-flash",
description=(
"Assistant that can search the web"
),
instruction=(
"You are an assistant that likes to help. Answer the user's questions by performing a Google Search when needed."),
tools=[google_search]
)If we then ask it, for example, “what was Barça’s latest match and what was the result?”, the agent will search the web, process the results, and give us the answer in natural language, along with the references showing where it found the information so we can verify the source.

Agents also have additional capacities such as
- Planning and reflection: AI agents can analyze a problem, break it down into steps, and adjust their approach based on new information.
- Tool access: They can interact with external tools and resources, such as databases, APIs, or specific applications, to gather information and perform actions.
- Memory: AI agents can store and retrieve information, allowing them to learn from past experiences and make more informed decisions.

Main Components of an Artificial Intelligence Agent (AI Agent)
Usage Example: Corporate Travel Request Management Agent
Objective: Decide whether to approve or reject an employee’s travel request.
Available tools:
- Travel policy checker: Consults and interprets company rules (budget, allowed destinations, justified reasons).
- Company calendar viewer: Accesses the company agenda to verify whether the meeting or event motivating the trip exists and is relevant.
- Historical cost comparator: Reviews similar trips previously made by the same department or company, comparing costs and justifications.
How it works:
When the agent receives a request, it uses the policy checker to see whether it complies with the rules. It checks the company calendar to validate the event motivating the trip. Finally, it compares the proposed cost with similar trips already approved or rejected. If something doesn’t align, it may reject the request, ask for additional information, or approve it if everything is correct.
If this agent were programmed in the traditional way, all exceptions and variations in policies, events, and scenarios would need to be coded manually, something extremely complex. A flexible agent can adapt directly to regulation changes and new situations.
Usage Example: Traffic Management Agent in a Smart City
This is another fictional example meant to illustrate how an agent can adapt to different situations.
Objective: Optimize the flow of urban traffic in real time to minimize congestion and wait times.
Available tools:
- Traffic cameras and sensors providing real-time data on vehicle volume and incidents.
- Weather forecasts to anticipate how conditions may affect traffic.
- Traffic light and road signal controllers (ability to adjust signal timing, open/close lanes, inform drivers, etc.).
Adaptive functioning:
Imagine that during rush hour, the system detects a buildup of vehicles on an avenue.
The agent does not always follow the same pattern:
- If it detects an accident through sensors, it first adjusts traffic lights or recommends alternative routes to drivers.
- If it knows rain is expected soon (via weather forecasts), it increases safety margins, extends traffic-light times at conflictive intersections, or reduces recommended speed.
- It can alternate and combine tools; for example, for example, it may change traffic-light programming while monitoring the effect, and if the measure is insufficient, rely on weather data or send alerts to drivers.
The agent decides at every moment which tool or combination of tools is most useful based on context, being able to change strategy from minute to minute if necessary.
As in the previous example, this would be very difficult to program traditionally, since real-world situations are infinite and constantly changing. An AI-powered agent can automatically adapt by combining resources according to what is happening in real time.
Now that we have detailed the internal structure of an agent, it’s important to note that we can have agents specialized in specific tasks, and we can also create agents that coordinate sub-agents so they collaborate to solve complex problems more efficiently. This is what we call a Multi-Agent System (MAS), which we will explain another time.
AI Agents are already an essential part of future systems; they are collaborative, intelligent and adaptive.
