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',
},
});

See Supported Networks for the canonical list of default-enabled chains and their default subgraph endpoints.

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