SDK Integration Guide
Integrate Noveum.ai tracing into your AI applications with flexible Python approaches
The Noveum.ai Python SDK provides comprehensive tracing and observability for your AI applications with minimal code changes. Whether you're building LLM applications, RAG systems, or multi-agent workflows, our flexible tracing approaches automatically capture essential metrics and traces.
🚀 Quick Start
1. Create Your Account & Get API Key
- Sign up at noveum.ai
- Generate an API key from the integration page
- Get your API key ready for the next step
2. Install the SDK
Requirements: Python 3.8+
3. Set Environment Variable
Environment Variables:
Important Notes:
Initialization
When you initialize with noveum_trace.init(), the following happens automatically:
- Project Creation: The project gets created in the UI automatically based on the string you provide
- Environment Organization: Environments are used to organize traces (e.g., dev, prod, beta, staging)
🎯 Flexible Tracing Approaches
Approach 1: Context Managers (Recommended)
Context managers provide the most flexible way to trace specific parts of your code without additional requirements.
Approach 2: Manual Span Creation
For legacy code or when you need fine-grained control, you can manually create and manage spans.
Approach 3: Mixed Approach
You can combine context managers and manual spans when working with legacy systems.
Approach 4: LangGraph Integration (Complex Agent Workflows)
For LangGraph applications, use the NoveumTraceCallbackHandler to automatically trace complex agent workflows, state management, and conditional routing.
LangGraph-Specific Tracing:
- Complete workflow execution and structure
- Node-by-node execution with timing
- State transitions and data flow
- Conditional routing decisions
- Iterative processes and self-loops
Approach 5: LangChain Integration (Chains & Agents)
For LangChain applications, use the NoveumTraceCallbackHandler to automatically trace chains, agents, and retrieval operations.
LangChain-Specific Tracing:
- Chain executions with timing and structure
- Agent decisions and tool usage with results
- Retrieval operations (embeddings, vector search)
What Gets Traced in Both LangGraph & LangChain:
Both approaches automatically capture comprehensive LLM metrics:
- LLM Calls with full context:
- Model name and provider (e.g.,
gpt-4,gemini-2.5-flash,claude-3) - Input prompts and output responses
- Token usage (input, output, total tokens)
- Cost tracking (input cost, output cost, total cost in USD)
- Latency and performance metrics
- Model parameters (temperature, max_tokens, etc.)
- Model name and provider (e.g.,
- Tool Usage with execution results and timing
- Error Tracking with detailed stack traces and status messages
- Custom Attributes and metadata for filtering and analysis
Approach 6: LiveKit Voice Agents (Audio Tracing)
For voice-enabled AI applications, use LiveKit wrappers to automatically trace speech-to-text, text-to-speech, and agent conversations.
What Gets Traced:
- Speech-to-text: Original audio recordings (playable), full transcriptions, confidence scores, latency
- Text-to-speech: Generated audio files (playable), input text, audio metadata, generation timing
- Agent LLM interactions and tool usage
- Audio processing metrics and performance
- Complete conversation sessions with context
- JobContext metadata: Room name/SID, participant identity, job ID, agent name (via
extract_job_context())
🔧 Framework Integrations
For detailed framework-specific guides with advanced examples:
- LangGraph Integration - Complex agent workflows and routing
- LangChain Integration - Chains, agents, tools, RAG, and more
- LiveKit Integration - Voice agents with STT/TTS tracing
- Simple Integration Examples - Additional basic examples
📊 Advanced Features
Custom Attributes & Events
Add custom metadata to your traces for better filtering and analysis:
Sampling Configuration
Error Handling
Errors must be explicitly recorded in traces for proper observability:
📈 View Your Data
Once integrated, visit your Noveum Dashboard to:
- 🔍 Search & Filter traces by any attribute
- 📊 Analyze Performance trends and bottlenecks
- 💰 Monitor Costs across different models and providers
- 🐛 Debug Issues with detailed trace timelines
- 👥 Collaborate with your team on insights
Next Steps
- Tracing Concepts - Learn about traces, spans, and observability best practices
- LangGraph Integration - Observe complex agent workflows
- Dashboard Guide - Master the Noveum platform interface
Get Early Access to Noveum.ai Platform
Be the first one to get notified when we open Noveum Platform to more users. All users get access to Observability suite for free, early users get free eval jobs and premium support for the first year.