AI Gateway
Route your LLM calls through the AI Gateway with a single base URL change. Zero vendor lock-in: always run on the best model at the lowest cost for your use case.
Observability
Instrument your code with OpenTelemetry to capture traces, logs, and metrics for every LLM call, agent step, and tool use.
AI Gateway
Overview
Agno is a Python framework for building production-ready AI agents with structured workflows, tool integration, and multi-agent orchestration. By connecting Agno to Toqan Routerās AI Gateway, you get access to 500+ models for your agents with a single configuration change.Key Benefits
Toqan Routerās AI Gateway enhances your Agno applications with:Complete Observability
Track every agent interaction, tool use, and model call with detailed traces
Built-in Reliability
Automatic fallbacks, retries, and load balancing for production resilience
Cost Optimization
Real-time cost tracking and spend management across all your AI operations
Multi-Provider Access
Access 500+ LLMs and 30+ providers through a single, unified integration
Prerequisites
Before integrating Agno with Toqan Router, ensure you have:- A Toqan Router account and API Key
- Python 3.10 or higher
To setup your API key, see API keys & Endpoints.
Installation
Configuration
Configure Agno to use Toqan Routerās AI Gateway viaOpenAILike with a custom base_url:
Python
base_url: https://router.toqan.ai/eu/v3/router
Basic Agent Example
Python
Agent with Tools
Add tools to your agent for real-world tasks:Python
Agent with Custom Tools
Define your own Python functions as tools:Python
Multi-Agent Team
Orchestrate multiple specialized agents:Python
Model Selection
With Toqan Router, you can use any supported model from 30+ providers:Python
Observability
Installation
Configuring Toqan Router Observability
Set up the tracer provider and instrument Agno before creating any agents:The OTEL setup and
AgnoInstrumentor().instrument() call must happen before any agent instantiation.
