Documentation

Everything you need to capture, store, and verify AI agent actions.

Overview

AgentReceipt captures every action your AI agent takes and stores it as a tamper-proof, human-readable receipt. If your agent sends emails, triggers payments, or modifies data, AgentReceipt gives you a clear record of what happened, when, and why. It is built for developers who build agents and for compliance teams who need to audit them.

The output is a receipt: a timeline of every LLM call, tool call, and decision your agent made during a single run. Each event is hash-chained, so any tampering is immediately detectable. You can view receipts in the dashboard, share them with auditors, or use them as evidence that your agent followed the rules.

Quick start

The fastest path from zero to your first receipt.

Step 1: Install the SDK

npm install @agentreceipt/sdk

Step 2: Get an API key from the dashboard

Sign in and create a project. On the project page, click "Create API key". Copy the key. You will not see it again.

Step 3: Wrap your AI client

agent.ts
import OpenAI from 'openai'
import { createClient } from '@agentreceipt/sdk'

const ar = createClient({ apiKey: process.env.AGENTRECEIPT_API_KEY })
const openai = ar.wrapOpenAI(new OpenAI(), { sessionName: 'Process invoice #441' })

// Use openai exactly as before
const response = await openai.chat.completions.create({
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Parse this invoice.' }]
})

Step 4: View the receipt in the dashboard

Open the dashboard, go to your project, and click into the session. You will see a timeline of every action your agent took, along with a plain-English summary and a hash chain verification badge.

That is it. Every LLM call, tool call, and decision is now captured automatically.

How it works

The SDK wraps your AI client and intercepts every call. Your code does not change. You call openai.chat.completions.create() exactly as before. The wrapper captures the input, output, duration, and model name, then sends it to AgentReceipt in the background.

Each intercepted call is sent to AgentReceipt as an event. Events are grouped into sessions. A session represents one end-to-end agent run, like processing a single invoice or handling a single support ticket. The SDK batches events and sends them every 2 seconds or when 10 events are queued, whichever comes first.

Events are stored in an append-only database and hash-chained. Each event's hash includes the previous event's hash, creating an unbreakable chain. If any event is modified after the fact, the chain breaks. The dashboard renders this data as a human-readable receipt that anyone can read, including people who are not technical.