Case study

AGENT.EX: AI agent marketplace

An EVM marketplace where developers mint, list and sell autonomous AI agents as ERC-721 NFTs, in place of Web2 registries that take 15–30% fees and offer no provable ownership.

Capstone · Jun 2026 — presentSolidity · HardhatERC-721 · EIP-191
01

The problem

AI agents are software, and software is easy to copy. Today they're sold through centralised registries that take 15–30% of each sale, can delist sellers at will, and give buyers nothing they can prove they own. Nothing stops someone re-uploading another developer's agent under a new name.

02

How it works

Ownership, payment and delivery enforced by contracts.

Anti-piracy fingerprints

Each agent package is hashed with SHA-256, and the fingerprint is bound to its token on-chain. If anyone tries to register the same codebase again, the contract sees the duplicate hash and rejects the mint.

Mint and list in one transaction

mintAndList mints the ERC-721 and places it in escrow in a single transaction, so a listed agent is always held by the contract rather than by the seller.

Atomic, reentrancy-guarded purchase

One purchase call transfers the NFT to the buyer, pays the seller and refunds any excess ETH. It follows the Checks-Effects-Interactions pattern behind a reentrancy guard, so either everything happens or nothing does.

EIP-191 download gate

To download, the buyer signs a message with their wallet (EIP-191). The server checks live on-chain ownership for that address and re-verifies the package against its on-chain hash before serving it. Next, I'm hardening delivery so agent code is harder to leak after download.

03

Stack

SolidityHardhatOpenZeppelin v5ethers.js v6Node.jsERC-721EIP-191SHA-256