π SuperOptiX Observability & Tracing Guide
Welcome to the comprehensive guide for SuperOptiX's observability and monitoring system! This guide combines the complete overview, real-world experiment, and quick reference for monitoring, debugging, and analyzing your AI agents using the super observe
command.
π― Overview
SuperOptiX provides a powerful observability system that automatically traces agent execution, tool usage, LLM calls, and performance metrics. The observability system helps you:
- Monitor agent performance in real-time
- Debug issues with detailed trace analysis
- Analyze patterns and optimize agent behavior
- Track tool usage and LLM interactions
- Export trace data for external analysis
π Quick Start
Let's walk through a complete example of setting up observability for an agent:
Step 1: Initialize a Project and Create an Agent
# Initialize a new SuperOptiX project
super init my_project
cd my_project
# Pull a pre-built agent (Genies tier for full observability features)
super agent pull developer --tier genies
# Compile the agent to generate the pipeline
super agent compile developer
Step 2: Run the Agent to Generate Traces
# Run the agent - this automatically enables tracing
super agent run developer --goal "Write a simple Python function to calculate the factorial of a number"
The agent execution automatically generates trace files in .superoptix/traces/
with detailed information about:
- Model initialization
- Tool setup and execution
- Pipeline execution flow
- Performance metrics
- Error handling
Step 3: Explore Observability Features
# List all agents with available traces
super observe list
# View traces for a specific agent
super observe traces developer_20250714_200501
# Launch the interactive dashboard
super observe dashboard --auto-open
# Analyze performance metrics
super observe analyze developer_20250714_200501 --days 1
π Available Commands
super observe list
- List Agents with Traces
Lists all agents that have generated trace files in your project.
Output Example:
π Available Agents with Traces
βββββββββββββββββββββββββββββ³ββββββββββββββ³ββββββββββββββββββββββ
β Agent ID β Trace Count β Last Activity β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β developer β 2 β 2025-07-14 20:05:11 β
β developer_20250714_200501 β 11 β 2025-07-14 20:05:11 β
βββββββββββββββββββββββββββββ΄ββββββββββββββ΄ββββββββββββββββββββββ
super observe traces
- View Agent Traces
View detailed execution traces for a specific agent.
# Basic trace view
super observe traces <agent_id>
# Detailed analysis with tool and LLM information
super observe traces <agent_id> --detailed --show-tools --show-llm
# Filter by component or status
super observe traces <agent_id> --component pipeline --status success
# Export traces to JSON or CSV
super observe traces <agent_id> --export json --output traces.json
Options:
- --component
: Filter traces by component (pipeline, tool, execution, etc.)
- --status
: Filter by status (success, error, warning, info)
- --limit
: Limit number of traces shown (default: 100)
- --detailed
: Show detailed trace analysis
- --show-tools
: Show tool execution details
- --show-llm
: Show LLM call details
- --export
: Export format (json, csv)
- --output
: Output file path
Output Example:
π Loading traces for agent: developer_20250714_200501
β
Loaded 11 trace events
Traces for Agent: developer_20250714_200501
ββββββββββββ³ββββββββββββ³ββββββββββββββββββββββββββ³ββββββββββ³ββββββββββββ
β Time β Component β Event β Status β Duration β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β 20:05:01 β pipeline β model_initialized β success β - β
β 20:05:01 β pipeline β tools_setup_start β success β - β
β 20:05:01 β pipeline β tools_initialized β success β - β
β 20:05:01 β pipeline β tools_setup_end β success β 0.5ms β
β 20:05:01 β pipeline β react_agent_initialized β success β - β
β 20:05:01 β execution β pipeline_forward_start β success β - β
β 20:05:05 β tool β calculate_start β success β - β
β 20:05:05 β calculate β tool_execution_success β success β - β
β 20:05:05 β tool β calculate_end β success β 0.1ms β
β 20:05:11 β pipeline β execution_completed β success β - β
β 20:05:11 β execution β pipeline_forward_end β success β 10270.0ms β
ββββββββββββ΄ββββββββββββ΄ββββββββββββββββββββββββββ΄ββββββββββ΄ββββββββββββ
π Total: 11 | Errors: 0 | Avg: 3423.5ms
super observe dashboard
- Launch Interactive Dashboard
Launch a web-based dashboard for real-time monitoring and analysis.
# Launch dashboard with default settings
super observe dashboard
# Launch with custom port and auto-open browser
super observe dashboard --port 8502 --host localhost --auto-open
# Monitor a specific agent
super observe dashboard --agent-id developer_20250714_200501
Options:
- --port
: Dashboard port (default: 8501)
- --host
: Dashboard host (default: localhost)
- --auto-open
: Automatically open browser
- --agent-id
: Monitor specific agent
The dashboard provides: - Real-time trace visualization - Performance metrics and charts - Tool usage analytics - Error tracking and debugging - Memory and context analysis
super observe analyze
- Performance Analysis
Analyze agent performance over time and generate insights.
# Analyze last 7 days (default)
super observe analyze <agent_id>
# Analyze specific time period
super observe analyze <agent_id> --days 30
Output Example:
π Performance Summary for Agent: developer_20250714_200501
Total Events 11
Successful Events 11
Error Events 0
Warning Events 0
Average Duration 3423.5 ms
Median Duration 0.5 ms
95th Percentile Duration 10270.0 ms
super observe check
- Trace Configuration Check
Check pipeline tracing configuration and verify trace generation.
# Check trace configuration
super observe check
# Check with test run
super observe check --agent-id <agent_id> --run-test
# Check DSPy configuration
super observe check --check-dspy
Options:
- --agent-id
: Test specific agent
- --run-test
: Run a test agent execution
- --check-dspy
: Check DSPy configuration
super observe debug
- Interactive Debugging
Start an interactive debugging session for an agent.
# Start debug session
super observe debug agent <agent_id>
# Enable step-by-step debugging
super observe debug agent <agent_id> --enable-step-mode
# Break on errors or memory operations
super observe debug agent <agent_id> --break-on-error --break-on-memory
Debug Commands:
- help
: Show available commands
- continue
: Continue execution
- step
: Step through execution
- breakpoint <component>
: Set breakpoint
- inspect
: Inspect current state
- memory
: View memory contents
- trace
: Show execution trace
- export
: Export debug data
π Trace Data Structure
SuperOptiX generates comprehensive trace data in JSONL format. Each trace event contains:
{
"event_id": "unique-event-identifier",
"timestamp": "2025-07-14T20:05:01.215246",
"event_type": "model_initialized",
"component": "pipeline",
"data": {
"model": "llama3.1:8b",
"provider": "ollama",
"tier": "genies",
"adapter": "ChatAdapter"
},
"parent_id": null,
"duration_ms": null,
"status": "success",
"metadata": null
}
Event Types:
- model_initialized
: Model setup and configuration
- tools_setup_start/end
: Tool initialization
- tools_initialized
: Tool registration
- react_agent_initialized
: ReAct agent setup
- pipeline_forward_start/end
: Main execution flow
- calculate_start/end
: Tool execution
- tool_execution_success
: Tool results
- execution_completed
: Pipeline completion
Components:
- pipeline
: Core pipeline operations
- execution
: Main execution flow
- tool
: Tool execution
- calculate
: Calculator tool
- text_analyzer
: Text analysis tool
- file_reader
: File reading tool
π¬ Real-World Experiment: Developer Agent
This section documents our comprehensive experiment with the SuperOptiX observability system using a developer agent.
π― Experiment Overview
Goal: Document and demonstrate the super observe
command functionality by creating a test agent, running it, and analyzing the generated traces.
Agent Used: Developer Assistant (Genies tier) Task: Write a simple Python function to calculate the factorial of a number
π Experiment Steps
Step 1: Project Initialization
Result: Created a new SuperOptiX project with the .super
file marker.
Step 2: Agent Creation
Result: Successfully added the Developer Assistant agent with:
- Name: Developer Assistant
- Industry: Software
- Tier: Genies
- Features: ReAct Agents + Tools + Memory
- Location: swe/agents/developer/playbook/developer_playbook.yaml
Step 3: Agent Compilation
Result: Generated a Genies-tier pipeline with:
- Framework: DSPy (Mixin template)
- Features: ReAct, Tools, RAG Support, Memory
- Output: swe/agents/developer/pipelines/developer_pipeline.py
- BDD Scenarios: 5 found for testing
Step 4: Agent Execution
# Run the agent with a specific goal
super agent run developer --goal "Write a simple Python function to calculate the factorial of a number"
Result: Agent executed successfully with:
- Agent ID: developer_20250714_200501
- Model: llama3.1:8b
(Ollama backend)
- Tools: 3 tools configured (calculator, text_analyzer, file_reader)
- Execution Time: 10.27 seconds
- Status: Success β
π Trace Analysis Results
Trace File Generation
The agent execution automatically generated trace files in .superoptix/traces/
:
π Trace Files Generated:
βββ .superoptix/traces/developer_20250714_200501.jsonl (4057 bytes)
βββ .superoptix/traces/developer.jsonl (960 bytes)
Key Trace Events Observed
- Model Initialization:
model_initialized
- Model setup with Ollama backend - Tool Setup:
tools_setup_start/end
- Tool initialization (0.5ms) - Tool Registration:
tools_initialized
- 3 tools registered - ReAct Setup:
react_agent_initialized
- ReAct agent configuration - Execution Start:
pipeline_forward_start
- Main execution begins - Tool Execution:
calculate_start/end
- Calculator tool used (0.1ms) - Execution Complete:
pipeline_forward_end
- Total execution (10270ms)
Performance Insights
- Total execution time: 10.27 seconds
- Tool execution time: 0.1ms (calculator tool)
- Setup overhead: 0.5ms for tool initialization
- LLM processing: Majority of time spent in LLM inference
π― Key Findings
1. Automatic Tracing
- Tracing is automatic: No manual configuration required
- Comprehensive coverage: Captures model, tools, execution, and performance data
- Structured format: JSONL format for easy parsing and analysis
2. Rich Trace Data
- Event hierarchy: Parent-child relationships between events
- Timing information: Precise duration measurements
- Component separation: Clear separation of pipeline, execution, and tool events
- Status tracking: Success, error, warning, and info statuses
3. Tool Usage Analysis
- Tools used: Calculator tool attempted (with syntax error)
- Tool integration: Seamless integration with ReAct framework
- Error handling: Graceful handling of tool execution errors
β‘ Quick Reference
π Essential Commands
List Agents with Traces
View Agent Traces
# Basic trace view
super observe traces <agent_id>
# Detailed analysis
super observe traces <agent_id> --detailed --show-tools --show-llm
# Filter by component
super observe traces <agent_id> --component pipeline
# Export traces
super observe traces <agent_id> --export json --output traces.json
Launch Dashboard
# Default dashboard
super observe dashboard
# Custom port and auto-open
super observe dashboard --port 8502 --auto-open
# Monitor specific agent
super observe dashboard --agent-id <agent_id>
Performance Analysis
# Analyze last 7 days (default)
super observe analyze <agent_id>
# Analyze specific period
super observe analyze <agent_id> --days 30
Debug Agent
# Start debug session
super observe debug agent <agent_id>
# Step-by-step debugging
super observe debug agent <agent_id> --enable-step-mode
# Break on errors
super observe debug agent <agent_id> --break-on-error
Check Configuration
# Check trace configuration
super observe check
# Test with specific agent
super observe check --agent-id <agent_id> --run-test
π Command Options Summary
super observe traces
Options
--component
: Filter by component (pipeline, tool, execution)--status
: Filter by status (success, error, warning, info)--limit
: Limit number of traces (default: 100)--detailed
: Show detailed analysis--show-tools
: Show tool execution details--show-llm
: Show LLM call details--export
: Export format (json, csv)--output
: Output file path
super observe dashboard
Options
--port
: Dashboard port (default: 8501)--host
: Dashboard host (default: localhost)--auto-open
: Automatically open browser--agent-id
: Monitor specific agent
super observe analyze
Options
--days
: Number of days to analyze (default: 7)
super observe debug
Options
--enable-step-mode
: Enable step-by-step debugging--break-on-error
: Break on error--break-on-memory
: Break on memory operations
π Debug Commands
Once in debug mode:
- help
: Show available commands
- continue
: Continue execution
- step
: Step through execution
- breakpoint <component>
: Set breakpoint
- inspect
: Inspect current state
- memory
: View memory contents
- trace
: Show execution trace
- export
: Export debug data
π― Common Event Types
model_initialized
: Model setuptools_setup_start/end
: Tool initializationtools_initialized
: Tool registrationreact_agent_initialized
: ReAct setuppipeline_forward_start/end
: Main executioncalculate_start/end
: Tool executiontool_execution_success
: Tool resultsexecution_completed
: Pipeline completion
π§ Common Components
pipeline
: Core pipeline operationsexecution
: Main execution flowtool
: Tool executioncalculate
: Calculator tooltext_analyzer
: Text analysis toolfile_reader
: File reading tool
π§ Advanced Features
External Tracing Integrations
SuperOptiX supports integration with external tracing systems:
- MLflow: For experiment tracking and model management
- Langfuse: For LLM application monitoring
- Custom tracers: Extensible tracing framework
Performance Monitoring
The observability system tracks: - Execution duration and timing - Tool usage patterns - LLM call performance - Error rates and types - Memory usage trends - Component-specific metrics
Debugging Capabilities
- Step-by-step execution: Walk through agent execution
- Breakpoints: Set breakpoints on specific components
- State inspection: Examine agent state at any point
- Memory analysis: View memory contents and operations
- Error tracking: Detailed error analysis and debugging
π― Best Practices
1. Enable Tracing for All Agents
Always run agents with tracing enabled to capture comprehensive execution data:
# Tracing is automatically enabled for all agent runs
super agent run <agent_id> --goal "your goal"
2. Regular Performance Analysis
Schedule regular performance analysis to identify optimization opportunities:
# Weekly performance review
super observe analyze <agent_id> --days 7
# Monthly trend analysis
super observe analyze <agent_id> --days 30
3. Monitor Tool Usage
Track tool usage patterns to optimize agent capabilities:
4. Debug Production Issues
Use the debugging system to troubleshoot production problems:
5. Export Trace Data
Export trace data for external analysis and reporting:
# Export to JSON for analysis
super observe traces <agent_id> --export json --output analysis.json
# Export to CSV for spreadsheet analysis
super observe traces <agent_id> --export csv --output data.csv
π¨ Troubleshooting
No Traces Found
If you don't see any traces:
- Verify agent execution: Ensure the agent has been run at least once
- Check project structure: Make sure you're in a SuperOptiX project directory
- Verify trace directory: Check
.superoptix/traces/
for trace files - Run trace check: Use
super observe check
to diagnose issues
Dashboard Not Starting
If the dashboard fails to start:
- Check port availability: Ensure port 8501 (or your chosen port) is free
- Verify Streamlit installation: Install with
pip install streamlit
- Check permissions: Ensure write access to
/tmp/
directory - Review logs: Check for error messages in the console output
Performance Issues
If you experience performance problems:
- Limit trace data: Use
--limit
to reduce trace output - Filter traces: Use
--component
and--status
filters - Export selectively: Export only necessary data
- Monitor disk usage: Clean up old trace files periodically
π Performance Metrics
Key Metrics to Monitor
- Total Events: Number of trace events
- Success Rate: Percentage of successful events
- Error Rate: Percentage of error events
- Average Duration: Mean execution time
- 95th Percentile: Performance threshold
- Tool Usage: Frequency of tool calls
- LLM Calls: Number of model interactions
Typical Values
- Setup Time: 0.1-1.0ms
- Tool Execution: 0.1-10ms
- LLM Processing: 1-30 seconds
- Total Execution: 1-60 seconds
π Quick Start Workflow
-
Run an agent to generate traces:
-
List available traces:
-
View traces for analysis:
-
Launch dashboard for monitoring:
-
Analyze performance:
-
Debug issues if needed:
π Related Documentation
- Agent Development Guide - Learn how to create and customize agents
- Tool Development Guide - Build custom tools for your agents
- Memory System Guide - Understand agent memory and context management
- Evaluation and Testing Guide - Test and validate your agents
- CLI Reference - Complete CLI command reference
π Conclusion
The SuperOptiX observability system provides comprehensive monitoring, debugging, and analysis capabilities for your AI agents. By following this guide, you can effectively monitor agent performance, debug issues, and optimize your agentic AI workflows.
Start exploring your agents today with super observe list
and discover the power of comprehensive AI observability! π