ai-document-analyst

πŸ“„ AI Document Analyst

Reads contracts, employment agreements, NDAs, and investor documents. Extracts every key clause, flags risky language, and gives you a plain-English summary β€” in 30 seconds.

What It Does

Upload any legal document. The agent reads it like a senior attorney, tells you what’s in it, what’s dangerous, and what you should negotiate before signing.

Pipeline: PDF/Text Input β†’ Type Detection β†’ Clause Extraction β†’ Risk Scan β†’ Executive Summary β†’ Q&A Interface

Real-World Impact

Tech Stack

| Tool | Role | |β€”β€”|β€”β€”| | OpenAI GPT-4o | Document reading + clause extraction | | GPT-4o Vision | Image/scanned PDF analysis | | PyPDF2 | PDF text extraction | | Python | Pipeline orchestration |

Setup

pip install openai PyPDF2
export OPENAI_API_KEY=your_key

# Analyze a file
python agent.py path/to/contract.pdf

# Or use the demo (built-in sample contract)
python agent.py

Document Types Supported

Sample Output

πŸ”΄ [CRITICAL] IP Assignment Beyond Employment
   Why it matters: All inventions β€” even personal projects on weekends β€”
   become company property. This is unusually broad and should be removed.
   Action: Negotiate to limit IP assignment to work directly related to
   company business during working hours only.

Interactive Q&A

After analysis, ask any question about the document in plain English:

Your question: Can I work for a competitor after leaving?
Answer: The non-compete clause (Section 4) prohibits you from working in
any competitive business for 5 years after termination, anywhere in the US.
This is extremely broad and likely unenforceable in many states.

Built by Philip | AI Agents & Automation Specialist