Operational ontology runtime · Effect 4 · Postgres 17

Model your operations as an ontology. Then run them.

Objects, links, actions, workflows and policies on Postgres, served as a typed REST API and an MCP server your agents can use, with an audit log you can verify offline.

Spins up a live sandbox with I-9, E-Verify, Checkr, CA/NY rules, real signing, and Ed25519 verification — no sign-in required. Or explore Policy Studio.

pack.jsonobjectnurseobjectfacilitylinkworks_atactionassign_nurseflowcredentialingnurse · Anafacility · Mercyworks_atcredentialing startedREST/domain/*MCPassign_nurseUINurses viewagent over MCP"Assign Ana to Mercy"audit log#41 action.runsha256 a3f9…#42 link.addprev a3f9 → 7c1e#43 flow.startprev 7c1e → e05b✓ signed · verifies offline

Every change is hash-chained and signed, so anyone can check it offline.

One live model of your operations, shared by your team, your systems and your agents.

How it works

Your business, as objects you can act on.

Objects and links
Each object type is a versioned JSON Schema. Links are typed x-ref fields; a change can replan the cases that depend on it.
Actions
Guarded changes to several objects that commit in one Postgres transaction, or not at all.
Workflows and policies
Durable workflows run what happens next. Policies decide what each case requires.
works_atnurseobjectfacilityobjectassign_nurseactioncredentialingworkflow
An example ontology. Apply a pack to start from a real one.
Architecture

Five composable primitives. Zero domain lock-in.

Every package depends in one direction, enforced by lint rules. Core knows nothing about HR, healthcare, or finance — your schemas, policies, and connectors define the domain.

01 · Objects & Links

Schema-checked ontology graph

Store domain objects as versioned JSON Schema entities with x-ref edges, GIN-indexed Saved Views, and hash-chained entity event logs.

02 · Domain Actions & JIT API

Atomic mutations & live OpenAPI

Run guarded multi-entity actions in one Postgres transaction and compile your tenant ontology JIT into typed /domain/* REST and /domain/openapi.json.

03 · Durable Workflows

Postgres-native state machines

Orchestrate action, branch, wait, and wait_for_event steps over SKIP LOCKED workers with step logs, timeouts, and rerun policies.

04 · Policy, Forma DSL & Docs

Rules, Lisp packs & signing

Author ontology packs in JSON or Forma Lisp DSL, evaluate policies with RFC 0003 reuse and chunked rollouts, and sign multi-party forms into lazy PDFs.

05 · Connectors & Proof

Effect plugins & zero-trust audit

Plug in external APIs as typed Effect Layers with tenant AEAD credentials, Postgres RLS, Ed25519 hash chains, and offline verification.

JIT Domain APIs & Unified Auth

Define your ontology once. Expose it everywhere.

JIT /domain/* REST, dynamic /domain/mcp, Effect RPC, and platform APIs share one CurrentActor middleware, one Postgres RLS tenant boundary, and one effect/Schema source of truth.

Compiled live from your tenant ontology with strict Effect Schema validation, RFC 7807 Problem Details, Idempotency-Key replay, and OpenAPI 3.1.

// Every object type, link, saved view, and action gets a typed /domain/* route
POST /domain/actions/onboard_vendor
Authorization: Bearer dw_live_...

{
  "legal_name": "Acme Logistics",
  "country": "US",
  "tier": "critical"
}

// Live spec for this tenant's ontology: GET /domain/openapi.json
For agents

Give your agents the ontology, not the database.

Each tenant's ontology is served at /domain/mcp: one MCP tool for every object type, action, saved view and workflow, kept in step as the ontology changes. Agents get the same guarded actions, scopes and row-level security as your team, and every change lands in the audit log.

Hand an agent a fresh sandbox (UUID 00000000)
Read /s/00000000…/llms.txt
// Connect Claude Code, Cursor, or any MCP client to /domain/mcp
{
  "mcpServers": {
    "ontology-run": {
      "url": "http://127.0.0.1:3100/domain/mcp",
      "headers": { "Authorization": "Bearer dw_agent_key" }
    }
  }
}

// Tools are generated JIT from your ontology (objects, actions, views, workflows).
// Every agent call is scope-checked, RLS-isolated, and hash-chained.
Ontology Packs & Forma DSL

Same runtime, any operational domain.

Package entity schemas, transactional actions, durable workflows, document templates, policy sets, saved views, and connectors into a portable JSON or Forma Lisp pack — apply or export with one API call.

Healthcare Staffing

Onboard clinicians across 50 states with 1-click Case Compliance Passports for hospital audits.

packs/healthcare-staffing.json

Entity Graph

  • nurse (license_state, specialty, compact_license)
  • facility (state, facility_type, accreditation)
  • Saved views: roster, nurses by state, case pipeline

Policies & Reuse

  • State-specific W-4 & I-9
  • ICU/ER license + HIPAA attestation
  • Cross-assignment document reuse (RFC 0003)

Connectors & Proof

  • Checkr background check action
  • Bullhorn ATS inbound/outbound sync
  • Auto-replan on license renewal
Measured on Postgres 17

Built for 100k+ subjects without extra infrastructure.

Reproducible via pnpm bench against real Postgres 17 — GIN JSONB indexing, keyset pagination, LISTEN/NOTIFY live feeds, lazy PDFs, and durable chunked rollouts.

6.76 ms
GIN JSONB view query (p50)

Filtered keyset page across 10k+ indexed entities on Postgres 17

6.09 ms
Entity graph reverse lookup (p50)

1,000 incoming x-ref edges via entity_links B-tree index

171 / s
Chunked policy rollout

Durable pause/resume/cancel cursor over SKIP LOCKED workers

1.94 ms
Cached lazy PDF render (p50)

12.5× faster than cold render; zero wasted PDFs for in-flight cases

Run locally in 5 seconds

Zero external services required to start.

Boots on embedded PGlite locally with zero setup, then scales to managed Postgres 17, S3/R2, OIDC, and Fly.io or Render with a single config file.

Full end-to-end I-9 + audit verify
pnpm install && pnpm demo
Interactive console + MCP server
pnpm demo:serve
Postgres 17 scale benchmark
pnpm bench