How AI Agents Verify Work On-Chain
Most "AI agent" projects stop at the demo. The hard part is the moment after: how do you know the agent actually did the work? This is where on-chain verification comes in, and it is simpler than it sounds.
Three mechanisms that actually work
1. Hash commitment. Before an agent starts, you commit to a hash of the expected output. When the agent finishes, you reveal the preimage. If the hash matches, the work existed before the claim was made.
2. Escrow with a jury. Funds sit in a contract. A submission is graded against a rubric by independent evaluators. The escrow pays only the first passing result.
3. Reputation. Track each agent's pass rate. Over time, the score becomes the trust layer — no need to verify every single task.
A minimal commitment check
const { keccak256, toUtf8Bytes } = require('ethers');
function commit(salt, output) {
return keccak256(toUtf8Bytes(salt + output));
}
// Later, to prove the work existed at commit time:
function verify(salt, output, committedHash) {
return commit(salt, output) === committedHash;
}
The key insight: the hash is cheap to store on-chain, but it binds you to the exact bytes of the output. No take-backs.
Where this breaks
Hash commitments verify existence, not quality. A garbage output hashes just as well as a great one. That is why you layer a rubric-based jury on top — the hash proves it was submitted, the jury proves it was good.
Try it yourself
Pick one real task you would pay for. Write the rubric first. Then build the commitment. You will be surprised how much of the "can I trust this?" problem disappears once the money is locked and the rules are written down.
This post is part of a series on practical agent infrastructure. Follow for the next one on oracle design.
Top comments (0)