ReceiptDB by Counterfoil Labs
Provenance for enterprise AI · self-hosted on your PostgreSQL

Every AI answer, with a receipt.

Accountability for whatever your AI produces. The receipt says which documents the answer used and who was allowed to see them. Withdraw a document and every answer built on it is withdrawn too. Erase a person and every chunk, vector, memory and answer built from their data is erased, with a certificate to prove it.

Runs in your cloudNothing hosted by usSSO, SCIM and your own KMS in Enterprise

ReceiptDB Explorer

answer 5d9b0a95ffe5

dana@acme.com asked: What's the notice period in the Globex MSA?

90 days' written notice, per §14.2 of the 2025 MSA.

answer 5d9b0a agent:legal-assist@2 └─ chunk "§14.2 Either party may…" chunker:paragraph@1 └─ part msa-2025.pdf p.11 v3 └─ source contracts://globex/msa-2025

Receipt

Status
active · 1 source
Trust
verified
Licence
restricted
Readers
group:legal
Personal data
none detected
Model
agent:legal-assist@2

If the source is withdrawn

41 chunks41 embeddings1 summary17 answers · 6 askers

Try it: preview first, nothing changes.

Runs on the infrastructure you already trust

  • PostgreSQL
  • Amazon RDS
  • Google Cloud SQL
  • Azure Database
  • Kubernetes
  • Okta
  • Microsoft Entra ID
  • AWS KMS

The platform

One lineage graph. Every guarantee your AI needs.

One document becomes chunks, vectors, memories, summaries and answers. ReceiptDB records where each one came from, so access, withdrawal, erasure and audit reach every copy.

Access that follows the data

Every derived record inherits access from every input, so a summary or an answer is never readable by someone who couldn't read its sources. Revoke a group's access to a source and it's revoked on everything built from it.

Withdraw a source everywhere

One call retracts a source and everything built from it, in a single transaction, and names the people whose answers it invalidates. When a source is amended, affected questions are asked again.

Erasure with a certificate

Erase a person across chunks, vectors, memories and answers, leaving only unreadable fingerprints. The certificate can be checked against the database by an independent verifier.

An audit trail for every answer

One receipt per answer: question, asker, model and lineage to every source. Filter by period, user or document, export it for a regulator, and check any receipt yourself: one command re-hashes it against the database, down to every source.

Personal data, found

A detector flags personal data a writer never declared and proposes the people it names. Its built-in engine needs no model and no extra service; add Microsoft Presidio to find names too. Once a person is confirmed, erasing them reaches the earlier records too.

Suspect content, quarantined

Scanners hold flagged sources and everything derived from them out of retrieval until someone reviews them. Use the built-in checks, Prompt Guard 2, Lakera Guard or your own classifier.

See it work

Withdraw a source. Every copy follows.

Every record gets an ID derived from its content and is linked to what it was derived from. Labels flow down that graph and fail closed: a derived record is never more trusted, or less restricted, than its riskiest input.

When the Globex MSA is amended, one call handles everything built from it, in a single transaction, and names the people whose answers it invalidates. Preview it, then run it →

$ receipt impact contracts://globex/msa-2025
impact (nothing changed yet)
chunk 41 retract
embedding 41 remove from index
answer 17 flag · 6 askers
source 1 retract
summary 1 retract

A preview first: nothing has changed yet.

The lineage of the Globex MSA SOURCE PART CHUNKS DERIVED ANSWERS source msa-2025 part p.11 v3 chunk §14.2 chunk §14.3 chunk §15.1 embedding of §14.2 embedding of §14.3 summary of §14.3, §15.1 embedding of §15.1 answer 5d9b0a dana@acme.com→ to tell answer a81f0c priya@acme.com→ to tell

source msa-2025 active

Readers
group:legal, its own
Derived from
nothing: it is a source
Built from it
8 records, 2 answers

Hover or tap a record to trace its lineage. Labels flow down: everything below the source inherits group:legal.

Why not a vector database

A metadata filter checks one chunk. Lineage reaches every copy.

A filter is attached to the chunk it guards; nothing carries it to what was built from that chunk. ReceiptDB stores the vectors too, and serves search with your policies enforced.

