RIF Runtime is a policy and governance runtime for agent-driven systems. It evaluates proposed actions before they cross a capability boundary, maintains runtime posture, and records decision history for inspection and replay.
The design goal is deliberately simple:
A model may propose. RIF decides.
RIF is not an autonomous-agent framework and does not treat model confidence, possession of a provider credential, or model output as authorization.
The current Python implementation provides:
- policy evaluation with deny-oriented defaults and environment-aware constraints;
- runtime posture management and recovery from persisted state;
- a governance graph and telemetry summaries;
- append-only JSONL persistence for decisions and posture history;
- replay of persisted decision history into runtime state;
- MCP governance surfaces, including a governed Metasploit integration;
- authenticated control-plane operations using
X-API-Keyconfiguration; - optional Supabase integration for execution-run/evidence persistence and JWT verification;
- FastAPI and Typer interfaces;
- automated quality and security workflows.
The repository also contains specifications and architectural proposals that are not all implemented in the default runtime path. Those documents are intentionally labelled as draft, planned, seeded, or implemented where appropriate.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
python -m pip install -r requirements-dev.txt
rif serveThe API is available at http://127.0.0.1:8000.
Try a health check:
curl http://127.0.0.1:8000/healthEvaluate and record a policy request. Control-plane authentication is required:
export RIF_CONTROL_PLANE_API_KEYS='replace-with-a-secret-key'
curl -X POST http://127.0.0.1:8000/v1/policy/evaluate \
-H 'X-API-Key: replace-with-a-secret-key' \
-H 'content-type: application/json' \
-d '{"actor":"agent:orchestrator","action":"http.request","target":"https://api.example.com/resource"}'For the complete API surface, see docs/API.md and the live OpenAPI document at /openapi.json when the service is running.
Agent / caller
|
v
Policy request
|
v
+-------------------+
| Policy evaluation |
+-------------------+
|
+---- deny ----> decision + posture + persistence
|
+---- allow ---> governed capability / MCP path
|
v
decision history
|
v
replay / audit
The larger target architecture is documented separately from the implementation so that proposals do not masquerade as shipped behaviour. Start with ARCHITECTURE.md and docs/ROADMAP.md.
docs/README.md— documentation index and source-of-truth rulesARCHITECTURE.md— implementation architectureDEVELOPMENT.md— local development and validationCONTRIBUTING.md— contributor workflowSECURITY.md— security model, limitations, and reportingDEPLOYMENT.md— supported container deployment pathsTESTING.md— testing strategydocs/API.md— current HTTP routesdocs/cli-reference.md— current CLI commandsdocs/ROADMAP.md— planned workdocs/REFLEXIVE_EVOLUTION.md— reflexive design, explicitly separated from shipped behaviourspec/README.md— contract/specification status
RIF Runtime is an actively developed release-candidate project, not a claim of production certification or a completed enterprise control plane. Some enterprise-oriented controls remain future work, including SBOM generation, signed releases, reproducible release builds, and a fully governed remote-inference authorization seam.
Security and CI documentation describe repository controls that are present in source/workflow files; they do not constitute an independent assurance report.
RIF benefits from contributors who enjoy the awkward but important boundary between what an intelligent system wants to do and what a governed system is willing to let it do.
Good contributions include:
- tightening policy semantics;
- improving replay and evidence contracts;
- adding regression tests for security boundaries;
- making specifications executable and unambiguous;
- improving developer ergonomics and documentation;
- challenging claims that cannot be demonstrated from the repository.
See CONTRIBUTING.md to get started.
MIT. See LICENSE.