Skip to content

Intro

The Agent0 SDK uses a subgraph for fast agent discovery and search. The subgraph automatically indexes ERC-8004 data from the blockchain and IPFS, providing GraphQL queries for efficient agent search and filtering.

The SDK automatically uses the Agent0 subgraph - no configuration needed:

# SDK automatically uses the default subgraph
sdk = SDK(
chainId=11155111,
rpcUrl="https://sepolia.infura.io/v3/YOUR_PROJECT_ID",
signer=your_private_key
)
# All search operations use the subgraph automatically
results = sdk.searchAgents(filters={"name": "AI"})
// SDK automatically uses the default subgraph
const sdk = new SDK({
chainId: 11155111,
rpcUrl: 'https://sepolia.infura.io/v3/YOUR_PROJECT_ID',
// read-only is fine for search; omit privateKey/walletProvider
});
// All search operations use the subgraph automatically (async in TypeScript)
const results = await sdk.searchAgents({ name: 'AI' });

You can override the default subgraph URL using subgraphOverrides if needed:

# Use a custom subgraph endpoint for specific chains
sdk = SDK(
chainId=11155111,
rpcUrl=RPC_URL,
signer=PRIVATE_KEY,
subgraphOverrides={
11155111: "https://gateway.thegraph.com/api/00a452ad3cd1900273ea62c1bf283f93/subgraphs/id/6wQRC7geo9XYAhckfmfo8kbMRLeWU8KQd3XsJqFKmZLT"
}
)
// Use a custom subgraph endpoint for specific chains
const sdk = new SDK({
chainId: 11155111,
rpcUrl: RPC_URL,
// read-only is fine for search; omit privateKey/walletProvider
subgraphOverrides: {
11155111: 'https://gateway.thegraph.com/api/00a452ad3cd1900273ea62c1bf283f93/subgraphs/id/6wQRC7geo9XYAhckfmfo8kbMRLeWU8KQd3XsJqFKmZLT',
},
});

Currently supported:

  • Ethereum Mainnet (Chain ID: 1)
    • Default (SDK): https://gateway.thegraph.com/api/7fd2e7d89ce3ef24cd0d4590298f0b2c/subgraphs/id/FV6RR6y13rsnCxBAicKuQEwDp8ioEGiNaWaZUmvr1F8k
  • Base Mainnet (Chain ID: 8453)
    • Default (SDK): https://gateway.thegraph.com/api/536c6d8572876cabea4a4ad0fa49aa57/subgraphs/id/43s9hQRurMGjuYnC1r2ZwS6xSQktbFyXMPMqGKUFJojb
  • Ethereum Sepolia (Chain ID: 11155111)
    • Default (SDK): https://gateway.thegraph.com/api/00a452ad3cd1900273ea62c1bf283f93/subgraphs/id/6wQRC7geo9XYAhckfmfo8kbMRLeWU8KQd3XsJqFKmZLT
  • Base Sepolia (Chain ID: 84532)
    • Default (SDK): https://gateway.thegraph.com/api/536c6d8572876cabea4a4ad0fa49aa57/subgraphs/id/4yYAvQLFjBhBtdRCY7eUWo181VNoTSLLFd5M7FXQAi6u
  • Polygon Mainnet (Chain ID: 137)
    • Default (SDK): https://gateway.thegraph.com/api/782d61ed390e625b8867995389699b4c/subgraphs/id/9q16PZv1JudvtnCAf44cBoxg82yK9SSsFvrjCY9xnneF

Note: The Graph Gateway endpoints require authentication (API key / authorization header). If you’re querying manually, use https://gateway.thegraph.com/api/<API_KEY>/subgraphs/id/<SUBGRAPH_ID>.

Coming soon:

  • Additional networks

The subgraph indexes:

  • Agent registrations - Identity, metadata, endpoints
  • Agent capabilities - MCP tools/prompts/resources, A2A skills/tasks
  • Feedback data - Scores, tags, reputation signals
  • Real-time updates - Automatic indexing of new registrations and feedback
  • Fast search - Query thousands of agents in milliseconds
  • Rich filtering - Search by capabilities, reputation, trust models
  • Real-time data - Always up-to-date with blockchain events
  • No RPC limits - Avoid rate limits on blockchain queries