# Building Legal Agents When You Can't See the Data — Jacob Lauritzen, CTO of Legora

## Executive summary

Jacob Lauritzen, CTO of Legora, discusses the challenges of building AI agents in the highly regulated legal sector, where access to client data is severely restricted. Legora's approach focuses on building a robust platform around core primitives—such as 'Lists' and 'Tabular Review'—rather than relying solely on raw model intelligence. The company emphasizes a sophisticated engineering model involving 'Legal Engineers' and 'Forward Deployed Engineers' (FDEs) to customize and integrate the product, allowing the platform to scale by solving complex, multi-step workflows like due diligence on thousands of contracts. The discussion highlights the shift from traditional billable hours to project-based fees and the necessity of robust governance and citation systems.

## Key takeaways

- Agent Architecture and Core Primitives: Legora's platform is built on core primitives (e.g., Lists, Tabular Review, Intake) that allow for flexible, scalable automation. Agents can create lists, and lists can trigger new agents, creating a complex, interconnected workflow system that acts as a 'glue' for various legal tasks. This modularity is key to scaling the product.
- The Role of Specialized Engineering Teams: The team structure includes 'Legal Engineers' (lawyers with CS degrees) and 'Forward Deployed Engineers' (FDEs). Legal Engineers configure the product as power users, while FDEs write code into production, enabling custom integrations and complex client-specific workflows.
- Handling Data Privacy and Governance: Due to the highly confidential nature of client data, Legora's infrastructure is hosted entirely on Azure. The company cannot access raw user activity traces, necessitating an 'emails team' to approximate user behavior and build features based on indirect signals.
- Model Strategy and Optimization: Instead of relying on a single frontier model, Legora employs 'model arbitrage,' using different models for specific tasks (e.g., using specialized models for retrieval or transcription). They are also beginning to fine-tune open-weight models for bounded, high-value tasks like legal research, which is considered a 'fan out retrieval problem.'

## Technical details

- Agent Workflow and Data Processing: The 'Tabular Review' feature allows users to ask the same question across thousands of documents (e.g., 10,000 employment contracts) and collect the answers in a structured, reviewable table. This process is described as a 'fan out' operation, which is highly efficient for due diligence.
- System Architecture and Integration: The platform utilizes a 'List' primitive, which functions like a scalable, customizable database (analogous to a Notion database). This list acts as a central hub, allowing agents to create tasks, and those tasks to trigger subsequent agents, enabling complex automation chains.
- Advanced Retrieval and Analysis: The system emphasizes robust search and retrieval augmented generation (RAG). The process involves identifying the correct legal precedent (a search problem) and then ensuring all generated output is traceable via a citation system, which links back to the source document and even specific cells in a table.
- Model Limitations and Improvements: While large language models (LLMs) are powerful, the most challenging tasks remain: long document reasoning (e.g., millions of tokens) and complex, multi-step edits across a document. The current state-of-the-art is insufficient for these tasks, requiring architectural solutions like chunking and orchestration.

## Practical implications

- For build engineers, the focus should shift from building single-function AI features to developing highly flexible, interconnected 'primitives' (like Lists) that can serve as the central data and workflow backbone.
- The architecture must prioritize governance and auditability, requiring mandatory citation systems that link AI output back to source documents.
- The development model should incorporate specialized, domain-expert roles (Legal Engineers) who can translate complex legal workflows into technical product requirements, bridging the gap between law and code.
- System design must account for data sovereignty and confidentiality, necessitating strict adherence to enterprise-grade cloud hosting (e.g., Azure) and minimal data exposure.

## Topics

AI Agents, Legal Tech, Build Engineering, Workflow Automation, Data Governance, LLM Architecture, Legora, Tabular Review, Intake, Lists, Azure, AG Grid

Source: https://www.youtube.com/watch?v=bJBEFzlKPoQ
