---
title: "What a generation is | Grafana Labs"
description: "The request and response the SDK captures each time an agent calls an LLM provider, and what that capture includes."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# What a generation is

A **generation** is the request and response the SDK captures each time your agent calls an LLM provider. It is the core unit of data in Agent Observability.

## What a generation includes

One generation holds the model that was called, the messages in and out, how many tokens the call used, and how long it took. Among the input messages is each **tool result**, what a tool returned after the agent called it, passed back to the model as an input message.

| Part                    | What it includes                                                                    |
|-------------------------|-------------------------------------------------------------------------------------|
| Model provider and name | For example, `openai/gpt-4o`                                                        |
| Input messages          | System prompt, user messages, and tool results                                      |
| Output messages         | Assistant responses and tool calls                                                  |
| Token usage             | Input, output, cache read, cache write, and reasoning                               |
| Timing                  | Request start, first token, and completion                                          |
| Metadata and tags       | Optional values you pass on a single generation; they apply to that generation only |

## Why these parts matter

When you open a conversation in Agent Observability, its detail view shows these same parts for each generation: the input messages, the output messages, the token usage by type, and the timing. Because AI agents are non-deterministic, these parts are what you use to troubleshoot behavioral issues when they produce incorrect answers and to manage costs.
