Inspiration

We’ve all seen AI wrappers that extract data from long legal documents and expect us to take the output on faith. But when you’re dealing with actual contracts—auto-renewals, notice periods, liability limits—blind trust isn't an option. A single hallucinated detail can cause massive headaches.

I wanted to build something fast that lets AI do the heavy lifting of reading legal jargon, but gives humans complete control over what gets saved. No black boxes, no silent state changes, and no sending sensitive contracts to a third-party server.

What it does

TermLens is a browser-native legal contract verification gate powered by WebMCP:

  • Source Grounding: Every extracted term links directly to its exact quote in the text, highlighting confidence levels so you know where to double-check.
  • Human-in-the-Loop Control: The AI can analyze and stage proposed contract terms, but it can never write or alter state without an explicit human sign-off.
  • Local-First Privacy: Documents are processed entirely inside your browser's local memory.
  • Audit Trail: Every action, approval, and rejection is captured in an exportable audit receipt (JSON/Markdown).

How we built it

  • Frontend: Built with vanilla HTML, modern CSS Grid/Flexbox layouts, and JetBrains Mono for a clean, developer-focused UI.
  • Animations: Powered by GSAP and ScrollTrigger to create hero reassembly effects and visual contract sweeps.
  • Agent Integration: Connected via WebMCP for deterministic tool handling and staged write-locks.
  • Deployment: Hosted on Cloudflare Pages (termlens.pages.dev).

Challenges we ran into

Getting the UI grid layouts to feel pixel-perfect across different display widths while preserving custom GSAP animation timelines took a lot of fine-tuning. We also had to ensure that the agent state machine strictly respected write locks—blocking any unverified attempts to persist contract terms without explicit user confirmation.

What we learned

Building browser-native AI workflows requires thinking about user trust first. When you give users direct grounding alongside hard write-protection, AI tools feel less like unpredictable black boxes and more like dependable assistants.

What's next for TermLens

I want to expand support for multi-document comparisons, add automated risk-scoring presets for standard SaaS agreements, and make the WebMCP integration even easier for developers to plug into their own local workflows.

Built With

Share this project:

Updates