Skip to main content
CooperBench is designed as a modular system that can execute agent tasks across different backends while maintaining consistent evaluation standards.

High-level architecture

Core components

Task runner

Orchestrates task execution, manages concurrency, and tracks results

Execution backends

Provide isolated sandboxes for agent execution (Modal, GCP, Docker)

Communication layer

Redis-based messaging for inter-agent communication

Evaluation pipeline

Tests merged patches and computes success metrics

Execution backends

CooperBench supports three execution backends, each with different tradeoffs:
Cloud-based serverless executionModal provides managed containerized sandboxes that scale automatically.Architecture:Features:
  • Automatic scaling to concurrency limits
  • Fast cold starts (~5-10 seconds)
  • Managed infrastructure
  • GPU support available
  • Pay-per-use pricing
Setup:
Pros:
  • Zero infrastructure management
  • Excellent for parallel execution
  • Fast iteration cycles
  • Good for small to medium experiments
Cons:
  • Requires internet connection
  • Pay-per-use costs
  • Less control over environment

Backend comparison

Agent execution pipeline

When a task runs, CooperBench follows this execution flow:
1

Task discovery

2

Infrastructure setup

  • Redis: Start or connect to messaging server
  • Git server (if enabled): Create shared repository
  • Namespacing: Create unique run ID for isolation
3

Sandbox initialization

For each agent:
  • Pull task-specific Docker image
  • Mount dataset files
  • Configure environment variables
  • Set up git remote (if enabled)
  • Initialize Redis connection
4

Agent execution

5

Patch extraction

6

Result aggregation

  • Collect patches from all agents
  • Extract conversation messages
  • Compute cost and token metrics
  • Save trajectories and logs

Redis messaging system

CooperBench uses Redis for real-time agent communication:

Architecture

Message flow

  1. Namespacing: Each run gets unique namespace run:{run_id}
  2. Channels: Per-agent channels run:{run_id}:{agent_id}
  3. Publishing: Agent sends message via send_message command
  4. Subscription: Agents poll for new messages
  5. Delivery: Messages appear in agent’s context as user messages
Example:

Configuration

Git collaboration mode

Optional git-based code sharing for agents:

Architecture

How it works

1

Server creation

2

Agent setup

3

Collaboration

Agents can use standard git commands:
4

Cleanup

Backend-specific implementation

  • Serverless git daemon in Modal sandbox
  • Network-accessible within Modal
  • Automatic cleanup on completion

Evaluation pipeline

After agents complete tasks, patches are evaluated:

Evaluation flow

Evaluation steps

1

Patch loading

2

Sandbox creation

Create isolated test environment:
  • Pull task Docker image
  • Clone repository at correct commit
  • Run setup script
3

Patch application

4

Test execution

5

Result analysis

Evaluation backends

Evaluation can run on different backends:

Output structure

CooperBench generates comprehensive logs and metrics:

Key output files

Concurrency and parallelization

CooperBench executes multiple tasks in parallel:

Concurrency architecture

Backend handles spawning and managing agent sandboxes based on concurrency limits.

What’s next?

Quick start

Run your first benchmark with the architecture you learned

Backend setup

Configure Modal, GCP, or Docker backends

Dataset structure

Understand how tasks are organized

CLI reference

Complete command-line options and parameters