
Lute
Build, independently verify, and deploy AI-generated Graph infrastructure.
Demo
About
Lute is an AI-native build, verification, and deployment layer for The Graph. It lets AI coding agents build Graph infrastructure, but it does not let those agents approve their own work. AI can now generate Subgraphs, schemas, mappings, tests, and other indexing infrastructure in minutes. The problem is that code can compile, sync successfully, and answer GraphQL queries while still indexing the blockchain incorrectly. A mapping can silently miss an event, duplicate one, store the wrong value, or produce data that no longer matches what actually happened onchain. Lute adds an independent verification step before deployment. A developer can ask an agent to build a Subgraph, but before that candidate is allowed to ship, Lute independently reconstructs the blockchain facts it should represent from canonical chain data and compares those facts against the indexed output. The verifier is deliberately separated from the generated mapping logic, so a mistake in the code being tested cannot automatically reproduce itself inside the system judging it. When Lute detects a disagreement, it does more than return a failed test. It identifies the first divergent block, transaction, log, event, field, and expected-versus-observed value. Deployment is immediately blocked. That evidence can then be passed to a coding agent such as Claude Code or Codex to repair the candidate. The repaired candidate receives a new cryptographic hash and must pass the same independent verifier again before Lute allows it to deploy. This creates a simple trust boundary: The AI can build it. The AI cannot approve its own work. Lute's first verification standard is an ERC-4626 Integrity Pack, which verifies observable vault activity such as Deposit and Withdraw events, assets, shares, ownership fields, event presence, duplicate records, and blockchain provenance. Integrity Packs are designed as reusable verification specifications so the same system can later support additional standards and protocols. Lute also supports auditing compatible existing Graph deployments, not just projects originally generated through Lute. A supported Subgraph can be checked against historical blockchain evidence to determine whether its indexed representation agrees with the underlying chain. The core lifecycle is: BUILD → VERIFY → DEPLOY If verification fails: VERIFY → DIAGNOSE → REPAIR → REVERIFY → DEPLOY And for deployed infrastructure, the same verification model can be reused to detect integrity drift over time. Lute is ultimately building a trust layer between autonomous software and blockchain data infrastructure: AI remains responsible for generation and repair, while deterministic evidence decides what is safe to ship
How it's made
Lute is built around a deliberately separated verification architecture. At the center is a deterministic verifier written in TypeScript. For EVM-based Subgraphs, Lute independently reads canonical blockchain events from the source chain using standard JSON-RPC calls such as eth_getLogs. Events are decoded from the contract ABI and normalized into canonical records containing information such as block number, transaction hash, log index, contract address, event type, and event parameters. Separately, Lute queries the corresponding indexed data from The Graph through GraphQL. That data is normalized into a second representation. These two paths are intentionally kept independent: Blockchain → independent decoder → canonical facts and Subgraph mappings → indexed entities → GraphQL A reconciliation engine then compares them. For supported Integrity Packs, Lute can check whether expected events exist, whether records are missing or duplicated, whether indexed values match their onchain values, and whether transaction, block, contract, and log provenance agree. When a mismatch appears, Lute searches for the earliest deterministic divergence instead of simply reporting that two totals differ. A failure can therefore be reduced to evidence such as: block → transaction → log → decoded event → expected entity → indexed entity → failed check That structured evidence is also what Lute provides to a coding agent during repair. The first implementation uses an ERC-4626 Integrity Pack. The pack defines which Deposit and Withdraw properties can be independently reconstructed and verified. Lute explicitly distinguishes between claims it can verify, claims that are only conditionally verifiable, and properties it cannot independently prove. Unsupported properties are never silently converted into a successful result. Every candidate also receives a deterministic cryptographic hash derived from its execution-relevant source. A Verification Run is bound to that hash. If the candidate changes after verification, the previous result becomes stale and the deployment gate rejects it. This prevents a dangerous workflow where one version is verified and a different version is deployed. The deployment gate therefore checks both the verification result and candidate identity before permitting deployment to The Graph. Lute also exposes its capabilities programmatically so coding agents can request actions such as auditing, verification, evidence retrieval, repair context, and deployment checks without gaining control over the actual verdict. The Graph is the core infrastructure behind the project: Lute works around Subgraphs, GraphQL data, Graph deployment tooling, and reusable Graph data products. Where included, Substreams provide another independently implemented data-processing path that can be compared against both raw blockchain events and Subgraph output. Hedera extends Lute into an agent-to-agent verification service: an external agent can pay for a verification job through an x402 flow, after which Lute performs the actual audit and returns the resulting evidence and verdict. Compact verification attestations can also be anchored through Hedera Consensus Service. Bazantic exposes Lute's API as reusable agent tooling and allows the verification step to participate in a Verify Before Trust Recipe, where another autonomous workflow can continue only if Lute's policy requirements are satisfied. The result is not another AI-generated testing dashboard. Lute deliberately separates generation from approval: agents can write and repair infrastructure, but only independently reconstructed evidence can unlock deployment.