Managing Spend Across 100 Agents: A Practical Architecture
Architecture patterns for deploying fleets of autonomous agents with individual wallets, shared credit lines, and centralized billing.
Deploying a single agent with a credit line is straightforward. Deploying 100 agents with independent spending, shared credit, and centralized billing requires architecture. This guide covers the patterns that work.
The Challenge
At scale, agent spending creates organizational complexity:
Architecture: Hub and Spoke
The most effective pattern is hub-and-spoke:
Hub (Mithril Account):
Spokes (Individual Wallets):
This gives you the best of both worlds: centralized financial control with decentralized operational autonomy.
Wallet Hierarchy
For organizations running many agents, structure wallets by purpose:
Team Credit Line ($10,000/month)
├── Research Agents (pool: $3,000/month)
│ ├── Wallet: research-agent-01 ($50/day)
│ ├── Wallet: research-agent-02 ($50/day)
│ └── Wallet: research-agent-03 ($50/day)
├── Sales Agents (pool: $2,000/month)
│ ├── Wallet: sales-agent-01 ($30/day)
│ └── Wallet: sales-agent-02 ($30/day)
└── Content Agents (pool: $1,000/month)
├── Wallet: content-agent-01 ($20/day)
└── Wallet: content-agent-02 ($20/day)Setting Limits at Scale
Formula for Daily Limits
daily_limit = (expected_calls_per_day × avg_cost_per_call) × safety_multiplierExample: A research agent makes ~200 API calls/day at ~$0.01 average cost. Expected daily spend: $2. With a 3x safety multiplier: $6/day limit.
Per-Transaction Limits
Set based on the most expensive service the agent uses. If the priciest call is $0.50, set the per-transaction limit to $1.
Gradual Ramp-Up
Week 1: Conservative limits (2x expected spend)
Week 2: Review actuals, adjust
Week 3: Production limits (3-5x expected spend)
Month 2: Stable limits based on real data
Monitoring at Scale
Key metrics to track:
Incident Response Playbook
When an agent goes haywire:
Cost Optimization
Billing Integration
Mithril provides transaction-level data via API, enabling: