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! score: Int! 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! 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!}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! 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!}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! averageScore: BigDecimal! scoreDistribution: [Int!]! 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