File size: 2,037 Bytes
9a280b0
 
 
 
 
 
 
913a064
9a280b0
 
 
 
3552405
 
 
 
 
 
9a280b0
3552405
 
913a064
 
 
3552405
913a064
 
3552405
 
 
913a064
3552405
913a064
 
 
 
 
 
3552405
913a064
3552405
 
 
913a064
3552405
 
913a064
3552405
913a064
3552405
 
913a064
 
 
3552405
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
title: ClauseGuard AI
emoji: πŸ›‘οΈ
colorFrom: indigo
colorTo: purple
sdk: streamlit
sdk_version: "1.31.0"
app_file: clauseguard/app.py
pinned: false
license: mit
---

# ClauseGuard β€” AI-Powered Contract Clause Risk Analyzer

Upload any contract (PDF, TXT, DOCX). ClauseGuard runs it through a 5-agent AI pipeline and outputs a structured risk report classifying every clause by severity with plain-English explanations.

## Architecture

**5-Agent AI Pipeline:** Extractor β†’ Classifier β†’ Risk Scorer β†’ Translator β†’ Reporter

```
  Upload Contract
       β”‚
       β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚Extractor │───▢│Classifier │───▢│ Risk Scorer  │───▢│  Translator  │───▢│ Reporter β”‚
  β”‚ (Agent 1)β”‚    β”‚ (Agent 2) β”‚    β”‚  (Agent 3)   β”‚    β”‚  (Agent 4)   β”‚    β”‚(Agent 5) β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

## Features

- **5-Agent AI Pipeline** β€” Extractor, Classifier, Risk Scorer, Translator, Reporter
- **Risk Severity Levels** β€” CRITICAL, HIGH, MEDIUM, LOW, INFO
- **Plain English Translations** β€” Every clause explained in simple language
- **Negotiation Copilot** β€” Pre-written messages and safer clause alternatives
- **AI Chat Assistant** β€” Full contract context chat for follow-up questions
- **Multi-format Downloads** β€” Markdown, CSV, and safer contract

## Quick Start

```bash
pip install -r requirements.txt
streamlit run clauseguard/app.py
```

## Configuration

Set environment variables or create a `.env` file:

```
API_KEY=EMPTY
BASE_URL=http://165.245.141.170:8000/v1
MODEL_NAME=Qwen/Qwen2.5-1.5B-Instruct
```

## License

MIT