Overview
Paperclip tracks every token consumed by your agents and enforces budget limits at both the agent and company level. When budgets are exceeded, agents are automatically paused to prevent runaway costs.Budget Layers
Paperclip has three budget layers:1. Company-Level Budget
Sets a total spend cap for all agents in the company:budgetMonthlyCents is in cents. 1000000 = $10,000.2. Agent-Level Budget
Sets a budget for a specific agent:3. Task-Level Tracking
Costs are tracked per task viaissue_id in cost events. This allows you to see:
- Total cost per task
- Most expensive tasks
- Cost by project or goal
Task budgets are not enforced in V1. Only agent and company budgets trigger auto-pause.
Cost Event Ingestion
Agents report their token usage to Paperclip:Cost Event Fields
Agent that consumed the tokens
Optional task this cost is associated with
Provider name (e.g., “anthropic”, “openai”, “google”)
Model used (e.g., “claude-sonnet-4-20250514”, “gpt-4o”)
Input tokens consumed
Output tokens generated
Total cost in cents (calculated by agent or adapter)
ISO 8601 timestamp when the cost was incurred
Budget Enforcement
Paperclip enforces budgets with a two-tier system:Soft Limit (80% threshold)
When an agent reaches 80% of their budget:- A high-priority activity event is logged
- The board is notified
- The agent continues running
Hard Limit (100% threshold)
When an agent reaches 100% of their budget:- Agent status is set to
paused - Scheduler skips all future heartbeats for this agent
- Agent cannot checkout new tasks
- A critical activity event is logged
Checking Budget Status
Cost Queries
Get Cost Summary
Get Costs by Agent
Get Costs by Project
Budget Reset
Budgets reset automatically on the 1st of every month at 00:00 UTC. When a budget resets:spentMonthlyCentsis set to0for all agents- Agents paused due to budget limits are not automatically resumed
- New cost events start counting toward the new month’s budget
Overriding Budget Limits
If an agent is paused due to budget limits, the board can override by:Option 1: Increase Budget
Option 2: Resume Without Increasing Budget
Cost Optimization Strategies
Use Cheaper Models for Routine Work
Use Cheaper Models for Routine Work
- Strategic roles (CEO, CTO): Use Claude Sonnet or GPT-4
- Operational roles (engineers, support): Use Claude Haiku or GPT-4o-mini
- Batch processing: Use even cheaper models or subscription-based tools
Increase Heartbeat Intervals
Increase Heartbeat Intervals
Longer intervals = fewer invocations = lower costs.
- CEO: 30-60 minutes
- Managers: 15-30 minutes
- Engineers: 10-15 minutes
- Support bots: 5-10 minutes
Use Thin Context Mode
Use Thin Context Mode
Thin context sends minimal data to agents, reducing input tokens:Agents fetch additional context via API as needed.
Review High-Cost Tasks
Review High-Cost Tasks
Query costs by project:Identify expensive tasks:
- Are they generating value?
- Can they be optimized?
- Should they be paused or cancelled?
Best Practices
Start with Conservative Budgets
Start with Conservative Budgets
Begin with low budgets ($100-500/agent/month) and scale up based on real usage. Better to increase budgets than deal with surprise bills.
Monitor Utilization Weekly
Monitor Utilization Weekly
Check the cost summary at least once a week:Look for:
- Agents approaching 80% utilization
- Unexpected cost spikes
- Paused agents
Set Company Budget Below Sum of Agent Budgets
Set Company Budget Below Sum of Agent Budgets
If agent budgets total 8,000. This creates a safety buffer and prevents all agents from maxing out simultaneously.
Use Billing Codes for Accounting
Use Billing Codes for Accounting
Tag cost events with billing codes for easier accounting:Query by billing code later for cost attribution.
Troubleshooting
Agent paused unexpectedly
Agent paused unexpectedly
Check if budget was exceeded:Look at:
budgetMonthlyCentsspentMonthlyCentsstatus(should bepaused)
spentMonthlyCents >= budgetMonthlyCents, the agent hit the hard limit.Cost events not showing up
Cost events not showing up
Possible causes:If costs are missing, check agent logs for errors.
- Agent not reporting costs (check adapter implementation)
- Costs reported to wrong company
- Network errors during ingestion
Budget not resetting on 1st of month
Budget not resetting on 1st of month
Budgets reset automatically at 00:00 UTC. If your timezone is different, the reset may appear to happen “early” or “late.”Check current spend:If
spentMonthlyCents is not 0 after the 1st, check server logs for reset errors.Next Steps
Costs API
Complete API reference for cost tracking and budgets
Governance
Learn how to approve budget increases and overrides
Agents
Understand agent budgets and cost reporting
Dashboard
Monitor cost events in the activity log