{"_id":"@blockbyvlog/agent0-sdk","_rev":"3-20d45a0fd9efcfec82a541732a79bb60","name":"@blockbyvlog/agent0-sdk","dist-tags":{"latest":"1.5.6"},"versions":{"1.5.4":{"name":"@blockbyvlog/agent0-sdk","version":"1.5.4","keywords":["erc-8004","agent","blockchain","ethereum","arbitrum","ipfs","reputation","@blockbyvlog"],"author":{"url":"https://x.com/blockbyvlog","name":"Daniel Ortega"},"license":"MIT","_id":"@blockbyvlog/agent0-sdk@1.5.4","maintainers":[{"name":"blockbyvlog","email":"danielortegaberja@gmail.com"}],"homepage":"https://github.com/xdaniortega/agent0-ts#readme","bugs":{"url":"https://github.com/xdaniortega/agent0-ts/issues"},"dist":{"shasum":"42da3ff839ef359ad98bef2c3bb7a0d6daa50b39","tarball":"https://registry.npmjs.org/@blockbyvlog/agent0-sdk/-/agent0-sdk-1.5.4.tgz","fileCount":123,"integrity":"sha512-qZZOyt2Mu9jKCtBhMdmeNohbXsn0gAGU6jMWKh9Ud42DedWENlZ01TqC/e2CWIssre0UkowG+U/Xy2THBWPYDg==","signatures":[{"sig":"MEUCIB7UYvRz6XgPNkY593GNTVc7Wj4mhunBNYatKAgI0b62AiEAnoFhU/V2CQP0+8K1lJLB36vrC+E5Clz2TmEk/OrV7Ms=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":755927},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./eip6963":{"types":"./dist/browser/eip6963.d.ts","default":"./dist/browser/eip6963.js"}},"gitHead":"7bec4c72e19de44e6c08bc86e93954c748349c60","scripts":{"lint":"eslint src","test":"jest","build":"tsc","clean":"rm -rf dist","format":"prettier --write src","codegen":"graphql-codegen --config codegen.yml","prepack":"npm run build","pretest":"npm run generate:taxonomies","prebuild":"npm run codegen && npm run generate:taxonomies","test:watch":"jest --watch","build:watch":"tsc --watch","test:coverage":"jest --coverage","generate:taxonomies":"node ./scripts/generate-taxonomies.mjs"},"_npmUser":{"name":"blockbyvlog","email":"danielortegaberja@gmail.com"},"overrides":{"nanoid":"^5.1.6","parse-duration":"^2.1.3"},"repository":{"url":"git+https://github.com/xdaniortega/agent0-ts.git","type":"git"},"_npmVersion":"11.8.0","description":"TypeScript SDK for agent portability, discovery and trust based on ERC-8004","directories":{},"_nodeVersion":"25.6.0","dependencies":{"viem":"^2.37.5","graphql-request":"^6.1.0","ipfs-http-client":"^60.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","jest":"^29.7.0","dotenv":"^16.3.1","eslint":"^8.56.0","graphql":"^16.9.0","ts-jest":"^29.1.1","prettier":"^3.1.1","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.6","@graphql-codegen/cli":"^6.0.1","@typescript-eslint/parser":"^6.17.0","@graphql-codegen/typescript":"^5.0.2","@graphql-codegen/introspection":"^5.0.0","@typescript-eslint/eslint-plugin":"^6.17.0","@graphql-codegen/typescript-operations":"^5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/agent0-sdk_1.5.4_1770998691960_0.22940889326117264","host":"s3://npm-registry-packages-npm-production"}},"1.5.5":{"name":"@blockbyvlog/agent0-sdk","version":"1.5.5","keywords":["erc-8004","agent","blockchain","ethereum","arbitrum","ipfs","reputation","@blockbyvlog"],"author":{"url":"https://x.com/blockbyvlog","name":"Daniel Ortega"},"license":"MIT","_id":"@blockbyvlog/agent0-sdk@1.5.5","maintainers":[{"name":"blockbyvlog","email":"danielortegaberja@gmail.com"}],"homepage":"https://github.com/xdaniortega/agent0-ts#readme","bugs":{"url":"https://github.com/xdaniortega/agent0-ts/issues"},"dist":{"shasum":"5f4ccd3a04b623cc4969c1d7ce59de21215d1196","tarball":"https://registry.npmjs.org/@blockbyvlog/agent0-sdk/-/agent0-sdk-1.5.5.tgz","fileCount":123,"integrity":"sha512-G0rOU1i+DuKwhXwxsT//1svRahLk2IUroBuaNrtiq2NMcjbwFDcjqHVQ69foLjZuZsAqqs1SWyGuJjVPuIIx7g==","signatures":[{"sig":"MEUCIQCl5CWUppVrRCvVWrh63dD2sA6W81vvcNvHgpiCsEq/agIgRd98wzVwJwcFVeMV+GvQKmHs6Go8PqOVfu50EsHfT/I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":772387},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./eip6963":{"types":"./dist/browser/eip6963.d.ts","default":"./dist/browser/eip6963.js"}},"gitHead":"cd1b38a3aa809af72004c6bd8c6993a7e63cbd07","scripts":{"lint":"eslint src","test":"jest","build":"tsc","clean":"rm -rf dist","format":"prettier --write src","codegen":"graphql-codegen --config codegen.yml","prepack":"npm run build","pretest":"npm run generate:taxonomies","prebuild":"npm run codegen && npm run generate:taxonomies","test:watch":"jest --watch","build:watch":"tsc --watch","test:coverage":"jest --coverage","generate:taxonomies":"node ./scripts/generate-taxonomies.mjs"},"_npmUser":{"name":"blockbyvlog","email":"danielortegaberja@gmail.com"},"overrides":{"nanoid":"^5.1.6","parse-duration":"^2.1.3"},"repository":{"url":"git+https://github.com/xdaniortega/agent0-ts.git","type":"git"},"_npmVersion":"11.8.0","description":"TypeScript SDK for agent portability, discovery and trust based on ERC-8004","directories":{},"_nodeVersion":"25.6.0","dependencies":{"viem":"^2.37.5","graphql-request":"^6.1.0","ipfs-http-client":"^60.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","jest":"^29.7.0","dotenv":"^16.3.1","eslint":"^8.56.0","graphql":"^16.9.0","ts-jest":"^29.1.1","prettier":"^3.1.1","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.6","@graphql-codegen/cli":"^6.0.1","@typescript-eslint/parser":"^6.17.0","@graphql-codegen/typescript":"^5.0.2","@graphql-codegen/introspection":"^5.0.0","@typescript-eslint/eslint-plugin":"^6.17.0","@graphql-codegen/typescript-operations":"^5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/agent0-sdk_1.5.5_1771171611774_0.5508409896915016","host":"s3://npm-registry-packages-npm-production"}},"1.5.6":{"name":"@blockbyvlog/agent0-sdk","version":"1.5.6","description":"TypeScript SDK for agentic economies - Multi-chain agent registry (Ethereum, Arbitrum, Base, Polygon) with dual indexing (Subgraph + RPC) based on ERC-8004","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./eip6963":{"types":"./dist/browser/eip6963.d.ts","default":"./dist/browser/eip6963.js"}},"scripts":{"codegen":"graphql-codegen --config codegen.yml","generate:taxonomies":"node ./scripts/generate-taxonomies.mjs","prebuild":"npm run codegen && npm run generate:taxonomies","build":"tsc","prepack":"npm run build","build:watch":"tsc --watch","pretest":"npm run generate:taxonomies","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","lint":"eslint src","format":"prettier --write src","clean":"rm -rf dist"},"keywords":["erc-8004","agent","blockchain","ethereum","arbitrum","ipfs","reputation","@blockbyvlog"],"author":{"name":"Daniel Ortega","url":"https://x.com/blockbyvlog"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/xdaniortega/agent0-ts.git"},"homepage":"https://github.com/xdaniortega/agent0-ts#readme","bugs":{"url":"https://github.com/xdaniortega/agent0-ts/issues"},"publishConfig":{"access":"public"},"dependencies":{"graphql-request":"^6.1.0","ipfs-http-client":"^60.0.1","viem":"^2.37.5"},"devDependencies":{"@graphql-codegen/cli":"^6.0.1","@graphql-codegen/introspection":"^5.0.0","@graphql-codegen/typescript":"^5.0.2","@graphql-codegen/typescript-operations":"^5.0.2","@types/jest":"^29.5.11","@types/node":"^20.10.6","@typescript-eslint/eslint-plugin":"^6.17.0","@typescript-eslint/parser":"^6.17.0","eslint":"^8.56.0","graphql":"^16.9.0","jest":"^29.7.0","dotenv":"^16.3.1","prettier":"^3.1.1","ts-jest":"^29.1.1","tsx":"^4.7.0","typescript":"^5.3.3"},"engines":{"node":">=22.0.0"},"overrides":{"nanoid":"^5.1.6","parse-duration":"^2.1.3"},"gitHead":"ffa7b77a9db837f5459b6eb4c65f7f321ab97e4a","_id":"@blockbyvlog/agent0-sdk@1.5.6","_nodeVersion":"25.6.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-KKOSK6LBm4Uyn50aEhHpcntTlT7HeCz/O6te21fqX4opylUJxhyQ7MbS2mqCSnxHC+6nvixjiocoGxRIOpTTaw==","shasum":"f31ef23f93ac995e386862453914ad6726fcc29c","tarball":"https://registry.npmjs.org/@blockbyvlog/agent0-sdk/-/agent0-sdk-1.5.6.tgz","fileCount":131,"unpackedSize":828561,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDtHW//7aozDLGhe+I7holJfqizZj9EUHmOjGM5LxLAHgIgKjulopCHMemv0hIfnqOe59R+5BShE4c4/mDhDC5JCKw="}]},"_npmUser":{"name":"blockbyvlog","email":"danielortegaberja@gmail.com"},"directories":{},"maintainers":[{"name":"blockbyvlog","email":"danielortegaberja@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent0-sdk_1.5.6_1771958004939_0.528598365950194"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-13T16:04:51.832Z","modified":"2026-02-24T18:33:25.288Z","1.5.4":"2026-02-13T16:04:52.176Z","1.5.5":"2026-02-15T16:06:51.959Z","1.5.6":"2026-02-24T18:33:25.153Z"},"bugs":{"url":"https://github.com/xdaniortega/agent0-ts/issues"},"author":{"name":"Daniel Ortega","url":"https://x.com/blockbyvlog"},"license":"MIT","homepage":"https://github.com/xdaniortega/agent0-ts#readme","keywords":["erc-8004","agent","blockchain","ethereum","arbitrum","ipfs","reputation","@blockbyvlog"],"repository":{"type":"git","url":"git+https://github.com/xdaniortega/agent0-ts.git"},"description":"TypeScript SDK for agentic economies - Multi-chain agent registry (Ethereum, Arbitrum, Base, Polygon) with dual indexing (Subgraph + RPC) based on ERC-8004","maintainers":[{"name":"blockbyvlog","email":"danielortegaberja@gmail.com"}],"readme":"# Agent0 SDK - Alternative Indexing Fork\n\nAgent0 is the TypeScript SDK for agentic economies. It enables agents to register, advertise their capabilities and how to communicate with them, and give each other feedback and reputation signals. All this using blockchain infrastructure (ERC-8004) and decentralized storage, enabling permissionless discovery without relying on proprietary catalogues or intermediaries.\n\n🌐 **Supported Networks:** Ethereum • Arbitrum • Base • Polygon | (Mainnet + Testnets)  \n⚡ **Dual Indexing:** The Graph Subgraph *or* Direct RPC (works without subgraph)  \n🔗 **Cross-chain:** Unified agent IDs, multi-chain search, and reputation aggregation\n\n---\n\nAgent0 enables agents to register, advertise their capabilities and how to communicate with them, and give each other feedback and reputation signals. All this using blockchain infrastructure (ERC-8004) and decentralized storage, enabling permissionless discovery without relying on proprietary catalogues or intermediaries.\n\n## What Does Agent0 SDK Do?\n\nAgent0 SDK enables you to:\n\n- **Create and manage agent identities** - Register your AI agent on-chain with a unique identity, configure presentation fields (name, description, image), set wallet addresses, and manage trust models with x402 support\n- **Advertise agent capabilities** - Publish MCP and A2A endpoints, with automated extraction of MCP tools and A2A skills from endpoints\n- **OASF taxonomies** - Advertise standardized skills and domains using the Open Agentic Schema Framework (OASF) taxonomies for better discovery and interoperability\n- **Enable permissionless discovery** - Make your agent discoverable by other agents and platforms using rich search by attributes, capabilities, skills, tools, tasks, and x402 support\n- **Build reputation** - Give and receive feedback, retrieve feedback history, and search agents by reputation with cryptographic authentication\n- **Cross-chain registration** - One-line registration with IPFS nodes, Pinata, Filecoin, or HTTP URIs\n- **Flexible indexing** - Use The Graph subgraph (default) *or* direct RPC queries (works without subgraph)\n\n## Supported Networks\n\n| Network | Chain ID | Mainnet/Testnet | Subgraph | RPC Indexer |\n|---------|----------|-----------------|----------|-------------|\n| **Ethereum Mainnet** | `1` | Mainnet | ✅ | ✅ |\n| **Arbitrum One** | `42161` | Mainnet | ❌ Not available | ✅ **Required** |\n| **Base Mainnet** | `8453` | Mainnet | ✅ | ✅ |\n| **Polygon Mainnet** | `137` | Mainnet | ✅ | ✅ |\n| **Ethereum Sepolia** | `11155111` | Testnet | ✅ | ✅ |\n| **Arbitrum Sepolia** | `421614` | Testnet | ✅ | ✅ |\n| **Base Sepolia** | `84532` | Testnet | ✅ | ✅ |\n\n**✅ Available** | **❌ Not Available** | **⚠️ Important:** Arbitrum networks require `indexer: 'rpc'` configuration\n\n## Release (1.5.6)\n\nThis release adds Arbitrum network support with both subgraph and RPC indexing options.\n\n**New in 1.5.6:**\n- ✅ Arbitrum One (42161) and Arbitrum Sepolia (421614) subgraph support\n- ✅ RPC Indexer with `getAgentById` and `queryAgentMetadata` implementations\n- ✅ Flexible indexing: choose between The Graph subgraph (default) or direct RPC\n- 📖 See `docs/RPC_INDEXER_LIMITATIONS.md` for RPC indexer capabilities\n\nFor breaking changes and migration notes from previous versions, see `release_notes/` folder.\n\n**Bug reports & feedback:** GitHub: [Report issues](https://github.com/agent0lab/agent0-ts/issues) | Telegram: [Agent0 channel](https://t.me/agent0kitchen) | Email: team@ag0.xyz\n\n## Installation\n\n### Prerequisites\n\n- Node.js 22 or higher\n- npm or yarn package manager\n- Private key for signing transactions (or run in read-only mode)\n- Access to an RPC endpoint (e.g., Alchemy, Infura, QuickNode)\n- (Optional) IPFS provider account (Pinata, Filecoin, or local IPFS node)\n\n### Install from npm\n\n```bash\nnpm install agent0-sdk\n```\n\nTo install a specific version explicitly:\n\n```bash\nnpm install agent0-sdk@1.5.6\n```\n\n**Note:** This package is an ESM (ECMAScript Module) package. Use `import` statements in your code:\n\n```typescript\nimport { SDK } from 'agent0-sdk';\n```\n\n### Install from Source\n\n```bash\ngit clone https://github.com/agent0lab/agent0-ts.git\ncd agent0-ts\nnpm install\nnpm run build\n```\n\n**Note:** The generated TypeScript types are created as part of `npm run build` (or manually with `npm run codegen`). Always use `npm run build` instead of running `tsc` directly.\n\n## Quick Start\n\n### 1. Initialize SDK (Default: Subgraph Indexer)\n\n```typescript\nimport { SDK } from 'agent0-sdk';\n\n// Initialize SDK with IPFS and subgraph (default indexer)\nconst sdk = new SDK({\n  chainId: 11155111, // Ethereum Sepolia testnet (use 1 for Ethereum Mainnet)\n  rpcUrl: process.env.RPC_URL!,\n  privateKey: process.env.PRIVATE_KEY ?? process.env.AGENT_PRIVATE_KEY, // Optional: for write operations\n  ipfs: 'pinata', // Options: 'pinata', 'filecoinPin', 'node'\n  pinataJwt: process.env.PINATA_JWT // For Pinata\n  // Subgraph URL auto-defaults from DEFAULT_SUBGRAPH_URLS\n});\n```\n\n### 1a. Initialize SDK with RPC Indexer (Optional Alternative)\n\nUse RPC indexer for direct on-chain queries or chains without subgraph:\n\n```typescript\nimport { SDK } from 'agent0-sdk';\n\n// RPC Indexer: Works with Alchemy, Infura, QuickNode, or any RPC\nconst sdk = new SDK({\n  chainId: 42161, // Arbitrum One\n  rpcUrl: 'https://arb-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY',\n  privateKey: process.env.PRIVATE_KEY,\n  indexer: 'rpc', // 🔧 Use RPC indexer instead of subgraph\n  rpcIndexerFromBlock: 150_000_000n, // ⚠️ IMPORTANT: Set to contract deployment block\n});\n\n// ✅ Feedback operations work perfectly\nconst feedbacks = await sdk.searchFeedback({ agents: ['42161:123'] });\n\n// ✅ Get single agent by ID works\nconst agent = await sdk.getAgent('42161:123');\n\n// ❌ Agent search not supported (requires subgraph for rich filtering)\n// await sdk.searchAgents({ name: 'MyAgent' }); // Throws error\n```\n\n**RPC Indexer Capabilities:**\n- ✅ Full feedback operations (`searchFeedback`, `giveFeedback`, `getFeedback`)\n- ✅ Get agent by ID (`getAgent`, `loadAgent`)\n- ✅ On-chain metadata queries\n- ❌ Agent discovery/search (use subgraph for this)\n- 📖 See `docs/RPC_INDEXER_LIMITATIONS.md` for details\n\n**When to use RPC Indexer:**\n- Real-time feedback data (subgraph has ~30s indexing delay)\n- Local/private chains without subgraph deployment\n- Testing or development environments\n- You only need feedback operations, not agent search\n\n### 1b. Initialize SDK (browser-side with ERC-6963 wallets)\n\nIn the browser you typically keep **reads on your `rpcUrl`** and use a wallet (EIP-1193) for **writes**.\n\n```typescript\nimport { SDK } from 'agent0-sdk';\nimport { discoverEip6963Providers, connectEip1193 } from 'agent0-sdk/eip6963';\n\nconst providers = await discoverEip6963Providers();\nif (providers.length === 0) throw new Error('No injected wallets found');\n\n// Pick a wallet (UI selection recommended)\nconst { provider } = providers[0];\nawait connectEip1193(provider); // prompts user\n\nconst sdk = new SDK({\n  chainId: 11155111,\n  rpcUrl: 'https://sepolia.infura.io/v3/YOUR_PROJECT_ID',\n  walletProvider: provider,\n});\n```\n\n### 2. Create and Register Agent\n\n```typescript\n// Create agent\nconst agent = sdk.createAgent(\n  'My AI Agent',\n  'An intelligent assistant for various tasks. Skills: data analysis, code generation.',\n  'https://example.com/agent-image.png'\n);\n\n// Configure endpoints (automatically extracts capabilities)\nawait agent.setMCP('https://mcp.example.com/'); // Extracts tools, prompts, resources\nawait agent.setA2A('https://a2a.example.com/agent-card.json'); // Extracts skills\nagent.setENS('myagent.eth');\n\n// Add OASF skills and domains (standardized taxonomies)\nagent.addSkill('data_engineering/data_transformation_pipeline', true);\nagent.addSkill('natural_language_processing/natural_language_generation/summarization', true);\nagent.addDomain('finance_and_business/investment_services', true);\nagent.addDomain('technology/data_science/data_science', true);\n\n// Optionally set a dedicated agent wallet on-chain (requires new wallet signature).\n// If you want agentWallet = owner wallet, you can skip this (contract sets initial value to owner).\n// await agent.setWallet('0x...', { newWalletPrivateKey: process.env.NEW_WALLET_PRIVATE_KEY });\nagent.setTrust(true, true, false); // reputation, cryptoEconomic, teeAttestation\n\n// Add metadata and set status\nagent.setMetadata({ version: '1.0.0', category: 'ai-assistant' });\nagent.setActive(true);\n\n// Register on-chain with IPFS\nconst registrationFile = await agent.registerIPFS();\nconsole.log(`Agent registered: ${registrationFile.agentId}`); // e.g., \"11155111:123\"\nconsole.log(`Agent URI: ${registrationFile.agentURI}`); // e.g., \"ipfs://Qm...\"\n```\n\n### 3. Load and Edit Agent\n\n```typescript\n// Load existing agent for editing\nconst agent = await sdk.loadAgent('11155111:123'); // Format: \"chainId:agentId\"\n\n// Edit agent properties\nagent.updateInfo(undefined, 'Updated description with new capabilities', undefined);\nawait agent.setMCP('https://new-mcp.example.com/');\n\n// Re-register to update on-chain\nawait agent.registerIPFS();\nconsole.log(`Updated: ${agent.agentURI}`);\n```\n\n### 4. Search Agents\n\n```typescript\n// Unified search (single chain): agent filters + reputation filters in one call\nconst results = await sdk.searchAgents(\n  {\n    name: 'AI', // substring\n    mcpTools: ['code_generation'],\n    a2aSkills: ['python'],\n    active: true,\n    x402support: true,\n    feedback: { minValue: 80, tag: 'enterprise', includeRevoked: false },\n  },\n  { sort: ['updatedAt:desc'] }\n);\n\nfor (const agent of results) {\n  console.log(`${agent.name}: ${agent.description}`);\n  console.log(`  Tools: ${agent.mcpTools?.join(', ')}`);\n  console.log(`  Skills: ${agent.a2aSkills?.join(', ')}`);\n}\n\n// Multi-chain search (SDK defaults include 1, 8453, 137, 42161, 11155111, 84532, 421614)\nconst multiChainResults = await sdk.searchAgents({ active: true, chains: [1, 8453, 137, 42161] });\n\nconsole.log(`Found ${multiChainResults.length} agents across chains`);\n\n// Get single agent (read-only, faster)\n// Supports chainId:agentId format\nconst agentSummary = await sdk.getAgent('11155111:123'); // explicit chainId:agentId\n```\n\n### 4a. Multi-Chain Search\n\n```typescript\n// Search across multiple chains\nconst results = await sdk.searchAgents({\n  active: true,\n  chains: [1, 11155111, 137] // Ethereum Mainnet, Ethereum Sepolia, Polygon Mainnet\n});\n\n// Search all configured chains\nconst allResults = await sdk.searchAgents({\n  active: true,\n  chains: 'all' // Searches all configured chains\n});\n\n// Search agents by feedback-derived reputation across chains (unified search)\nconst reputationResults = await sdk.searchAgents(\n  { chains: [1, 11155111, 137], feedback: { minValue: 80, includeRevoked: false } }\n);\n\n// Get agent from specific chain\nconst agent = await sdk.getAgent('1:123'); // Ethereum Mainnet\n\n// Search feedback for a specific agent (unchanged)\nconst feedbacks = await sdk.searchFeedback({ agentId: '1:123' }); // Ethereum Mainnet\n\n// NEW: Search feedback given by a reviewer wallet (across all agents)\nconst givenFeedback = await sdk.searchFeedback({\n  reviewers: ['0x742d35cc6634c0532925a3b844bc9e7595f0beb7'],\n});\n\n// NEW: Search feedback across multiple agents at once\nconst multiFeedback = await sdk.searchFeedback({\n  agents: ['1:123', '1:456', '11155111:789'],\n});\n\n// Get reputation summary for agent on specific chain\nconst summary = await sdk.getReputationSummary('1:123'); // Ethereum Mainnet\n```\n\n### 5. Give and Retrieve Feedback\n\n```typescript\n// Optional: prepare an OFF-CHAIN feedback file (only needed for rich fields)\nconst feedbackFile = sdk.prepareFeedbackFile({\n  capability: 'tools',\n  name: 'code_generation',\n  skill: 'python',\n  context: { sessionId: 'abc' },\n});\n\n// Give feedback (on-chain fields are passed directly)\nconst tx = await sdk.giveFeedback(\n  '11155111:123',\n  85, // value (number|string)\n  'data_analyst', // tag1 (optional)\n  'finance', // tag2 (optional)\n  'https://api.example.com/feedback', // endpoint (optional on-chain)\n  feedbackFile // optional off-chain file\n);\n// Submitted-by-default: wait explicitly for confirmation to get a receipt + the domain result\nconst { receipt, result: feedback } = await tx.waitConfirmed();\n\n// Search feedback\nconst feedbackResults = await sdk.searchFeedback(\n  { agentId: '11155111:123', capabilities: ['tools'] },\n  { minValue: 80, maxValue: 100 }\n);\n\n// Get reputation summary\nconst summary = await sdk.getReputationSummary('11155111:123');\nconsole.log(`Average value: ${summary.averageValue}`);\n```\n\n## IPFS Configuration Options\n\n```typescript\n// Option 1: Filecoin Pin (free for ERC-8004 agents)\nconst sdk = new SDK({\n  chainId: 11155111,\n  rpcUrl: '...',\n  signer: privateKey,\n  ipfs: 'filecoinPin',\n  filecoinPrivateKey: 'your-filecoin-private-key'\n});\n\n// Option 2: IPFS Node\nconst sdk = new SDK({\n  chainId: 11155111,\n  rpcUrl: '...',\n  signer: privateKey,\n  ipfs: 'node',\n  ipfsNodeUrl: 'https://ipfs.infura.io:5001'\n});\n\n// Option 3: Pinata (free for ERC-8004 agents)\nconst sdk = new SDK({\n  chainId: 11155111,\n  rpcUrl: '...',\n  signer: privateKey,\n  ipfs: 'pinata',\n  pinataJwt: 'your-pinata-jwt-token'\n});\n\n// Option 4: HTTP registration (no IPFS)\nconst sdk = new SDK({ chainId: 11155111, rpcUrl: '...', signer: privateKey });\nconst regTx = await agent.registerHTTP('https://example.com/agent-registration.json');\nawait regTx.waitConfirmed();\n```\n\n## Multi-Chain Support\n\nThe SDK supports **7 blockchain networks** with cross-chain agent discovery and reputation:\n\n| Network | Chain ID | Status | Indexing |\n|---------|----------|--------|----------|\n| **Ethereum Mainnet** | `1` | ✅ Full Support | Subgraph + RPC |\n| **Arbitrum One** | `42161` | ✅ Full Support | Subgraph + RPC |\n| **Base Mainnet** | `8453` | ✅ Full Support | Subgraph + RPC |\n| **Polygon Mainnet** | `137` | ✅ Full Support | Subgraph + RPC |\n| **Ethereum Sepolia** | `11155111` | ✅ Full Support | Subgraph + RPC |\n| **Arbitrum Sepolia** | `421614` | ✅ Full Support | Subgraph + RPC |\n| **Base Sepolia** | `84532` | ✅ Full Support | Subgraph + RPC |\n\n**Note:** All networks support both The Graph subgraph (default) and RPC indexer. Use `indexer: 'rpc'` for direct on-chain queries without subgraph dependency.\n\n### Chain-Agnostic Agent IDs\n\nUse `chainId:agentId` format to specify which chain an agent is on:\n\n```typescript\n// Get agent from specific chain\nconst agent = await sdk.getAgent('1:1234');      // Ethereum Mainnet\nconst arbAgent = await sdk.getAgent('42161:456'); // Arbitrum One\n\n// Search feedback for agent on specific chain\nconst feedbacks = await sdk.searchFeedback({ agentId: '1:1234' });\nconst arbFeedbacks = await sdk.searchFeedback({ agentId: '42161:456' });\n\n// Get reputation summary for agent on specific chain\nconst summary = await sdk.getReputationSummary('1:1234');  // Ethereum Mainnet\nconst arbSummary = await sdk.getReputationSummary('42161:456');  // Arbitrum One\n```\n\n### Using Arbitrum Networks\n\nArbitrum One and Arbitrum Sepolia are fully supported with both subgraph and RPC indexing:\n\n```typescript\n// Arbitrum One with subgraph (default, recommended)\nconst arbSDK = new SDK({\n  chainId: 42161,\n  rpcUrl: 'https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY',\n  privateKey: process.env.PRIVATE_KEY,\n  // Subgraph URL auto-defaults for chain 42161\n});\n\n// All operations work: agent search, feedback, reputation\nconst agents = await arbSDK.searchAgents({ active: true });\nconst feedbacks = await arbSDK.searchFeedback({ agents: ['42161:123'] });\nawait arbSDK.giveFeedback('42161:123', 5.0, 'Excellent service', ['quality', 'speed']);\n\n// Alternative: Use RPC indexer for real-time data (optional)\nconst arbRpcSDK = new SDK({\n  chainId: 42161,\n  rpcUrl: 'https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY',\n  privateKey: process.env.PRIVATE_KEY,\n  indexer: 'rpc', // Direct on-chain queries\n  rpcIndexerFromBlock: 150_000_000n,\n});\n\n// RPC indexer: feedback operations work, agent search requires subgraph\nconst agent = await arbRpcSDK.getAgent('42161:123');\nconsole.log(`Agent: ${agent.name}, Owner: ${agent.owners[0]}`);\n```\n\n### Multi-Chain Search\n\nSearch across multiple chains simultaneously:\n\n```typescript\n// Search across multiple chains\nconst result = await sdk.searchAgents({\n  active: true,\n  chains: [1, 8453, 137, 42161, 11155111, 84532, 421614]  // All supported chains\n});\n// Search all configured chains\nconst allChainsResult = await sdk.searchAgents({\n  active: true,\n  chains: 'all'  // Searches all configured chains\n});\n\n// Multi-chain feedback-derived reputation search (unified search)\nconst reputationResult = await sdk.searchAgents(\n  { chains: [1, 8453, 137, 42161, 11155111, 84532, 421614], feedback: { minValue: 80, includeRevoked: false } }\n);\n\n// Search all chains for agents with reputation (unified search)\nconst allChainsReputation = await sdk.searchAgents(\n  { chains: 'all', feedback: { minValue: 80, includeRevoked: false } }\n);\n\n// Pagination has been removed; multi-chain results are returned as a flat list.\n```\n\n### Default Chain Behavior\n\nWhen you initialize the SDK, you specify a default chain. Agent IDs without a `chainId:` prefix use the default chain:\n\n```typescript\nconst sdk = new SDK({\n  chainId: 11155111,  // Default chain\n  rpcUrl: 'https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY'\n});\n\n// Uses default chain (11155111)\nconst agent = await sdk.getAgent('1234');  // Equivalent to \"11155111:1234\"\n\n// Explicitly specify different chain\nconst agent = await sdk.getAgent('1:1234');  // Ethereum Mainnet\n```\n\n## OASF Taxonomies\n\nThe SDK includes support for the **Open Agentic Schema Framework (OASF)** taxonomies, enabling agents to advertise standardized skills and domains. This improves discoverability and interoperability across agent platforms.\n\n### Adding Skills and Domains\n\n```typescript\n// Add OASF skills (with optional validation)\nagent.addSkill('advanced_reasoning_planning/strategic_planning', true);\nagent.addSkill('data_engineering/data_transformation_pipeline', true);\n\n// Add OASF domains (with optional validation)\nagent.addDomain('finance_and_business/investment_services', true);\nagent.addDomain('technology/data_science/data_visualization', true);\n\n// Remove skills/domains\nagent.removeSkill('old_skill');\nagent.removeDomain('old_domain');\n```\n\n### OASF in Registration Files\n\nOASF skills and domains appear in your agent's registration file:\n\n```json\n{\n  \"endpoints\": [\n    {\n      \"name\": \"OASF\",\n      \"endpoint\": \"https://github.com/agntcy/oasf/\",\n      \"version\": \"v0.8.0\",\n      \"skills\": [\n        \"advanced_reasoning_planning/strategic_planning\",\n        \"data_engineering/data_transformation_pipeline\"\n      ],\n      \"domains\": [\n        \"finance_and_business/investment_services\",\n        \"technology/data_science/data_science\"\n      ]\n    }\n  ]\n}\n```\n\n### Taxonomy Files\n\nThe SDK includes complete OASF v0.8.0 taxonomy files:\n- **Skills**: `src/taxonomies/all_skills.json` (136 skills)\n- **Domains**: `src/taxonomies/all_domains.json` (204 domains)\n\nBrowse these files to find appropriate skill and domain slugs. For more information, see the [OASF specification](https://github.com/agntcy/oasf) and `release_notes/RELEASE_NOTES_0.31.md`.\n\n## Unified Search Reference (Exhaustive)\n\nThe unified search API is:\n\n```ts\nconst results = await sdk.searchAgents(filters?: SearchFilters, options?: SearchOptions);\n// results: AgentSummary[]\n```\n\n### `FeedbackFilters` (used as `filters.feedback`)\n\n```ts\nexport interface FeedbackFilters {\n  hasFeedback?: boolean;\n  hasNoFeedback?: boolean;\n  includeRevoked?: boolean;\n  minValue?: number;\n  maxValue?: number;\n  minCount?: number;\n  maxCount?: number;\n  fromReviewers?: string[];\n  endpoint?: string; // substring match\n  hasResponse?: boolean;\n  tag1?: string;\n  tag2?: string;\n  tag?: string; // matches tag1 OR tag2\n}\n```\n\n| Field | Semantics |\n| --- | --- |\n| `hasFeedback` / `hasNoFeedback` | Filter by whether the agent has any feedback |\n| `includeRevoked` | Include revoked feedback entries in the pool used for filtering |\n| `minValue` / `maxValue` | Threshold on **average value** over feedback matching the other feedback constraints (inclusive) |\n| `minCount` / `maxCount` | Threshold on **count** over feedback matching the other feedback constraints (inclusive) |\n| `fromReviewers` | Only consider feedback from these reviewer wallets |\n| `endpoint` | Only consider feedback whose `endpoint` contains this substring |\n| `hasResponse` | Only consider feedback that has at least one response (if supported) |\n| `tag1` / `tag2` | Only consider feedback matching tag1/tag2 |\n| `tag` | Shorthand: match either tag1 OR tag2 |\n\n### `SearchFilters`\n\n```ts\nexport interface SearchFilters {\n  chains?: number[] | 'all';\n  agentIds?: string[];\n\n  name?: string; // substring\n  description?: string; // substring\n\n  owners?: string[];\n  operators?: string[];\n\n  hasRegistrationFile?: boolean;\n  hasWeb?: boolean;\n  hasMCP?: boolean;\n  hasA2A?: boolean;\n  hasOASF?: boolean;\n  hasEndpoints?: boolean;\n\n  webContains?: string;\n  mcpContains?: string;\n  a2aContains?: string;\n  ensContains?: string;\n  didContains?: string;\n\n  walletAddress?: string;\n\n  supportedTrust?: string[];\n  a2aSkills?: string[];\n  mcpTools?: string[];\n  mcpPrompts?: string[];\n  mcpResources?: string[];\n  oasfSkills?: string[];\n  oasfDomains?: string[];\n\n  active?: boolean;\n  x402support?: boolean;\n\n  registeredAtFrom?: Date | string | number;\n  registeredAtTo?: Date | string | number;\n  updatedAtFrom?: Date | string | number;\n  updatedAtTo?: Date | string | number;\n\n  hasMetadataKey?: string;\n  metadataValue?: { key: string; value: string };\n\n  keyword?: string;\n  feedback?: FeedbackFilters;\n}\n```\n\n### `SearchOptions`\n\n```ts\nexport interface SearchOptions {\n  sort?: string[];           // e.g. [\"averageValue:desc\", \"updatedAt:desc\"]\n  semanticMinScore?: number; // keyword searches only\n  semanticTopK?: number;     // keyword searches only\n}\n```\n\n| Field | Semantics |\n| --- | --- |\n| `sort` | List of sort keys: `\"field:asc\"` or `\"field:desc\"` |\n| `semanticMinScore` | Minimum semantic score cutoff (keyword searches only) |\n| `semanticTopK` | Limits semantic prefilter size (semantic endpoint has no cursor) |\n\n### `AgentSummary` (returned items)\n\n```ts\nexport interface AgentSummary {\n  chainId: number;\n  agentId: string;\n  name: string;\n  image?: string;\n  description: string;\n  owners: string[];\n  operators: string[];\n  // Endpoint strings (present when advertised; not booleans)\n  mcp?: string;\n  a2a?: string;\n  web?: string;\n  email?: string;\n  ens?: string;\n  did?: string;\n  walletAddress?: string;\n  supportedTrusts: string[];\n  a2aSkills: string[];\n  mcpTools: string[];\n  mcpPrompts: string[];\n  mcpResources: string[];\n  oasfSkills: string[];\n  oasfDomains: string[];\n  active: boolean;\n  x402support: boolean;\n  createdAt?: number;\n  updatedAt?: number;\n  lastActivity?: number;\n  agentURI?: string;\n  agentURIType?: string;\n  feedbackCount?: number;\n  averageValue?: number;\n  semanticScore?: number;\n  extras: Record<string, any>;\n}\n```\n\n## 🚀 Coming Soon\n\n- Support for validations\n- Enhanced x402 payments\n- Advanced reputation aggregation\n- Import/Export to centralized catalogues\n\n## Examples\n\nComplete working examples are available in the `examples/` directory:\n\n- `quick-start.ts` - Basic agent creation and registration\n- `agent-update.ts` - Agent registration with IPFS\n- `feedback-usage.ts` - Complete feedback flow with IPFS storage\n- `search-agents.ts` - Agent search and discovery\n- `transfer-agent.ts` - Agent ownership transfer\n\n## Documentation\n\nFull documentation is available at [sdk.ag0.xyz](https://sdk.ag0.xyz), including:\n\n- [Installation Guide](https://sdk.ag0.xyz/2-usage/2-1-install/)\n- [Agent Configuration](https://sdk.ag0.xyz/2-usage/2-2-configure-agents/)\n- [Registration](https://sdk.ag0.xyz/2-usage/2-3-registration-ipfs/)\n- [Search](https://sdk.ag0.xyz/2-usage/2-5-search/)\n- [Feedback](https://sdk.ag0.xyz/2-usage/2-6-use-feedback/)\n- [Key Concepts](https://sdk.ag0.xyz/1-welcome/1-2-key-concepts/)\n- [API Reference](https://sdk.ag0.xyz/5-reference/5-1-sdk/)\n\n## License\n\nAgent0 SDK is MIT-licensed public good brought to you by Marco De Rossi in collaboration with Consensys, 🦊 MetaMask and Agent0, Inc. We are looking for co-maintainers. Please reach out if you want to help.\n\nThanks also to Edge & Node (The Graph), Protocol Labs and Pinata for their support.\n","readmeFilename":"README.md"}