Skip to content

Add ERC: Agent Tool Registry#1723

Open
ryanio wants to merge 11 commits into
ethereum:masterfrom
ryanio:ryan/erc-tool-registry
Open

Add ERC: Agent Tool Registry#1723
ryanio wants to merge 11 commits into
ethereum:masterfrom
ryanio:ryan/erc-tool-registry

Conversation

@ryanio
Copy link
Copy Markdown
Contributor

@ryanio ryanio commented May 6, 2026

Summary

Adds new ERC-8257: Agent Tool Registry - a permissionless onchain registry for AI agent tools with extensible predicate-based access control.

Each registration commits a metadata URI and a keccak256 content hash. Invocation access is gated by an optional external predicate contract, following the "pluggable external contract" pattern used by Seaport zones, Uniswap v4 hooks, and ERC-4337 paymasters. Registrations are anchored to a canonical off-chain manifest through origin-binding (manifest served at a well-known path on the endpoint's origin) plus creator self-attestation. Pricing hints are protocol-agnostic and live in the manifest; the registry never handles funds.

Status

Draft. Opening early to gather feedback. Once an editor assigns a number we will rename the file from erc-xxxx.md and set the eip: field accordingly.

Discussion: https://ethereum-magicians.org/t/erc-draft-agent-tool-registry/28457

Reference implementation

Author handles

Cody Sears (@CodySearsOS), Ryan Ghods (@ryanio)

@eip-review-bot
Copy link
Copy Markdown
Collaborator

eip-review-bot commented May 6, 2026

File ERCS/erc-8257.md

Requires 1 more reviewers from @g11tech, @jochem-brouwer, @samwilsn, @xinbenlv

Comment thread ERCS/erc-xxxx.md Outdated
Comment thread ERCS/erc-xxxx.md Outdated
ryanio and others added 3 commits May 6, 2026 22:27
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added w-ci and removed w-ci labels May 7, 2026
ryanio and others added 2 commits May 6, 2026 23:19
- Convert ERC/EIP cross-references to relative ./eip-NNN.md links
- Add markdown links on first mention of ERC-4337, ERC-165, ERC-1155, ERC-20, ERC-721, ERC-1967, EIP-712, EIP-150
- Replace external links (unicode.org, npmjs, pypi, sigstore, x402, mpp.dev, CAIP github, creativecommons) with plain text per EIP-1
- Demote Appendix B (marker interfaces) to a subsection of Appendix A to satisfy markdown-order-section
- Switch manifest schema type URL from eip-draft to canonical https://ercs.ethereum.org/ERCS/erc-8257#tool-manifest-v1
- Update CAIP-19 namespace from erc-draft to erc8257
- Recompute Appendix A reference manifestHash test vectors

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- markdown-link-first: rename '### Relationship to ERC-8004' to '### Relationship to Onchain Agent Identity' so the first ERC-8004 mention (line below) is already a link
- markdown-no-backticks: drop the inline backticked URL example from the §2 type-field row; the canonical value is shown inline in §2's example manifests
- markdown-order-section: rename 'Appendix A: Reference Test Vectors' to 'Test Cases' and move it before Reference Implementation per EIP-1 canonical section order; fold the marker-interfaces appendix into Test Cases as a subsection

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

The commit c4ca973 (as a parent of 217ea61) contains errors.
Please inspect the Run Summary for details.

The #attestation-1 anchor referred to a duplicate Attestation heading that
no longer exists. There's only one #### Attestation heading, so the
correct anchor is #attestation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ryanio ryanio marked this pull request as ready for review May 7, 2026 14:50
@ryanio ryanio requested a review from eip-review-bot as a code owner May 7, 2026 14:50
@ryanio ryanio changed the title Add ERC: Agent Tool Registry Add ERC-8257: Agent Tool Registry May 7, 2026
@eip-review-bot eip-review-bot changed the title Add ERC-8257: Agent Tool Registry Add ERC: Agent Tool Registry May 7, 2026
@github-actions github-actions Bot removed the w-ci label May 7, 2026
@ryanio ryanio changed the title Add ERC: Agent Tool Registry Add ERC-8257: Agent Tool Registry May 9, 2026
Lowercase or rephrase MUST/MAY/SHOULD usages that appeared in Abstract,
Rationale, and Reference Implementation so normative keywords stay
inside the Specification section. Also drop bare external references
to the companion implementation repository from Test Cases and
Reference Implementation; the link belongs in the PR description and
discussion thread, not in the spec body.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@eip-review-bot eip-review-bot changed the title Add ERC-8257: Agent Tool Registry Add ERC: Agent Tool Registry May 12, 2026
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
…FCs/CAIPs

Apply review feedback and a parallel sweep for similar issues:
- Link RFC 2119 / RFC 8174 (Specification preamble) and CAIP-19 /
  CAIP-10 / CAIP-2 on first use.
- Escape the pipe inside the `amount` regex so the table cell no
  longer truncates at `^(0`.
- Differentiate the two `// e.g. "eip155:8453"` parsing comments
  so the function intent is visible.
- Expand abbreviations on first use: NFD, ACE, TEE (+ a short gloss
  for "TEE attestation"), E2EE, TLS, TCB, IDN, BGP, EOA.
- Tag the verifyOriginBinding block as ```solidity and note in
  prose that it is Solidity-flavored pseudocode.
- Convert the "Handling Verification Failure" bullets to a numbered
  list and clarify that "check 4" is the creator-binding step in
  Consumer Verification.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
Comment thread ERCS/erc-8257.md Outdated
Copy link
Copy Markdown
Member

@jochem-brouwer jochem-brouwer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly editorial comments, some security points/qs.

Main points: CAIP/RFCs should have URLs which is handy for the reader.
All abbreviations should on first-use be defined.

Very interesting ERC! 😄 👍

…it-code commitment, abbreviations

Predicate gas (jochem-brouwer): drop the normative 200,000-gas
ceiling on predicate staticcalls and the illustrative gas table.
Hardcoded gas values age badly across hard-fork repricings
(Glamsterdam SLOAD repricing per EIP-8038) and differ between
L1 and L2 fee schedules. Safety follows from staticcall semantics
alone: any failed sub-call returns (success=false) and the 1/64
rule preserves the caller's ability to handle it. The gas-bound
decision moves to the call site — composers wrap hasAccess with
staticcall{gas: budget} where they know their target chain's
economics. Downstream gas-cap references (ERC-165 probe,
recursive registry self-reference rationale, getRequirements
introspection cap, reference-impl description) updated to match.

AccessProof signature collision (jochem-brouwer): replace the raw
keccak256(abi.encodePacked(...)) challenge with EIP-712 typed data
so the signed digest cannot collide with EIP-7702 authorizations,
eth_sign payloads, or other ERC challenge schemes. Domain ties
proofs to (chainId, predicate address).

Init-code bytecode commitment (jochem-brouwer): runtime bytecode
alone does not commit predicate behavior — an attacker-controlled
init-code can SSTORE values that the runtime branches on. Recommend
pinning the init-code hash (which determines both runtime bytecode
and constructor-planted storage) or inspecting post-deployment
storage; flag pure-logic predicates as the safer choice for
security-sensitive gates.

Transient-storage caching (jochem-brouwer): non-normative note that
composing contracts MAY cache hasAccess results in EIP-1153
transient storage within a single transaction.

Editorial: drop the Solidity `view` framing in §Predicate Reentrancy
in favor of `staticcall` directly (EVM concept, not Solidity).
Expand UUPS, SSRF, MITM, CID; gloss RE2; define "10 KiB" inline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ryanio
Copy link
Copy Markdown
Contributor Author

ryanio commented May 12, 2026

@jochem-brouwer thanks for the thorough review — both passes have shipped. Below is a summary of what changed, organized by significance.

Substantive normative changes (1c1568d8)

  • Predicate gas cap removed. Dropped the normative 200,000-gas staticcall ceiling and the illustrative 5k–60k gas table. Safety now relies on staticcall semantics alone: any failed sub-call returns (success=false) and EIP-150's 63/64 rule preserves the caller's gas for the failure path. The gas-bound decision moves to the call site — composers wrap hasAccess with staticcall{gas: budget} based on their target chain and fork. Cited EIP-8038 (Glamsterdam SLOAD repricing) as the reason the spec doesn't pin a number. The reference implementation keeps a 200k internal cap framed as defense-in-depth, not a conformance requirement. Downstream gas-cap mentions (ERC-165 probe, recursive-self-reference rationale, getRequirements introspection cap) updated to match.
  • AccessProof challenge → EIP-712. Replaced raw keccak256(abi.encodePacked(toolId, account, chainid, deadline)) with EIP-712 typed data. The "\x19\x01" prefix and domain (name: "ERC8257-AccessProof", verifyingContract: predicate) prevent collision with EIP-7702 authorizations, eth_sign payloads, or other ERC challenge schemes. Follows the canonical anti-collision pattern; happy to take a dedicated security review on it if you want to flag someone.
  • Init-code commitment. Acknowledged that runtime bytecode alone doesn't fully commit predicate behavior — init-code can SSTORE state that the runtime branches on. Counterfactual-deployment guidance now recommends pinning the init-code hash (which determines both runtime bytecode and constructor-planted storage) or inspecting post-deployment storage, and flags pure-logic predicates (no storage reads) as the safer choice for security-sensitive gates.
  • Transient-storage caching note. Added non-normative pointer for composers: cache hasAccess results in EIP-1153 transient storage keyed by (toolId, account) to keep a stable answer across multiple calls within one transaction. Clears automatically at end-of-transaction so it can't leak across txs.

Editorial (451a1508 + 1c1568d8)

  • Linked RFC 2119 / 8174 / CAIP-19 / CAIP-10 / CAIP-2 on first use
  • Expanded abbreviations on first use: NFD, ACE, TEE, E2EE, TLS, TCB, IDN, BGP, EOA, UUPS, SSRF, MITM, CID; glossed RE2; defined "10 KiB (10,240 bytes)" inline; spelled out OOG as "out of gas"
  • Dropped Solidity view framing in §Predicate Reentrancy in favor of staticcall (EVM concept, not Solidity)
  • Escaped the pipe inside the amount regex (`^(0\|[1-9][0-9]*)$`) so the table cell no longer truncates at ^(0
  • Differentiated the duplicate // e.g. "eip155:8453" parsing comments so the reader can see the function intent
  • Tagged the verifyOriginBinding block as ```solidity and noted in prose that it's Solidity-flavored pseudocode
  • Converted "Handling Verification Failure" bullets to a numbered list; clarified "check 4" as the creator-binding step from §Consumer Verification
  • Confined remaining RFC 2119 keywords to §Specification (per EIP-1)

19 threads marked resolved. Particularly happy to discuss the gas-cap rework if you'd like to push back — it's a normative loosening, so worth confirming you're aligned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants