# AI Contract Review Agent

> A contract-review agent: reads clause by clause against your playbook, flags risky and missing terms with severity, and proposes fallback language. Not legal advice.

- **Category:** Legal & Contracts
- **Difficulty:** Advanced
- **Setup time:** 45 min
- **Stacks:** Claude, LangGraph, OpenAI
- **Version:** 2.0.0 (updated 2026-06-21)
- **Source:** https://agent-kits.com/kit/contract-clause-reviewer

## Overview

Clause-by-clause review against your playbook: flags risky terms, missing clauses, and deviations, each with a severity and a citation to the contract text.

Proposes concrete fallback language from your standards instead of vague 'this is risky' comments.

Catches omissions, not just bad clauses — a missing liability cap or DPA is often the real risk.

Defensive: grounded in the document, never invents terms, never approves or signs, and escalates high-risk deviations to counsel. Review assistance, not legal advice.

## When to use it

- Your legal/ops team reviews a high volume of similar third-party contracts (NDAs, MSAs, DPAs, vendor agreements) and wants a fast, consistent first pass.
- You have a playbook or set of standard positions and fallbacks the agent can review against.
- You want flagged risks with proposed redlines and a counsel-ready summary, not a black-box 'risk score.'
- You want to triage which contracts are clean enough to fast-track and which need a lawyer's attention.

## When not to use it

- You expect it to give legal advice, make the final call, or sign — those are human (and counsel) responsibilities.
- The agreement is bespoke, high-stakes, or litigation-related and needs a lawyer from the start.
- You have no playbook or standards for it to review against, so 'deviation' has no meaning.
- You can't keep counsel in the loop on high-risk findings.

## Architecture

- **Document intake & parsing** — Ingests the contract (PDF/DOCX/text), splits it into clauses/sections with their headings, and identifies the contract type to select the right playbook.
- **Playbook grounding** — Loads the company's standard positions, required clauses, and fallback language for that contract type — the benchmark every clause is measured against.
- **Clause-by-clause analysis** — The model compares each clause to the playbook, quoting the text, explaining the deviation, and rating severity — and separately checks for required clauses that are absent.
- **Fallback & redline generation** — For each material finding, proposes concrete fallback language from the playbook so counsel gets a starting redline, not just a flag.
- **Severity & escalation gate** — A deterministic step routes any high-severity deviation or missing mandatory clause to counsel review and sets the contract's disposition accordingly.
- **Counsel summary** — Produces a structured, citation-backed summary a lawyer can act on quickly, with the disposition (fast-track / negotiate / counsel review).
- **Audit & playbook feedback** — Logs findings and the human's accept/override decisions; disagreement patterns refine the playbook and the prompt over time.

## Files in this bundle

- `system-prompt.md` — the agent's system prompt
- `tools.json` — tool/function definitions the agent expects
- `workflow.md` — step-by-step run loop
- `.env.example` — environment variables to fill in
- `kit.json` — full structured metadata
- `starters/` — minimal starter snippets
- `LICENSE` — Apache-2.0 (code, configuration, and schema)
- `LICENSE-CONTENT` — CC BY 4.0 (specification text and documentation)
- `NOTICE` — attribution and trademark notice
- `run.py` — **runnable demo**: real agent loop with mock tools (`pip install anthropic`, set `ANTHROPIC_API_KEY`, `python run.py`)
- `agentaz.json` / `agentaz.schema.json` — AgentAz™ governance spec + schema

## Implementation notes

- Keep it review-only in config: it must never mark a contract approved, executed, or safe to sign, and every output should carry the 'not legal advice' framing.
- Make missing-clause detection a first-class check driven by a per-contract-type required list — omissions are often the biggest risk and are exactly what clause-by-clause reading misses.
- Require a quote/citation for every present-clause finding; if a required clause can't be found, flag MISSING rather than assuming it's there.
- Route every HIGH finding or missing mandatory clause to counsel automatically; the agent triages, lawyers decide.
- Ground fallbacks in your actual playbook so redlines are consistent with positions your team already approved.
- Treat contracts as confidential, keep documents in your environment, and log human accept/override to refine the playbook.
- Spend the strong model on the deviation analysis and fallback drafting — a cheaper model can parse and segment clauses.

## Variations

- **Basic — First-pass risk flagger:** Reviews a contract clause by clause against your playbook and returns flagged risks, missing clauses, and severities with citations for a human to action.
- **Advanced — Redlining reviewer:** Adds playbook-grounded fallback language for each finding, missing-clause detection, and automatic counsel-review routing for high-severity deviations.
- **Enterprise — Governed CLM reviewer:** Integrates with your CLM and intake, supports multiple contract types and jurisdictions, enforces confidentiality controls, and tunes the playbook from reviewer feedback at scale.

## FAQ

**Does it give legal advice?**

No. It provides review assistance — flagging deviations from your playbook, missing clauses, and proposed fallback language — and every output says so. It does not advise on enforceability or make the decision; a lawyer does.

**Can it approve or sign a contract?**

Never. It is review-only by configuration and never marks a contract approved, executed, or safe to sign. Its job is to surface issues and route high-risk ones to counsel.

**How does it avoid inventing clauses?**

Every finding about a present clause must quote/cite the contract text. If a required clause isn't found, it flags it as MISSING rather than assuming standard terms are there — which is how it catches omissions.

**What makes it more than a keyword scanner?**

It compares each clause to your standard positions, explains why a deviation matters, rates severity, and proposes concrete fallback language — and it checks for required clauses that are absent, not just bad ones present.

**How does it handle high-risk terms?**

Any high-severity deviation (uncapped liability, broad indemnity, IP assignment, missing data-protection terms, etc.) is flagged for counsel and sets the contract's disposition to counsel review.

**Is our contract data kept confidential?**

Yes. It treats contracts as confidential, runs in your environment, keeps findings within the review output, and is intended to be used with documents that never leave your control.


---

© 2026 AgentKits · www.agent-kits.com

**Open source.** Code, configuration, and the AgentAz™ schema are licensed under
**Apache-2.0**; specification text and documentation under **CC BY 4.0** (with
attribution to AgentKits, link to https://www.agent-kits.com). See LICENSE, LICENSE-CONTENT,
and NOTICE in this bundle. "AgentAz" and "AgentKits" are trademarks of AgentKits.

**Flagship reference blueprint.** View the source, AgentAz™ spec, and frozen v1.0 schema
in the public registry: https://github.com/agent-kits/agentaz
Original: https://agent-kits.com/kit/contract-clause-reviewer