WhenWith a metadata filterWith ReceiptDB
A legal-only contract is summarisedThe summary is readable by anyone the filter missesThe summary is readable only by those who may read every source
A document is withdrawnIts chunks and answers keep serving until someone rebuilds the indexOne call retracts everything built from it and lists the answers it affected
A person asks to be erasedSomeone hunts for every copy by handErased from every chunk, vector, memory and answer, with a certificate
"Which sources did this answer use?"Nothing records itEvery answer has a receipt

Compliance

The evidence regulators ask for, built from the records.

Requests from OneTrust or Transcend are answered with an erasure certificate, and stay open while a legal hold keeps records. In Enterprise, report templates for the EU AI Act and FINRA are built from the same receipts. Your privacy team starts ahead, with a DPIA template that sets out what ReceiptDB stores and where its data flows, and article-by-article mappings for GDPR and the EU AI Act, each naming the tests that show it; ask for them.

EU AI Act · Art. 12

Record-keeping for AI systems

Each answer is stored with its inputs, model, asker and time, and period reports are built from those records.

GDPR · Art. 17

Right to erasure

Erase a person from every chunk, vector, memory and answer derived from their data, with a certificate of what was removed.

FINRA · Regulatory Notice 24-09

Supervising AI output

An audit export per answer: what it said, who asked, and every source it relied on.

EU AI Act record-keeping report (Art. 12)

System: Credit-operations assistant (sample) · Provider/deployer: Acme Bank (fictional)
Period: 2026-01-01T00:00:00+00:00 to 2026-04-01T00:00:00+00:00 · Generated: 2026-10-12T20:19:14.827436+00:00

1. Outputs recorded

  • 7 answers were recorded with full provenance (inputs, sources, model, asker, time).
  • 4 of them are no longer valid, because a source was retracted, superseded or erased since.
  • 1 relied on low-trust content, 0 on non-commercial or restricted content, and 1 involved personal data.

2. Input data: in the full sample, not this excerpt

3. Outputs invalidated in the period

Outputs whose inputs were later retracted, superseded, erased or quarantined.

WhenAsked byQuestionStatusReason
2026-03-02T09:05:00a.dubois@bank.exampleWhat's the current personal loan rate?quarantinedquarantine: rates changed on 1 March: out of date
2026-03-04T08:30:00l.fischer@bank.exampleWhat's the maximum debt-to-income for a personal loan?supersededthe March 2026 lending policy
2026-03-04T08:30:00s.romano@bank.exampleCan we go above 40% DTI for a strong applicant?supersededthe March 2026 lending policy
2026-03-18T17:45:00erasedGDPR Art. 17 request #418

The last row is an answer built on a loan applicant's data, erased under their GDPR request: its question and asker went with it, and the record that an answer existed stays.

An excerpt of a sample report ReceiptDB Enterprise wrote for a fictional bank's credit-operations assistant over a quarter: unedited, its event log verified. Read the full EU AI Act sample →   FINRA →

ReceiptDB gives you the evidence; how you use it determines compliance.

Architecture

Runs in your cloud. Your data stays in it.

A stateless API in front of the PostgreSQL you already back up, monitor and secure. Nothing leaves your network unless you switch on an integration that calls out, such as a connector or a hosted model.

Your cloud
Your AI applications and agentsLangChain, LlamaIndex, LangGraph, Haystack, Semantic Kernel, MCP clients, or the HTTP, Python and TypeScript APIs
Your content EnterpriseGoogle Drive, SharePoint, Slack, Confluence, S3, Google Cloud Storage and Azure Blob, synced with their permissions
Your identity provider EnterpriseSSO over OIDC and SCIM from Okta or Entra ID; groups from SpiceDB or OpenFGA
ReceiptDB
Stateless APIKubernetes with the Helm chart, or Docker; scale by adding replicas
Lineage, labels and policyEvery search access-checked; retraction and erasure in one transaction
Your PostgreSQL 16 or 17 with pgvectorSelf-managed, Amazon RDS, Cloud SQL or Azure Database; records, vectors and the lineage graph in ordinary tables
Your key management EnterprisePer-person keys under a master key in AWS KMS, Google Cloud KMS or Azure Key Vault
Your security operationsAudit export to Splunk, OpenTelemetry or syslog; Prometheus metrics and traces
Your privacy and data catalogsOneTrust and Transcend requests; lineage to OpenLineage, Marquez and DataHub

Security and operations

Built for your security review, and to be run by your platform team.

