The client-facing surface of the Integrate.ai stack: an agent library, live agent chat with document upload, and trust views (a tamper-evident audit ledger + the firm's ontology graph).
North Star: Ontology (substrate) → Harness (engine) → Platform (surface). The ontology is the firm's own entities and relationships, grounding every agent's answers and gating every agent's actions; the harness is the extractable runtime that runs any agent against it; the platform is what a client actually sees and clicks.
v1 is a live-but-narrow proof of concept for the fictional professional-services firm Hartwell & Vane LLP: a document/transcript agent (hero) and an expense/ops agent whose every action routes through a hash-chained audit ledger.
pnpm install
pnpm seed # embedded Postgres (PGlite) — no Docker, no external DB
pnpm devThen open http://localhost:3000.
Copy .env.example to .env.local and set:
ANTHROPIC_API_KEY— required for live chat (streaming responses, tool use, PDF upload). Without it the agent chat pages load but model calls fail.OS_LEDGER_HMAC_KEY— optional. Falls back to a committed dev-only key (DEV_LEDGER_KEYinsrc/lib/os/hash.ts) so the audit ledger works out of the box in local dev/tests. Set a real secret before anything resembling production.
- Hartwell Document Agent — turns messy source material (meeting transcripts, dictated attendance notes, engagement letters, bundles) into structured, sourced file notes for the matter file, grounded in the firm's ontology (matters, clients, people).
- Hartwell Expense Agent — reconciles firm expenses against policy read live from the ontology. It never decides on its own: every reconciliation is classified green (auto-approved), yellow (flagged, pending a human decision) or red (blocked), and every outcome is written to the audit ledger.
The /trust page has two tabs:
- Audit — every gated agent action (auto-approved, pending, approved, denied, blocked), a live chain-verify badge, and an approve/deny flow for anything pending.
- Ontology — a force-directed graph of the firm's entities (people, clients, matters, suppliers, policies) and how they relate. This is the substrate the agents ground their answers and their governance in.
The audit ledger is tamper-evident and HMAC-keyed: modifying, inserting, or reordering an entry is detected by verification; rewriting history would require both database write access and the application secret. It is not proof against an adversary holding both — that requires an external anchor, which is on the roadmap.
src/lib/runtime/is the extractable agent runtime — no UI imports, one interface. It is tomorrow's in-tenant always-on container; keep the boundary clean.src/lib/os/is the governance layer — the policy gate (gate.ts), the approvals workflow (approvals.ts), and the hash-chained ledger (hash.ts). No UI imports here either; only db +node:crypto.- DB is PGlite (embedded Postgres) behind Drizzle; migrations are standard Postgres SQL and lift to Supabase unchanged when the product grows up.
- Demo data is fictional. Never point this at a real brain or a real client tenant.
See DEMO.md for the pitch run-through.