Skip to content
Star3

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.

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.

Terminal window
git clone https://github.com/selimaytac/hashspan && cd hashspan
nvm use && corepack enable pnpm && pnpm install
make lab-up # Jaeger UI on http://localhost:16686, OTLP on :4317/:4318
make demo # runs the agent against a fresh local chain

Open 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.

Terminal window
make lab-pause # stop, keep state
make lab-nuke # remove containers, images, tools and build output

The example’s code is in examples/ai-sdk-agent.