Get up and running in under 2 minutes.
Install in minutes
Three simple steps to start proxying Claude API requests through AgentRouter.
I'll guide you!

1
Clone or download
Get Claude Proxy running locally.
bash
git clone https://github.com/brainstormersia-cmd/agentrouter-autoretry-claudecode.git
cd agentrouter-autoretry-claudecode2
Set environment variables
Add your AgentRouter API key.
bash
# One command setup
python retry-proxy.py
# Answer: gateway, API key, model
# Auto-configures ~/.claude/settings.json3
Point your client to the proxy
Use this endpoint in Claude Code or your client.
bash
export ANTHROPIC_BASE_URL=http://127.0.0.1:8787
export ANTHROPIC_API_KEY=your-agentrouter-key
export CLAUDE_CODE_RETRY_WATCHDOG=1
# Now run Claude Code as usual
claude


Runs on localhost
Your proxy runs locally on http://127.0.0.1:8787. Nothing leaves your machine except API calls to AgentRouter.
No key leaves your machine
Your Anthropic API key never leaves your computer. We only proxy your requests.
Works with AgentRouter
Injects required headers and handles SSE streams for hidden errors automatically.
Open source MIT licensed. Built for the community.
