> ## Documentation Index
> Fetch the complete documentation index at: https://agent-compass.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Concurrency

> Control task parallelism without overrunning model or provider limits.

AgentCompass has two concurrency layers: per-run task concurrency and process-global provider limits.

## Per-Run Concurrency

```bash theme={null}
agentcompass run \
  swebench_verified \
  mini_swe_agent \
  your-model \
  --env <env-provider> \
  --model-base-url "$MODEL_BASE_URL" \
  --model-api-key "$MODEL_API_KEY" \
  --task-concurrency 32
```

`--task-concurrency` controls how many benchmark tasks can execute in parallel for this run.

## Provider Limits

Provider limits live in code defaults and can be overridden with `runtime.provider_limits` in private config files. They default to `128` per provider and cap concurrent sessions across the process, even if a run requests a higher task concurrency.

| Limit                                | Controls                                    |
| ------------------------------------ | ------------------------------------------- |
| `task_concurrency`                   | Tasks in one run.                           |
| `runtime.provider_limits.<provider>` | Process-wide sessions for a provider.       |
| Model endpoint rate limit            | External API throughput and retry behavior. |

## Practical Workflow

1. Start with one `sample_ids` task.
2. Increase `--task-concurrency` gradually.
3. Watch model errors, provider startup time, and task timeout failures.
4. Keep provider limits below account or cluster quotas.

## Related Pages

* [Environments Overview](/environments/overview)
* [Runtime](/key_modules/runtime)
* [Results](/key_modules/results)
