Skip to main content

Requirements

Environment Variables

Initialize Maxim Logger

Enable LlamaIndex Instrumentation

This single line automatically instruments:
  • AgentWorkflow.run() - Multi-agent workflow execution
  • FunctionAgent.run() - Function-based agent interactions
  • ReActAgent.run() - ReAct reasoning agent calls

Simple FunctionAgent Example

Create a basic calculator agent with automatic tracing:

Multi-Modal Agent Example

Create an agent that can handle both text and images:

Multi-Agent Workflow Example

Create a complex workflow with multiple specialized agents:

What Gets Traced

With Maxim instrumentation enabled, you’ll automatically capture:

Agent Execution Traces

  • Function Calls: All tool executions with inputs and outputs
  • Agent Reasoning: Step-by-step decision making process
  • Multi-Agent Coordination: Agent handoffs and communication
  • Performance Metrics: Execution times and resource usage

LLM Interactions

  • Prompts and Responses: Complete conversation history
  • Model Parameters: Temperature, max tokens, model versions
  • Token Usage: Input/output token consumption
  • Error Handling: Failed requests and retry attempts

Workflow Orchestration

  • Agent Workflows: Complex multi-agent execution paths
  • Tool Chain Execution: Sequential and parallel tool usage
  • Multi-Modal Processing: Text, image, and mixed content handling

View Traces in Maxim Dashboard

All agent interactions, tool calls, and workflow executions are automatically traced and available in your Maxim dashboard. You can:
  • Monitor agent performance and success rates
  • Debug failed tool calls and agent reasoning
  • Analyze multi-agent coordination patterns
  • Track token usage and costs across workflows
  • Set up alerts for agent failures or performance issues

Advanced Configuration

Custom Debug Settings

llamaindex_traces.gif

Resources

You can quickly try the LlamaIndex One Line Integration here -

LlamaIndex Integration Cookbook