πŸ€– AI-Powered Contract Review System

An automated legal assistant built using multi-agent AI architecture and a modern frontend.

πŸ“˜ Project Overview

This project demonstrates a fully automated AI system designed to review and summarize contracts. The system uses a crew of specialized AI agents to parse, analyze, and interpret contract text, perform web research on unclear clauses, summarize key risks, and email the final summary to the user.

🧩 Crew Architecture

Crew Architecture Diagram

The project uses CrewAI to orchestrate multiple agents that collaborate across tasks. Each agent has a defined role and objective to ensure accurate and efficient contract analysis.

πŸ“„ Contract Parser Agent

Extracts raw text from uploaded contracts and segments it into clauses for structured analysis.

βš–οΈ Risk Analysis Agent

Identifies potential risks and obligations such as payment timelines, confidentiality, and termination clauses.

🌐 Web Research Agent

Performs web lookups for unclear or uncommon legal terms to enrich understanding and provide context.

🧠 Summary Agent

Generates a concise Markdown summary of the entire contract with risk highlights and key points.

πŸ“§ Email Delivery Agent

Formats the summary and sends it directly to the user’s email address for easy access.

πŸ’» User Interface

Frontend Screenshot

A simple Flask-based web interface allows users to upload their contract (PDF) and enter an email address. Once submitted, a loading screen appears while the backend agents analyze the contract.

πŸ“¬ Example Output

Email Output Example

The user receives a clean and well-structured email summary containing the key contract highlights, risks, and obligations. The entire process is automated, from parsing to final email delivery.