Quickstart
You need Docker with Compose v2. Nothing else.
-
Clone and configure:
Terminal window git clone https://github.com/OneLab-X/ai-gov.git && cd ai-govcp .env.example .env -
Start everything:
Terminal window docker compose up --buildThis starts PostgreSQL, Redis, OPA, object storage, the API, a Celery worker, the scheduler and the web console. On first boot the API runs migrations, seeds jurisdictions, policies and four example AI systems, and loads the policies into OPA.
-
Open the console at http://localhost:3000 and sign in. All demo accounts use the password
ChangeMe123!:Email Role Can do admin@aigov.example.comadmin everything, including policies and users risk@aigov.example.comrisk_officer inventory, classification, checks, evidence viewer@aigov.example.comviewer read-only
| What | Where |
|---|---|
| Web console | http://localhost:3000 |
| API docs (Swagger / ReDoc) | http://localhost:8000/docs, http://localhost:8000/redoc |
| Readiness probe | http://localhost:8000/ready |
| OPA | http://localhost:8181 |
Walk the flow with the API
Section titled “Walk the flow with the API”Every /api/v1 response is wrapped as {"success": true, "data": ...}, so the payload is
under .data.
API=localhost:8000/api/v1TOKEN=$(curl -s $API/auth/login -H 'content-type: application/json' \ -d '{"email":"admin@aigov.example.com","password":"ChangeMe123!"}' | jq -r .data.access_token)AUTH="authorization: Bearer $TOKEN"
# 1. Register a systemSYSTEM=$(curl -s -X POST $API/systems -H "$AUTH" -H 'content-type: application/json' -d '{ "name": "Loan Decisioning Engine", "description": "Approves or declines consumer loan applications", "status": "active", "system_metadata": { "purpose": "Decide consumer loan applications", "use_case": "credit_scoring", "industry": "fintech", "autonomy_level": "human_on_the_loop", "data_categories": ["personal_data", "financial"], "deployment_regions": ["EU"], "data_subject_regions": ["EU", "IN"], "offered_in_regions": ["EU", "IN"], "service_accessible_regions": ["GLOBAL"], "makes_automated_decisions": true }}' | jq -r .data.id)
# 2. Detect jurisdictions and classify risk (writes immutable classification rows)curl -s -X POST $API/systems/$SYSTEM/classify -H "$AUTH" \ -H 'content-type: application/json' -d '{}' | jq '.data.most_restrictive_tier'
# 3. Evaluate policies through OPAcurl -s -X POST $API/systems/$SYSTEM/check-policies -H "$AUTH" \ -H 'content-type: application/json' -d '{}' | jq '.data.summary'
# 4. Generate an evidence package (202 Accepted, then poll)PKG=$(curl -s -X POST $API/systems/$SYSTEM/evidence -H "$AUTH" \ -H 'content-type: application/json' -d '{"include_history": true}' | jq -r .data.package_id)sleep 3curl -s $API/systems/$SYSTEM/evidence/$PKG -H "$AUTH" | jq '.data.status'Next steps
Section titled “Next steps”- How it works: the model behind each step.
- Self-hosting: configuration and production hardening.
- Writing Rego policies: add or change a rule.