Skip to content

Data Structures

All data structures in the Agent0 subgraph.

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 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!]!
}

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
}

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!
}

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 filterSubgraph field(s)Notes
name / descriptionAgentRegistrationFile.name / AgentRegistrationFile.description*_contains_nocase when supported
hasMCP / mcpContainsAgentRegistrationFile.mcpEndpointExistence + substring
hasA2A / a2aContainsAgentRegistrationFile.a2aEndpointExistence + substring
hasWeb / webContainsAgentRegistrationFile.webEndpointExistence + substring
ensContainsAgentRegistrationFile.ensSubstring
didContainsAgentRegistrationFile.didSubstring
hasOASFAgentRegistrationFile.hasOASFExact semantics: skills/domains non-empty (SDK falls back for older subgraphs)
oasfSkills / oasfDomainsAgentRegistrationFile.oasfSkills / AgentRegistrationFile.oasfDomainsList-contains
mcpTools / mcpPrompts / mcpResourcesAgentRegistrationFile.mcpTools / etc.List-contains
a2aSkillsAgentRegistrationFile.a2aSkillsList-contains
supportedTrustAgentRegistrationFile.supportedTrustsList-contains
active / x402supportAgentRegistrationFile.active / AgentRegistrationFile.x402SupportBoolean
owners / operatorsAgent.owner / Agent.operatorsWallet addresses (bytes)
walletAddressAgent.agentWalletOn-chain metadata
registeredAtFrom/ToAgent.createdAtTime filter
updatedAtFrom/ToAgent.updatedAtTime filter
hasMetadataKey / metadataValueAgentMetadataTwo-phase prefilter (SDK queries metadata IDs)
feedback.* thresholdsFeedback + Agent.totalFeedbackMostly two-phase (SDK queries IDs/stats); hasFeedback/hasNoFeedback can be pushed down via Agent.totalFeedback

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!
}

On-chain metadata storage:

type AgentMetadata {
id: ID! # "agentId:key"
agent: Agent!
key: String!
value: Bytes!
updatedAt: BigInt!
}

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!
}

Cross-chain statistics:

type GlobalStats {
id: ID! # "global"
totalAgents: BigInt!
totalFeedback: BigInt!
totalValidations: BigInt!
totalProtocols: BigInt!
agents: [Agent!]!
tags: [String!]!
updatedAt: BigInt!
}

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!
}