Distributed AI evaluation infrastructure and deployment gating for generative AI systems.
Agent Vigilo provides versioned WASM evaluators, durable evaluation runs, worker/coordinator execution, normalized results, and pass/fail gates that can sit in CI or release workflows.
It focuses on the parts of AI evaluation that become hard as systems grow: idempotent distributed work, durable event delivery, evaluator isolation, retry-safe persistence, and auditable results.
- Run evaluations like infrastructure: Immutable datasets and run plans in object storage, PostgreSQL-backed state, RabbitMQ work distribution, and Rust workers.
- Ship versioned evaluators: publish WASI Preview 2 WebAssembly evaluators with strict WIT contracts.
- Protect the runtime: Wasmtime fuel, memory, timeout, log, and concurrency limits isolate evaluator execution.
- Avoid lost events: durable outbox ledger plus hot delivery queue, RabbitMQ publisher confirms, and idempotency keys.
- Gate deployments: turn evaluator measurements and host-owned profile policy into dimension scores, total aggregate scores, and auditable release decisions.
The Direct Probe (Direct Execution of Target Agent) harness invokes the target and captures evidence. A Delegated Trial (Harness-Orchestrated Session) gives the interaction to a separate harness and collects its evidence. Both support inline or polling completion through the CLI, and callback completion through the library. Deterministic (Code Scorer) and Model-as-a-Judge evaluators measure evidence. Host policy owns normalization and release gates. See the canonical vocabulary for session ownership, evaluator types and completion-delivery boundaries.
Each evaluator invocation returns one measurement or abstention plus optional diagnostics. The profile binding owns normalization, threshold, dimension, weight, requiredness, and blocking policy. Missing, errored, abstained, duplicated, or invalid required output produces an errored execution aggregate with no score. An execution passes when completeness is satisfied, aggregate_score >= min_execution_score, and the configured blocking policy permits it.
Run scorecard gates enforce dimension or evaluator thresholds across the full run, including configured case-group and tag slices. Shards publish bounded rollups; the coordinator merges those rollups and persists the authoritative scorecard without scanning execution rows centrally.
See Measurement Normalization for copyable binary, numeric, curve, threshold, and ordinal policy examples.
A run completes after exact chunk settlement, including when retained results are partial. Missing coverage or failed evaluation policy fails the release gate. Immutable admission conflicts can mark the run failed before dispatch.
- Getting started: run your first evaluation.
- CLI reference: canonical commands for evaluators, runs, databases, and rebalancing.
- Architecture overview: containers, components, flows, and state diagrams.
- Scale-out and shard migration: 128 logical run shards and expansion guidance.
- Worker runtime: chunk claiming, evaluator execution, and result persistence.
- Runtime limits: Wasm evaluator sandbox and worker concurrency controls.
- Outbox lifecycle: durable event publication and retry behavior.
- Publishing evaluators: build and publish versioned WASM evaluators.
- Evaluator compatibility: versioned WIT ABIs, host adapters, and immutable run pinning.
Rust, Tokio, PostgreSQL, SQLx, RabbitMQ, S3-compatible object storage, Wasmtime, WASI Preview 2, WIT, Docusaurus.
GitHub Actions is the source of truth for build verification. To install the optional local Git hooks:
chmod +x scripts/hooks/pre-commit scripts/hooks/pre-push
git config core.hooksPath scripts/hooks| Tier | Scope | Required services | GitHub Actions job |
|---|---|---|---|
| Unit and contract | Service-free Rust behavior across the workspace | None | Unit and Contract Tests |
| Database integration | SQL, migrations, transactions, advisory locks, leases, concurrency, and portable evaluator publication | One PostgreSQL server; DATABASE_URL must use a role that can create test databases. Portable publication also uses the built evaluator Wasm fixture |
Database Integration Tests |
| Migration | Greenfield schema application through the CLI setup path | One fresh PostgreSQL database | Migration Tests |
| End-to-end | Routing and the real distributed runtime across process and protocol boundaries | Two PostgreSQL servers, RabbitMQ, S3-compatible object storage, evaluator Wasm, and the test HTTP agent | End-to-End Tests |
| Blob storage integration | Signed object I/O, transport faults, upload/run-plan recovery, and exact cleanup | PostgreSQL and disposable Ceph Object Gateway | Blob Storage Integration Tests |
| Performance service integration | Perf topology ownership, collector reset, and cleanup integration | Docker Engine with Compose; images are declared in infra/performance/compose.yml |
Performance Service Integration Tests |
| Evaluator compatibility | Fixture-backed evaluator ABI and portable artifact compatibility | Built Wasm fixtures; no live services | Evaluator Compatibility Tests |
| Documentation | Website typecheck and production build | Node.js and installed website dependencies | Documentation Checks |
Run the service-free tier with:
cargo test --workspace --locked --lib --binsThe repository-local performance harness is a separate opt-in workflow. Its static check remains service-free and validates that performance tooling stays out of the shipped dependency graph:
cargo perf checkThe explicit live-service integration tier is:
cargo test -p xtask --locked --features performance-services --test performance_services -- --nocaptureIt is feature-gated and therefore does not expand normal workspace, database,
migration, or end-to-end test commands. Build, workload, artifact, and
isolation details are in performance/README.md.
The signed object-storage tier is also explicitly opt-in. Configure the endpoint, bucket, and credentials using the development storage instructions, then run:
cargo test -p vigilo --locked --features blob-storage-services --test blob_storage_services -- --nocaptureThis tier checks Ceph persistence and transport faults. Dataset ingestion also
uses a disposable PostgreSQL database initialized through setup:
cargo test -p vigilo --locked --features blob-storage-services --test dataset_ingestion_services -- --nocaptureThe ingestion tier kills and resumes real upload and run-plan CLI processes, checks frozen inputs and finalized reuse, verifies the dispatch boundary, and checks exact cleanup. Both storage tiers contribute to the same aggregate coverage report and 80% gate.
Agent and evaluator HTTP transport tests use disposable loopback servers and run separately from service-free tests:
cargo test -p vigilo --locked --features agent-http-services --test agent_http_services
cargo build -p http-request-fixture --locked --target wasm32-wasip2 --release
cargo test -p vigilo --locked --features evaluator-http-services --test evaluator_http_servicesThe public evaluator-operation tier also requires disposable PostgreSQL and the existing sentiment and HTTP Wasm fixtures:
cargo build -p sentiment-basic-en -p http-request-fixture --locked --target wasm32-wasip2 --release
cargo test -p vigilo --locked --features evaluator-http-services --test evaluator_operations_services -- --nocaptureIt verifies immutable publication, caller-bound registry access and test-specific HTTP policy/credentials through the public library. CI includes these transport and operation tests in the end-to-end coverage report and the same 80% gate.
Use the database connection settings from .github/workflows/build.yaml for
DATABASE_URL; direct fixture SQL needs the same explicit connection defaults as
the runtime. Run every PostgreSQL-backed SQLx test with:
cargo test -p vigilo --locked --lib -- --ignored --nocapture --test-threads=4Within the vigilo library target, #[ignore] is reserved for this database
integration tier so the command remains complete.
The independent library consumer fixture lives in vigilo/tests/fixtures/library-consumer.
CI seeds its lockfile from the workspace lockfile and builds it as a separate package
using only the supported public API. It checks typed operation results, Send
futures and host resolver implementations across run, export, dataset, evaluator
and daemon interfaces. These service-free checks construct and drop I/O futures;
the named integration tiers verify live authority, persistence and execution.
The crate release workflow also verifies the actual package outside the checkout, including its library/binary tests and operation doctests. With Python 3.12+, run:
cargo fetch --locked
python3 scripts/releases/verify_package.py --allow-dirtyThe verification step runs offline after dependency preparation and does not publish.
The end-to-end tier runs multi_database_routing and multi_database_e2e
separately because they require the complete distributed dependency set. The
workflow builds the evaluator Wasm and supplies the required database,
messaging, storage-owner configuration (VIGILO_STORAGE_CONFIG), and opt-in environment variables.
CI runs worker storage cases in their own job, distributes the remaining
multi_database_e2e cases across three runners, and runs routing, HTTP transport,
and evaluator registry checks in separate jobs. Each group contributes a
required report to aggregate coverage.
It exercises the public hosted library with restricted database roles, injected
resources, two owners, concurrent coordinators and workers, forged queue hints,
pause/resume, revocation, and lease recovery. Synthetic row policies belong to the
test fixture; they are not installed by the runtime.
The pre-commit hook runs nightly rustfmt only. The pre-push hook runs clippy, the service-free Rust tier, and the web typecheck. Database integration, blob storage integration, performance service integration, migration, end-to-end, evaluator compatibility, and documentation checks run as separate required CI jobs.
Run the affected distributed scenario locally before pushing runtime or fixture
changes. The shared runner builds the Wasm fixture, waits for test services on
disposable loopback ports, and fails if the requested test is absent. It
requires Bash 4 or later, Python 3, Docker Compose, and the wasm32-wasip2 Rust target.
Coverage runs also require cargo-llvm-cov and the llvm-tools-preview component.
bash scripts/testing/distributed-e2e.sh --exact unavailable_shard_does_not_block_healthy_placement_work
bash scripts/testing/distributed-e2e.sh --coverage distributed-2The coverage command selects the same tests as the corresponding CI job and
uses the same four test threads. Use
--coverage all to run every distributed scenario in one local pass. Each run
records the selected tests and output under target/e2e-logs/. CI failures
include a replay command and attach the logs to the failed job.
The unit and contract, performance service integration, database integration,
blob storage integration, and end-to-end jobs collect coverage in parallel. The
Linux unit pass includes the service-free performance contract check; Docker-backed
service ownership tests run in their own integration job. A final job merges
the five reports, requires at least 80% aggregate line
coverage, and uploads that report under the rust-all Codecov flag. Project
coverage and the repository badge therefore reflect code reached through unit,
integration, and distributed runtime tests.
Only PostgreSQL test fixture sources are excluded; production query and table
modules remain in the coverage denominator.
SQLx creates each isolated PostgreSQL test database with CREATE DATABASE,
which clones PostgreSQL's built-in template1 database. The PostgreSQL coverage
job migrates template1 once, so each test validates the recorded migrations
instead of rebuilding every partition and index. The separate migration job
applies the complete migration set to an empty database. The
migration layout documents dependency order and file ownership.
Accumulate the same reports locally after starting the services and setting the environment variables required by each tier:
cargo llvm-cov clean --workspace
cargo llvm-cov --no-report --workspace --locked --lib --bins
cargo llvm-cov run --no-report -p xtask --locked -- perf check
cargo llvm-cov --no-report -p xtask --locked --features performance-services --test performance_services -- --nocapture
cargo llvm-cov --no-report -p vigilo --locked --features blob-storage-services --test blob_storage_services -- --nocapture
cargo llvm-cov --no-report -p vigilo --locked --features blob-storage-services --test dataset_ingestion_services -- --nocapture
cargo llvm-cov --no-report -p vigilo --locked --features agent-http-services --test agent_http_services
cargo llvm-cov --no-report -p vigilo --locked --features evaluator-http-services --test evaluator_http_services
cargo llvm-cov --no-report -p vigilo --locked --features evaluator-http-services --test evaluator_operations_services
cargo llvm-cov --no-report -p vigilo --locked --lib -- --ignored --nocapture --test-threads=4
cargo llvm-cov --no-report -p vigilo --locked --test multi_database_routing -- --nocapture
VIGILO_E2E_MULTI_DATABASE=1 cargo llvm-cov --no-report -p vigilo --locked --test multi_database_e2e -- --nocapture
cargo llvm-cov report --fail-under-lines 80 --ignore-filename-regex '[/\\]postgres_tests(\.rs|[/\\])' --lcov --output-path lcov.infoThe integration commands require the database, messaging, evaluator Wasm, and
test agent dependencies described above. Configure the repository secret
CODECOV_TOKEN for the aggregate CI upload.
Publishing a GitHub release tagged vX.Y.Z runs Publish Vigilo Crate.
The workflow checks out the release commit, verifies the tag against
vigilo/Cargo.toml, and requires a successful Build workflow for that exact
commit (a push or manual run). It publishes only the vigilo crate with Cargo's
package verification enabled. Evaluator collection releases do not trigger crate
publication.
Configure the GitHub environment crates-io with the required reviewers and
release-tag deployment restrictions for your repository. Add the secret
CARGO_REGISTRY_TOKEN with a crates.io token authorized to publish vigilo.
The token is exposed only to the publish step. Referencing an environment in the
workflow does not configure its protection rules.
Release procedure:
- Commit the release changes, including the crate version and lockfile. Run
bash scripts/testing/distributed-e2e.sh --coverage allon that commit before pushing it. - Push the release commit and wait for Build to pass for that commit.
- Tag that commit as
vX.Y.Zand publish its GitHub release. - Approve the
crates-ioenvironment deployment when required, then check the publish job's result.
Rerunning the job skips a version already present on crates.io. Registry errors
fail the job instead of being treated as an absent version. To verify locally
without uploading, run cargo publish -p vigilo --dry-run --locked.
Official evaluator collections have their own Release Core Evaluators workflow; see Publishing Evaluators.
Agent Vigilo is an active systems project focused on reliable AI evaluation, LLM evaluation workflows, agent testing, and deployment gates. The implementation favors explicit contracts, durable state transitions, and operational diagrams over black-box orchestration.
Agent Vigilo is source-available under the Functional Source License, Version 1.1, ALv2 Future License (FSL-1.1-ALv2). Internal use and self-hosting are permitted; competing commercial offerings are restricted by the license. Each version becomes available under Apache 2.0 two years after it is first made available.
Public evaluators and templates under evaluators/, and
interface definitions under vigilo/wit/, are licensed under
Apache 2.0. They can be used, modified, and redistributed commercially under those
terms. Independently authored evaluators choose their own licenses.
The root LICENSE governs the remaining repository-owned content. Crate-local
license copies and evaluator collection licenses are checked against their
respective authoritative license files in CI. Third-party components retain their
own licenses.