The details for your review are on the security page.

  • Fails closedContent without labels is treated as untrusted and restricted, permissions a connector can't map deny access, and a retraction or erasure either completes everywhere or changes nothing.
  • Permissions as fresh as the source EnterpriseConnectors follow Google Drive and SharePoint as they change, so a revoked share is applied about a minute after the source reports it. Turn on the live check and each document's permissions are read at the source again before it's returned.
  • Keys in your KMS EnterpriseText about each person is encrypted with its own key. Erasing a person destroys their key, so their text can't be read back from the live database, nor from a restored backup when the key store lives on a separate instance.
  • A tamper-evident audit log EnterpriseEvery lifecycle change is recorded in a hash-chained log, with signed exports and certificates. Signed checkpoints kept outside the database make a rewritten or truncated log detectable, even to someone with database access.
  • Erasure leaves nothing to identifyWhat erasure keeps of a person, a document or its content is an unreadable fingerprint, keyed with a secret you hold outside the database, so a stolen copy can't confirm who was erased.
  • Run by your platform teamWorks behind PgBouncer, serves again within about a second of the database coming back after a failover, and applies every lifecycle operation whole or not at all. Rate limits, zero-downtime key rotation, Prometheus and OpenTelemetry, migrations with no locks on a restart, and runbooks drilled against real failures.
  • Releases you can traceEvery release image ships with a software bill of materials and SLSA build provenance, for your supply-chain review.
  • Scanned on every changeEvery change is checked before it merges: Semgrep for the code and gitleaks for secrets, and every dependency change goes through pip-audit and Trivy, which scans each image and refuses a fixable high-severity flaw. The threat model is yours to review on request.

Performance

Search at index speed, with every access check.

Every figure includes the access check, and how much a caller may read barely moves it.

3.3ms

median search on real embeddings, with trust and licence policies enforced

99%

recall at one million chunks, policies enforced

10,100/s

searches per second through the API on one 32-vCPU server, each one access-checked

How we measured

Latency measured on tuned PostgreSQL on its own 8-vCPU server, recall on its own 32-vCPU server, with the search on another.

Searches per second measured with tuned PostgreSQL on its own 32-vCPU server, the API on a second 32-vCPU server and the load generator on a third machine, with the server's default worker pinning: 40 processes, 320 concurrent clients, 100,000 chunks, k = 10, trust and licence filters on every search.

Latency on real embeddings; recall and the share a caller may read on a synthetic million-chunk corpus, with the 16-bit vectors stored today and the index settings ReceiptDB picks. At a million chunks, a caller who can read half of them and one who can read a hundredth of a percent both search in 4 to 40 ms. The benchmark harness ships with ReceiptDB.

Editions

Start with the core. Add what your auditors ask for.

ReceiptDB

For teams building RAG and agents

  • Receipts, label inheritance and cascading retraction
  • Permission-aware vector and hybrid search, with policies enforced
  • Erasure across every derived record, legal holds and quarantine
  • Personal-data detection, grounding checks and data-egress labels
  • Answer audit export, re-answering and signed webhooks
  • Any model; LangChain, LlamaIndex, LangGraph, Haystack, Semantic Kernel and MCP; importers from Pinecone, Weaviate, Qdrant, Chroma, Elasticsearch and OpenSearch
Talk to us
For regulated teams

ReceiptDB Enterprise

For regulated and multi-team deployments

  • SSO (OIDC) and SCIM identity sync from Okta or Entra ID, with groups from SpiceDB or OpenFGA if you run one
  • Connectors that sync content and permissions from Google Drive, SharePoint, Slack, Confluence, and S3, Google Cloud Storage or Azure Blob buckets; a revoked share in Drive or SharePoint applies in about a minute, with an optional live check at the source
  • Crypto-shredding of text and vectors, with keys in AWS KMS, Google Cloud KMS or Azure Key Vault and a separate key store for backups
  • Signed erasure certificates and a tamper-evident audit log with anchors
  • EU AI Act and FINRA report templates, provenance explorer
  • Multi-tenancy: a directory, webhooks and audit export per tenant, tenants you can disable or remove, scoped API keys, usage metering and quotas
  • A licence that never holds data hostage: after expiry, a grace period, then only new Enterprise value stops
Request a demo

Integrations

Fits the stack you already run.

Database

  • PostgreSQL 16 · 17
  • pgvector
  • Amazon RDS
  • Google Cloud SQL
  • Azure Database for PostgreSQL

