Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4102,6 +4102,7 @@
"observability/maxim",
"observability/mlflow",
"observability/openlit",
"observability/respan",
"observability/traceloop",
"observability/weave"
]
Expand Down
2 changes: 1 addition & 1 deletion observability/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Agno offers first-class support for OpenTelemetry, the industry standard for dis
- **Custom Tracing**: Extend or customize tracing as needed.

<Note>
OpenTelemetry-compatible backends including Arize Phoenix, Langfuse, Langsmith, Langtrace, Logfire, Maxim, MLflow, OpenLIT, Traceloop, and Weave are supported by Agno out of the box.
OpenTelemetry-compatible backends including Arize Phoenix, Langfuse, Langsmith, Langtrace, Logfire, Maxim, MLflow, OpenLIT, Respan, Traceloop, and Weave are supported by Agno out of the box.
</Note>

67 changes: 67 additions & 0 deletions observability/respan.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: Respan
description: Integrate Agno with Respan to trace agent workflows and monitor performance.
---

## Integrating Agno with Respan

[Respan](https://respan.ai) is an observability platform for tracing and monitoring AI agents. The `respan-exporter-agno` package captures Agno's OpenInference trace data and sends it to Respan.

## Prerequisites

1. **Install Dependencies**

```bash
uv pip install agno openinference-instrumentation-agno respan-exporter-agno
```

2. **Setup Respan Account**

- Create an account at [platform.respan.ai](https://platform.respan.ai).
- Generate an API key on the [API keys page](https://platform.respan.ai/platform/api/api-keys).

3. **Set Environment Variables**

```bash
export RESPAN_API_KEY=<your-api-key>
```

## Sending Traces to Respan

```python
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from respan_exporter_agno import RespanAgnoInstrumentor

# Initialize Respan instrumentation
RespanAgnoInstrumentor.instrument()

# Create and configure the agent
agent = Agent(
model=OpenAIChat(id="gpt-4o-mini"),
instructions="You are a helpful assistant.",
)

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

View your traces on the [Traces page](https://platform.respan.ai/platform/traces) in the Respan dashboard.

## Configuration

`RespanAgnoInstrumentor.instrument()` accepts the following parameters:

| Parameter | Type | Default | Description |
| --------------------- | ------------- | ------------------------ | ---------------------------- |
| `api_key` | `str` | `RESPAN_API_KEY` env var | Respan API key. |
| `endpoint` | `str \| None` | `None` | Custom ingest endpoint URL. |
| `base_url` | `str \| None` | `None` | API base URL. |
| `environment` | `str \| None` | `None` | Environment label. |
| `customer_identifier` | `str \| None` | `None` | Default customer identifier. |
Comment thread
drPod marked this conversation as resolved.
Outdated

## Notes

- **Environment Variables**: Set `RESPAN_API_KEY` to avoid passing `api_key` directly in code.
- **Initialization Order**: Call `RespanAgnoInstrumentor.instrument()` before creating any agents.
- **Respan Docs**: See the [Respan Agno integration guide](https://respan.ai/docs/integrations/tracing/agno) for additional details.
Loading