
Hedera Lab
Agent-ready Hedera testing with independent ledger verification, automated repair, and x402.
Demo
About
Hedera Lab helps developers and AI coding agents test whether their Hedera applications actually do what they are supposed to do. The idea came from a simple problem: an application can look finished and pass its unit tests while still making the wrong transaction. A screen saying “Payment successful” does not prove that the right person received the right amount. We built Hedera Lab on top of Hedera Harness to make independent verification part of the development process. **What it does** - Checks HBAR balances, NFT ownership, token associations and HCS messages. - Connects browser actions, such as buying a ticket, to checks of the resulting ledger state. - Supports in-memory simulation, a configured Solo local network and Hedera testnet. - Produces readable reports showing which checks passed or failed, transaction evidence and cleanup results. - Tests failure scenarios involving delayed responses, retries, concurrent requests and uncertain transaction outcomes. **How a developer uses it** The developer gives their coding agent the Hedera Lab skill and explains the expected behavior. For example: > “Alice should receive 0.75 HBAR and Bob should receive 0.25 HBAR.” The skill guides the agent through inspecting the application, connecting its actual business logic and writing the verification files. A guided setup command automates this for supported JavaScript payment functions. Other supported workflows can use custom adapters and scenarios. The expected results come from the developer’s requirements, independently of the application’s output. This prevents the tests from simply repeating the same mistake as the code. When a check fails, the agent can inspect the findings, repair the application and run the same checks again. **Optional paid verification** We also implemented an x402 service for agents that want to purchase verification from a provider: - The user authorizes required checks and spending limits. - A purchasing client selects coverage and signs the payment locally. - Blocky402 handles payment settlement. - A separate worker executes the tests. - A dashboard shows the results, payment evidence and actual network costs. This flow has been tested on a private deployment. There is currently no public paid-service endpoint, and the local testing tools do not require payment. **What we demonstrated** We tested a grant-payment application that passed all four of its ordinary tests despite sending incorrect amounts to recipients. Independent paid testnet verification caught the problem. A coding agent repaired the application, and the next verification passed without changing the approved requirements. That demonstration used a deliberately introduced defect. We also tested real testnet and Solo workflows, transaction recovery after process restarts, and guided onboarding without handwritten Lab files. Our goal is to make it easier to move from “the agent says it works” to clear, repeatable evidence that the application behaves as intended.
How it's made
We built Hedera Lab on top of Hedera Harness, keeping its code-generation and repair workflow while adding independent application verification. - **TypeScript and Node.js:** Power the CLI, verification API, scenario runner and execution worker. - **YAML scenarios:** Define disposable accounts, transaction steps and expected outcomes. - **Hiero JavaScript SDK:** Executes real HBAR, NFT and HCS operations on Hedera testnet and Solo. - **Independent checks:** Use receipts, account queries and Mirror Node data to verify what happened, rather than trusting the application’s success message. - **Playwright:** Connects real browser actions to ledger checks through an authenticated local bridge. - **Agent skill and onboarding:** Help coding agents generate adapters and verification files from user-approved requirements. - **JSON transaction plans:** Let applications describe their intended operations without running application code inside the signing worker. - **x402 and Blocky402:** Provide optional paid verification, with client-side signing, spending limits and payment settlement. - **Docker:** Separates the private API and execution worker, with restricted resources and the execution key mounted only in the worker. The trickiest part was handling transactions that succeeded even though the client timed out. We added persistent recovery journals and original-transaction lookup, then tested recovery by deliberately killing processes. Hedera’s native services let us test payments, NFT ownership and audit messages without custom contracts for those examples. Solo supported local network testing, and Blocky402 enabled the real paid-request demonstration.