ERC-8004 in Action: We Built the First Working Demo of Trustless AI Agents

Why this matters

The on‑chain AI economy needs a trust layer. AI agents can already message each other (A2A), but in open markets they can’t reliably verify identity, prove work quality, or build portable reputation. ERC‑8004 (Trustless Agents) defines simple, minimal on‑chain rails so agents can collaborate across organizational boundaries safely, transparently, and without trusted intermediaries.

What ERC‑8004 provides (the “rails”)

A minimal, on‑chain trust layer via three lightweight registries:

  • Identity Registry: Sovereign, portable agent identity Maps AgentAddress + AgentDomainAgentID, with resolvers for lookups.

  • Validation Registry: Independent verification Server submits DataHash; Validator returns a 0–100 score on‑chain.

  • Reputation Registry: Feedback authorization Server pre‑authorizes Client to post feedback off‑chain, anchored by on‑chain events.

Complex logic (AI, scoring, storage, payments) stays off‑chain; the chain is the source of truth.

What we built (the “show”)

We shipped the first complete working demo of ERC‑8004 in which agents built with CrewAI performing real work, getting independently validated, and creating a full, on‑chain audit trail.

  • Repo: ChaosChain/erc‑8004‑example

  • What it demonstrates

    • ERC‑8004 registries: Identity, Validation, Reputation

    • CrewAI multi‑agent workflows

    • Trustless work/validate/feedback loop

    • Full on‑chain audit trail

The demo scenario

  • Alice (Server Agent): Provides market analysis

  • Bob (Validator Agent): Independently validates Alice’s work

  • Charlie (Client Agent): Pre-authorized to leave feedback

End‑to‑end flow:

  1. Deploy the three registries locally (Anvil).

  2. Register all agents in Identity Registry.

  3. Alice performs BTC market analysis using CrewAI agent team.

  4. Alice submits DataHash and requests validation from Bob (Validation Registry).

  5. Bob validates the package using his CrewAI team; computes a score.

  6. Bob submits the 0–100 score on‑chain (Validation Registry).

  7. Alice authorizes Charlie to leave feedback (Reputation Registry).

  8. Display a complete on‑chain audit trail.

Architecture at a glance

  • On‑chain: Identity + Validation + Reputation registries (Solidity / Foundry)

  • Off‑chain: Agents (Python), CrewAI orchestration, Web3.py, IPFS‑ready packaging

  • Data model: DataHash commits to inputs/outputs; off‑chain evidence stored (local in demo; IPFS for production)

Run it locally in minutes

Prereqs: Python 3.8+, Foundry, Anvil

git clone <https://github.com/ChaosChain/erc-8004-example>
cd erc-8004-example
cp .env.example .env            # adjust if needed
./setup.sh                      # installs deps, builds contracts
anvil --port 8545 &             # start local chain
python3 demo.py                 # run the full demo

What you’ll see:

  • Contracts deployed

  • Agents registered (Alice=Server, Bob=Validator, Charlie=Client)

  • Analysis generated by agents

  • Validation requested and scored on‑chain

  • Feedback authorization completed

  • Final audit trail with transaction hashes

For developers: key patterns

  • Keep on‑chain minimal: identities, requests, responses, and auth events

  • Put heavy lifting off‑chain: AI workloads, scoring, data retrieval, packaging

  • Use content‑addressed data (hash/CID) to tie off‑chain evidence to on‑chain facts

  • Model the trust loop explicitly: Work → Validate → Authorize Feedback → Reputation

Small example (Python, submitting validation request):

tx = validation_registry.functions.validationRequest(
    validator_agent_id,  # e.g., Bob's AgentID
    server_agent_id,     # e.g., Alice's AgentID
    data_hash            # bytes32
).build_transaction({...})

What’s next: from rails to bullet train

We’re moving from public “rails” to the first high‑performance ChaosChain Studio (“bullet train”) that runs on them:

  • Productionize storage (IPFS) for analysis/validation packages

  • Harden contracts + testnet deployments (Sepolia → L2s)

  • Agent orchestrator + queue for real workloads

  • dApp: submit tasks, track validations, view audit trails

  • Domain‑specific Studios with proprietary prompts, tools, and data

Call to action

  • Star the repos, run the demo, open issues/PRs

  • Share the demo thread on X; we’ll amplify

  • Reach out if you want to co‑build Studios on ERC‑8004

Built with care for the Trustless Agents ecosystem.

Subscribe to ChaosChain
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.