# Agents Explained | A Visual Primer

Everyone is talking about agents. Hardly a week goes by without major AI labs announcing an impressive agent demo or an agent toolkit. They've enabled many to vibe-code their way to internet fame, and they are the subject of endless social media commentary. But, what are agents exactly? How are they built and trained?

In this blog post we'll cover the mechanics of agents, or how you get from a pure text-generator (a base LLM) to something that can take real-life actions. We'll walk you step by step through an example you can follow along, then cover what advances in the field made agents effective in recent months. Here's the workflow we'll explore together—you can click through to see each step:

**User Query**  Plan a weekend trip...

**Agent's Reasoning**  The model generates reasoning to analyze the problem and plan tool calls.

To plan a weekend trip, I need weather information and activity recommendations. I'll use `get_weather` to check conditions, then `web_search` for activities.

The user provides a query.

"Plan a weekend trip in Copenhagen."

**The agent issues a tool call with function name and arguments.**
```json
{
  "name": "get_weather",
  "arguments": {
    "location": "Copenhagen, Denmark",
    "unit": "celsius"
  }
}
```

**Response from weather tool:**  
```json
{"temperature": 20, "condition": "Partly Cloudy", "humidity": 65, "wind_speed": 12, "location": "Copenhagen, Denmark", "unit": "celsius"}
```

The agent issues another tool call.
```json
{
  "name": "web_search",
  "arguments": {
    "query": "weekend activities Copenhagen cloudy weather"
  }
}
```

**Response from search tool:**  
```json
{"results": [{"title": "Copenhagen Weekend Guide", "snippet": "Visit Tivoli Gardens, stroll through Nyhavn, explore Rosenborg Castle, or bike the city center."}], "search_query": "weekend activities Copenhagen"}
```

**The agent provides the weekend plan.**  
"Copenhagen will be 20°C and partly cloudy this weekend. I recommend Tivoli Gardens, Nyhavn waterfront, or Rosenborg Castle."

### How Does It Work?

MCP (Model Context Protocol) is a standard that allows developers to define tools for their application in a common format. It is a commonly agreed upon interface for agents to access app functionality, whether that be access to calendar apps, web searches, databases, or actions with workplace software.

Today's agents excel at using openly available tools in general-purpose contexts; however, they struggle to adapt to specific environments. Building personalized assistants that can integrate deeply into your business processes will take additional work.

To learn more, check out [our work with agents](/content/site-root.html).
