-
-
Vigilance ‘Q’: a UiPath Maestro-powered batch quality watchtower for detecting pharma quality drift before failure.
-
Case APP: One batch, one live Maestro case: PTC-006 tracked from intake through QC, recommendation, review, and closure.
-
Maestro Case: dynamic stages, parallel signal/trend analysis, evidence review, human gate, and governed closure.
-
QA Decision Gate: the agent recommends, but human QA reviews evidence and decides before system updates.
-
Batch PTC-006 looks acceptable in isolation, but weak signals accumulate across stages. Vigilance ‘Q’ connects them into one governed case.
-
Reference architecture: every signal becomes case evidence, every recommendation hits a human gate, and every system update is approved.
Inspiration
Somewhere, a patient is waiting for medicine.
Not because the drug does not exist. Not because science failed. But because somewhere upstream, a manufacturing batch was delayed, rejected, or held under investigation, leaving the supply chain with no room to absorb the shock.
In Q1 2024, the U.S. reached 323 active drug shortages. Many shortages are connected to manufacturing disruption, quality issues, and fragile supply chains.
A failed pharma batch is not just a lab result. It can mean destroyed product, delayed supply, regulatory exposure, environmental disposal burden, and patients waiting.
Public cases like Ranbaxy remind us what happens when quality records, evidence, and governance fail. Quality failures can become operational, legal, financial, regulatory, and patient-safety crises.
But most batch failures do not happen suddenly.
A batch drifts first.
One result trends slightly low. One moisture value creeps upward. One dissolution result moves closer to limit. One calibration record is missing. One prior deviation is not connected.
Each signal may look harmless alone. Together, they tell the real risk story.
Today, QA reviewers are often forced to become the integration layer: searching LIMS, MES, SAP, QMS, SOPs, emails, spreadsheets, screenshots, and historical records manually.
That is not quality intelligence. That is evidence hunting.
We built Vigilance ‘Q’ because automation should do more than save hours.
It should help save batches, protect patients, reduce waste, and turn scattered quality signals into governed, evidence-backed decisions.
A batch rarely fails suddenly. It drifts first. Vigilance ‘Q’ catches that drift before it reaches the patient.
What it does
Vigilance ‘Q’ is an agentic batch quality case management system built on UiPath Maestro.
It converts scattered pharmaceutical quality signals into one live, governed Maestro Batch Quality Case - from the first weak signal through final audit closure - with human QA in control of every critical decision.
The problem it solves:
Today, there is no single live case for a batch. Vigilance ‘Q’ creates one.
Our demo follows Batch PTC-006: Paracetamol 500mg immediate-release tablets.
PTC-006 does not fail dramatically. It drifts:
previous batches show weakening assay trend in-process moisture moves near limit hardness drifts upward final QC assay is near lower specification limit dissolution is borderline related substances are rising
Every individual result is technically within specification. No single alarm fires. But together, the pattern shows accumulating risk.
Vigilance ‘Q’ opens a Maestro Batch Quality Case when the first signal arrives.
Inside the case:
- Batch Data Completeness Validation: RPA workflow that validates incoming batch data (batch ID, product, phase, test/signal, result date, status, analyst, instrument) and checks everything required is present.
- Quality Signal Analysis Agent (runs at Pre-Manufacturing, In-Process QC, and Final QC): evaluates records against that phase's governed rules (Pre-Manufacturing Readiness Rules, In-Process QC operating rules, Final QC Specification Rules), classifying outcomes as Passed, Watchlist, or Out of Specification.
- Trend Analysis Agent (runs at Pre-Manufacturing, In-Process QC, and Final QC): compares current results against historical batch performance to detect drift, flagging Out of Trend when pattern and threshold criteria are both met.
- Evidence workflows: write both agents' findings into the case's Evidence entity for that phase.
- Evidence Validation: the app a quality reviewer uses in Evidence Review to confirm the agents' evidence is complete and accurate, correct it if needed, and decide whether the batch can proceed.
- Recommendation Agent: consolidates evidence from all three QC phases against the Recommendation Review Rules and produces a risk level, summary, and suggested action: Proceed or Place on Hold.
- QA Notification: emails the finalized case, evidence, and decision to QA once closed.
If batch data is incomplete, the case is sent to Data Completion Review for correction, then returns to Batch Intake for re-validation. After every phase, evidence routes to Evidence Review for human validation, and once confirmed it always reroutes back to the QC stage. The Recommendation Agent provides a suggestion, while QA makes the final decision in Human Final Stage Review. After approval, downstream systems are updated and SLAs track every stage for a complete audit history.
AI investigates. Human QA decides. Systems update only after approval.
How we built it
We built Vigilance ‘Q’ with UiPath Maestro as the center of the solution.
We did not build a chatbot. We did not build a simple QC checker. We did not build a fixed BPMN flow.
We built a live Maestro Batch Quality Case.
The core design:
One batch = one live Maestro Batch Quality Case. Stages activate as signals arrive. The first signal creates the case. Every later signal strengthens the case.
UiPath components used:
| Component | What it does |
|---|---|
| UiPath Maestro Case | Orchestrates the end-to-end case. Manages stages, routing, human tasks, the audit trail, and built-in SLA timers and escalations at both the case and stage levels. |
| UiPath Orchestrator | Hosts and runs every RPA process, App, and Agent referenced in the case (via folder-path bindings), and provides execution logs/traceability for them. |
| UiPath Coding Agents | Used to accelerate the development of individual RPA workflows and agents by leveraging Gemini CLI and Codex. Assisted in generating, refining, and maintaining workflow logic and agent implementations. |
| UiPath Agents | Quality Signal Analysis Agent, Trend Analysis Agent, and Recommendation Agent. Low-code agents checking data against fixed, version-controlled rules. The first two run at every QC phase. |
| UiPath RPA workflows | Retrieve records, validate batch data, write corrected data back, and save agent results as evidence. No decisions, just data movement and checks. |
| UiPath Apps + Action Center | Human-facing screens: Data Review & Verification for fixing batch data, Evidence Validation for checking agent results, Quality Review for the final QA decision. |
| UiPath Data Fabric | The database behind everything. Stores LIMS records, Historical Trend, and Evidence. Also triggers the case when a new batch starts. |
| UiPath Integration Service | The connector layer behind both the LIMS trigger and the Outlook email step - handles the event trigger and the outbound Send Email activity. |
| UiPath Cloud Robots - Serverless | Executes RPA processes without requiring dedicated unattended machine |
In pharma quality, classification must be reproducible, attributable, timestamped, and inspectable. An LLM should not decide whether a batch signal is OOT or OOS. A controlled rule running in a agent can.
Structured rules decide. SOP context explains. Human QA approves.
Challenges we ran into
The biggest challenge was deciding where agents should act and where they should not. In agentic development, the temptation is to make the AI more autonomous. In pharmaceutical QA, that can become a compliance risk. We originally explored more flexible reasoning for classification, but rebuilt the Signal Classification Agent as a coded, rule-traceable implementation. That was harder, but it made the solution stronger.
Less agentic in the right place is better architecture.
Another challenge was making Maestro Case the hero of the demo. Early versions looked too much like agent logs. We restructured the experience so the Maestro case appears first: Case ID, Batch, Risk Level, SLA, Stage, Evidence Status, Human Task, and Audit State. Every agent action now happens inside the case.
The case is the product.
The hardest design pattern was evidence exception routing. When evidence is missing, the case must pause, route to a human, wait for resolution, validate the update, and resume without losing state or audit history. That is exactly where Maestro Case became valuable.
Accomplishments that we're proud of
We are proud that Vigilance ‘Q’ is not another automation demo about saving effort.
It is automation with a purpose: protect product value, reduce waste, support patient supply, and make regulated decisions provable.
We are especially proud of:
- A QA-trustworthy architecture with deterministic classification, human gates, controlled updates, and audit trail by design.
- A realistic demo case where PTC-006 is not obviously failing, but shows accumulating risk.
- Zero LLMs in the quality decision chain with classification and quality decisions are rule-based and traceable.
- Maestro Case as the center where every signal, task, recommendation, decision, update, and audit record lives.
- Business value beyond FTE savings with Vigilance ‘Q’ save batches, not just hours.
- A reusable regulated-enterprise pattern for deviations, OOS/OOT investigations, complaints, supplier quality, and other governed case processes.
Traditional automation saves effort. Vigilance ‘Q’ helps save the batch.
What we learned
We learned that Maestro Case is the right tool for unpredictable, evidence-heavy processes.
Pharma QA is not a straight-line workflow. Evidence gaps, drift classifications, missing documents, expired calibration, QA decisions, and human overrides create branches that cannot all be mapped cleanly in advance.
That is what case management is for.
We also learned that the human gate is not a limitation.
The human gate is the feature.
The most important moment in the demo is not an agent generating an answer. It is QA reviewing the evidence, reading the recommendation, documenting a decision, and approving the next action.
That is what makes Vigilance ‘Q’ trustworthy.
We also learned that evidence is not just the output.
Evidence is the product.
Every agent, human gate, system update, and audit record exists to produce one complete, accurate, human-approved evidence trail.
What's next for Vigilance 'Q': The Pharma Quality Watchtower
Next, we want to evolve Vigilance ‘Q’ into a reusable pharma quality case-management accelerator.
Planned next steps:
- Extend upstream into pre-manufacturing readiness by covering calibration, material release, line clearance, analyst qualification, and method readiness.
- Enable multi-batch CAPA support to assess related batch impacts and assist in drafting corrective and preventive actions.
- Build validated integrations with LIMS, MES, SAP/ERP, QMS, and document management systems.
- Expand configurable rule libraries to support additional products, dosage forms, analytical tests, regulatory markets, investigation thresholds, and investigation types.
- Strengthen audit and compliance dashboards with enhanced visibility into quality metrics, investigation status, and operational performance.
- Prepare for enterprise deployment with GxP-aware validation, RBAC, comprehensive audit logging, electronic records, and a production-ready architecture.
The architecture pattern is bigger than one demo:
Dynamic case. Deterministic classification. Evidence assembly. Human decision gates. Governed system updates. Audit-ready closure.
Somewhere, a patient is waiting for that medicine.
Vigilance ‘Q’ makes sure the signal is caught, the evidence is assembled, the human decision is made, and the batch moves forward safely.
Beyond efficiency. Beyond compliance. This is what automation looks like with a purpose.
Built With
- action-center
- agent-builder
- case-management
- context-grounding
- data-fabric
- orchestrator
- robots
- studio-web
- uipath-apps
- uipath-automation-cloud
- uipath-maestro

Log in or sign up for Devpost to join the conversation.