I recently negotiated my first contract, and had no idea what I was doing. Having used Cursor so much for programming I wished there was something equivalent for editing contracts. Something that would let me easily concede or be more aggressive in certain clauses using legalese.

I had an itch to scratch so I built a demo for this sort of UI I would like to see more of in document editing - inspired by the essay AI Horseless Carriages.

Running locally it uses gemma3:12b with Ollama amazingly quick even on my M3 mac, but on this web demo it’s using gemini-2.0-flash-lite.

Come back on a desktop to see the interactive demo.
Contract UI Demo
How did I serve this demo?

I wanted the app to run completely locally since contracts can be sensitive, but didn’t want visitors to this page to have to fetch 1GB worth of a language model. I settled on using Gemini via a Vercel Function proxy server which has my API key on it. I also used an Upstash Redis KV Store that limits inferences based on IP address to prevent abuse.

This was surprisingly accessible with the help of language models, and most of all free given what I expect the traffic to this site to be. Crazy!


References: