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!
score: Int!
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!
name: String
description: String
image: String
active: Boolean
x402support: Boolean
supportedTrusts: [String!]!
mcpEndpoint: String
mcpVersion: String
a2aEndpoint: String
a2aVersion: String
ens: String
did: String
agentWallet: Bytes
agentWalletChainId: BigInt
mcpTools: [String!]!
mcpPrompts: [String!]!
mcpResources: [String!]!
a2aSkills: [String!]!
createdAt: BigInt!
}

IPFS feedback file data:

type FeedbackFile {
id: ID! # Format: "transactionHash:cid"
cid: String! # IPFS CID (for querying by content)
feedbackId: String!
text: String
capability: String
name: String
skill: String
task: String
context: 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!
averageScore: BigDecimal!
scoreDistribution: [Int!]!
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!
}