Skip to main content
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!
Claude Proxy Mascot (walking)
1

Clone or download

Get Claude Proxy running locally.

bash
git clone https://github.com/brainstormersia-cmd/agentrouter-autoretry-claudecode.git
cd agentrouter-autoretry-claudecode
2

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.json
3

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
Mascot Laptop
Mascot Key
Mascot Map
Localhost

Runs on localhost

Your proxy runs locally on http://127.0.0.1:8787. Nothing leaves your machine except API calls to AgentRouter.

Key Security

No key leaves your machine

Your Anthropic API key never leaves your computer. We only proxy your requests.

AgentRouter

Works with AgentRouter

Injects required headers and handles SSE streams for hidden errors automatically.

Open source MIT licensed. Built for the community.