Legal Document Automation
Template-based document generation with AI clause suggestions
View the interactive project page →
Legal Document Automation
Part of the worlds-biggest-software-project initiative.
An AI-native, open-source platform for template-based legal document generation with conversational template authoring and jurisdiction-aware clause suggestions.
Legal Document Automation is a guided-interview document assembly platform that lets lawyers, in-house counsel, legal aid organisations, and courts turn structured questions into Word and PDF documents — without the developer skill required by Docassemble or the licensing cost of HotDocs and Contract Express. It targets the gap between expensive proprietary tools and the steep learning curve of existing OSS, while bringing LLM-powered drafting into a permissively licensed foundation.
Why Legal Document Automation?
- HotDocs is the 30-year incumbent (1M+ users, 11,500+ organisations) but ships a dated UI, requires developer-grade template authoring in HotDocs markup, and has no native LLM integration.
- Contract Express (Thomson Reuters) is priced for BigLaw at $30K–$150K+/year — out of reach for solo, small-firm, and legal aid users.
- Docassemble is the only credible OSS option (MIT-licensed) but its YAML/Python/Jinja2 model demands real developer skill, has no managed SaaS, and ships no native AI features.
- Knackly offers the best non-developer authoring experience but is proprietary, has limited AI, and starts at $99/month with a smaller template library.
- 80% of low-income Americans with legal problems receive no legal help (LSC); an AI-enhanced OSS tool that lowers the template-authoring barrier directly serves an access-to-justice gap that commercial vendors will not address.
Key Features
No-Code Template Authoring
- Visual interview builder with drag-and-drop construction and live document preview
- Conditional logic, branching questions, and looping for repeated blocks
- Variable substitution via Jinja2 for document generation from completed interview data
- Template library with version control and access roles separating template authors from document users
Guided Interviews and Document Output
- Step-by-step web-based interview UI, mobile-responsive and embeddable
- Document output in Word (.docx) and PDF formats
- Multilingual interview and document generation
- Public-facing portal mode configurable for access-to-justice deployments (court forms, tenant rights letters, benefits applications)
AI-Assisted Drafting
- Conversational template authoring: describe a document type in plain English; AI generates the initial interview logic and Jinja2 template for human review
- Dynamic clause suggestion from context: AI reads completed answers and the partial document, then proposes additional clauses appropriate to the situation
- Jurisdiction-aware clause flagging: AI identifies which jurisdiction-specific provisions are required based on party location and governing law
- Plain-English document analysis: summarise generated or uploaded documents for non-lawyer readers
Compliance, Security, and Audit
- Audit trail recording who generated which document, when, and with what inputs
- Configurable data retention and deletion workflows for GDPR/CCPA compliance
- Encryption and two-factor authentication for end-user data
- E-signature integration via DocuSign or Adobe Sign on generated documents
Integration and Extensibility
- REST API for embedding interviews in third-party portals, legal aid websites, and self-help kiosks
- Webhook support for connecting to CRM, practice management, and CLM systems
- Optional Docassemble interview YAML import to ease migration of existing template libraries
- Analytics dashboard tracking completion rates, drop-off points, and common answer patterns
AI-Native Advantage
Conventional template tools fill variables from answers; this project treats the LLM as a first-class drafting collaborator. Lawyers describe a document in plain English and the system generates the interview logic and template — collapsing template creation from weeks to minutes, the single biggest adoption barrier in legal document automation today. Beyond authoring, AI proactively suggests jurisdiction-specific clauses (e.g., a PAGA arbitration waiver for a California employment agreement) and flags missing mandatory provisions when parties span jurisdictions, capabilities that today require expensive legal expertise.
Tech Stack & Deployment
- Self-hosted deployment with Jinja2/YAML-based template foundation, drawing on the proven Docassemble approach while adding a visual no-code layer
- Pluggable LLM backends (OpenAI, Anthropic, local models) for AI-assisted authoring and clause suggestion
- REST API and embeddable web component for integration into third-party portals
- E-signature via DocuSign and Adobe Sign APIs; compliance with eIDAS, ESIGN Act, and UETA for enforceable signed output
- WCAG 2.1 AA accessibility for portals serving courts, legal aid, and government agencies
- ISO/IEC 27001 alignment for enterprise buyers handling privileged client data
Market Context
The legal AI software market is estimated at $3.11B in 2025, projected to reach $10.82B by 2030 at a 28.3% CAGR (MarketsandMarkets), with the legal document management sub-market sized at $4.02B in 2025 (Business Research Company). Incumbent pricing spans $0 (Docassemble self-hosted) to $30K–$150K+/year for HotDocs Enterprise and Contract Express, and $150K–$500K+/year for BigLaw suites such as Litera. Primary buyers are solo and small-firm attorneys, in-house legal ops teams, legal aid organisations, courts and government agencies, and compliance officers — with small/solo firms the fastest-growing segment.
Project Status
This project is in the research and specification phase.
Contributions, feedback, and domain expertise are welcome.
Contributing
We welcome contributions from developers, domain experts, and potential users. See CONTRIBUTING.md for guidelines.
Important: All contributions must be your own original work or clearly attributed open-source material with a compatible licence. Copyright infringement and licence violations will not be tolerated and will result in immediate removal of the offending contribution. If you are unsure whether a piece of code, text, or other material is safe to contribute, open an issue and ask before submitting.
Licence
Licence to be determined. See discussion for context.