Skip to content
AurenoxPublic

About

Attack the contract before they do. AI-powered adversarial review that finds loopholes, exposes risks, and generates safer redlines.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

LEXRISK

Attack the contract before they do.

AI-powered adversarial contract review that finds loopholes, exposes risks, and generates safer redlines.

๐Ÿš€ Live Demo

Live App: https://lexrisk-rho.vercel.app/

๐Ÿ“ธ Screenshots

1. Landing

The LEXRISK landing dashboard provides a clear starting point for adversarial contract review.

Landing

2. Contract Attack

Launch the โš”๏ธ Attack Contract workflow to stress-test contract clauses from an opposing counsel perspective.

Contract Attack

3. Risk Analysis & Legal Review

Review identified risks alongside Opposing Counsel, Client Counsel, and Neutral Reviewer perspectives.

Risk Analysis & Legal Review

4. Risk Map

Visualize the distribution and severity of risks across the contract.

Risk Map

5. Test Suite

Validate the prototype through the built-in test suite and review system performance.

Test Suite

๐Ÿ’ก What is LEXRISK?

LEXRISK is an AI-powered contract review platform designed to stress-test contracts before opposing counsel does.

Instead of simply asking:

"What does this contract say?"

LEXRISK asks:

"How could the other side use this contract against me?"

It simulates three legal perspectives to uncover weaknesses, evaluate competing interpretations, and recommend fixes.

โš”๏ธ How It Works

Contract
   โ†“
Clause Extraction
   โ†“
โš”๏ธ Opposing Counsel Attack
   โ†“
๐Ÿ›ก๏ธ Client Counsel Defence
   โ†“
โš–๏ธ Neutral Review
   โ†“
Risk Assessment
   โ†“
Recommended Fix
   โ†“
AI Redline
   โ†“
Lawyer Accept / Reject

โœจ Key Features

  • โš”๏ธ Adversarial Contract Review โ€” Simulates opposing counsel looking for exploitable weaknesses.
  • ๐Ÿ›ก๏ธ Client Counsel Defence โ€” Builds the strongest defence of the client's position.
  • โš–๏ธ Neutral Reviewer โ€” Evaluates competing interpretations using contract evidence.
  • ๐Ÿšจ Risk Detection โ€” Identifies and prioritizes critical, high, medium, and low risks.
  • ๐Ÿ”Ž Evidence Grounding โ€” Connects findings to specific contract clauses.
  • ๐Ÿ’ฅ Worst-Case Scenarios โ€” Explains how identified weaknesses could affect the client.
  • ๐Ÿ› ๏ธ Recommended Fixes โ€” Provides practical remediation suggestions.
  • โœ๏ธ AI Redlines โ€” Generates proposed safer contract language.
  • โœ… Human-in-the-Loop โ€” Lawyers can accept or reject AI-generated changes.
  • ๐Ÿ“ค Export โ€” Export analysis for further review and sharing.

๐Ÿง  The Adversarial Advantage

Traditional contract review is often defensive.

LEXRISK introduces an adversarial mindset:

Read the clause
     โ†“
Find the weakness
     โ†“
Attack the wording
     โ†“
Defend the position
     โ†“
Determine the stronger interpretation
     โ†“
Fix the weakness

๐Ÿ‘ฅ Three-Role Legal Review

โš”๏ธ Opposing Counsel

Attempts to find the strongest interpretation that benefits the other party.

๐Ÿ›ก๏ธ Client Counsel

Develops the strongest defence of the client's position.

โš–๏ธ Neutral Reviewer

Evaluates both arguments and determines which interpretation is better supported by the contract.

๐Ÿ” Evidence-Grounded Analysis

Each finding can follow:

Risk โ†’ Severity โ†’ Clause โ†’ Evidence โ†’ Attack โ†’ Defence
โ†’ Neutral Finding โ†’ Worst Case โ†’ Recommended Fix โ†’ AI Redline

When sufficient evidence is unavailable, the system can indicate that rather than presenting an unsupported conclusion as fact.

๐Ÿšจ Risk Categories

LEXRISK can identify potential issues involving:

  • Liability
  • Indemnity
  • Termination
  • Payment
  • Material breach
  • Notice
  • Definitions
  • Cross-references
  • Confidentiality
  • Data protection
  • Intellectual property
  • Missing protections
  • Dispute provisions

๐Ÿ› ๏ธ Built With

  • React
  • TypeScript
  • Vite
  • Python
  • FastAPI
  • Pydantic
  • Google Gemini AI
  • PDF / DOCX / TXT extraction
  • ReportLab
  • python-docx
  • Vercel
  • Render

๐Ÿ“ Project Structure

LEXRISK/
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ package-lock.json
โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ””โ”€โ”€ vite.config.ts
โ”‚
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ main.py
โ”‚   โ”œโ”€โ”€ requirements.txt
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ”œโ”€โ”€ sample_contract/
โ”œโ”€โ”€ screenshots/
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ .gitignore

๐Ÿš€ Run Locally

Clone the repository

git clone https://github.com/Aurenox/LEXRISK.git
cd LEXRISK

Start the backend

cd backend
python -m venv .venv

Windows:

.venv\Scripts\activate

Install dependencies:

pip install -r requirements.txt

Create backend/.env:

GEMINI_API_KEY=YOUR_GEMINI_API_KEY
GEMINI_MODEL=gemini-2.5-flash

Start FastAPI:

uvicorn main:app --reload

Start the frontend

Open another terminal:

cd frontend
npm install
npm run dev

For the deployed frontend:

VITE_API_URL=https://lexrisk-api.onrender.com

๐ŸŽฌ Demo Flow

1. Open LEXRISK
2. Upload Contract
3. โš”๏ธ Attack Contract
4. Opposing Counsel
5. Evidence
6. Client Counsel Defence
7. Neutral Finding
8. Risk Assessment
9. Recommended Fix
10. AI Redline
11. Accept / Reject

๐Ÿ† Why LEXRISK?

LEXRISK is not another contract summarizer.

It changes the question from:

"What does the contract say?"

to:

"How could the other side exploit it?"

The goal is to help legal professionals identify weaknesses before they become negotiation leverage or disputes.

๐Ÿ”ฎ What's Next

  • Contract-to-contract comparison
  • Company-specific legal playbooks
  • Negotiation intelligence
  • Clause benchmarking
  • Continuous contract monitoring
  • Obligation and deadline tracking
  • Collaborative legal review
  • Expanded legal-source grounding

โš ๏ธ Disclaimer

LEXRISK is an AI-assisted legal review prototype.

It is designed to support contract review and identify potential issues. It does not replace qualified legal advice, professional judgment, or independent legal review.

๐Ÿ‘จโ€โš–๏ธ Vision

Don't wait for opposing counsel to find the weakness. Find it first.

Attack the contract before they do.

About

Attack the contract before they do. AI-powered adversarial review that finds loopholes, exposes risks, and generates safer redlines.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages