> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-update-deprecated-models.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# LangWatch

> Integrate Agno with LangWatch to send traces and gain insights into your agent's performance.

## Integrating Agno with LangWatch

LangWatch provides a robust platform for tracing and monitoring AI model calls. By integrating Agno with LangWatch, you can utilize OpenInference instrumentation to send traces and gain insights into your agent's performance.

## Prerequisites

1. **Install Dependencies**

   Ensure you have the necessary packages installed:

   ```bash theme={null}
   uv pip install langwatch agno openai openinference-instrumentation-agno
   ```

2. **Setup LangWatch Account**

   * Sign up for an account at [LangWatch](https://langwatch.ai/).
   * Obtain your API key from the LangWatch dashboard.

3. **Set Environment Variables**

   Configure your environment with the LangWatch API key:

   ```bash theme={null}
   export LANGWATCH_API_KEY=<your-api-key>
   ```

## Sending Traces to LangWatch

* ### Example: Using LangWatch with OpenInference

This example demonstrates how to instrument your Agno agent with OpenInference and send traces to LangWatch.

```python theme={null}
import langwatch
import os

from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from openinference.instrumentation.agno import AgnoInstrumentor

# Initialize LangWatch and instrument Agno
langwatch.setup(instrumentors=[AgnoInstrumentor()])

# Create and configure your Agno agent
agent = Agent(
    name="A helpful AI Assistant",
    model=OpenAIResponses(id="gpt-5.2"),
    tools=[],
    instructions="You are a helpful AI Assistant.",
    debug_mode=True,
)

# Use the agent
agent.print_response("Tell me a joke.")
```

The `AgnoInstrumentor` automatically captures all Agno agent activity. All traces will be sent to your LangWatch dashboard without requiring manual OpenTelemetry configuration.

## Notes

* **Environment Variables**: Ensure your environment variables are correctly set for the API key.
* **Automatic Instrumentation**: The LangWatch SDK handles OpenTelemetry configuration automatically when you use `langwatch.setup()`.
* **Additional Features**: LangWatch supports capturing RAG data, metadata, attributes, evaluations, and guardrails. Visit the [LangWatch documentation](https://docs.langwatch.ai/) for more information.

By following these steps, you can effectively integrate Agno with LangWatch, enabling comprehensive observability and monitoring of your AI agents.
