Logging & Observability
Good logging helps you understand what your agent is doing. In production, observability is essential for debugging issues and improving performance.
Basic Logging with Loguru
The Atoms SDK uses Loguru for logging. Set it up in your agent:
Log Levels
Use appropriate log levels:
Structured Logging
Add context to your logs:
Logging Events
Track all events flowing through your agent:
Logging Tool Calls
Track tool usage:
Session Logging
Log session lifecycle:
Log Output Configuration
Configure log output format:
Performance Tracking
Measure response times:
Error Tracking
Capture and log errors with context:
Metrics Collection
Track key metrics for dashboards:
Debug Mode
Add a debug mode for development:
Enable with:

