Skip to main content
There are two configuration surfaces: the Guard constructor (per-agent, code-level) and environment variables (server-level).

Guard constructor

The signature lives at certior/guard.py:167. The Guard.verify(...) and Guard.wrap(...) methods then take per-call required_capabilities and cost_cents.

Verification stack

Three formal tools, three jobs - all driven by the same Guard configuration: When the Lean live binary is not configured, the runtime uses the Python implementation of the same subset/budget rule whose soundness Lean has proven offline.

Server environment variables

When running with the FastAPI server (./run.sh), these env vars control behaviour: The full reference - including production guidance for PostgreSQL DSNs, secret handling, and the Docker Compose host-env pattern - lives in CONFIGURATION.md.

Backend priority

When the server starts, persistence backends are selected in order:
  1. DATABASE_URL set → PostgreSQL state store + event bus.
  2. REDIS_URL set → Celery / Redis task queue (combinable with PostgreSQL or SQLite).
  3. CERTIOR_DATA_DIR set → SQLite single-node persistence.
  4. None set → in-memory (testing only; data lost on restart).

See also