Data Structures
All data structures in the Agent0 subgraph.
Core Entities
Section titled “Core Entities”Core agent information:
type Agent { id: ID! # "chainId:agentId" chainId: BigInt! agentId: BigInt! agentURI: String agentURIType: String owner: Bytes! operators: [Bytes!]! createdAt: BigInt! updatedAt: BigInt! registrationFile: AgentRegistrationFile feedback: [Feedback!]! validations: [Validation!]! metadata: [AgentMetadata!]! totalFeedback: BigInt! lastActivity: BigInt!}Feedback
Section titled “Feedback”Feedback and reputation data:
type Feedback { id: ID! # "chainId:agentId:clientAddress:feedbackIndex" agent: Agent! clientAddress: Bytes! value: BigDecimal! tag1: String tag2: String feedbackUri: String feedbackURIType: String feedbackHash: Bytes isRevoked: Boolean! createdAt: BigInt! revokedAt: BigInt feedbackFile: FeedbackFile responses: [FeedbackResponse!]!}Validation
Section titled “Validation”Validator attestations:
type Validation { id: ID! # requestHash agent: Agent! validatorAddress: Bytes! requestUri: String requestHash: Bytes! response: Int # 0-100, 0 means pending responseUri: String responseHash: Bytes tag: String status: ValidationStatus! createdAt: BigInt! updatedAt: BigInt!}
enum ValidationStatus { PENDING COMPLETED EXPIRED}File Entities (IPFS)
Section titled “File Entities (IPFS)”AgentRegistrationFile
Section titled “AgentRegistrationFile”IPFS registration file data:
type AgentRegistrationFile { id: ID! # Format: "transactionHash:cid" cid: String! # IPFS CID (for querying by content) agentId: String! # Presentation fields name: String description: String image: String active: Boolean x402Support: Boolean supportedTrusts: [String!]!
# Endpoints endpointsRawJson: String mcpEndpoint: String mcpVersion: String a2aEndpoint: String a2aVersion: String webEndpoint: String emailEndpoint: String
# OASF (Open Agentic Schema Framework) oasfEndpoint: String oasfVersion: String oasfSkills: [String!]! oasfDomains: [String!]! hasOASF: Boolean! # derived: true if oasfSkills OR oasfDomains non-empty
# External identifiers ens: String did: String
# Capabilities mcpTools: [String!]! mcpPrompts: [String!]! mcpResources: [String!]! a2aSkills: [String!]!
createdAt: BigInt!}SDK search filters → subgraph fields
Section titled “SDK search filters → subgraph fields”The unified SDK searchAgents() pushes many filters down into the subgraph query (where clause). Some filters are implemented as two-phase prefilters (SDK first queries IDs/stats, then constrains the agent query).
| SDK filter | Subgraph field(s) | Notes |
|---|---|---|
name / description | AgentRegistrationFile.name / AgentRegistrationFile.description | *_contains_nocase when supported |
hasMCP / mcpContains | AgentRegistrationFile.mcpEndpoint | Existence + substring |
hasA2A / a2aContains | AgentRegistrationFile.a2aEndpoint | Existence + substring |
hasWeb / webContains | AgentRegistrationFile.webEndpoint | Existence + substring |
ensContains | AgentRegistrationFile.ens | Substring |
didContains | AgentRegistrationFile.did | Substring |
hasOASF | AgentRegistrationFile.hasOASF | Exact semantics: skills/domains non-empty (SDK falls back for older subgraphs) |
oasfSkills / oasfDomains | AgentRegistrationFile.oasfSkills / AgentRegistrationFile.oasfDomains | List-contains |
mcpTools / mcpPrompts / mcpResources | AgentRegistrationFile.mcpTools / etc. | List-contains |
a2aSkills | AgentRegistrationFile.a2aSkills | List-contains |
supportedTrust | AgentRegistrationFile.supportedTrusts | List-contains |
active / x402support | AgentRegistrationFile.active / AgentRegistrationFile.x402Support | Boolean |
owners / operators | Agent.owner / Agent.operators | Wallet addresses (bytes) |
walletAddress | Agent.agentWallet | On-chain metadata |
registeredAtFrom/To | Agent.createdAt | Time filter |
updatedAtFrom/To | Agent.updatedAt | Time filter |
hasMetadataKey / metadataValue | AgentMetadata | Two-phase prefilter (SDK queries metadata IDs) |
feedback.* thresholds | Feedback + Agent.totalFeedback | Mostly two-phase (SDK queries IDs/stats); hasFeedback/hasNoFeedback can be pushed down via Agent.totalFeedback |
FeedbackFile
Section titled “FeedbackFile”IPFS feedback file data:
type FeedbackFile { id: ID! # Format: "transactionHash:cid" cid: String! # IPFS CID (for querying by content) feedbackId: String! agentRegistry: String agentId: BigInt clientAddress: String createdAtIso: String valueRaw: BigInt valueDecimals: Int text: String mcpTool: String mcpPrompt: String mcpResource: String a2aSkills: [String!]! a2aContextId: String a2aTaskId: String oasfSkills: [String!]! oasfDomains: [String!]! proofOfPaymentFromAddress: String proofOfPaymentToAddress: String proofOfPaymentChainId: String proofOfPaymentTxHash: String tag1: String tag2: String createdAt: BigInt!}Metadata Entity
Section titled “Metadata Entity”AgentMetadata
Section titled “AgentMetadata”On-chain metadata storage:
type AgentMetadata { id: ID! # "agentId:key" agent: Agent! key: String! value: Bytes! updatedAt: BigInt!}Statistics Entities
Section titled “Statistics Entities”AgentStats
Section titled “AgentStats”Per-agent analytics:
type AgentStats { id: ID! # "chainId:agentId" agent: Agent! totalFeedback: BigInt! averageValue: BigDecimal! totalValidations: BigInt! completedValidations: BigInt! averageValidationScore: BigDecimal! lastActivity: BigInt! updatedAt: BigInt!}GlobalStats
Section titled “GlobalStats”Cross-chain statistics:
type GlobalStats { id: ID! # "global" totalAgents: BigInt! totalFeedback: BigInt! totalValidations: BigInt! totalProtocols: BigInt! agents: [Agent!]! tags: [String!]! updatedAt: BigInt!}Protocol Entity
Section titled “Protocol Entity”Protocol
Section titled “Protocol”Chain-specific protocol configuration:
type Protocol { id: ID! # "chainId" chainId: BigInt! name: String! identityRegistry: Bytes! reputationRegistry: Bytes! validationRegistry: Bytes! totalAgents: BigInt! totalFeedback: BigInt! totalValidations: BigInt! agents: [Agent!]! tags: [String!]! updatedAt: BigInt!}Next Steps
Section titled “Next Steps”- Explore Example Queries