General · 4 min · Proverbit library

Every hour your legal team spends manually scanning contracts for liability is a billable hour thrown away. Today, we're building a fully autonomous Legal AI Agent in n8n that reads a 50-page NDA, audits it against your standard compliance playbook, scores the risk, and drops a complete summary in Slack—completely hands-free. This isn't basic text-matching; it's a deep cognitive reasoning engine

Save
Chapters 9
  1. Why this is worth understanding
  2. The shape of it
  3. How it works, step by step (part 1)
  4. How it works, step by step (part 2)
  5. The part that matters most
  6. Example 1
  7. Example 2
  8. Another way to see it
  9. Recap
Transcript

A fifty-page NDA, audited against your playbook, risk-scored. By hand, that's most of an afternoon — treating an infection one cell at a time. What if it took ninety seconds, and arrived as one short message? One flow, left to right.

A Drive trigger watches Contracts. Extract pulls the text from the PDF. Chunking splits it into clauses. Reason reads each clause against your playbook, fed in from below, scores the risk nought to one hundred, and posts a summary to Slack.

One branch peels off: anything at seventy or above goes straight to counsel. Senses in, brain decides, hand acts. Stage one is the senses — clean signal in, no judgement yet. A Google Drive trigger fires the moment NDA.

pdf lands in the Contracts folder. Extract from File turns all fifty pages into plain text, about twenty-five thousand words. That's far too much for any model to hold at once, so the next node splits it into roughly thirty clause chunks of eight hundred words each. The final step loads your compliance playbook as a table of rules: the liability cap must be at least twelve months of fees, indemnity must be mutual, governing law must be Delaware, confidentiality runs at least thirty-six months, and there is no uncapped liability.

Still nothing has been judged — the agent simply has a clean picture of what the contract says. Node five is where judgement happens: each chunk, plus the whole compliance playbook, goes to the model with one instruction — for every rule return the rule, the clause text, a verdict, and a reason, as structured JSON. No free prose. Node six applies fixed thresholds to each finding.

Uncapped liability: forty points. One-sided indemnity: twenty-five. Wrong governing law: ten. Node seven sums them into a risk score from zero to one hundred, and writes a three-line summary — score, top finding, recommended action.

Node eight posts it to the legal contracts channel. And if the score hits seventy or more, a branch quotes the flagged clause straight to legal. The cortex decides; the hand moves. The part that matters most: the reasoning step — comparing each clause to your playbook — is what makes this an agent, not a search box.

Here's where intuition breaks. Two clauses, both containing the word 'indemnify'. The first: each party shall indemnify the other — mutual, fine. The second: the Customer shall indemnify the Provider — one-way.

Keyword matching passes both. The agent flags only the one-way clause: twenty-five risk points. The direction of the duty, not the word, is the risk. A typical vendor NDA.

Four playbook rules, checked one at a time. Confidentiality runs 24 months — the playbook demands at least 36, so that's a medium finding. The liability cap, 12 months of fees, passes. Delaware governing law, passes.

The 12-month non-solicit, passes. Score: 30 out of 100 — low risk. Approve, with one note on the confidentiality term. Here's a second lens on the same job.

Left: one big reasoning pass — fifty pages read together, reasoned over as a whole. Right: map-reduce. The contract splits into chunks, each chunk is scored alone, then the scores aggregate into one. Fixed rules — governing law, dates, term lengths — go to plain if-nodes; the model is kept for judgement calls.

Whole-body scan versus organ by organ. Past two hundred pages, the chunked hybrid is the better lens. For a single fifty-page NDA, the single pass is fine. Here's the whole pipeline: trigger, extract, chunk, reason against your compliance playbook, score the risk from zero to one hundred, and post it to Slack.

Above seventy, it escalates to a human. So a fifty-page NDA is read, audited and scored in about ninety seconds — and the lawyer opens one message about one clause, not a fifty-page stack.

Still stuck on part of this?

Ask for a video on exactly the bit you need. Your first 2 are free.

Animated by Proverbit, planned with AI

2 free videos
No card
Try it free