Lab 07
DeFi Agent
An AI assistant that rehearses first
Explore savings options and rehearse a move on a copy of the blockchain.
Overview
An automated assistant needs to check its work before taking consequential action.
How this could help a business
The transferable pattern is controlled workflow automation: connect tools, validate their results, enforce rules and test actions before execution. This example is not financial advice.
What I built
- A browser workflow connecting planning, authenticated tools, deterministic rules and a readable trace.
- Live contract-data readers and a server that rehearses transactions on temporary blockchain copies.
Live demo
Try an example goal. Step-by-step mode works without the large AI download.
What I built
Implementation, decisions and evidence.
What Sebastian built
The application around the technology.
- A browser workflow connecting planning, authenticated tools, deterministic rules and a readable trace.
- Live contract-data readers and a server that rehearses transactions on temporary blockchain copies.
- A manual fallback and scenario evaluations that expose planner failures instead of hiding them.
One engineering decision
Safety rules run outside the language model, so the planner cannot decide to waive them. No real wallet is connected.
What to check yourself
Compare the AI and step-by-step modes. The committed benchmark records 31 passing scenarios out of 40, including the planner's failures.
Tools and model credits. LangGraph orchestrates the workflow, Qwen plans locally through WebLLM, and Anvil provides the temporary blockchain fork.
These are portfolio demonstrations. Explore professional experience separately, or discuss how the approach could fit your team.
Learn
Understand what the application is doing.
Follow the assistant’s research, safety checks and rehearsal one step at a time. Nothing spends money or moves funds.
Pause and predict
Should an AI assistant be allowed to waive its own safety rules?
A learning question, not a score. Try this in the working demo.
Try changing something
Now make it your experiment.
Try the request it should refuse. Watch whether the boundary is enforced before an unsafe action is attempted.
The planner completes most of my benchmark scenarios but not all of them; the failures are listed in What I built. Rehearsal does not guarantee a real transaction would succeed, and this demo never sends one.
A few words, explained
- Agent
- Software that chooses steps and calls tools to work towards a goal.
- Rehearsal
- Trying the operation on a temporary copy, with no real wallet or funds at risk.
Data handling & current limitations
Simulation only. No wallet or real transactions. The AI planner is an optional large download.
Demo only. Each lab below explains which inputs stay on your device and which data is sent for server-backed features. Model files are downloaded and may remain in your browser cache. Hosting and security services also receive the network requests needed to serve the site.
The planner runs in this browser. Tool requests send asset, chain and amount to our server for research and simulation. This lab connects no wallet and signs or sends no real transaction.
The planner completes most of my benchmark scenarios but not all of them; the failures are listed in What I built. Rehearsal does not guarantee a real transaction would succeed, and this demo never sends one.