Four lawyers carried the legal exposure of 900+ pharmacies
Roughly 200 cases a year, 15-to-30-day regulatory deadlines, and more than 80% of the team’s time spent finding information instead of deciding what to do with it.
One of the largest pharmacy networks in its market runs 900+ pharmacies with 5,600+ employees, in one of the most regulated retail sectors there is. Drug pricing, consumer protection, labor law and criminal matters from in-store theft all land on the same desk: a legal team of four. Today, a legal assistant built on FlowX.AI is live for that team: four agents on one knowledge base, two the lawyers work with directly (case analysis and document drafting) and two in the background that keep the knowledge base current (legislation monitoring and knowledge ingestion).
Live in production, on the identity provider already in place
What if in-house lawyers spent their time on legal judgment, not on the research and drafting?
A typical case starts with a piece of paper: an employee complaint, an invitation from the consumer protection authority, a summons from a local authority. The lawyer works out which laws apply, checks whether the article they know by heart was amended since last year, searches for precedent, drafts the response and tracks the case until it is decided. Then the outcome disappears into an archive and into the lawyer’s memory.
The team described its load as “26 to 29 hours of work a day”, and most of those hours went on finding the law, not taking action.
Four uncomfortable truths defined the starting state.
Roughly 200 cases a year, 15-to-30-day regulatory deadlines, and more than 80% of the team’s time spent finding information instead of deciding what to do with it.
Experience covered the daily cases. Everything else looked, in the team’s own words, like this: “He goes to the portal, types three words, gets a pile of normative acts, then goes to Google, then to ChatGPT and asks which laws he should rely on.”
One amending act can touch five others; a Constitutional Court decision can void an article overnight. Daily legislative alerts arrived, but turning one into an updated legal position was manual work.
Case history sat in different places, consolidated by hand once a month. Every fine annulled or dismissal upheld was a precedent the company had paid for, and none of it was searchable. With 5,600+ employees, the risk was not only slowness. It was treating two identical cases differently.
The research, the drafting and the reading of new legislation moved to the assistant. The legal judgment, and the responsibility for it, stayed with the lawyers.
Research outside the routine improvised; no consistent way to find the applicable law.
A case analysis agent reads the chat, up to 10 attached documents (including scans via OCR) and the knowledge base, and returns the same seven sections every time, in the local language or English.
Every viewpoint, summons, sanctioning decision or criminal complaint written from a blank page.
A document drafting agent turns the analysis into an editable Word draft from the department’s templates. The target is a draft of 90% there, so the lawyer changes two or three words.
Daily legislative alerts turned into updated legal positions by hand.
A legislation monitoring agent reads each alert, fetches the acts from the official national legislation portal, judges their relevance to labor law and updates the knowledge base.
No precedent system; decisions consolidated by hand every month.
A case lifecycle that feeds the knowledge base: only cases a lawyer closes with a real outcome become precedent, and the history is searchable in natural language.
An AI answer is a liability if nobody can correct it or own it.
Assistive, not authoritative. A lawyer reviews, edits and sends every document and keeps legal responsibility. Any cited law or precedent can be unchecked and the analysis rerun.
The lawyer describes a matter and attaches the documents. The assistant returns the same seven-section analysis every time, then an editable Word draft from the department’s own templates.
Seven fixed sections, always in the same order: case summary; legal framework (laws and articles, with EU rules as transposed into national law); recommended actions; legal arguments; vulnerability analysis (weak points and the counter-arguments to expect); required documents; and relevant jurisprudence (similar internal cases, newest first, plus external decisions marked “External”). The lawyer can uncheck any law or precedent and the next run excludes it: a structured way to correct the agent without prompt engineering.
Once the analysis is right, the lawyer presses “Generate document” and picks a template: a formal viewpoint for authority controls; an employee summons, final report or sanctioning decision for HR; a criminal complaint; written notes for litigation; a substantiation note, a dissolution decision or a termination decision. The template carries the company header, mandatory sections and closing formula; the agent writes the content.
The knowledge base is seeded with ~30 labor-law acts chosen by the legal team. Each daily alert email triggers the agent, which tracks new labor-law acts and adds or updates them. The source is an alert the team already paid for plus a free official portal, so the corpus stays current without a commercial legislation contract. Lawyers see exactly which acts the agent is reading.
Internal regulations, procedures and external jurisprudence are uploaded per category, and the agent writes a three-to-five-line summary of each so the lawyer can confirm it is understood. Versions are replaced, never merged.
Every case the lawyer closes with a real outcome flows back in as precedent. Over time, the department’s own history becomes the agent’s jurisprudence.
Leave and resume
A case starts as a Draft the lawyer can leave and resume days later, a status that exists because one lawyer described being called to another floor mid-analysis.
The lawyer’s document of record
Saved as final, it becomes Pending, and the lawyer’s final edited document, not the AI draft, becomes the document of record.
Precedent, human-closed
Once the real-world outcome is known, it becomes Resolved, turns read-only and is indexed into the knowledge base. Only human-closed cases become precedent, so the agent never learns from unvalidated output.
In law you cannot defend yourself with ignorance of the law.
The business side moved fast: all requirements were validated in a 1-hour second workshop, and the third was skipped as unnecessary.
Kick-off
6 May
Scope, success criteria and governance agreed. Acceptance criteria fixed before the first workshop.
Discovery
5 June
Workshop 1 dropped three assumptions from the original vision (three case modes, handwritten documents, a “save once” lifecycle) and flagged the legislation source as the top risk. Workshop 2 validated all requirements, five case categories and the templates. The final alignment fixed the ~30-act labor-law baseline and the alert-driven monitoring flow.
Build
3 July
Built in 2 sprints, in under 3 weeks.
UAT
28 August
About six weeks. Testing capacity on the client side was at times limited, and data anonymization raised challenges that required improvements to the agentic solution.
Live
31 August
Live for the legal team.
Agreed at kick-off, by request complexity: the time a request takes today, and the target.
What the project created as reusable assets: patterns that travel to any regulated in-house team with a dense, moving body of rules, whether compliance, HR or procurement.
A legal corpus that keeps itself current from public sources and alerts the client already receives.
Scope a legal agent by the law it reads, not the cases it handles, and put the data-source decision on the critical path with its own owner and date.
“Uncheck this law” beats “rephrase your prompt”.
Only human-validated outcomes become precedent, so the knowledge base never learns from its own drafts.
The legal assistant, Phase 1, is the proof point, and the third project the company and FlowX.AI have delivered on the same identity provider. Phase 1 covers labor law by design. The rest of the original vision is the natural extension: pharmaceutical and commercial law, handwritten inspector minutes, an admin role. Each adds a corpus and a source; the four agents, the seven-section output, the lifecycle and the precedent loop stay the same.
The deeper change is not speed. Before go-live, the company’s legal knowledge lived in four heads and an archive. Every case closed in the assistant now becomes a precedent the next lawyer, or the next hire, can see, with the law it relied on and the outcome it produced.
For the first time, the department has a place where its experience accumulates instead of leaving with the people who hold it.
FlowX.AI is the enterprise orchestration platform that enables regulated institutions to deploy deterministic, source-traceable agentic workflows on top of legacy infrastructure. Companies run critical customer and operations journeys on FlowX.AI, including:
Bring a regulated team with a dense, moving body of rules and we will show you a path to production, with every source on record and the expert in charge of every decision.