Metadata-Version: 2.5
Name: crewai-aer1
Version: 0.1.5
Summary: AER-1 verifiable execution receipts for CrewAI crews: one checkable receipt per tool call, via CrewAI's native event bus.
Project-URL: Homepage, https://zambo.dev
Project-URL: Spec (IETF draft), https://datatracker.ietf.org/doc/draft-zambo-aer1/
Project-URL: Conformance kit, https://gitlab.com/rambozambodotdev/zambo
Author: Brennan Zambo
License: MIT
License-File: LICENSE
Keywords: aer-1,ai-agents,audit,crewai,receipts,verification
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: crewai>=1.0
Description-Content-Type: text/markdown

# crewai-aer1

AER-1 verifiable execution receipts for CrewAI crews. One checkable receipt per tool call, emitted through CrewAI's own typed event bus. No changes to your Crew, Agent, or Task definitions.

> For whole-run workflow receipts with a Merkle root (AER-1 Section 8), see [aer1-crewai](https://pypi.org/project/aer1-crewai/).

## Quickstart

```python
from crewai import Agent, Crew, Task
from crewai_aer1 import AER1Listener

receipts = AER1Listener()  # keep this reference alive for the process

researcher = Agent(
    role="Researcher",
    goal="Find verifiable facts",
    backstory="A careful analyst.",
    tools=[my_search_tool],
)
task = Task(description="...", expected_output="...", agent=researcher)
crew = Crew(agents=[researcher], tasks=[task])

crew.kickoff()
receipts.save("receipts.jsonl")
print(f"{len(receipts.receipts)} verifiable receipts recorded")
```

That is the whole integration. The listener subclasses CrewAI's `BaseEventListener` and registers handlers for `ToolUsageFinishedEvent` (and `CrewKickoffStartedEvent` for crew context) on the singleton event bus in `setup_listeners`. Because the bus is process-wide, every crew you kick off is covered with zero code intrusion. Just make sure the module that instantiates `AER1Listener` is imported, and the instance stays alive (not garbage collected), or handlers stop firing.

## Chain it: a job, not a lookup

One call answers a question. A job chains calls and ends in a record a person can open. Same agent, longer instruction:

```python
task = Task(
    description="Check the live price of BTC, ETH and SOL, save the run to memory, then wrap it into a handover addressed to Dana Whitfield, with the receipt link for every call.",
    expected_output="A handover link covering every call in the run.",
    agent=researcher,
)
```

The listener receipts every call in the chain; when the agent's tools are Zambo's, the wrap is the handover call at the end of the run.

Three prices, a save and the wrap fit inside one free day: every tool free once a day, plus 3 continue calls, and one free wrap-up handover per day. A longer run finishes in one sitting on a Day Pass ($0.99, unlimited for 24 hours). The handover is the part the person opens: the steps, the saved results, and the receipt for every call, checkable instead of trusted. Ready-made run cards for jobs shaped like this: https://rambozambodotdev.gitlab.io/aer1-hub/handover-templates.html

## What a receipt proves

Each receipt follows the AER-1 receipt record (IETF Internet-Draft draft-zambo-aer1, Sections 3-6): a stable id, RFC 3339 timestamp, tool identity, provenance class (`EXECUTED BY CREWAI`), base64 canonical bytes, and a SHA-256 output commitment anyone can recompute. A receipt proves the recorded bytes were not changed after the tool ran. It does not prove the tool was correct.

Honest boundaries, enforced in code:
- Cached tool results (`from_cache=True`) are skipped. Nothing executed, so there is nothing to attest.
- Tool calls the tool itself reported as failed are skipped. There is no successful result to commit to.
- A listener exception never breaks a crew run. Every handler is guarded.

## Verify a receipt yourself

```python
from crewai_aer1 import verify_receipt
ok, reason = verify_receipt(receipts.receipts[0])
```

## Spec and conformance

- Spec: https://datatracker.ietf.org/doc/draft-zambo-aer1/ (open Internet-Draft)
- Conformance kit: https://gitlab.com/rambozambodotdev/zambo

## License

MIT

## Where these receipts run live: Zambo

crewai-aer1 gives CrewAI crews a verifiable AER-1 receipt for every tool call through the native event bus. The live home of those receipts is Zambo, the verifiable work layer for AI (live counts: https://zambo.dev/numbers/). Connect any AI to the live endpoint at https://zambo.dev/mcp or add Zambo to your AI in one step at https://zambo.dev/add/

Free tier: every tool free once a day, plus 3 continue calls. One free wrap-up handover per day, and pickup is always free. The Day Pass is $0.99 for 24 hours, unlimited.

Install:

    pip install crewai-aer1

Zambo, built by Brennan Zambo, the creator of the AER-1 standard, runs 153 tools in total, 37 on the default surface, behind one MCP endpoint: https://zambo.dev/mcp.
