Skip to content
Lawyer-agent: 50 contracts in 5 minutes
LegalFlow · 2025OpenAI · LangChain · OCR · Python

Lawyer-agent:50contractsin5minutes

The agent reads the template, pulls data from CRM and registries, fills and checks contracts. Before — a lawyer spent a day per batch. Now — 50 contracts in 5 minutes.

Brief

LegalFlow — the legal department of a large supplier. A standard contract took a lawyer 15-30 minutes. Peak months ran into hundreds of packages. We built an agent: it reads the template, pulls counterparty details from CRM and the company registry, fills the data in, checks for errors and hands the lawyer a finished document for signature.

Context

The problem

Lawyers spent 60% of their time on routine: filling templates, verifying entity details, checking VAT rates.

Constraint

These documents go to court. Any error in entity details means a fine or a challenge.

Goal

Cut the time per standard document batch by at least 10× — with no loss of quality.

Before → After

Contract-batch preparation speed

Before launch
  • Lawyer — 15-30 minutes per contract
  • Peak month — hundreds of packages
  • Errors in entity details — risk of being challenged
  • 60% of a lawyer's time on routine
6 weeks
After 4 weeks
  • +50 contracts in 5 minutes
  • +Peak months — no fire-drills
  • +0 errors in entity details since launch
  • +Lawyers work on the hard cases
Project timeline

Shipped in 4 weeks

From first call to first production launch. No phase two, no endless iterations.

Week 1

Discovery

Analysed 40 standard templates. Built a risk-and-error map.

Week 2

Design

Contract ontology. Wiring to CRM, 1C and the company registry.

Week 3

Build

Agent, validators, lawyer's UI. Test set on 200 real packages.

Week 4

Launch

Pilot in one division. Measured speed and errors. Rolled out company-wide.

What we did

How we built it

01

Templates and ontology

Decomposed 40 standard contracts into structural blocks: parties, subject, price, timelines, entity details.

02

Data connectors

Wired up CRM, 1C, the company registry and the internal counterparty database. Entity details fill automatically.

03

Lawyer-agent

An LLM with tools: filling, cross-checking numbers and dates, surfacing conflicts with prior contracts.

04

Human-in-the-loop

The lawyer sees a package of finished contracts, fixes the exceptions, signs them with one click.

From template to signature

The lawyer files a task "batch of contracts for the seasonal supply run" — the agent returns a finished package in minutes.

01Set the task — pick the template and counterparties
02Agent assembles the data — CRM, registry, history
03Package ready — the lawyer confirms and sends for signature

Risk control

The lawyer-agent doesn't just fill fields — it hunts for contradictions, verifies entity details, flags risky clauses. The human gets a package with exceptions already marked.

01Agent verifies entity details against the registry and payment history
02Cross-check of numbers, dates and timelines across all contracts
03Risks highlighted — the lawyer only fixes what needs a human
0450 contracts → 5 minutes → one-click signature
Results

What came out

50

contracts in 5 minutes

−94%

less time per document batch

4 wk

to production

0

errors in entity details since launch

“The lawyer stopped being a Word operator. They work on hard cases now instead of filling batches of templates.”

Anna Sokolova

Head of Legal, LegalFlow

Project team
LP

Lena Petrova

Strategy

JP

James Park

AI

VK

Vitaly Kust

Tech

Next case

PING — fintech + lawtech platform for SMB

A platform for SMB: financial health monitoring and debt collection. Before — spreadsheets and letters. After — real-time alerts and automated legal procedures.

PING — fintech + lawtech platform for SMB