Local lab
The repository ships an example agent built with the Vercel AI SDK. It pays a vendor, then tries a withdrawal that reverts, and both transactions show up in its trace. It runs against a local Anvil chain and a scripted model, so it needs no API key.
Run it
Section titled “Run it”You need Node.js 22.18 or later, pnpm and Docker. nvm use picks the version in the repository’s .nvmrc. The packages themselves only need Node.js 22.3; the higher version is for the repository’s build tools.
git clone https://github.com/selimaytac/hashspan && cd hashspannvm use && corepack enable pnpm && pnpm installmake lab-up # Jaeger UI on http://localhost:16686, OTLP on :4317/:4318make demo # runs the agent against a fresh local chainOpen Jaeger, pick the treasury-agent service and expand withdraw_from_vault. The second confirm 31337 span is marked as an error and carries blockchain.tx.revert.reason.
Clean up
Section titled “Clean up”make lab-pause # stop, keep statemake lab-nuke # remove containers, images, tools and build outputThe example’s code is in examples/ai-sdk-agent.