crewai - 💡(How to fix) Fix Feature: Cryptographic action receipts for multi-agent crew audit trails [13 comments, 6 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
crewAIInc/crewAI#4754Fetched 2026-04-08 00:40:23
View on GitHub
Comments
13
Participants
6
Timeline
23
Reactions
0
Timeline (top)
commented ×12mentioned ×5subscribed ×5closed ×1

Code Example

# Conceptual integration
@task
def research_task(self, agent, context):
    result = agent.execute(context)
    receipt = sign_action_receipt(
        agent_id=agent.role,
        principal=crew.manager,
        action={'type': 'research', 'target': context.topic},
        input_hash=sha256(context),
        output_hash=sha256(result),
    )
    return result, receipt

---

npm install botindex-aar
RAW_BUFFERClick to expand / collapse

Problem

When a CrewAI crew executes tasks across multiple agents, there's no standard way to cryptographically prove:

  • Which agent executed which task
  • What inputs each agent received
  • What outputs each agent produced
  • Whether any output was tampered with between agent handoffs

For enterprise deployments, this is a compliance blocker. For agent-to-agent commerce (x402, Stripe agent checkout), it's a trust gap.

Proposed Solution: Agent Action Receipts (AAR)

AAR v1.0 is an open standard (MIT) for signed receipts that chain across agent actions:

  • Ed25519 signatures over canonicalized JSON (JCS-SORTED-UTF8-NOWS)
  • SHA-256 input/output hashing — verifiable without exposing raw data
  • Each agent in the crew signs its task execution, creating a verifiable chain of custody
  • Failed/partial tasks are explicitly marked (status: 'failure' | 'partial')

For CrewAI specifically

# Conceptual integration
@task
def research_task(self, agent, context):
    result = agent.execute(context)
    receipt = sign_action_receipt(
        agent_id=agent.role,
        principal=crew.manager,
        action={'type': 'research', 'target': context.topic},
        input_hash=sha256(context),
        output_hash=sha256(result),
    )
    return result, receipt

Each crew execution produces a receipt chain — complete audit trail from delegation to final output.

Ecosystem Compatibility

  • Mastercard Verifiable Intent (announced March 5, 2026) — bidirectional mapping included
  • x402 (Coinbase) — complementary payment verification standard
  • Aztec L2 ZK-compatible — verify receipts on-chain without revealing contents

SDK

TypeScript SDK live on npm:

npm install botindex-aar

Python SDK in development.

Happy to contribute a PR for CrewAI integration. MIT licensed, single dependency.

extent analysis

Fix Plan

To implement Agent Action Receipts (AAR) in CrewAI, follow these steps:

  • Integrate the AAR SDK into your project:
    • For TypeScript, run npm install botindex-aar
    • For Python, wait for the Python SDK or implement the AAR spec manually
  • Modify your task execution code to generate and sign receipts:
    • Use Ed25519 signatures over canonicalized JSON (JCS-SORTED-UTF8-NOWS)
    • Calculate SHA-256 input/output hashes
    • Create a receipt chain for each crew execution
  • Update your task function to return the result and receipt:
from botindex_aar import sign_action_receipt
import hashlib

@task
def research_task(self, agent, context):
    result = agent.execute(context)
    input_hash = hashlib.sha256(str(context).encode()).hexdigest()
    output_hash = hashlib.sha256(str(result).encode()).hexdigest()
    receipt = sign_action_receipt(
        agent_id=agent.role,
        principal=crew.manager,
        action={'type': 'research', 'target': context.topic},
        input_hash=input_hash,
        output_hash=output_hash,
    )
    return result, receipt
  • Store the receipt chain for auditing and verification purposes

Verification

To verify the fix, check that:

  • Each task execution produces a valid receipt chain
  • The receipt chain contains the correct input and output hashes
  • The receipt chain is properly signed and verifiable
  • The AAR SDK is correctly integrated and functional

Extra Tips

  • Ensure you handle errors and exceptions properly when generating and signing receipts
  • Consider implementing a mechanism to store and retrieve receipt chains for auditing and verification purposes
  • Review the AAR spec and SDK documentation for any updates or changes to the implementation requirements

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING