--agent-config flag allows you to provide agent-specific configuration files to customize agent behavior.
Usage
Configuration format
Configuration format depends on the agent framework:- mini_swe_agent - YAML format
- swe_agent - YAML format
- openhands - YAML or TOML format
mini_swe_agent configuration
Example config
mini.yaml
Key fields
- system_template - System prompt for the agent (supports Jinja2 templates)
- instance_template - Task-specific instructions (supports Jinja2 templates)
- step_limit - Maximum number of agent turns (default: 100)
- cost_limit - Maximum cost in USD (default: 1.0)
- mode - Execution mode (
confirm,auto)
Template variables
Available in Jinja2 templates:{{task}}- Task description{{agent_id}}- Agent identifier (e.g.,agent_0){{agents}}- List of all agent IDs{{git_enabled}}- Whether git collaboration is enabled{{messaging_enabled}}- Whether messaging is enabled{{system}},{{release}},{{version}},{{machine}}- System info
Example usage
swe_agent configuration
Example config
coop.yaml
Key fields
- templates - Prompt templates (system, instance, observation)
- tools - Tool configuration (bundles, env variables)
- history_processors - Message history processing
Tool bundles
Available tool bundles:tools/registry- Core tools (ls, find, grep, etc.)tools/edit_anthropic- File editing toolstools/messaging-send_messagecommand for collaborationtools/review_on_submit_m- Code review on submission
Example usage
openhands configuration
OpenHands uses YAML or TOML configuration.Example config
openhands.yaml
Example usage
Environment-specific configs
Solo mode config
For single-agent tasks, simplify templates:solo.yaml
Cooperative mode config
For multi-agent tasks, include collaboration instructions:coop.yaml
Default configurations
If--agent-config is not specified, CooperBench uses built-in defaults:
- mini_swe_agent:
src/cooperbench/agents/mini_swe_agent/config/mini.yaml - swe_agent:
src/cooperbench/agents/swe_agent/config/coop.yaml - openhands: Built-in SDK defaults
Locating default configs
To see default configs:Custom config examples
Increase step limit
high-steps.yaml
Custom prompts
custom-prompt.yaml
Disable tools
minimal-tools.yaml
Environment variable overrides
Some settings can be overridden with environment variables:Validation
CooperBench validates configs on load. Common errors: Invalid YAML syntax:Best practices
- Start with defaults: Copy built-in configs and modify incrementally
- Test locally: Use
--backend docker -c 1to test configs quickly - Version control: Keep configs in git alongside your experiments
- Document changes: Add comments explaining custom settings
- Validate templates: Test Jinja2 templates with sample data before running