Overview
Forge supports 8 AI coding agents out of the box. Each agent needs proper configuration before use.BYOL Architecture: Forge uses a “Bring Your Own LLM” model - you provide API keys, Forge handles orchestration.
Supported AI Agents
| Agent | Type | Setup Required |
|---|---|---|
| Claude Code | API | Anthropic API key |
| Claude Code Router | API | Any LLM API key (agnostic) |
| Cursor CLI | CLI | Cursor account |
| Gemini | API | Google AI API key |
| OpenAI Codex | API | OpenAI API key |
| Amp | API | Sourcegraph token |
| OpenCode | Local | Model weights |
| Qwen Code | Local | Model weights |
Configuration File
Forge stores LLM configuration in.forge/config.json:
.forge/config.json
Never commit
.forge/config.json! Add it to .gitignore immediately:Claude Code Setup
Get Your API Key
1
Create Anthropic Account
Go to console.anthropic.com
2
Generate API Key
Navigate to API Keys → Create Key
3
Configure Forge
Available Models
| Model | Context | Best For |
|---|---|---|
claude-3-5-sonnet-20241022 | 200K | General coding (recommended) |
claude-3-opus-20240229 | 200K | Complex refactoring |
claude-3-haiku-20240307 | 200K | Fast iterations |
Advanced Configuration
Claude Code Router Setup
Claude Code Router is LLM-agnostic - use any model with an OpenAI-compatible API!
Configuration
Supported Providers
- OpenAI
- Anthropic
- Local (Ollama)
- Custom
Gemini Setup
Get Your API Key
1
Go to Google AI Studio
Visit aistudio.google.com
2
Get API Key
Click “Get API Key” → Create API key
3
Configure Forge
Available Models
| Model | Context | Best For |
|---|---|---|
gemini-2.0-flash-exp | 1M | Fast iterations (recommended) |
gemini-1.5-pro | 2M | Large codebases |
gemini-1.5-flash | 1M | Quick tasks |
Cursor CLI Setup
Cursor CLI is separate from the Cursor IDE. You can use it independently!
Installation
Configuration
Cursor CLI respects your Cursor account subscription - no additional API keys needed!
OpenAI Codex Setup
Get Your API Key
1
Create OpenAI Account
Go to platform.openai.com
2
Generate API Key
Navigate to API Keys → Create new secret key
3
Configure Forge
Available Models
| Model | Context | Best For |
|---|---|---|
gpt-4-turbo | 128K | General coding |
gpt-4 | 8K | Legacy tasks |
gpt-3.5-turbo | 16K | Simple tasks |
Open Source Agents
OpenCode (Local)
Qwen Code (Local)
Configuration Best Practices
Start Simple
Begin with one agent (Claude or Gemini), add more later
Test Each Agent
Create a test task to verify configuration
Secure API Keys
Never commit
.forge/config.json to version controlMonitor Usage
Track API costs per agent to optimize spending
Validation
Test your configuration:Troubleshooting
Invalid API key
Invalid API key
Symptoms: Authentication errors when running tasksSolutions:
- Verify API key is correct (no extra spaces)
- Check API key has proper permissions
- Ensure API key isn’t expired
- Confirm you have credits/quota remaining
Model not found
Model not found
Symptoms: “Model not available” errorsSolutions:
- Check model name spelling (case-sensitive)
- Verify model is available in your region
- Ensure your API tier has access to the model
Timeout errors
Timeout errors
Symptoms: Tasks fail with timeoutSolutions:
- Increase
timeoutvalue in config - Check network connectivity
- Try a faster model (e.g., Haiku, Flash)
Cursor CLI not authenticated
Cursor CLI not authenticated
Symptoms: Cursor tasks fail immediatelySolutions:
Cost Optimization
Model Selection Strategy
1
Use Fast Models for Iteration
Start with fast, cheap models:
- Claude Haiku
- Gemini Flash
- GPT-3.5 Turbo
2
Use Powerful Models for Complex Tasks
Switch to stronger models for:
- Large refactoring
- Architecture changes
- Critical bug fixes
3
Compare Results
Run the same task with multiple models to find the sweet spot for each task type
Cost Comparison
| Model | Input | Output | Sweet Spot |
|---|---|---|---|
| Claude Haiku | $0.25/MTok | $1.25/MTok | Quick iterations |
| Gemini Flash | Free tier | Free tier | Experimentation |
| GPT-3.5 Turbo | $0.50/MTok | $1.50/MTok | Simple tasks |
| Claude Sonnet | $3/MTok | $15/MTok | General work |
| GPT-4 Turbo | $10/MTok | $30/MTok | Complex tasks |

