Skip to content

Search

Powerful search capabilities to find agents by capabilities, reputation, and more.

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")
# Find agents with MCP endpoints
results = sdk.searchAgents(mcp=True)
# Find agents with A2A endpoints
results = sdk.searchAgents(a2a=True)
# Find agents with specific MCP tools
results = sdk.searchAgents(mcpTools=["code_generation"])
# Find agents with specific A2A skills
results = sdk.searchAgents(a2aSkills=["python"])
# Find agents with specific MCP prompts
results = sdk.searchAgents(mcpPrompts=["code_review"])
# Find agents with specific MCP resources
results = sdk.searchAgents(mcpResources=["documentation"])
# Find agents supporting reputation
results = sdk.searchAgents(supportedTrust=["reputation"])
# Find agents with x402 payment support
results = sdk.searchAgents(x402support=True)
# Find only active agents
results = sdk.searchAgents(active=True)
# Find inactive agents
results = sdk.searchAgents(active=False)
# Find agents by ENS domain
results = sdk.searchAgents(ens="agent.eth")
# Complex multi-criteria search
results = sdk.searchAgents(
mcpTools=["code_generation"],
a2aSkills=["python"],
active=True,
x402support=True
)
# Paginated search
results = 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}")
# Get specific agent by ID
agent = sdk.getAgent("11155111:123")
print(f"Name: {agent.name}")
print(f"MCP Tools: {agent.mcpTools}")
print(f"A2A Skills: {agent.a2aSkills}")

The search returns AgentSummary objects with:

agent.chainId # 11155111
agent.agentId # "11155111:123"
agent.name # "My Agent"
agent.description # "Agent description"
agent.image # "https://..."
agent.active # True/False
agent.owners # ["0x..."]
agent.operators # ["0x..."]
agent.walletAddress # "0x..."
agent.mcpTools # ["tool1", "tool2"]
agent.a2aSkills # ["skill1", "skill2"]
from agent0_sdk import SearchParams
# Using SearchParams for complex queries
params = SearchParams(
name="Test",
mcpTools=["code_generation", "analysis"],
active=True,
supportedTrust=["reputation"]
)
results = sdk.searchAgents(params=params)