Skip to content

Feature: Agent Action Receipt (AAR) middleware for provable tool calls #13215

Description

@Cyberweasel777

Problem

The Vercel AI SDK powers agent tool calls, structured outputs, and multi-step reasoning — but there's no built-in mechanism for cryptographically proving what an agent did. As AI moves from chat into consequential actions (payments, data mutations, API calls), unsigned execution logs aren't sufficient for auditability.

Proposal: Agent Action Receipt (AAR) Support

AAR is a lightweight open standard for Ed25519-signed proof of agent actions:

  • What — action name, scope, input/output SHA-256 hashes
  • Who — agent identity, principal (user/system that authorized it)
  • When — ISO 8601 timestamp
  • Proof — Ed25519 detached signature, offline-verifiable

The SDK is <10KB, zero external dependencies, works in Edge Runtime.

Integration surface

Natural fit as a streamText / generateText middleware or experimental_telemetry extension:

import { generateText } from "ai";
import { withAAR } from "botindex-aar/vercel";

const result = await generateText({
  model: openai("gpt-4"),
  prompt: "Analyze this contract",
  experimental_telemetry: withAAR({ agent: "contract-analyzer" }),
});
// result.receipt → signed AAR receipt

Every tool call gets a receipt. Receipts chain for multi-step provenance.

Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai/corecore functions like generateText, streamText, etc. Provider utils, and provider spec.featureNew feature or requesttask-identify-issue-type-done

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions