AutonomiX is a Web3 platform combining x402 micropayments and ERC-8004 agent NFTs for decentralized AI agents, on-chain reputation, and secure paywalled APIs on Base Sepolia.
AutonomiX is an early-stage TypeScript project in the AI payments / x402 ecosystem, focused on ai-agents, base-sepolia, decentralized-applications, erc-8004. It currently has 2 GitHub stars and 1 forks, and sits alongside related tools like dna-x402, clawtrust-contracts, ripley-guard-ts.

Production-ready stack featuring x402 micropayments and ERC‑8004 agent NFTs on Base Sepolia. This repository contains:
smart-contract/) — ERC‑8004 agent NFT contract and scriptsbackend/) — Express.js API, metadata/images, and x402 (USDC) micropayment protectionfrontend/) — React + TypeScript + Vite UI for browsing and interacting with agentsAutonomiX defines agent NFTs that carry off‑chain discovery data (HTTP endpoint, metadata URI) and an on‑chain reputation score. The smart contract implements ERC‑8004; the backend serves metadata and images and can protect agent endpoints with x402 (USDC); the frontend renders agents and reads data from the contract and backend.
Note: This repository is a practical example that demonstrates how to use ERC‑8004 together with x402 micropayments. The intended direction is for agents to perform AI‑driven actions via external APIs (e.g., OpenAI, Claude), publish discovery metadata, and update on‑chain reputation. Sensitive or write endpoints can be paywalled with x402.
Network requirement: Base Sepolia (base-sepolia). All instructions assume this network.
0x6633006c0825a55aC8dEEB66a2d1C5D1e9283725
sequenceDiagram
participant Client
participant Backend
participant Facilitator as x402 Facilitator
Client->>Backend: GET /api/agent{N}
Backend-->>Client: 402 Payment Required + challenge
Client->>Facilitator: Pay USDC, request receipt
Facilitator-->>Client: X-402-Receipt
Client->>Backend: GET /api/agent{N} + X-402-Receipt
Backend-->>Client: 200 OK (agent response)
sequenceDiagram
participant Browser
participant Backend
Browser->>Backend: GET /metadata/agent1.json
Backend-->>Browser: 200 OK + Access-Control-Allow-Origin: *
Browser->>Backend: GET /images/agent2.svg
Backend-->>Browser: 200 OK + Access-Control-Allow-Origin: *
sequenceDiagram
participant Client
participant Contract as AutonomiXAgent (ERC‑8004)
participant Backend
Client->>Contract: agentMetadataURI(tokenId)
Contract-->>Client: metadata URI
Client->>Backend: GET /metadata/agent{ID}.json
Backend-->>Client: JSON (name, description, image)
Client->>Contract: reputationOf(tokenId)
Contract-->>Client: reputation score
smart-contract/contracts/AutonomiXAgent.solsmart-contract/contracts/interfaces/IERC8004.solagentEndpoint(tokenId), agentMetadataURI(tokenId), reputationOf(tokenId), getAgent(tokenId)registerAgent(to, endpoint, metadataURI), setAgentMetadata(tokenId, endpoint, metadataURI), updateReputation(tokenId, delta)AgentRegistered, AgentMetadataUpdated, ReputationUpdatedSee details and operational scripts in smart-contract/README.md.
backend/src/index.tsbackend/src/routes/endpoint/agent{N}.ts at GET /api/agent{N}GET /metadata/agent<ID>.json and images at GET /images/agent<ID>.*x402-express for selected routes on Base Sepoliaethers with RPC_URL, AGENT_ADDRESS, and optional ADMIN_PRIVATE_KEY to read/write on‑chain (e.g., reputation updates)Full details in backend/README.md.
agentEndpoint, agentMetadataURI, and reputationOf from the contract; fetches metadata/images from the backendfrontend/.envFull details in frontend/README.md.
Key environment variables used across packages:
BASE_SEPOLIA_RPC_URL, WALLET_KEY, ETHERSCAN_API_KEY, AUTONOMIX_AGENT_ADDRESS, AGENT_ENDPOINT_URL, AGENT_METADATA_URIPORT, FRONTEND_ORIGIN, RPC_URL, AGENT_ADDRESS, ADMIN_PRIVATE_KEY, X402_RECEIVER_ADDRESS, X402_NETWORK=base-sepolia, X402_PRICE_USD, X402_FACILITATOR_URL, X402_PROTECTED_PATHSVITE_NETWORK=base-sepolia, VITE_RPC_URL, VITE_CONTRACT_ADDRESS, VITE_BACKEND_URLcd smart-contract && npm ci && npx hardhat compilecd backend && npm ci && npm run devhttp://localhost:3000 (configurable via PORT)cd frontend && npm ci && npm run devhttp://localhost:5173 (configurable by Vite)npx hardhat ignition deploy --network base-sepolia smart-contract/ignition/modules/AutonomiXAgent.tsAUTONOMIX_AGENT_ADDRESS (contracts) and AGENT_ADDRESS (backend) to the deployed address.smart-contract/scripts/register-agent.ts using .env values (AGENT_ENDPOINT_URL, AGENT_METADATA_URI).smart-contract/scripts/verify-etherscan-v2.ts with ETHERSCAN_API_KEY and the deployed address on Base Sepolia./metadata/agent<ID>.json and images under /images/agent<ID>.*http(s) or ipfs:// URIs.env files are populated (RPC, addresses, keys)base-sepolia) across contracts, backend, and frontendX402_RECEIVER_ADDRESS and X402_NETWORK=base-sepoliaDNA — Payment rails for AI agents. x402 micropayment protocol on Solana. Netting, transfer, stream settlement. Receipt anchoring on-chain.
Solidity smart contracts for ClawTrust — ERC-8004 identity, ERC-8183 agentic commerce, reputation, escrow, swarm validation on Base.
Industrial-grade Monero payment gating for modern APIs. IETF-compliant, 0-conf enabled, and built for the sovereign internet.