Models and agents

  • Any LLM
  • Model Context Protocol
  • LangChain
  • LlamaIndex
  • LangGraph
  • Haystack
  • Semantic Kernel
  • Langfuse
  • Arize Phoenix

Content sources Enterprise

  • Google Drive
  • SharePoint
  • Slack
  • Confluence
  • Amazon S3
  • Google Cloud Storage
  • Azure Blob Storage

Import from

  • Pinecone
  • Weaviate
  • Qdrant
  • Chroma
  • Elasticsearch
  • OpenSearch

Identity Enterprise

  • OIDC single sign-on
  • SCIM provisioning
  • Okta · Microsoft Entra ID
  • SpiceDB · OpenFGA groups

Key management Enterprise

  • AWS KMS
  • Google Cloud KMS
  • Azure Key Vault
  • HashiCorp Vault

Content scanning

  • Llama Prompt Guard 2
  • Lakera Guard
  • Microsoft Presidio

Privacy requests

  • OneTrust
  • Transcend

Audit export

  • Splunk HTTP Event Collector
  • OpenTelemetry logs
  • Syslog (RFC 5424)

Data catalogs

  • OpenLineage
  • Marquez
  • DataHub

Deployment

  • Kubernetes
  • Helm
  • Docker

FAQ

Questions teams ask first.

Does it replace our vector database?

It can. ReceiptDB stores vectors in PostgreSQL with pgvector and serves search itself, with your policies enforced. It plugs into LangChain and LlamaIndex as a vector store, so adopting it is a small code change rather than a migration project. One command imports a collection from Pinecone, Weaviate, Qdrant, Chroma, Elasticsearch, OpenSearch or plain pgvector, labelled as unknown provenance until you say otherwise, with each point's readers and data subjects taken from its metadata. Lineage and labels add 1 to 9 ms per search. Vectors are stored at half precision, so the search index is 40% smaller than plain pgvector's 32-bit one (1.2 GB against 2.0 GB at a million chunks) and builds and searches as fast, for 99.6% of the true top ten at a million chunks against 32-bit's 100%, and the same recall on real embeddings.

How quickly does a revoked share take effect?

With Enterprise's connectors following Google Drive or SharePoint, about a minute after the source reports the change: the document and everything built from it leave search and answers for the people who lost access. For documents where a minute is too long, the live check reads permissions at the source again before a document is returned, and leaves it out if the source can't answer.

Will it find personal data we didn't label?

Yes, if you turn on the detector, which runs in your own environment. Its built-in engine finds email addresses, phone numbers, card numbers and IBANs, and, when you name them, US and UK national identifiers such as National Insurance numbers, with no model and no extra service; Microsoft Presidio adds names. It flags personal data a writer didn't declare and proposes the people it can identify, such as an email address, for a rule or a reviewer to confirm. It records entity types and scores, never the text it matched, and it only adds restrictions. Like any detector it can miss things, so the labels your writers declare still come first.

Do we need to run a new database?

No. ReceiptDB runs on PostgreSQL with the pgvector extension, self-managed or managed, including Amazon RDS. The lineage graph and audit log are ordinary tables, so your existing backups, monitoring and access controls apply.

Which models can we use?

Any. Answers, grounding checks, agent memory and the injection scanner run on Anthropic, any OpenAI-compatible endpoint including local models, or AWS Bedrock, and the MCP server lets the agents you already run record their answers with receipts. Content labelled for local use never goes to a hosted model.

What happens if our Enterprise licence lapses?

Nothing is held hostage. After expiry there's a grace period; after that, only new Enterprise features stop. Reads, decryption, erasure and access to every tenant keep working, through restarts too, so your data and your obligations to the people in it never depend on a renewal.

What is the licence?

The Community edition is under the Functional Source License (FSL-1.1-ALv2). Use, modify and redistribute it for any purpose except offering a competing product or service; each release becomes Apache-2.0 two years after it ships. Enterprise is a separate commercial licence.

What does it cost?

Pricing depends on your deployment. Talk to us for a quote.

Talk to us

See ReceiptDB on your own data.

Tell us what you're building and where provenance hurts today.

  • A proof of concept on your own data
  • A direct line to the engineers who build it
  • Help with your security review
Request a demo

or write to hello@counterfoillabs.com