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.

Install

pip install gridseal

With OpenAI adapter:

pip install gridseal[openai]

With Anthropic adapter:

pip install gridseal[anthropic]

Usage

Core: create a chain and append entries

from gridseal.core.chain import create_chain, append_entry, validate_chain
from gridseal.core.types import AppendEntryInput

chain = create_chain("audit-chain-001")

result = append_entry(chain, AppendEntryInput(
    entry_type="ai_decision",
    model_id="gpt-4o",
    model_provider="openai",
    decision_type="classification",
    input_hash="a1b2c3...",
    output_hash="d4e5f6...",
    actor_id="analyst-chen",
    session_id="session-001",
))

if result.ok:
    print(f"Entry appended: {result.value.entry_id}")

# Verify the entire chain is intact
validation = validate_chain(chain)
print(f"Chain valid: {validation.ok}")

Wrap OpenAI calls (auto-capture)

from gridseal.adapters.openai import wrap_openai
from gridseal.core.chain import create_chain
from gridseal.core.storage import InMemoryStorage
from openai import AsyncOpenAI

storage = InMemoryStorage()
chain = create_chain("my-chain")

client = wrap_openai(
    client=AsyncOpenAI(),
    storage=storage,
    chain=chain,
)

# Every call is now automatically audited
result = await client.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Approve this loan?"}],
)
# result.entry contains the proof chain entry
# result.completion contains the OpenAI response

What it does

  • Hash-chained entries with SHA-256, append-only, tamper-evident
  • Chain validation (full chain, subtree, single entry)
  • SDK wrappers for OpenAI and Anthropic with auto-capture
  • LangGraph and CrewAI framework adapters
  • In-memory storage adapter included
  • Python 3.12+, type hints throughout, async-first

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.1.tar.gz (21.6 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.1-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gridseal-0.5.1.tar.gz
  • Upload date:
  • Size: 21.6 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.1.tar.gz
Algorithm Hash digest
SHA256 12df40246c56311c6a6ee4e565679b6abbf2d3b0677927fb85a87b39e4d23fc3
MD5 91b79fcc76e9183798830431c73e770b
BLAKE2b-256 6f9409e4c5b3e1b09a9517b8880573addc21af580aaf79b26aeb1377f8c610fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gridseal-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 18.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65f3c40a5f5fc95939f3220818283124dfb7dffbcb730695c9674d66310ea942
MD5 0f0803f41c39fcbe441842b962b9b8c0
BLAKE2b-256 e3c1819f3865121ca8bc5598be42a16f0e907d743fe855804322830effe0e4d9

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