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

# Langwatch

This example shows how to instrument your agno agent and send traces to LangWatch.

## Code

```python cookbook/integrations/observability/langwatch_op.py theme={null}
import langwatch
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.duckduckgo import DuckDuckGoTools
from openinference.instrumentation.agno import AgnoInstrumentor

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

# Create and configure your Agno agent
agent = Agent(
    name="Stock Price Agent",
    model=OpenAIChat(id="gpt-5-mini"),
    tools=[DuckDuckGoTools()],
    instructions="You are an internet search agent. Find and provide accurate information on any topic.",
    debug_mode=True,
)

agent.print_response("What are the latest developments in artificial intelligence?")

```

## Usage

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Set your API key">
    ````bash theme={null}
    - Sign up for an account at https://app.langwatch.ai/.
    - Set your LangWatch API key as an environment variables:
    ```bash
    export LANGWATCH_API_KEY=<your-key>
    ````

    ````
    </Step>

    <Step title="Install libraries">
    ```bash
    pip install -U agno openai ddgs langwatch openinference-instrumentation-agno
    ````
  </Step>

  <Step title="Run Agent">
    <CodeGroup>
      ```bash Mac theme={null}
      python cookbook/integrations/observability/langwatch_op.py
      ```

      ```bash Windows theme={null}
      python cookbook/integrations/observability/langwatch_op.py
      ```
    </CodeGroup>
  </Step>
</Steps>
