Skip to content

Repository files navigation

Ovrule

Ovrule
Auditable case files for AI agent decisions.

Live URL: https://decision-receipt-lab.vercel.app
API docs: https://decision-receipt-lab.vercel.app/docs

What Is Ovrule

AI agents are starting to approve refunds, send messages, move money, deploy code, and make user-facing calls that can carry real risk. Most systems still treat those decisions like disposable outputs. There is no signed record of what the agent tried to do, why it was allowed or refused, or how a human can challenge it later.

Ovrule turns an agent action into a case file. A proposed action is audited across six rules, streamed back rule by rule, wrapped in a signed receipt, and stored as a shareable case with evidence, missing information, revision history, contests, and reviewer overrides.

It is built for teams shipping autonomous or semi-autonomous AI systems: developer tools, operations platforms, customer support, finance workflows, healthcare-adjacent assistants, and any product that needs a real accountability layer instead of a one-shot model answer.

Screenshots

Homepage: live case workspace and streaming audit flow Homepage: hero, live case entry, progressive audit workspace.

Case view: shared permalink with signed receipt Shared case permalink with verdict, evidence, and receipt metadata.

Ledger: public trust ledger of stored receipts Public ledger showing the hash chain view of persisted case receipts.

Docs: SDK and API reference Developer docs covering the SDK, policy packs, verification, and API routes.

Architecture

Client / SDK
    |
    | POST /api/classify
    v
Next.js App Router route
    |
    | streams rule verdicts (SSE)
    v
OpenAI GPT-4o-mini
    |
    | fixed rule trace + case-file synthesis
    v
Policy pack merger
    |
    | deterministic checks can escalate rule verdicts
    v
ed25519 signing
    |
    | signed receipt + history events
    v
Supabase
    ├── receipts
    ├── receipt_history
    ├── contests
    └── receipt_overrides

Tech Stack

Layer Technology
App framework Next.js 14 App Router
Language TypeScript
Styling Tailwind CSS
Database Supabase
Model OpenAI GPT-4o-mini with structured outputs
Hosting Vercel
Signing Node crypto ed25519 signatures
Hashing SHA-256 canonical receipt hash
SDK bundling tsup
Validation Zod
Rate limiting Upstash Redis

SDK

Install:

npm install ovrule-lab

Examples:

import { classify } from "ovrule-lab";
const receipt = await classify("Support agent wants to refund $5,000 without manager approval.");
import { guard } from "ovrule-lab";
const result = await guard({ scenario: "Finance agent wants to wire $18,000 to a new vendor.", policyPack: "finance" });
import { verify } from "ovrule-lab";
const valid = await verify(receipt, receipt.signature);

Full SDK examples: sdk/README.md

Quick Start

  1. Clone the repo and install dependencies.

    git clone https://github.com/elakumuk/decision-receipt-lab.git
    cd decision-receipt-lab
    npm install
  2. Create your local environment file.

    cp .env.local.example .env.local
  3. Add the required environment variables.

    OPENAI_API_KEY=
    SUPABASE_URL=
    SUPABASE_ANON_KEY=
    SUPABASE_SERVICE_ROLE_KEY=
    OVRULE_PRIVATE_KEY=
    UPSTASH_REDIS_REST_URL=
    UPSTASH_REDIS_REST_TOKEN=
  4. Apply the Supabase migrations in supabase/migrations/.

  5. Start the app.

    npm run dev
  6. Verify the project.

    npm run lint
    npm run build

API

Interactive API documentation lives at: https://decision-receipt-lab.vercel.app/docs

Key routes:

  • POST /api/classify
  • POST /api/contest
  • POST /api/override
  • POST /api/verify
  • GET /api/public-key
  • GET /api/signing-health

Deployment Notes

Production is hosted on Vercel. Server-side Supabase operations use the service-role key, while public client flows remain rate-limited and demo-open. Receipt signing requires OVRULE_PRIVATE_KEY in production.

License

MIT

Credits

Built in April 2026. Codex was the primary coding partner across the app, classifier, SDK, and infrastructure work.

About

Ovrule — AI agent audit & decision-receipt platform. Built solo in 8 days. Makes AI agent decisions auditable and reviewable.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages