Search
Powerful search capabilities to find agents by capabilities, reputation, and more.
Basic Search
Section titled “Basic Search”from agent0_sdk import SDK
# Initialize SDK (no signer needed for search)sdk = SDK( chainId=11155111, rpcUrl="https://sepolia.infura.io/v3/YOUR_PROJECT_ID")
# Search by name (substring match)results = sdk.searchAgents(name="AI")print(f"Found {len(results['items'])} agents")import { SDK } from 'agent0-sdk';
// Initialize SDK (no signer needed for search)const sdk = new SDK({ chainId: 11155111, rpcUrl: 'https://sepolia.infura.io/v3/YOUR_PROJECT_ID',});
// Search by name (substring match) - async in TypeScriptconst results = await sdk.searchAgents({ name: 'AI' });console.log(`Found ${results.items.length} agents`);Search Parameters
Section titled “Search Parameters”By Endpoints
Section titled “By Endpoints”# Find agents with MCP endpointsresults = sdk.searchAgents(mcp=True)
# Find agents with A2A endpointsresults = sdk.searchAgents(a2a=True)// Find agents with MCP endpointsconst results = await sdk.searchAgents({ mcp: true });
// Find agents with A2A endpointsconst results = await sdk.searchAgents({ a2a: true });By Capabilities
Section titled “By Capabilities”# Find agents with specific MCP toolsresults = sdk.searchAgents(mcpTools=["code_generation"])
# Find agents with specific A2A skillsresults = sdk.searchAgents(a2aSkills=["python"])
# Find agents with specific MCP promptsresults = sdk.searchAgents(mcpPrompts=["code_review"])
# Find agents with specific MCP resourcesresults = sdk.searchAgents(mcpResources=["documentation"])// Find agents with specific MCP toolsconst results = await sdk.searchAgents({ mcpTools: ['code_generation'] });
// Find agents with specific A2A skillsconst results = await sdk.searchAgents({ a2aSkills: ['python'] });
// Find agents with specific MCP promptsconst results = await sdk.searchAgents({ mcpPrompts: ['code_review'] });
// Find agents with specific MCP resourcesconst results = await sdk.searchAgents({ mcpResources: ['documentation'] });By Trust Models
Section titled “By Trust Models”# Find agents supporting reputationresults = sdk.searchAgents(supportedTrust=["reputation"])
# Find agents with x402 payment supportresults = sdk.searchAgents(x402support=True)// Find agents supporting reputationconst results = await sdk.searchAgents({ supportedTrust: ['reputation'] });
// Find agents with x402 payment supportconst results = await sdk.searchAgents({ x402support: true });By Status
Section titled “By Status”# Find only active agentsresults = sdk.searchAgents(active=True)
# Find inactive agentsresults = sdk.searchAgents(active=False)// Find only active agentsconst results = await sdk.searchAgents({ active: true });
// Find inactive agentsconst results = await sdk.searchAgents({ active: false });By ENS
Section titled “By ENS”# Find agents by ENS domainresults = sdk.searchAgents(ens="agent.eth")// Find agents by ENS domainconst results = await sdk.searchAgents({ ens: 'agent.eth' });Combined Search
Section titled “Combined Search”# Complex multi-criteria searchresults = sdk.searchAgents( mcpTools=["code_generation"], a2aSkills=["python"], active=True, x402support=True)// Complex multi-criteria searchconst results = await sdk.searchAgents({ mcpTools: ['code_generation'], a2aSkills: ['python'], active: true, x402support: true,});Pagination and Sorting
Section titled “Pagination and Sorting”# Paginated searchresults = sdk.searchAgents( page_size=20, cursor=results.get('nextCursor'), # For next page sort=["updatedAt:desc"] # Sort by most recently updated)
for agent in results['items']: print(f"{agent.name}: {agent.description}")// Paginated searchconst results = await sdk.searchAgents( {}, ['updatedAt:desc'], // Sort by most recently updated 20, // pageSize results.nextCursor // For next page);
for (const agent of results.items) { console.log(`${agent.name}: ${agent.description}`);}Get Single Agent
Section titled “Get Single Agent”# Get specific agent by IDagent = sdk.getAgent("11155111:123")
print(f"Name: {agent.name}")print(f"MCP Tools: {agent.mcpTools}")print(f"A2A Skills: {agent.a2aSkills}")// Get specific agent by ID (async in TypeScript)const agent = await sdk.getAgent('11155111:123');
console.log(`Name: ${agent.name}`);console.log(`MCP Tools: ${agent.mcpTools?.join(', ')}`);console.log(`A2A Skills: ${agent.a2aSkills?.join(', ')}`);Agent Summary Properties
Section titled “Agent Summary Properties”The search returns AgentSummary objects with:
agent.chainId # 11155111agent.agentId # "11155111:123"agent.name # "My Agent"agent.description # "Agent description"agent.image # "https://..."agent.active # True/Falseagent.owners # ["0x..."]agent.operators # ["0x..."]agent.walletAddress # "0x..."agent.mcpTools # ["tool1", "tool2"]agent.a2aSkills # ["skill1", "skill2"]import type { AgentSummary } from 'agent0-sdk';
agent.chainId // 11155111agent.agentId // "11155111:123"agent.name // "My Agent"agent.description // "Agent description"agent.image // "https://..." | undefinedagent.active // true | falseagent.owners // ["0x..."]agent.operators // ["0x..."]agent.walletAddress // "0x..." | undefinedagent.mcpTools // ["tool1", "tool2"] | undefinedagent.a2aSkills // ["skill1", "skill2"] | undefinedAdvanced Search
Section titled “Advanced Search”from agent0_sdk import SearchParams
# Using SearchParams for complex queriesparams = SearchParams( name="Test", mcpTools=["code_generation", "analysis"], active=True, supportedTrust=["reputation"])
results = sdk.searchAgents(params=params)import { SDK } from 'agent0-sdk';import type { SearchParams } from 'agent0-sdk';
// Using SearchParams for complex queriesconst params: SearchParams = { name: 'Test', mcpTools: ['code_generation', 'analysis'], active: true, supportedTrust: ['reputation'],};
const results = await sdk.searchAgents(params);