Inspiration

Every day, people sign contracts they don’t fully understand—rental agreements, job offers, loan documents, or terms of service—often under time pressure and without legal help. Uploading sensitive legal documents to cloud services creates serious privacy and security risks. We wanted to prove that legal protection should be instant, private, and fully offline.

What it Does

ContractGuardian is an offline AI legal assistant that analyzes contracts directly on the user’s device. By scanning a document or image, it identifies risky or unfair clauses, highlights potential legal threats, and explains complex terms in simple, human-readable language—without ever using the internet.

How We Built It

We used Llama-3 Vision to perform on-device text extraction and clause detection from contract images and PDFs. DeepSeek R1 powers the legal reasoning engine, identifying predatory language and assessing risk. The RunAnywhere SDK orchestrates both models efficiently on-device and ensures secure, encrypted local storage of results.

Challenges We Faced

The biggest challenge was optimizing large models to run smoothly on consumer devices while maintaining accurate legal reasoning. Balancing inference speed, memory usage, and explanation clarity required careful model distillation, quantization, and prompt tuning—all while staying fully offline.

What We Learned

We learned that edge AI is not a limitation—it’s a strength. Sensitive domains like legal and financial documents demand privacy-first architectures. ContractGuardian demonstrates that powerful reasoning, real-time analysis, and zero data leakage are possible without the cloud.

Built With

  • RunAnywhere SDK
  • Llama-3 Vision
  • DeepSeek R1
  • On-device encryption
  • Mobile-first architecture

Built With

  • deepseek
  • llama
  • runanyhwhere
Share this project:

Updates