--metrics flag displays token usage and cost information after agent execution.
Quick Start

Usage
Basic Metrics
Combine with Other Features
Metrics Displayed
Use Cases
Cost Monitoring
Track costs across different prompts:Model Comparison
Compare token usage across models:Planning Mode Metrics
See total tokens across all planning steps:Cost Estimation
Cost estimates are approximate and based on publicly available pricing. Actual costs may vary based on your API plan.
Typical Costs by Model
Best Practices
Optimize Prompts
Monitor token counts to identify verbose prompts that can be shortened
Choose Right Model
Use metrics to compare cost/quality tradeoffs between models
Budget Tracking
Track cumulative costs across multiple runs for budget planning
Debug Issues
High token counts may indicate prompt issues or infinite loops

