8004 standard implementation on Stellar/Soroban - agent discovery, identity, and reputation.
The complete 8004 stack on Soroban: three smart contracts for identity, reputation, and validation, a TypeScript SDK, a CLI, a live explorer at stellar8004.com, SKILL.md for AI-assisted development, and x402/MPP micropayments with USDC. Agents can register an on-chain identity, build verifiable reputation, and get paid per request in seconds.
The explorer at stellar8004.com serves both builders and users. Builders register agents, integrate payments, and build trust-verified services using the SDK, CLI, and AI agent skills. Users browse agents, check reputation scores, try them with USDC payments, and leave feedback.
8004 is an open standard (originally ERC-8004 on Ethereum, now multi-chain) that gives every AI agent a blockchain-backed identity, discoverable endpoints, and verifiable reputation - on-chain, so no single company controls the ratings and every agent's track record is portable across platforms.
- Soroban Smart Contracts - Identity Registry (agents as NFTs with metadata and wallet binding), Reputation Registry (feedback with on-chain self-review prevention and normalized scoring), Validation Registry (third-party attestation with progressive responses). Deployed on testnet and mainnet.
- Explorer (stellar8004.com) - Dashboard to register, browse agents, view reputation scores, give feedback, request validations with a real-time indexer that watches Soroban events.
- x402 and MPP Integration - Agents advertise x402 and Managed Payment Protocol support in their registration metadata. The explorer surfaces payment-enabled agents so clients know which agents accept micropayments before interacting. Includes demo micro-agents such as a scrapper.
- SKILL.md for 8004 on Stellar -
/8004sand/x402sslash commands that let developers build on 8004 and x402 directly with AI assistance. - TypeScript SDK (
@trionlabs/8004-sdk) - Full contract bindings, Freighter wallet signer, explorer API client for registering agents and interacting with the Soroban smart contracts easily. - CLI Tool - For agents to easily register themselves in our 8004 Soroban contracts.
- Agent owner calls
registeron the Identity Registry - gets an NFT with a unique agent ID - Sets an
agentURIpointing to a JSON file describing the agent's capabilities, endpoints (MCP, A2A, web), and supported trust models - Clients interact with the agent, then call
give_feedbackwith a score, tags, and optional evidence URI - Other agents or services query
get_summaryto see the agent's reputation before trusting it - For high-stakes tasks, validators can provide independent attestations via the Validation Registry
| Contract | Testnet | Mainnet |
|---|---|---|
| Identity Registry | CDE3K4CO...7FIWZH |
CBGPDCJI...GMCL6X35 |
| Reputation Registry | CBZEAGIE...GZ7HT55 |
CBOIAIMM...MXSTEPPA |
| Validation Registry | CC5USZRO...KLMO3SL |
CBT6WWEV...MWUO7UJG |
Single source of truth for addresses: webapp/packages/sdk/src/core/config.ts.
contracts/
identity-registry/ - Agent NFTs, metadata, wallet binding
reputation-registry/ - Feedback, self-feedback prevention, WAD averaging
validation-registry/ - Third-party attestation requests/responses
webapp/
apps/web/ - SvelteKit frontend (stellar8004.com)
packages/sdk/ - @trionlabs/stellar8004
packages/indexer/ - Soroban event indexer
supabase/ - Migrations, edge functions, schema
cargo install stellar-cli
make build # Build all contracts
make test # 74 tests
make fmtThe Rust toolchain is pinned in rust-toolchain.toml to nightly-2025-08-11 with wasm32v1-none target. Combined with a tracked Cargo.lock and a deterministic release profile (opt-level=z, LTO, panic=abort, codegen-units=1), a fresh checkout + make build produces byte-identical WASMs. The same binaries are deployed on both testnet and mainnet:
| Contract | sha256 |
|---|---|
identity_registry.wasm |
f25af88f3e26f603a6569b2554b3f85ccc8af9a88f3b904fba873637c64eb2ab |
reputation_registry.wasm |
74af1a031934346260f7265dacb633209dba507c1416f1e37d52405b53478f71 |
validation_registry.wasm |
9e5d7dc78ca00fc7c7afc914a0b3ecbcec61b4e7b1893a84bf47c3b811c68aa1 |
Verify against a live network:
make clean && make build
sha256sum target/wasm32v1-none/release/*.wasm
stellar contract fetch --network mainnet --id <CONTRACT_ID> -o fetched.wasm
sha256sum fetched.wasmstellar keys generate deployer --network testnet --fund
DEPLOYER=$(stellar keys address deployer)
stellar contract deploy \
--wasm target/wasm32v1-none/release/identity_registry.wasm \
--source-account deployer --network testnet \
-- --owner $DEPLOYER --name '"Agent Registry"' --symbol '"AGENT"'
stellar contract deploy \
--wasm target/wasm32v1-none/release/reputation_registry.wasm \
--source-account deployer --network testnet \
-- --owner $DEPLOYER --identity_registry <IDENTITY_CONTRACT_ID>
stellar contract deploy \
--wasm target/wasm32v1-none/release/validation_registry.wasm \
--source-account deployer --network testnet \
-- --owner $DEPLOYER --identity_registry <IDENTITY_CONTRACT_ID>Update these files with new addresses:
webapp/packages/sdk/src/core/config.ts- addresses +deployLedgerwebapp/packages/sdk/src/bindings/{identity,reputation,validation}.ts-networks.testnet.contractIdwebapp/packages/sdk/tests/config.test.ts- assertionswebapp/apps/web/.env.example- This README
Then run scripts/backfill-events.ts from the new deploy ledger and redeploy the indexer.
Claude Code skills for building on Stellar 8004 and x402:
# Install all skills
npx skills add trionlabs/stellar-8004 --skill '*'
# Or individually
npx skills add trionlabs/stellar-8004 --skill 8004s # Agent trust protocol
npx skills add trionlabs/stellar-8004 --skill x402s # HTTP micropaymentsThen use /8004s and /x402s slash commands in Claude Code. See the Developer Portal for full docs.
See webapp/README.md for the explorer, SDK quick start, and local dev setup.
stellar:{network}:{identityRegistryAddress}#{agentId}
Example: stellar:testnet:CDE3K4COIAGWNNJQQLL26SYI3KBJF5FUDHXG5FA6GYDJCG7T5V7FIWZH#0
Spec coverage, EVM divergences, event layouts, and type mappings: TECHNICAL.md.
Rust/Soroban contracts, TypeScript SDK, SvelteKit, Supabase (Postgres + Edge Functions), Stellar x402.
soroban-sdk25.3.0- OpenZeppelin Stellar Contracts (pinned to commit
9dd85c30) stellar-cli25.2.0- Rust nightly pinned in
rust-toolchain.toml
- Explorer: stellar8004.com
- Developer docs: stellar8004.com/developers
- SDK: github.com/trionlabs/stellar-8004/tree/main/webapp/packages/sdk
- 8004 standard: 8004.org
- EIP-8004 Spec
- 8004 Reference Contracts
- 8004 Network Registry
MIT