Data protection in legal AI
Grace Nelson Law
An AI paralegal for a bilingual law firm in Ecuador. Each client email is read, filed and answered in draft within minutes; a lawyer approves, edits and sends every reply. The agent cannot send email, and each run can change only one client's file.
gracenelsonlaw.comFrom email to approved reply
- 01InboxEvery 60 seconds the shared mailbox is read through Microsoft Graph and sorted without AI; noise is dropped.
- 02QueueEach message becomes one event in a SQLite queue, with retries and an alert if it gets stuck.
- 03AgentA sandboxed Claude run identifies the client, updates the file, files attachments and checks the knowledge base.
- 04DraftAn unsigned draft in Outlook, in the client's language, with every open point marked for confirmation.
- 05LawyerA lawyer reviews, edits and sends. A 09:00 email lists questions and drafts waiting for review.
Client data in an AI system
The firm's clients write about their visas, property, money and families: personal data, often sensitive, and covered by professional secrecy. Before any of it reached an AI model, the design had to answer the questions a data protection lawyer would ask: what the system needs, who can see it, what it may do with it, and how a mistake is caught before it reaches a client.
- Purpose: the system reads, files and drafts; it cannot send, and a lawyer approves every reply
- Minimisation: each run sees one client's file, and alerts carry identifiers, never client names
- Access: least-privilege Microsoft 365 permissions, and administrative access only over a private network
- Accountability: every run, draft and approved lesson is recorded; incidents are written up with their root cause
- Recovery: versioned off-site backups through an upload-only key, and daily snapshots
The firm
Grace Nelson Attorneys at Law is a family firm in Cuenca, Ecuador, working in English and Spanish for people who move to Ecuador, buy property there and settle their affairs: visas and residency, real estate, wills and estates. Most client contact is by email, and every answer needs the client's file, the firm's practice and the current rules at hand.
I was an associate attorney at the firm before I took over its technology, and that shaped the design: the lawyers keep every decision, while the system does the reading, the filing and the first draft.
Guardrails in code, not in prompts
Every safety rule lives in the tools the agent calls or in the permissions it runs with. Instructions can be argued with; a missing permission cannot.
- No sending: the send permission was removed from the application and its consent revoked; a send attempt returns 403
- Recipients: drafts can address only the matched client, never third parties
- One client per run: writes are limited to the client set for the event, and the tool refuses a second one
- Narrow tools: a shell only for the pipeline's own commands, files only in the run's work folder, the knowledge base read-only
- Sandbox: a throwaway system user per run, private and cloud-metadata networks blocked, memory and process limits
- The lawyers' Outlook folders are theirs: the agent never moves, renames or deletes them
What the agent does
Mail is sorted before any AI sees it: firm mail, web leads, clients, third parties and noise, with sender authentication required for anything claiming to come from the firm. Each remaining message starts one agent run with a 15-minute limit.
- Identifies the client and updates the client's profile and matter status
- Files attachments into the client's folder in OneDrive
- Reads the firm's cited knowledge base; anything researched from official sources is marked as unverified
- Checks Sent Items just before drafting and stops if a lawyer has already answered
- Writes an unsigned draft tagged as AI-drafted, using only approved document templates
A knowledge base with sources
The agent answers from a knowledge base in git, not from memory. Every figure names its primary source, such as the ministerial agreement or article, and the date it was checked; the full texts of the laws sit beside it. Research passes are fact-checked independently, and firm practice drawn from past correspondence goes in only when the firm's owner approves it.
Learning from the lawyers
Once a week the system compares each draft with what the lawyer actually sent and proposes lessons: a phrasing the firm prefers, a fee that changed, a step the draft missed. The firm's owner approves or rejects each one; 61 have been approved so far. Proposals that would carry a name, an email address or a phone number into the knowledge base are refused automatically.
Security and operations
I am responsible for the firm's information security and IT as a whole, not only the agent.
- Least-privilege Microsoft 365 and Microsoft Graph permissions
- Administrative access only over a private network
- A health check every five minutes; alerts carry identifiers only, never client names
- Self-hosted Wazuh security monitoring
- Nightly database copies to versioned off-site storage through an upload-only key, and daily disk snapshots
- Incidents written up with their root cause, and the fix recorded in the specification
The firm's websites
I rebuilt the firm's website in one day in October 2026, from GoDaddy to Eleventy on Cloudflare, with a redirect for every old address and contact forms tagged by source. I also run the firm's immigration site, myecuadorvisa.com, whose clicks from Google search rose from 1,557 to 5,181 per 90 days between June and September 2026.
Screenshots
Figures as of 7 November 2026; the median covers the first week of November. Published with the firm's approval. No client data appears on this page.