Sókrates
An On-Premises AI Department. Sókrates ships as a single NixOS appliance on the customer's premises. It ingests the company's existing systems, keeps a governed knowledge graph of the business, and lets named agents do back-office work over Slack, Teams, WhatsApp and email. It comes in two editions: a mini-PC that routes inference through a gateway, and a DGX Spark that runs every model locally for air-gapped customers. Correctness lives in the architecture rather than in the prompt: rules are executable logic, every external action is durable and consented, and every action an agent takes is traced.
General notes
- One appliance: a 14-service stack across five credential-isolated containers, each holding at most one kind of customer credential.
- Universal schema connector: OpenAPI, JSON Schema, GraphQL and SQL DDL compiled into typed Pydantic models and served to agents as MCP tools.
- Rules as executable logic: business rules are Logica laws compiled to DuckDB SQL, and each returns the set of violations rather than a pass/fail.
- Evaluated like software: agent behaviour is tested against invariants over live systems (typed output, a selection from the valid set, the shape of the span tree) rather than string matching.
Construction notes
- Durable execution: external actions run as DBOS workflows with write-ahead attempt records, so a crash never repeats an action against a customer system.
- Consent: every governed write carries an HMAC-signed consent token. Agents propose; a human approves anything that leaves the box.
- Observability as identity: a governed act's identity is its trace span, and spans are mirrored into a DuckLake lakehouse on the box for audit queries, with no data leaving the premises.
- Model independence: model identity is injected by configuration, so models can be swapped and compared on real workloads without code changes.
- Architecture as law: a registry of numbered invariants and a layered package graph, enforced in CI by import-linter and tach.
254 ratified IFRS law primitives; 245 compile and run against their expected violations in CI
14 services in five credential-isolated containers on one appliance
47 numbered architecture invariants, 27 of them enforced mechanically in CI
16 packages in a nine-layer dependency graph, boundaries enforced by import-linter and tach
4 schema languages compiled into agent tools: OpenAPI, JSON Schema, GraphQL and SQL DDL
2 editions: a gateway-routed mini-PC, or fully local inference on a DGX Spark
Materials
- Python
- pydantic-ai
- FastAPI
- DBOS
- Postgres
- DuckDB/DuckLake
- Logica
- Logfire
- MCP
- NixOS
- SvelteKit
- Project
- Hákon Freyr Gunnarsson
- Sheet
- Detail A
- Title
- Sókrates
- Scale
- N.T.S.
- Rev
- 2026-10