Skip to main content

Integrating Agno with Maxim

Maxim AI provides comprehensive agent monitoring, evaluation, and observability for your Agno applications. With Maxim’s one-line integration, you can easily trace and analyse agent interactions, performance metrics, and more.

Prerequisites

  1. Install Dependencies Ensure you have the necessary packages installed:
    Or install Maxim separately:
  2. Setup Maxim Account
    • Sign up for an account at Maxim.
    • Generate your API key from the Maxim dashboard.
    • Create a repository to store your traces.
  3. Set Environment Variables Configure your environment with the Maxim API key:

Sending Traces to Maxim

Example: Basic Maxim Integration

This example demonstrates how to instrument your Agno agent with Maxim and send traces for monitoring and evaluation.

Example: Multi-Agent System with Maxim

This example demonstrates how to set up a multi-agent system with comprehensive Maxim tracing using the Team class.
agno.gif

Features

Observability & Tracing

Maxim provides comprehensive observability for your Agno agents:
  • Agent Tracing: Track your agent’s complete lifecycle, including tool calls, agent trajectories, and decision flows
  • Token Usage: Monitor prompt and completion token consumption
  • Model Information: Track which models are being used and their performance
  • Tool Calls: Detailed logging of all tool executions and their results
  • Performance Metrics: Latency, cost, and error rate tracking

Evaluation & Analytics

  • Auto Evaluations: Automatically evaluate captured logs based on filters and sampling
  • Human Evaluations: Use human evaluation or rating to assess log quality
  • Node Level Evaluations: Evaluate any component of your trace for detailed insights
  • Dashboards: Visualize traces over time, usage metrics, latency & error rates

Alerting

Set thresholds on error rates, cost, token usage, user feedback, and latency to get real-time alerts via Slack or PagerDuty.

Notes

  • Environment Variables: Ensure your environment variables are correctly set for the API key and repository ID.
  • Instrumentation Order: Call instrument_agno() before creating or executing any agents to ensure proper tracing.
  • Debug Mode: Enable debug mode to see detailed logging information:
  • Maxim Docs: For more information on Maxim’s features and capabilities, refer to the Maxim documentation.
By following these steps, you can effectively integrate Agno with Maxim, enabling comprehensive observability, evaluation, and monitoring of your AI agents.