AI Legal Assistant
AI-powered legal drafting with SharePoint & iManage integration
Legal professionals spend hours drafting standard documents from scratch. This platform brings AI-assisted drafting into their existing workflow — through a web app and a Microsoft Word add-in — connected to the DMS systems they already use.
Role
Lead AI Architect & SSE
Timeline
12 Months (2025–2026)
Deliverables
Web App, Word Add-in, DMS Integration
Platform
Web App & MS Word

50+
Firms onboarded
Legal firms across Australia
2
Delivery channels
Web · Word Add-in
3+↑
DMS integrations
SharePoint · iManage
AI
Core engine
LangChain · OpenAI
The Problem
Legal document drafting is repetitive and error-prone. Lawyers at this firm were copy-pasting clauses from old documents, managing versions across email chains, and manually syncing final drafts into SharePoint and iManage. The firm wanted an AI assistant that could generate drafts from prompts, but it had to work within their existing enterprise environment — no copy-pasting text between systems, no manual file management. Every document had to end up in the right DMS folder with proper permissions.
How I Built It
AI Document Generation Engine
Months 1–4
The AI engine uses LangChain with OpenAI to generate legal documents from natural language prompts. Users describe what they need — “draft a non-disclosure agreement for a software development partnership” — and the system generates a structured document with proper legal clauses. The pipeline handles prompt construction, context injection from existing documents, and structured output formatting. Background processing queues handle longer-running generation jobs so the UI stays responsive.
Microsoft Word Add-in
Months 4–8
Lawyers live in Microsoft Word. Taking them out of their editor to use an AI tool would kill adoption. I built a Word add-in using Office.js that lets users generate, insert, and refine document sections without leaving Word. The add-in communicates with the FastAPI backend through secure OAuth-authenticated API calls. Users can highlight a clause and ask the AI to rephrase it, expand on a section, or generate a new clause based on context from the open document. The add-in supports multi-section drafting for complex documents like contracts and agreements.
We started with a standalone web editor as the primary interface, but internal testing showed adoption was low — lawyers wouldn’t leave Word. The add-in flipped adoption completely. It took about two months to rebuild the editor as an embedded Office.js add-in, including OAuth flows, ribbon UI, and task pane layout.
DMS Integration Layer
Months 8–12
The hardest part was enterprise DMS integration. SharePoint and iManage both use OAuth for authentication but have completely different APIs and document models. SharePoint uses Microsoft Graph API with site-relative paths and metadata. iManage has a REST API with its own folder hierarchy and security model. I built an abstraction layer that presents a unified document service interface to the rest of the application — the AI engine and Word add-in never talk to DMS APIs directly. When a user saves a generated document to SharePoint or iManage, the abstraction layer handles auth, folder resolution, permission inheritance, and metadata mapping. Webhooks keep documents in sync when they’re updated externally.
Document Generation Pipeline
Tech Stack
React
Admin Dashboard
TypeScript
Word Add-in · API
Python
FastAPI · Backend
MongoDB
Documents · Schemas
Docker
Deployment · CI/CD
Results & Performance
Document Generation Time Per Draft
Manual vs AI-assisted: from hours to minutes
Drafting from hours to minutes
Legal documents that previously took 2–3 hours to draft from templates are generated in under 2 minutes with AI assistance.
In-editor adoption
The Word add-in was the key adoption driver. Lawyers use it without changing their workflow — no new tools to learn, no context switching.
Enterprise DMS compliance
All generated documents land in the correct SharePoint/iManage folder with proper permissions, audit trails, and metadata — no manual sync.
Layered architecture
The DMS abstraction layer means adding a new document store (Box, Dropbox, NetDocuments) is one adapter — the rest of the system doesn’t change.
See It Live
The platform is live at legalassistant.au. If your firm needs AI-powered document generation with enterprise DMS integration, I’d love to hear about your use case.