Skip to main content

Tamper-evident, cryptographically verifiable audit trail for AI decisions

Project description

GridSeal

Tamper-evident, cryptographically verifiable audit trail for AI systems.

Why

AI systems make decisions that affect people, from loan approvals to medical recommendations to government benefits. Regulations are arriving: the EU AI Act (Article 12 record-keeping, August 2026), Colorado SB-205, NIST AI RMF, and HIPAA audit controls. Organizations need proof of what their AI did, why it did it, and whether a human reviewed it. GridSeal provides that proof as a SHA-256 hash-chained, append-only log that is cryptographically verifiable and impossible to silently tamper with.

Who this is for

Government agencies deploying AI for public services need audit trails for accountability and FOIA compliance. Financial services using AI for lending and fraud detection need records for fair lending laws and examiner reviews. Healthcare organizations using AI for diagnostics need HIPAA audit controls. Any company shipping AI products in the EU after August 2026 needs Article 12 record-keeping. Platform companies building multi-agent systems need provenance tracking across agent delegation chains.

What it does

  • Hash-chained entries - 24-field proof chain entries (3 tiers: core integrity, AI decision context, compliance metadata) linked by SHA-256 hashes
  • Chain validation - verify full chains, subtrees, or single entries; detects tampering at the exact position
  • Reasoning certificates - structured records of AI reasoning: premises, trace steps, conclusions, confidence assessments, unsupported claims
  • Compliance auto-tagging - automatic mapping of entries to regulatory requirements (Colorado SB-205, EU AI Act, NIST AI RMF, HIPAA)
  • Model provenance - AIBOM records compatible with CycloneDX ML-BOM, tracking model identity, training data, and performance metrics
  • Storage adapters - in-memory and SQLite adapters included, with a pluggable adapter interface
  • SDK wrappers - drop-in wrappers for OpenAI, Anthropic, generic HTTP, MCP tool calls, LangGraph, and CrewAI that auto-capture audit entries
  • Compliance reports - generate regulation-specific reports with gap analysis from chain data

Install

npm install @gridseal/core

For SDK wrappers that auto-capture AI provider calls:

npm install @gridseal/sdk-node

Usage

Core: create a chain and append entries

import {
  createChain,
  appendEntry,
  validateChain,
} from "@gridseal/core";

const chain = createChain("audit-chain-001");

const result = appendEntry(chain, {
  entryId: crypto.randomUUID(),
  timestamp: new Date().toISOString(),
  entryType: "model-inference",
  modelId: "gpt-4o",
  inputHash: "a1b2c3...",
  outputHash: "d4e5f6...",
  decisionType: "classification",
});

if (result.ok) {
  const { chain: updated, entry } = result.value;
  console.log(entry.entryHash); // SHA-256 hash of the entry
  console.log(entry.previousHash); // links to prior entry

  // Validate the entire chain
  const valid = validateChain(updated);
  if (!valid.ok) {
    console.error(valid.error); // reports exact position of tampering
  }
}

SDK: wrap an OpenAI client

import { wrapOpenAI } from "@gridseal/sdk-node";
import { createInMemoryAdapter } from "@gridseal/core";
import OpenAI from "openai";

const gridseal = wrapOpenAI({
  client: new OpenAI(),
  chainId: "session-001",
  storage: createInMemoryAdapter(),
});

const result = await gridseal.createCompletion({
  messages: [{ role: "user", content: "Evaluate this loan application." }],
  model: "gpt-4o",
  decisionType: "approval-denial",
});

if (result.ok) {
  const { completion, entryId } = result.value;
  // completion: standard OpenAI ChatCompletion
  // entryId: ID of the audit entry in the proof chain
}

Requirements

Node.js >= 22. Uses native crypto module for SHA-256 hashing, no third-party crypto dependencies.

License

AGPL-3.0-only

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gridseal-0.5.0.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gridseal-0.5.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file gridseal-0.5.0.tar.gz.

File metadata

  • Download URL: gridseal-0.5.0.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for gridseal-0.5.0.tar.gz
Algorithm Hash digest
SHA256 9c820dcd8a6c400ad0d474237b4465557828d2993ec159599ba7dbda6d049df4
MD5 1eab6a41bbfd2a16111a67a34be3fe31
BLAKE2b-256 8d12bc467c1e731b495e6abb722de16485dc823e0208b65e80f661e6bf16e95a

See more details on using hashes here.

File details

Details for the file gridseal-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: gridseal-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for gridseal-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42b4f60652ed2ac610df80a005c0fe0b8e76ec2d203e3f3953c0103f5e676641
MD5 e1d038b97a04808d8fcbf5a6eede0922
BLAKE2b-256 2ce52023f4269496001150f73a42fa8e7b0cc9567d24d2fc3d96e585e6598149

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page