log_usage
Record token and cost usage for tasks or agents, saving structured records to the Usage/ folder and optionally appending a summary to the task's Agent Log.
Instructions
Record token/cost usage for a task or agent. Stores structured usage records in the Usage/ folder. Optionally appends usage summary to the task's Agent Log.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | LLM model used. | |
| notes | No | Free-text notes about this usage record. | |
| task_id | No | Task this usage is for. | |
| agent_id | Yes | Which agent is reporting usage. | |
| cost_usd | No | Estimated cost in USD. | |
| project_id | No | Project this usage is for. | |
| input_tokens | Yes | Input tokens consumed. | |
| output_tokens | Yes | Output tokens consumed. | |
| duration_seconds | No | How long the operation took in seconds. |