Integrating Agno with LangDB
LangDB provides an AI Gateway platform for comprehensive observability and tracing of AI agents and LLM interactions. By integrating Agno with LangDB, you can gain full visibility into your agent’s operations, including agent runs, tool calls, team interactions, and performance metrics. For detailed integration instructions, see the LangDB Agno documentation.
LangDB Finance Team Trace
Prerequisites
-
Install Dependencies
Ensure you have the necessary packages installed:
-
Setup LangDB Account
- Sign up for an account at LangDB
- Create a new project in the LangDB dashboard
- Obtain your API key and Project ID from the project settings
-
Set Environment Variables
Configure your environment with the LangDB credentials:
Sending Traces to LangDB
Example: Basic Agent Setup
This example demonstrates how to instrument your Agno agent with LangDB tracing.Example: Multi-Agent Team Coordination
For more complex workflows, you can use Agno’sTeam
class with LangDB tracing:
Sample Trace
View a complete example trace in the LangDB dashboard: Finance Reasoning Team Trace
LangDB Finance Team Thread
Advanced Features
LangDB Capabilities
- Virtual Models: Save, share, and reuse model configurations—combining prompts, parameters, tools, and routing logic into a single named unit for consistent behavior across apps
- MCP Support: Enhanced tool capabilities through Model Context Protocol servers
- Multi-Provider: Support for OpenAI, Anthropic, Google, xAI, and other providers
Notes
- Initialization Order: Always call
init()
before creating any Agno agents or teams - Environment Variables: With
LANGDB_API_KEY
andLANGDB_PROJECT_ID
set, you can create models with justLangDB(id="model_name")