Contract review is slow, tedious, and expensive. Organizations signing vendor agreements, SaaS licenses, NDAs, and partnership contracts must identify legal and financial risks before approval — but this requires time, legal expertise, and manual effort.
Reading each clause word-by-word, identifying obligations, renewal traps, liability exposure, confidentiality terms, and negotiating leverage is mentally exhausting.
The Result:
- Teams spend hours reviewing documents, or
- Sign contracts without fully understanding their exposure
- Leading to harmful financial commitments, unlimited liabilities, and operational risks
Manual review makes it impossible to scale: more contracts means more delays, more risk, and increased workload for legal and procurement teams.
ClauseIQ applies multi-agent AI to automate contract understanding. A user uploads a PDF, and the system performs three core steps automatically:
- Extract clauses from the contract and structure them into categories
- Evaluate legal and financial risks
- Generate an executive summary targeted at business decision-makers
Users can also ask follow-up questions such as:
- "Which clauses are high risk?"
- "What should we renegotiate?"
- "Explain the indemnification clause"
ClauseIQ stores memory across the session, enabling grounded follow-up answers based strictly on the uploaded contract rather than hallucination. This turns contract review into a fast, scalable workflow that empowers decision-makers with clarity before signing.
ClauseIQ is a multi-agent system built using Google's Agent Development Kit (ADK). It is not a single general model — instead, it is a team of specialized agents coordinated by a central orchestrator.
| Agent | Responsibility |
|---|---|
| Extractor Agent | Reads PDF artifacts and extracts structured clauses |
| Risk Analyst Agent | Evaluates risk level and business/legal exposure for each clause |
| Reporter Agent | Writes an executive-style summary for business leadership |
| Root Agent | Manages delegation and answers follow-up questions |
Reads the uploaded PDF using ADK's artifact loader and returns structured JSON with:
- Clause ID
- Title
- Content
- Category (payment, termination, liability, IP, confidentiality, renewal, indemnification, warranty, general)
Analyzes each clause to determine risk level (low, medium, high) with justification — such as:
- Unlimited liability
- Auto-renewal
- Penalty clauses
- Perpetual IP rights
Provides recommendations for each risk identified.
Synthesizes clause and risk data into a concise executive summary written for non-legal business audiences. It highlights risk distribution and negotiation talking points.
Acts as the user-facing coordinator. It:
- Launches the pipeline automatically after PDF upload
- Enables follow-up conversations
- Leverages ADK memory, tools, and session state to avoid repeated processing
- Grounds answers in the uploaded contract
ClauseIQ uses three ADK tools to support specialized reasoning:
| Tool | Purpose |
|---|---|
load_artifacts_tool |
Reads the uploaded contract PDF |
load_memory_tool |
Remembers extracted clauses, risks, and summaries across queries |
google_search_tool |
Optional external factual research if needed |
By combining tools with specialized agents, ClauseIQ converts:
Contract text → Structured clauses → Risk intelligence → Business-ready insights
- Model: Gemini 2.5 Flash Lite
- Retry Configuration: 5 attempts with exponential backoff
- HTTP Status Codes Handled: 429, 500, 503, 504
1. Extractor Agent
- Output: JSON array of clauses
- Categories: payment, termination, liability, IP, confidentiality, renewal, indemnification, warranty, general
- Tools:
artifacts_tool,memory_tool
2. Risk Analyst Agent
- Output: JSON array with risk assessments
- Risk Levels: low, medium, high
- Analysis Factors: One-sided terms, unlimited liability/indemnity, automatic renewal, penalties, perpetual IP rights
- Tools:
memory_tool,search_tool
3. Reporter Agent
- Output: Executive summary
- Report Structure:
- Overall risk rating
- Contract overview (4-6 sentences)
- Top critical issues (3-5 bullets)
- Negotiation recommendations/redlines
- Tools:
memory_tool
4. Root Agent
- Role: User-facing coordinator
- Workflow:
- Call
extractor_agentto obtain clauses - Call
risk_analyst_agentto assess risks - Call
reporter_agentto generate summary
- Call
- Tools:
artifacts_tool,memory_tool, AgentTools for all sub-agents
pip install google-adk google-genai pymupdfimport os
os.environ["GOOGLE_API_KEY"] = "your_api_key"
os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "FALSE"adk create clauseiq_agent --model gemini-2.5-flash-lite --api_key $GOOGLE_API_KEYadk web --url_prefix {url_prefix}- Upload a contract PDF through ADK Web interface
- Ask: "Analyze this contract and summarize the risks"
- Follow-up queries:
- "Which clauses are high risk and why?"
- "What should we renegotiate before signing?"
- "Explain the indemnification clause"
The system maintains session memory, so follow-up questions are answered based on the already-processed contract data without re-extraction.
ClauseIQ reduces contract review time from hours to minutes while improving clarity and risk awareness. It empowers founders, procurement teams, and legal-ops professionals to make confident decisions without requiring a full legal review for every document.
- ⏱ Time Savings – Review contracts in minutes instead of hours
- 📉 Risk Reduction – Identify hidden liabilities automatically
- 📈 Scalability – Handle more contracts without increasing headcount
- 🧠 Intelligence – Data-driven insights for better negotiation
With more time, the next evolution would add a Negotiation Agent to automatically recommend redlines and generate counter-proposal text — turning contract analysis and contract negotiation into a unified AI-driven workflow.
ClauseIQ demonstrates how multi-agent systems can transform legal and business processes. Instead of relying on a single general model, ClauseIQ divides the complex task of contract review into focused subtasks handled by dedicated agents — extraction, risk evaluation, and executive summarization — coordinated by a Root Agent.
Running on ADK Web, the system supports interactive review: users upload a contract, receive immediate insights, and ask follow-up questions without reprocessing the PDF. This modular architecture makes the system scalable, reusable, and easy to extend.
This project is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.
Nitin Dave
- Kaggle: @nitindave
| Resource | Link |
|---|---|
| 📓 Kaggle Notebook | ClauseIQ Final Version |
| 🎥 YouTube Demo | Watch Demo |
| 📝 Kaggle Writeup | Competition Entry |
| 🏆 Competition Track | Enterprise Agents – Agents Intensive Capstone Project |