Contract Reviewer
One-line: A Claude Opus 4.8 agent that reviews contracts, flags risky and unusual clauses, surfaces missing protections, and summarizes each party's obligations — automated review to assist a human, not legal advice.
What it does
Contract Reviewer reads an agreement end to end and returns a structured, severity-ranked report:
- Key risks & unusual clauses — one-sided termination, uncapped or asymmetric indemnities, broad liability waivers, evergreen renewals, IP assignment, restrictive covenants, and off-market terms — each with a clause citation, why it matters, and a question for counsel.
- Missing protections — terms a prudent party would expect but that are absent (liability cap, mutual indemnity, confidentiality, cure periods, data-protection obligations, etc.).
- Obligations summary — per party: obligations, payment terms, deadlines and notice windows, and termination/renewal triggers.
- Open questions — items that depend on missing exhibits or unstated governing law/jurisdiction.
It grounds every finding in the document text and never fabricates clauses, figures, or citations. It is a triage tool to make human review faster and more thorough — not legal advice.
Setup
# TypeScript / Node
npm install @anthropic-ai/sdk
export ANTHROPIC_API_KEY=sk-ant-...
# Python
pip install anthropic
export ANTHROPIC_API_KEY=sk-ant-...
The agent uses model claude-opus-4-8 (deepest reasoning, best suited for legal analysis) with adaptive thinking. For long contracts, stream the response so large max_tokens requests don't hit HTTP timeouts.
Example
import Anthropic from "@anthropic-ai/sdk";
import fs from "fs";
const client = new Anthropic();
const contract = fs.readFileSync("./msa.txt", "utf8");
const stream = client.messages.stream({
model: "claude-opus-4-8",
max_tokens: 16000,
thinking: { type: "adaptive" },
system: CONTRACT_REVIEWER_SYSTEM_PROMPT, // see config below
messages: [
{
role: "user",
content: `I represent the Customer. Review this agreement and flag risks, missing protections, and key obligations.\n\n---\n${contract}`,
},
],
});
const message = await stream.finalMessage();
for (const block of message.content) {
if (block.type === "text") process.stdout.write(block.text);
}
Typical output (abridged):
This is an automated review to assist a human reviewer, not legal advice.
Confirm material terms with a qualified attorney.
## Summary
This is a SaaS Master Services Agreement between Provider and Customer. The
allocation of risk leans toward Provider — liability is capped tightly while
Customer's indemnity is uncapped, and renewal is automatic.
## Key Risks & Unusual Clauses
1. **Uncapped Customer indemnity vs. capped Provider liability — High** (§8.2, §9.1)
Provider liability is capped at 3 months of fees; Customer indemnity has no
cap. Action: negotiate a mutual cap or carve-outs.
2. **Evergreen auto-renewal, 90-day notice — Medium** (§3.1) ...
Notes
- Not legal advice. This agent is an analysis and triage aid. Material decisions should be reviewed by a qualified attorney. The model is instructed to include a one-line disclaimer in every response.
- Grounding. Findings cite specific sections/defined terms. The agent will not invent clauses, figures, or governing law; missing exhibits and unstated jurisdiction are surfaced as open questions.
- Long documents. For large contracts approaching the context window, stream the response and consider uploading the file via the Files API (PDF/text) rather than inlining. The 1M-token context window on
claude-opus-4-8 handles most single agreements without chunking.
- Represented party. Pass the party you represent in the user message for interest-calibrated severity; omit it for a neutral review.
- Privacy. Contracts often contain confidential and personal data — handle inputs according to your data-retention and privacy obligations.