From 4bf1d85774bf2c5825ce93ed1d42fbdf7c8962c6 Mon Sep 17 00:00:00 2001 From: longfeiW Date: Wed, 5 Nov 2025 11:34:47 +0800 Subject: [PATCH 1/4] update 8004 tutorial --- .../erc-8004-agent-registration.md | 31 +++++++--------- github-agent-card.json | 37 +++++++++++++++++++ 2 files changed, 51 insertions(+), 17 deletions(-) create mode 100644 github-agent-card.json diff --git a/builder-cookbook/filecoin-pin/erc-8004-agent-registration.md b/builder-cookbook/filecoin-pin/erc-8004-agent-registration.md index cacabc925..14773fabf 100644 --- a/builder-cookbook/filecoin-pin/erc-8004-agent-registration.md +++ b/builder-cookbook/filecoin-pin/erc-8004-agent-registration.md @@ -10,13 +10,13 @@ Learn how to register a trustless autonomous agent on the ERC-8004 Identity Regi ## Overview -This tutorial walks you through registering an [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) compliant agent with cryptographically-verified persistent storage on Filecoin. You'll create an agent card (metadata describing your agent's capabilities), store it on Filecoin with daily PDP (Proof of Data Possession) storage proofs, and register it on-chain as an NFT on Base Sepolia. +This tutorial walks you through registering an [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) compliant agent with cryptographically-verified persistent storage on Filecoin. You'll create an agent card (metadata describing your agent's capabilities), store it on Filecoin & IPFS using Filecoin Pin, and register it on-chain as an NFT on Base Sepolia. **What you'll learn:** - How to create an ERC-8004 compliant agent card - How to use Filecoin Pin for persistent, verifiable storage - How to register an agent on the ERC-8004 Identity Registry -- How to verify PDP proofs and on-chain registration +- How to verify Filecoin storage proofs and on-chain registration **What you'll build:** A GitHub Integration Agent that references GitHub's official MCP server, demonstrating how real-world services can be integrated with ERC-8004. @@ -75,15 +75,16 @@ You'll need testnet tokens on **two networks**: #### Filecoin Calibration Testnet - **tFIL** (testnet Filecoin) - For gas fees - - Faucet: https://faucet.calibnet.chainsafe-fil.io/funds.html - - Amount needed: ~5 tFIL + - [Filecoin Calibration Faucet](https://faucet.calibnet.chainsafe-fil.io/funds.html) + - Amount requested: 100 tFIL - **USDFC** (Filecoin stablecoin) - For storage payments - - Mint at: https://stg.usdfc.net (requires tFIL as collateral) + - [Filecoin Calibnet USDFC Faucet](https://forest-explorer.chainsafe.dev/faucet/calibnet_usdfc) + - Or Mint at [USDFC website](https://stg.usdfc.net) (requires at tFIL as collateral) - Amount needed: ~5 USDFC #### Base Sepolia Testnet - **Sepolia ETH** - For NFT minting and registration - - Faucet: https://www.alchemy.com/faucets/base-sepolia + - [Faucet](https://www.alchemy.com/faucets/base-sepolia) - Amount needed: ~0.001 ETH > **NOTE!** The same Ethereum wallet works on both Filecoin Calibration and Base Sepolia. You only need one private key. @@ -522,8 +523,6 @@ Use the Dataset ID from Step 2: filecoin-pin data-set 933 # Replace with your Dataset ID ``` -**Screenshot**: [Terminal showing PDP proof status with storage provider, last proof timestamp, and next proof time] - You'll see output like: ``` @@ -598,8 +597,6 @@ echo "Token URI: $URI" curl -s "https://ipfs.io/ipfs//github-agent-card.json" | jq '.endpoints[]' ``` -**Screenshot**: [Terminal showing complete discovery workflow with agent card endpoints displayed] - ### Summary ✅ Your agent is now: @@ -622,7 +619,7 @@ npm install -g filecoin-pin ### Issue: `Insufficient USDFC` -**Solution**: Mint more USDFC at https://stg.usdfc.net using tFIL as collateral. +**Solution**: Request more test USDFC at [Filecoin Calibnet USDFC Faucet](https://forest-explorer.chainsafe.dev/faucet/calibnet_usdfc) ### Issue: `Transaction reverted` on Base Sepolia @@ -630,7 +627,7 @@ npm install -g filecoin-pin ```bash cast balance --rpc-url https://sepolia.base.org --ether ``` -Get more from the faucet if needed: https://www.alchemy.com/faucets/base-sepolia +Get more from the [faucet](https://www.alchemy.com/faucets/base-sepolia) if needed. ### Issue: IPFS retrieval is slow or fails @@ -691,11 +688,11 @@ Coming soon, stay tuned! ## Additional Resources -- **ERC-8004 Specification**: https://eips.ethereum.org/EIPS/eip-8004 -- **Reference Implementation**: https://github.com/ChaosChain/trustless-agents-erc-ri -- **Filecoin Pin CLI Tutorial**: https://docs.filecoin.io/builder-cookbook/filecoin-pin/filecoin-pin-cli -- **Base Sepolia Explorer**: https://sepolia.basescan.org -- **GitHub MCP Server**: https://github.com/github/github-mcp-server +- [**ERC-8004 Specification**](https://eips.ethereum.org/EIPS/eip-8004) +- [**Reference Implementation**](https://github.com/ChaosChain/trustless-agents-erc-ri) +- [**Filecoin Pin CLI Tutorial**](https://docs.filecoin.io/builder-cookbook/filecoin-pin/filecoin-pin-cli) +- [**Base Sepolia Explorer**](https://sepolia.basescan.org) +- [**GitHub MCP Server**](https://github.com/github/github-mcp-server) *** diff --git a/github-agent-card.json b/github-agent-card.json new file mode 100644 index 000000000..a8f4c9eb7 --- /dev/null +++ b/github-agent-card.json @@ -0,0 +1,37 @@ +{ + "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1", + "name": "GitHub Integration Agent", + "description": "AI agent providing GitHub repository, issue, and pull request management capabilities through GitHub's official MCP server. Enables automated code review, issue triage, PR management, and repository analysis.", + "image": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", + "endpoints": [ + { + "name": "MCP", + "endpoint": "https://api.githubcopilot.com/mcp/", + "version": "1.0.0", + "capabilities": { + "tools": [ + { + "name": "repository_management", + "description": "Browse code, search files, analyze commits across GitHub repositories" + }, + { + "name": "issue_management", + "description": "Create, update, search, and manage GitHub issues with AI assistance" + }, + { + "name": "pull_request_management", + "description": "Review PRs, manage approvals, merge conflicts, and code reviews" + } + ] + } + }, + { + "name": "agentWallet", + "endpoint": "eip155:84532:0x0000000000000000000000000000000000000000" + } + ], + "registrations": [], + "supportedTrust": [ + "reputation" + ] + } \ No newline at end of file From c644d6de6ff80dfa14082f48619689f250fe30ec Mon Sep 17 00:00:00 2001 From: longfeiW Date: Wed, 5 Nov 2025 11:39:35 +0800 Subject: [PATCH 2/4] updates 8004 --- .../filecoin-pin/erc-8004-agent-registration.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builder-cookbook/filecoin-pin/erc-8004-agent-registration.md b/builder-cookbook/filecoin-pin/erc-8004-agent-registration.md index 14773fabf..751a8ed67 100644 --- a/builder-cookbook/filecoin-pin/erc-8004-agent-registration.md +++ b/builder-cookbook/filecoin-pin/erc-8004-agent-registration.md @@ -75,16 +75,16 @@ You'll need testnet tokens on **two networks**: #### Filecoin Calibration Testnet - **tFIL** (testnet Filecoin) - For gas fees - - [Filecoin Calibration Faucet](https://faucet.calibnet.chainsafe-fil.io/funds.html) + - Request tFIL from [Filecoin Calibration Faucet](https://faucet.calibnet.chainsafe-fil.io/funds.html) - Amount requested: 100 tFIL - **USDFC** (Filecoin stablecoin) - For storage payments - - [Filecoin Calibnet USDFC Faucet](https://forest-explorer.chainsafe.dev/faucet/calibnet_usdfc) + - Request test USDFC from [Filecoin Calibnet USDFC Faucet](https://forest-explorer.chainsafe.dev/faucet/calibnet_usdfc) - Or Mint at [USDFC website](https://stg.usdfc.net) (requires at tFIL as collateral) - Amount needed: ~5 USDFC #### Base Sepolia Testnet - **Sepolia ETH** - For NFT minting and registration - - [Faucet](https://www.alchemy.com/faucets/base-sepolia) + - Request test ETH on Base Sepolia on [Faucet](https://www.alchemy.com/faucets/base-sepolia) - Amount needed: ~0.001 ETH > **NOTE!** The same Ethereum wallet works on both Filecoin Calibration and Base Sepolia. You only need one private key. From 0cf8ef777d088ac168b9d449400dd05d88069c51 Mon Sep 17 00:00:00 2001 From: longfeiW Date: Wed, 5 Nov 2025 11:59:02 +0800 Subject: [PATCH 3/4] remove unneeded file --- github-agent-card.json | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 github-agent-card.json diff --git a/github-agent-card.json b/github-agent-card.json deleted file mode 100644 index a8f4c9eb7..000000000 --- a/github-agent-card.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1", - "name": "GitHub Integration Agent", - "description": "AI agent providing GitHub repository, issue, and pull request management capabilities through GitHub's official MCP server. Enables automated code review, issue triage, PR management, and repository analysis.", - "image": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", - "endpoints": [ - { - "name": "MCP", - "endpoint": "https://api.githubcopilot.com/mcp/", - "version": "1.0.0", - "capabilities": { - "tools": [ - { - "name": "repository_management", - "description": "Browse code, search files, analyze commits across GitHub repositories" - }, - { - "name": "issue_management", - "description": "Create, update, search, and manage GitHub issues with AI assistance" - }, - { - "name": "pull_request_management", - "description": "Review PRs, manage approvals, merge conflicts, and code reviews" - } - ] - } - }, - { - "name": "agentWallet", - "endpoint": "eip155:84532:0x0000000000000000000000000000000000000000" - } - ], - "registrations": [], - "supportedTrust": [ - "reputation" - ] - } \ No newline at end of file From 0af8d26531b61e23084887467ff1e666dec251e5 Mon Sep 17 00:00:00 2001 From: longfeiW Date: Wed, 5 Nov 2025 14:30:49 +0800 Subject: [PATCH 4/4] rename title --- builder-cookbook/filecoin-pin/erc-8004-agent-registration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder-cookbook/filecoin-pin/erc-8004-agent-registration.md b/builder-cookbook/filecoin-pin/erc-8004-agent-registration.md index 751a8ed67..526425bd4 100644 --- a/builder-cookbook/filecoin-pin/erc-8004-agent-registration.md +++ b/builder-cookbook/filecoin-pin/erc-8004-agent-registration.md @@ -511,7 +511,7 @@ Replace `` with your agent's ID (e.g., `56`). *** -## Step 4: Verify Storage and PDP Proofs +## Step 4: Check On-chain Storage Proofs Finally, let's verify that your agent card is persistently stored with cryptographic proofs.