System CorePlatform APIs
Vitruvyan Docs
๐ Veritas Engine API (Quant Engine)
Last Updated: March 23, 2026 17:00 UTC
๐ Location
- Service:
services/api_veritas_engine/ - Pure core:
vitruvyan_core/core/governance/veritas_engine/ - Module doc: Veritas Engine
๐ช Base URL / Port
- Config default:
SERVICE_PORT=8013(services/api_veritas_engine/config.py) - Docker external port: 9013 (see
infrastructure/docker/docker-compose.yml)
๐งญ Endpoints (implemented)
Defined in services/api_veritas_engine/api/routes.py:
| Method | Path | Description |
|---|---|---|
GET | /health | liveness + bus connectivity status |
POST | /validate | run a full signal quality validation |
GET | /validate/{run_id} | retrieve a past run (501 โ not yet implemented) |
๐งพ Request/Response models
See services/api_veritas_engine/models/schemas.py.
POST /validate
Request (ValidationRunRequest):
Response (ValidationRunResponse):
GET /health
Response (HealthCheckResponse):
โ๏ธ Env vars (service-level)
Loaded in services/api_veritas_engine/config.py:
| Variable | Default | Description |
|---|---|---|
SERVICE_PORT | 8013 | HTTP listen port |
LOG_LEVEL | INFO | logging verbosity |
QUALITY_PROFILE | default | threshold preset (default/strict/relaxed) |
NEURAL_ENGINE_URL | http://neural_engine:8003 | upstream NE URL (optional) |
REDIS_URL | redis://redis:6379 | StreamBus connection |
POSTGRES_HOST | postgres | audit log DB host |
POSTGRES_DB | vitruvyan | audit log DB name |
POSTGRES_USER | vitruvyan | audit log DB user |
POSTGRES_PASSWORD | (secret) | audit log DB password |
๐ Redis Streams Listener
services/api_veritas_engine/streams_listener.py runs as a sidecar container.
- Channel:
veritas.validation.requested - Consumer group:
veritas_engine - Trigger: deserializes payload โ calls
VeritasBusAdapter.run_validation() - ACK: acknowledges event after successful processing
๐๏ธ Audit Log (optional)
services/api_veritas_engine/adapters/persistence.py writes to:
Insert is ON CONFLICT DO NOTHING โ idempotent.
Postgres wiring is optional: if PostgresAgent is unavailable the audit log silently skips.