System Overview
The CLI and Python SDK converge on the same orchestration runtime.run wraps one RunRequest; launch resolves an
ordered set of named requests into one Orchestration. Registries resolve the requested components, the planner creates
a per-task ExecutionPlan, and the shared scheduler coordinates request priority, task concurrency, environment,
benchmark, harness, evaluation, result, and analysis lifecycles.
The diagram shows the common harness-backed path. A HarnessFreeBenchmark can own the inference loop, but it must
preserve the same task, environment, result, evaluation, and persistence contracts.
Runtime Shape
The runtime is built around a small set of typed objects. These objects are the stable seams between modules.
Changing one of these contracts is a runtime change, not a local component change. Audit every producer and consumer,
update public exports, and preserve serialization compatibility where existing result artifacts depend on it.
Component Ownership
Use ownership to decide where a change belongs. For example, a task image stored in dataset metadata belongs to the
benchmark contract; mapping that image to a Daytona snapshot or Modal named image belongs to a recipe; creating and
closing the sandbox belongs to the environment provider.
Execution Lifecycle
The runtime creates a plan for every selected task because images, resources, workspaces, and verifier requirements can vary between tasks. Cleanup belongs infinally paths. A failure in preparation, harness startup, model execution, artifact collection, or
verification must not leak a container, cloud sandbox, proxy, client, or background process.
Planning and Precedence
Configuration is normalized before execution. Recipes then adapt a copy of the per-task plan without mutating the original request. Explicit user intent must survive every adaptation layer. For provider selection fields, use this precedence:setdefault() rather than unconditional assignment.
This policy has a deliberate trade-off: automatic recipes make official task images convenient, while user-first
precedence keeps custom prebuilt images and provider-native snapshots possible. Reject incompatible explicit values
with an actionable error; do not silently replace them with a configuration that happens to run.
Design Principles
Depend on Contracts, Not Implementations
Components communicate through runtime contracts and public registries. Import shared types fromagentcompass.runtime
instead of reaching into another component’s private module. This keeps a harness reusable across benchmarks and an
environment provider reusable across harnesses.
Separate Policy From Mechanism
Benchmarks define evaluation policy; environments provide execution mechanisms; the runtime sequences them. A benchmark may require isolated verification, but it should express that through its evaluation plan rather than creating a Docker container directly.Preserve Explicit User Intent
Defaults and recipes may fill missing values, never overwrite an explicit compatible choice. Convenience that changes a user-supplied image, resource limit, workspace, network policy, model parameter, or timeout is a correctness bug.Keep Planning Pure and Side Effects Scoped
Task loading, plan construction, and recipe application should be deterministic. Network calls, package installation, sandbox creation, and file mutation belong to explicit lifecycle phases where errors, limits, and cleanup are visible.Enforce Security at the Environment Boundary
Prompts and agent instructions are not security controls. Network isolation, resource limits, filesystem boundaries, and secret handling must be enforced by the provider or runtime. Setup, agent execution, and verification policies are separate because trusted preparation and untrusted execution have different requirements.Make Reproducibility Observable
Record versions, revisions, resolved plans, model and harness settings, evaluator behavior, failures, and task coverage. A close score without matching settings and denominator is not alignment evidence.Fail Early, Preserve Failure Meaning
Validate unsupported versions, protocols, providers, policies, and task ids before expensive work begins. Preserve the difference between environment errors, harness errors, model errors, agent timeouts, evaluator errors, and valid zero scores; downstream analysis depends on those distinctions.Keep Specialized Dependencies Optional
The default installation should contain framework-essential and broadly shared packages. Benchmark- or harness-specific driver dependencies belong in optional extras and the trusted dependency workflow. Task-runtime dependencies belong in the task image or controlled setup phase.Bound Concurrency and External Pressure
Task concurrency, provider-open rate limits, model endpoint capacity, and resource quotas are independent constraints. Keep async provider calls non-blocking, apply bounded concurrency at the owning layer, and avoid global mutable state in per-task sessions.Change Impact Map
Before editing, use this table to identify the minimum code and validation surface.
When a reusable runtime or provider capability is required by a benchmark, split the work: land the foundational change
first, then rebase the benchmark integration onto it. This keeps platform behavior reviewable without hiding it inside
a single benchmark pull request.
Public Surfaces and Compatibility
The stable developer-facing surfaces are:agentcompassfor Python SDK entry points and supported external recipe types.agentcompass.runtimefor shared contracts and built-in component implementation.- Component registries for discovery by stable id.
- Config dataclasses for public component parameters.
- Persisted detail, progress, run-info, and summary artifacts for downstream tooling.
