Requirements
Before installing CooperBench, ensure you have:- Python 3.10+ (Python 3.12+ recommended)
- Execution backend (choose one):
- Redis - For inter-agent communication in cooperative mode
- LLM API keys - From supported providers (Anthropic, OpenAI, Google Gemini, etc.)
Basic installation
The basic installation includes Modal as the default execution backend. You can add other backends using optional dependencies.
Backend setup
Choose one execution backend based on your needs:- Modal (Default)
- GCP (Recommended for Scale)
- Docker (Local)
Modal provides cloud-based sandboxed execution with minimal setup.
Create Modal account
Sign up at modal.com and get your API token.
Redis setup
Redis is required for inter-agent communication in cooperative mode.For solo experiments, Redis is optional. You can skip this step if you only plan to run single-agent experiments.
LLM API keys
CooperBench supports multiple LLM providers. Configure your API keys in a.env file:
Dataset download
Download the CooperBench dataset from HuggingFace:dataset/ directory containing all 652 tasks across 12 repositories.
Dataset structure
Dataset structure
Verify installation
Confirm everything is set up correctly:If all commands succeed, you’re ready to run experiments!
Optional dependencies
CooperBench provides several optional dependency groups:| Group | Install | Purpose |
|---|---|---|
gcp | pip install 'cooperbench[gcp]' | Google Cloud Platform backend |
swe-agent | pip install 'cooperbench[swe-agent]' | SWE-agent framework support |
dev | pip install 'cooperbench[dev]' | Development tools (pytest, mypy, ruff) |
all | pip install 'cooperbench[all]' | All optional dependencies |
Troubleshooting
Python version errors
Python version errors
CooperBench requires Python 3.10 or higher. Check your version:If needed, install a newer Python version:
Modal authentication fails
Modal authentication fails
If
modal setup fails:- Ensure you have a Modal account at modal.com
- Check your internet connection
- Try logging out and back in:
Redis connection errors
Redis connection errors
If agents can’t connect to Redis:
- Verify Redis is running:
redis-cli ping - Check the Redis URL in your command:
- For cloud Redis, use the full connection string:
LLM API key errors
LLM API key errors
If you get authentication errors:
- Verify
.envfile exists and contains keys - Check key format matches provider requirements
- Test the key directly with the provider’s API
- Ensure
.envis in the working directory where you run commands
Next steps
Quick start
Run your first CooperBench experiment
CLI reference
Explore all available commands and options