Skip to main content

Integrating Agno with Latitude

Latitude is an open-source observability and evaluation platform for LLM applications. By instrumenting Agno with OpenInference and exporting OpenTelemetry traces to Latitude, every agent run, tool call, and model call becomes a span you can inspect, search, and evaluate. Token usage, cost, latency, and full input/output are captured automatically.

Prerequisites

  1. Install Dependencies Ensure you have the necessary packages installed:
  2. Setup Latitude Account
    • Sign up for an account at Latitude (or self-host).
    • Create a project and copy its slug.
    • Obtain an API key from the project’s settings.
  3. Set Environment Variables Configure your environment with the Latitude credentials:

Sending Traces to Latitude

Example: Using Latitude with OpenInference

Instrument your Agno agent with OpenInference and send traces to Latitude’s OpenTelemetry ingestion endpoint.
After running the agent, open your project in the Latitude dashboard to view the trace, with child spans for each model and tool call.
Latitude dashboard showing Agno traces and sessions with cost, token usage, duration, and tags

Agno traces in Latitude

Notes

  • Environment Variables: Ensure LATITUDE_API_KEY and LATITUDE_PROJECT are set, and that the project slug matches a project in the organization that owns the API key.
  • Endpoint: The OTLP HTTP exporter appends /v1/traces to the base OTEL_EXPORTER_OTLP_ENDPOINT. If you self-host Latitude, point the endpoint at your own ingestion host instead of https://ingest.latitude.so.
  • Short-lived scripts: When tracing one-off scripts, call tracer_provider.shutdown() (or use a BatchSpanProcessor and flush on exit) so the final batch of spans is exported before the process ends.
By following these steps, you can integrate Agno with Latitude, enabling comprehensive observability and evaluation of your AI agents.