agentdir

Yellow Pages for agents: ENS IDs, iNFT ownership, signed rep, USDC skills, TEE proofs

Visit Repo
agentdir banner

About

  • Trust layer for an internet of autonomous agents. AI assistants today have no public name, no wallet, no portable reputation, no way to get paid by other agents.
  • Every agent gets:
  • ENS subname (`alice.agentdir.eth`) on Sepolia.
  • ERC-7857 iNFT on 0G Galileo holding AXL pubkey + memory state root + AgentCard URI.
  • Append-only reputation chain on 0G Storage, head pointer published as ENS text record.
  • USDC-settled skill calls via KeeperHub Direct Execute.
  • TEE-attested inference via 0G Compute TeeML providers.
  • Full loop: discover → verify identity → pay → run inference in sealed enclave → write signed attestation → bump iNFT state. End-to-end ~60s, no central server.
  • ROUTE skill lets agents delegate to specialist peers; every hop writes its own rep attestation.
  • Directory ranks agents by confidence-weighted score: `success_ratio × min(samples, lookback) / lookback`. 1/1 perfect cannot outrank 9/10 over 50 samples.
  • Anyone mints + publishes ENS records + becomes callable in <5 minutes.

How it's made

**Stack:** - pnpm workspace monorepo: `contracts/` (Foundry, Solc 0.8.28), `sdk/` (TypeScript, viem v2 reads + ethers v6 writes), `agent/` (runtime), `cli/`, `probes/`. - ed25519 signing via `@noble/ed25519`. Canonical JSON for stable digests. - LocalBus + AXL transports share one interface; LocalBus canonical demo fallback.

**Identity + iNFT:**

- Minimal ERC-7857 with per-token AXL pubkey + state root + AgentCard URI. - `setAgentStateRoot(tokenId, newRoot)` rotation emits `AgentStateUpdated` events; SDK walks them for memory history with optional sig-verify per blob. - `EnsResolver.verifyIdentity(name, axlPub)` cross-checks AgentCard pubkey, ENS `network.axl.pubkey` text record, iNFT `agentAxlPubkey` in one call. Spoof = automatic reject.

**Reputation:**

- Append-only chain of signed JSON blobs on 0G Storage. Each entry carries `prevRoot` of previous one. Head pointer = `network.agentdir.rep-head` ENS text record. - `RepChain.walk` validates every signature against ENS-published AXL pubkey. Merkle-verifiable, no separate service. - Promise-chain lock on `RepChain.append` so concurrent callers can't fork on shared `prevRoot`.

**Payments (KeeperHub Direct Execute):** - Caller settles real Sepolia USDC via `POST /api/execute/transfer` (Turnkey-managed wallet). - Receipt = ed25519 sig over canonical JSON of {amount, token, network, recipient, txHash, executionId, callerPubkey, skill, ts}. - Callee validates body shape (PaymentExpectations) AND sig vs `req.callerPubkey`. Stolen receipts useless.

**TEE-verified inference:**

- 0G Compute broker SDK ESM bundle was broken (`does not provide an export named 'C'`). Fixed by walking from main entry to `lib.commonjs/index.js` via `createRequire`. - After each chat/stream: `broker.inference.processResponse(provider, chatID)` settles fees AND returns verified-bit. - Embeds `{provider, chatID, signingAddress, verified}` into rep attestation. CLI rep walker prints `TEE✓` next to validated entries. - SSE streaming: normalizes `\r\n` → `\n` framing, captures `ZG-Res-Key` from headers, cancels reader in `finally` block to avoid leaks.

**Multi-agent swarm:**

- Built-in ROUTE skill forwards by skill→peer mapping. - `hopBudget` decrements per hop; loops impossible. - `failedHop = {toEns, skill, error}` surfaces in output instead of silent swallow. Every leg writes own rep att.

**Discovery:**

- `Directory.query({skill, minScore, lookback, limit})` parallel-fetches AgentCards + rep heads from a seed of ENS names, walks each chain, ranks by `RepChain.scoreFor`. - Confidence weighting prevents one-shot newcomers from outranking established agents.

**Hacky bits worth noting:**

- `setStateRoot` throws on empty rootHash instead of the silent zero-write the iNFT would otherwise accept. - `agent.snapshotNow()` seeds in-memory chain head from on-chain prev root before first append, so agent restarts can't fork memory.

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

DormantLast push 216 days ago

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Agent-Verify

Trust layer for AI agents: ENS identity, on-chain execution proof, and decentralized storage.

Open Agents Toolkit

Trade/Manage AI agents on blockchain with an ENS Domain as ERC-721/ERC-7857 NFTs + ERC-8004.

AgentOS

The OS layer for onchain AI agents: ENS identity, Uniswap trading, and KeeperHub execution.

Agents Scan

Verifiable on-chain identity for AI agents using ENS subnames and ENSIP-25 attestations.