Back
48/65
Lesson 48
6 min
CAAM: Account Rotation
Manage multi-provider API accounts with automatic rate limit rotation
Ready to level up?
Mark complete to track your learning progress.
Manage multi-provider API accounts with automatic rate limit rotation
Mark complete to track your learning progress.
Manage multiple AI provider accounts and automatically rotate when rate limits hit to keep your agents running continuously.
CAAM (Coding Agent Account Manager) saves the subscription logins (Claude Max, GPT Pro, Gemini Ultra, and more) of each agent CLI and swaps between them when usage limits hit. Instead of waiting for cooldowns, your agents keep working on the next available account.
When running agent swarms with NTM, each agent consumes quota fast. CAAM tracks per-profile cooldown state and swaps auth files so agents experience near-zero downtime from throttling.
Swap saved subscription logins in under 100ms
Per-account rate limit state with TTL
Track tokens and costs per account
Claude, Codex, Antigravity, Gemini, Grok, OpenCode, Cursor
Account Rotation Control Panel
Step through scenarios to see how CAAM manages accounts, rate limits, and emergency failover
All accounts healthy. Active account handling requests at moderate load. Rate limits well within safe range.
work-primary
Anthropicwork-backup
Anthropicopenai-main
OpenAIgemini-pro
GoogleSave each logged-in account once, then let CAAM handle switching.
# Log in to each account once with the tool's normal flow, then save itcaam backup claude work@example.com# /login to the second account inside Claude Code, then save it toocaam backup claude personal@example.com# Same for Codex, Antigravity (agy), Gemini, Grok, OpenCode, Cursorcaam backup codex team@example.com# List saved profilescaam ls# Check which profile is active for each toolcaam status
caam next claude in your agent startup scripts. It picks the healthiest profile that is not cooling down (add --usage-aware to factor in live quota).CAAM combines cooldowns, profile health, and live quota to make rotation decisions:
# Live quota for every saved Claude profilecaam limits claude# Pick the best profile (cooldown, health, recency, plan, live quota)caam next claude --usage-aware# When an agent hits a rate limit, mark the active profile (default 60 min)caam cooldown set claude# Or mark a specific profile for a custom durationcaam cooldown set claude/work-account --minutes 5# Rotation skips profiles that are still cooling downcaam next claude
When NTM spawns multiple agents, each one can run in its own isolated CAAM profile to maximize throughput.
# Give each parallel agent its own isolated profilecaam profile add claude agent-2# Claude logs in from inside the session: start it once and type /logincaam exec claude agent-2# Later runs reuse that logincaam exec claude agent-2 -- -p "implement feature X"# List running caam sessionscaam sessions# Usage history across profiles for the last daycaam usage --days 1
Assign accounts per spawned agent for parallel throughput
Check each provider's remaining quota before CAAM switches accounts
SLB gates dangerous commands; CAAM keeps every agent logged in
Back up agent settings with ASB (credential files are excluded by default; CAAM keeps the logins)