Basic Logging with Loguru
The Atoms SDK uses Loguru for logging. Set it up in your agent:Log Levels
Use appropriate log levels:| Level | Use For | Example |
|---|---|---|
| DEBUG | Detailed debugging info | Message contents, event data |
| INFO | Normal operations | Session start, tool calls |
| WARNING | Unexpected but handled | Fallback used, retry needed |
| ERROR | Failures | API errors, exceptions |
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:Next Steps
Common Issues
Troubleshoot common problems.
Examples Gallery
See complete working examples.

