How It Works
Quick Start
Install Package
Install PraisonAI Agents:Note: Telemetry is included by default and automatically enabled unless disabled.
Disable Telemetry (Optional)
To disable telemetry, set any of these environment variables before running:
What is Tracked
PraisonAI telemetry collects only minimal, anonymous metrics:Usage Metrics
- Number of agent executions
- Number of task completions
- Tool usage (names only)
- Error types (no messages)
Environment Info
- Framework version
- Python version
- Operating system type
- Anonymous session ID
Disabling Telemetry
Telemetry can be disabled in multiple ways:Environment Variables (Recommended)
Opt-out (any of these disables telemetry):CLI Integration: As of PR #1552, PraisonAI respects pre-existing
OTEL_SDK_DISABLED environment variables instead of overwriting them. Telemetry initialization now runs from cli.PraisonAI.__init__ (explicit call to _ensure_telemetry_defaults()), not from the lazy __getattr__ hook in praisonai/__init__.py. This means importing praisonai no longer touches the filesystem or os.environ; only constructing PraisonAI(...) does. Initialization is also thread-safe (uses threading.Lock).Enabling / Disabling Telemetry Programmatically
Precedence: Explicit environment opt-out always wins. Setting
DO_NOT_TRACK=true (or any of the *_DISABLED flags above) makes enable_telemetry() a no-op. Otherwise, the most recent programmatic call decides the state. With neither set, telemetry is off by default until enable_telemetry() is called or PRAISONAI_TELEMETRY_ENABLED=true / PRAISONAI_PERFORMANCE_ENABLED=true is exported.Langfuse + opt-out coexistence
Users now have full control over telemetry settings when using Langfuse for other applications:How Telemetry Works
Telemetry in PraisonAI is automatic and minimal:- Automatic Integration: When you create agents and run workflows, telemetry is automatically integrated
- Anonymous Tracking: Only counts and types are tracked, never content
- Memory Storage: Currently metrics are only stored in memory (no network calls)
- Session-based: Each run gets a unique anonymous session ID
- Privacy-first: Respects DO_NOT_TRACK standard and multiple opt-out methods
Advanced Usage
Accessing Telemetry Data
Manual Tracking (Advanced)
Integration with External Services
PostHog Integration (Coming Soon)
PraisonAI telemetry includes built-in PostHog support for anonymous analytics:AgentOps Integration
For more advanced monitoring, you can use AgentOps alongside the built-in telemetry:Backward Compatibility
The telemetry module maintains compatibility with the previous interface:Best Practices
Privacy First
Privacy First
- Telemetry is designed to be minimal and privacy-focused
- No personal data, prompts, or responses are ever collected
- Always respect user preferences for tracking
- Use environment variables for easy opt-out
Performance Impact
Performance Impact
- Telemetry has minimal overhead
- Metrics are stored in memory only (no network calls in current version)
- Automatic integration means no extra code needed
- PostHog integration (when available) uses async mode to prevent blocking
Development vs Production
Development vs Production
Troubleshooting
Telemetry Not Working
If telemetry isn’t tracking:
- Check environment variables aren’t disabling it
- Verify telemetry.enabled is True
- Check debug logs with LOGLEVEL=DEBUG
- Ensure you’re using the latest version
- If you call
enable_telemetry()but hooks still don’t fire, check whether an opt-out env var (DO_NOT_TRACK,PRAISONAI_TELEMETRY_DISABLED,PRAISONAI_DISABLE_TELEMETRY,PRAISONAI_PERFORMANCE_DISABLED) is set — those always win
Privacy Concerns
If you have privacy concerns:
- Review what’s tracked (only anonymous metrics)
- Disable telemetry via environment variables
- Check the source code for transparency
- No network calls in current implementation
Next Steps
Monitoring
Explore AgentOps integration for advanced monitoring
Cost Tracking
Learn about detailed latency and cost tracking
Gateway Tracing Hook
Emit OpenTelemetry spans across each gateway pipeline stage
PraisonAI telemetry is designed to be minimal, privacy-focused, and helpful. It collects only anonymous usage metrics to help improve the framework while respecting user privacy. Telemetry can be easily disabled at any time.
Related
Stream structured lifecycle events to your own observability stack.
Hook into agent events to log, measure, or react in code.

