Contract Analysis Agent
Agent Description:
The Contract Analysis Agent automates the review and validation of legal contracts by extracting key contractual components from PDF drafts and comparing them against verified legal standards. It supports legal teams in identifying clause gaps, outdated references, and compliance issues, providing structured recommendations for improving the contract's legal robustness—especially for Indian legal frameworks.
- Purpose: To extract and validate legal contracts by identifying missing or non-compliant clauses, outdated legal terms, and structural inconsistencies using a reference knowledge base of verified contracts.
- Components:
- A contract reader to extract content and structure from uploaded PDF drafts.
- A legal validator to compare against a curated legal RAG knowledge base and identify gaps.
- A recommendation engine to propose improvements.
- Reading PDF contracts and parsing structural metadata (clauses, title, parties, and so on).
- Identifying key clauses (e.g., payment terms, dispute resolution, confidentiality).
- Comparing extracted content to verified Indian legal contract templates using RAG.
- Highlighting missing clauses, weak wording, and outdated legal references.
- Recommending improvements with proper phrasing and clause additions.
- Google VertexNote: To learn more about the LLM and to modify its behavior, refer to the Configuring LLM settings section.
Sub-Agents
- Role: Data Reader.
- Scope: Processes the PDF to extract legal metadata, clauses, and overall structure.
-
Description: This sub-agent parses the full contract draft from a PDF using a PDF Reader Tool. It extracts:
-
Title
-
Parties involved
-
Clauses (example, payment terms, confidentiality, jurisdiction)
-
Signatory sections
-
Outputs a structured version of the full contract text, segmented by clause and metadata, to be consumed by the validator.
-
- LLM Used: Google Vertex (inherits from parent).
- Tools Used: PDF Reader
2. Contract Validator
- Role: Contract Validator.
- Scope: Compares extracted contract content with a verified Indian legal contract knowledge base.
-
Description: This subagent:
- Uses a RAG model referencing PDF-based Indian legal contracts.
- Analyzes the contract structure for clause completeness and formatting accuracy.
- Identifies:
-
Missing or weak clauses (example, indemnity, dispute resolution)
-
Outdated terminology or references
-
Formatting inconsistencies
-
- LLM Used: Google Vertex (inherits from parent).
- Tools Used: MCP Client
PDFreader – Used by the Contract Draft Reader to extract raw contract content from PDF format.
MCP Client Tool – Used by the Contract Validator to interact with the RAG-based legal knowledge base.
- The Contract Draft Reader opens the uploaded PDF and extracts key sections of the contract, including metadata, all clauses, and signatory information. The content is output in a structured format.
- The structured contract is passed to the Contract Validator, which uses a Retrieval-Augmented Generation (RAG) model trained on verified Indian legal contracts.
- The validator checks for missing clauses (e.g., termination, indemnity), structural issues, and outdated references.
- It outputs recommendations for each detected issue in a structured format:
- Clause name
- Description of the issue
-
Suggested legal improvement or phrasing
- Is this contract draft legally valid and enforceable under Indian law?
- Does this contract clearly define responsibilities, liabilities, and dispute resolution?
- Are all key fields like party names, effective date, and term duration correctly included?