From Manual Exceptions to Automated Recovery: How a Pharma Company Achieved 99.7% Batch Completion
Overview
Veridian Pharmaceuticals, a mid-size pharmaceutical manufacturer with 600 employees and three production facilities, was losing $2.3 million annually to batch failures in its solid-dosage manufacturing lines. A 12% exception rate — driven by viscosity deviations, temperature excursions, and raw material variability — stalled production while operators waited for supervisor review that averaged 45 minutes per incident. By deploying Structured Workflow Engine (Planning Architecture) alongside Dynamic Decision Router (Blackboard Architecture), Veridian automated exception classification, recovery execution, and compliance documentation, raising batch completion from 88% to 99.7% and saving $1.8 million in the first year.
The Challenge
Veridian Pharmaceuticals produces 14 branded and generic solid-dosage medications across three manufacturing facilities in New Jersey and North Carolina. Each product follows a batch manufacturing record (BMR) consisting of 18 sequential processing steps — from raw material dispensing through granulation, blending, compression, coating, and final packaging. The company runs approximately 1,400 batches per year across its three sites, with an average batch value of $165,000 in finished product.
The problem was what happened between the steps. Pharmaceutical batch manufacturing is not a continuous flow — it's a series of checkpoints where in-process parameters must fall within validated ranges before production can advance. Granulation moisture content must be between 1.8% and 2.4%. Tablet compression hardness must hold at 8-12 kiloponds. Coating pan temperature must stay within a 2-degree Celsius window. When a parameter drifts outside its range, the batch enters an exception state.
In 2025, Veridian's three facilities recorded exceptions on 12% of all batches — roughly 168 per year. Each exception triggered the same manual protocol: the line operator flagged the deviation, paused production, and paged a shift supervisor. The supervisor reviewed the parameter data, consulted the batch record, assessed whether the deviation was recoverable, and either authorized a corrective action or escalated to quality assurance. That review averaged 45 minutes. If the supervisor was handling another deviation, or was in a meeting, or was off-shift, the wait stretched to two hours or more. The production line sat idle the entire time.
"The operators knew exactly what to do for 80% of those exceptions," said Robert Tran, VP of Manufacturing at Veridian Pharmaceuticals. "A viscosity reading 0.3 points above range? Adjust the water addition rate and re-test. They'd done it a hundred times. But the SOP required supervisor sign-off before any corrective action, and the supervisor had to document the deviation, the rationale, and the corrective action in the batch record. So everyone waited." The 45-minute average wasn't a reflection of decision complexity — it was the overhead of a documentation and approval process designed for the worst case applied uniformly to every case.
Beyond the production delays, the documentation burden was substantial. Every deviation required a completed deviation report — a form that referenced the batch record step, the observed parameter, the specification range, the corrective action taken, the justification, and the authorizing signature. Under FDA 21 CFR Part 11, these records must be attributable, legible, contemporaneous, original, and accurate (ALCOA). Veridian's quality team estimated that its manufacturing staff spent 1,200 hours per year writing, reviewing, and filing deviation reports. Three audit observations in the previous two years cited documentation inconsistencies — not procedural failures, but paperwork errors in how corrective actions were recorded.
The Solution
Structured Workflow Engine (Planning Architecture)
The Planning Architecture excels at decomposing multi-step processes into ordered sequences with decision logic at each node. Veridian deployed the Structured Workflow Engine to encode its 18-step batch manufacturing process as a directed graph, with each step's in-process control parameters, acceptable ranges, and validated corrective actions represented as structured data rather than prose in a paper BMR.
When a parameter reading arrives from the process control system, the Structured Workflow Engine evaluates it against the current step's specifications. If the reading is within range, the engine advances the batch to the next step and logs the result. If the reading is out of range, the engine classifies the exception by type (viscosity, temperature, hardness, moisture, weight, or dissolution), magnitude (minor: within 10% of range boundary; moderate: 10-25% outside; severe: greater than 25% or safety-critical), and recoverability (recoverable with validated corrective action, recoverable with engineering assessment, or non-recoverable).
For minor, recoverable exceptions — which accounted for 74% of all deviations at Veridian — the engine selects the validated corrective action from its knowledge base, executes the adjustment through the process control system, schedules a re-test, and documents the entire sequence in a Part 11-compliant deviation report. The operator sees a notification: "Granulation moisture at 2.6% (spec: 1.8-2.4%). Corrective action: extended drying cycle, 4 additional minutes at 62 degrees C. Re-test scheduled at completion. Deviation report DR-2026-0847 generated." The line keeps moving.
For moderate and severe exceptions, the engine escalates to the appropriate level — shift supervisor for moderate deviations, quality assurance for severe — but with a pre-assembled diagnostic package that includes the parameter history for the current batch, comparable parameter data from the last 20 batches of the same product, the proposed corrective action and its validation basis, and a pre-drafted deviation report that the supervisor reviews and approves rather than writes from scratch. That pre-assembly reduced supervisor review time from 45 minutes to 11 minutes for escalated cases.
Dynamic Decision Router (Blackboard Architecture)
Not every exception fits neatly into a classification matrix. Pharmaceutical manufacturing involves interactions between parameters that simple threshold logic misses. A viscosity reading that is technically within range might still indicate a developing problem if the ambient humidity has shifted, the raw material lot has different particle size distribution, or the granulation endpoint was borderline on the previous step.
The Dynamic Decision Router uses the Blackboard Architecture to maintain a shared context — the "blackboard" — where multiple specialist agents post observations, read each other's findings, and contribute to a collective assessment. Veridian deployed four specialist agents on the blackboard: a Process Trend Agent that monitors parameter trajectories across the full batch history, a Material Variability Agent that tracks lot-to-lot differences in raw material characteristics, an Environmental Agent that correlates facility conditions (humidity, temperature, vibration) with process behavior, and a Historical Pattern Agent that compares the current batch's profile against the 200 most recent batches of the same product.
When the Structured Workflow Engine encounters an ambiguous exception — a parameter reading that is borderline, or a corrective action that did not fully resolve the deviation on re-test — it posts the case to the blackboard. Each specialist agent evaluates the situation from its perspective and posts its assessment. The Process Trend Agent might note that viscosity has been trending upward across the last three batches, suggesting a systematic drift rather than a one-time excursion. The Material Variability Agent might flag that the current raw material lot has 8% finer particle size distribution than the lot used in process validation. The Historical Pattern Agent might identify that this specific combination — upward viscosity trend plus finer particle size — preceded a failed dissolution test on a batch six months ago.
The Dynamic Decision Router synthesizes these assessments into a recommendation: adjust the process parameter preemptively, hold the batch for additional testing, or escalate to engineering with a specific hypothesis to investigate. The blackboard's transparency is critical for regulatory compliance — every agent's contribution is logged, creating a clear decision trail that auditors can follow.
The two architectures divide the problem cleanly. The Structured Workflow Engine handles the 86% of situations that are well-characterized and have validated responses. The Dynamic Decision Router handles the 14% that require contextual judgment — cases where threshold-based logic alone would either miss a developing problem or trigger unnecessary escalation.
The Results
Veridian tracked batch manufacturing performance for twelve months following full deployment across all three facilities, comparing against the prior twelve-month baseline.
- Batch completion rate increased from 88% to 99.7%. Of 1,412 batches produced in the measurement period, only 4 required termination — all due to raw material contamination events that correctly triggered non-recoverable classifications.
- Operator interventions reduced by 78%. Of the exceptions that previously required manual handling, 74% were resolved automatically by the Structured Workflow Engine and 4% were resolved through Dynamic Decision Router recommendations accepted by operators without escalation.
- Supervisor review time for escalated cases dropped from 45 minutes to 11 minutes, thanks to pre-assembled diagnostic packages and pre-drafted deviation reports.
- Batch documentation generation fully automated and 100% Part 11 compliant. The three audit observations from the prior period — all related to documentation inconsistencies — were eliminated. Veridian passed an FDA inspection in August 2026 with zero documentation findings.
- $1.8 million in annual savings from reduced batch failures ($1.1M), reduced documentation labor ($420K), and reduced production line idle time ($280K).
The system reached steady-state performance within six weeks. The first two weeks were spent encoding corrective action protocols for each product line. Weeks three and four ran in shadow mode — the system generated recommendations that operators could compare against their own judgments without the system taking action. Full autonomous operation for minor recoverable exceptions began in week five.
"The system handles exceptions the way our best operators would — if our best operators had perfect memory of every batch we'd ever run and could read four data streams simultaneously. The difference is it does it in seconds, and the documentation is done before the operator even looks at the screen. Our people are still making the hard calls. They're just not buried in paperwork for the easy ones anymore." — Robert Tran, VP of Manufacturing, Veridian Pharmaceuticals
Key Takeaways
- Most manufacturing exceptions are routine, but they're treated as novel. Veridian's operators knew the correct response for 74% of deviations. The bottleneck was the approval and documentation process, not the decision itself. Automating well-characterized responses freed human judgment for cases that actually need it.
- Context transforms exception handling from reactive to predictive. The Dynamic Decision Router's blackboard approach detected developing problems — like the viscosity trend combined with material variability — that threshold-based systems would miss until they became actual failures.
- Compliance documentation is a data problem, not a writing problem. The 1,200 hours Veridian spent annually on deviation reports reflected the effort of transcribing structured data into narrative form. When the system generates documentation directly from process data and decision logs, compliance becomes a byproduct of operation rather than a separate activity.
- Composing architectures matches system design to problem structure. The Structured Workflow Engine handles the deterministic majority — known exceptions with validated responses. The Dynamic Decision Router handles the probabilistic minority — ambiguous cases requiring multi-factor judgment. Forcing either architecture to cover both domains would produce a system that is either too rigid or too slow.
Ready to Explore Structured AI Workflows for Your Manufacturing Operations?
If your production lines stall while operators wait for approvals they already know the answer to — or if your deviation documentation consumes hours that should go to production — the constraint is process design, not workforce capability. Agentica's Structured Workflow Engine and Dynamic Decision Router integrate with existing process control and MES systems to automate exception handling while maintaining full regulatory compliance. Schedule a consultation to discuss how structured AI workflows apply to your manufacturing environment.