Skip to content
ClaudeClaude

What legal agents inherit from coding agents: Lessons from Legora

Three patterns shaped Legora's legal-AI agent: what they could reuse from coding agents, what they had to translate, and what they had to invent. Hear Staff Software Engineer Jakob Emmerling share how Legora rebuilt document editing, linting, and bulk review around coding-agent principles and see the agent live.

May 20, 202628mWatch on YouTube ↗

At a glance

WHAT IT’S REALLY ABOUT

How Legora adapts coding-agent patterns to build legal AI agents

  1. Legora found legal agents lagged behind coding agents and used coding as the reference domain to accelerate product and UX decisions.
  2. They categorize learnings into three buckets—reuse one-to-one patterns, translate analogous patterns, and invent domain-specific capabilities where legal work differs.
  3. Planning-first workflows and human-in-the-loop approvals transfer directly from coding agents to legal tasks, improving reliability and controllability.
  4. For document editing, Legora shifted from multi-model handoffs to a coding-agent-like read–edit–verify loop using an intermediate DOCX representation, yielding more exhaustive edits even with smaller models.
  5. Legora built domain-native tools such as citation grounding and large-scale due diligence workflows via a tabular review interface that supports extraction, filtering, and verification with highlights.

IDEAS WORTH REMEMBERING

5 ideas

Use a simple three-part rubric to import progress from coding agents.

Legora’s approach is to (1) reuse patterns that are universal (planning, to-dos, approvals), (2) translate patterns that are structurally similar (editing loops, linters), and (3) invent tools for domain-unique requirements (citations, due diligence workflows).

Planning-first interaction reduces agent decision risk during execution.

By iterating on a detailed plan up front—assumptions, steps, and scope—the agent executes with fewer ambiguous choices, mirroring how coding agents handle larger refactors.

Human-in-the-loop approvals are a universal safety and trust primitive.

Just as coding agents should ask before running unsafe shell commands, legal agents should request approval before destructive or high-impact actions like deleting or overwriting client documents.

Avoid brittle multi-model handoffs for complex editing when possible.

Legora’s earlier DOCX approach used separate models for intent, locating edits, and writing patches, which introduced context/tool mismatches and coordination failures as the system grew more capable.

Adopt the coding-agent ‘read–edit–verify’ loop to improve exhaustiveness.

By transforming DOCX into a flat intermediate representation and providing read/edit tools, the agent can iteratively correct itself, revisit missed sections, and converge—similar to how it edits many files in a repo.

WORDS WORTH SAVING

5 quotes

Six months ago, we had a realization of how we built agents and, um, realized that we need to do something different.

Jakob Emmerling

There's basically three buckets how you can, how you can learn from coding agen-agents, as we found.

Jakob Emmerling

My mental model is kind of that you wanna have the model almost feel like it's inside a coding agent harness, and it just does a legal task.

Jakob Emmerling

The funniest part about this was that to test how good this, like, new harness and tool design works, we run this whole thing on Haiku, so this wasn't even, like, a good model.

Jakob Emmerling

Whenever they ship something new, you steal the thing and benefit from it.

Jakob Emmerling

Why coding agents progressed faster than other vertical agentsThree-bucket framework: reuse, translate, inventPlanning mode for long-running tasksHuman approval gates for risky actionsDOCX editing via intermediate representation and iterative loops“Linting” / static checks for legal documentsDue diligence at scale with tabular extraction, citations, and verification

High quality AI-generated summary created from speaker-labeled transcript.

Get more out of YouTube videos.

High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.