Pharmaceutical capsule filling with AI — the dose drifts before blistering, not after.
Filling hard or soft capsules means cross-referencing exact dose, capsule integrity and active powder traceability with the MES recipe. iLEAN Edge sees every capsule, Connect reads the capsule filler and the checkweigher, and the agent holds the batch before the blister if anything drifts out of that batch's own corridor. The person signs.
Dose uniformity shows up in QC — once the blister strip is already made.
An encapsulation line has three realities that almost never meet at second zero:
- The recipe and the API batch — particle size, bulk density, flowability. They come from the supplier's CoA or from your own granulator. They change from batch to batch, and that changes how the dosing unit behaves.
- What the capsule filler actually does — tamping force, slug fill, residual powder. The PLC has it; it rarely reaches the MES continuously.
- Quality control — AQL sampling for mass and content uniformity (HPLC), 100% checkweigher if there is one. The data lands in different systems, and content sampling takes hours.
By the time a uniformity OOS appears, there are usually thousands of capsules already blistered and packed. The problem is not missing controls — it is that the answer to "what did the capsule filler do on this particular batch?" has to be rebuilt by hand across several systems, and by then it is already scrap or a GMP deviation.
iLEAN does not replace the capsule filler or the checkweigher — it cross-references them.
The problem with capsule dose control is not a lack of equipment — it is information living on islands between the capsule filler, the checkweigher, the MES and the CoA. iLEAN acts as the putty that joins those four stories into one per batch, without asking you to change the line.
Edge sees every capsule at the outfeed. Connect reads the capsule filler, the checkweigher and the API CoA. The agent cross-references them with the recipe and holds the batch before the blister if the corridor breaks. The person signs.
The three iLEAN pieces applied to capsule filling:
- Edge — a terminal with machine vision (CNN) at the capsule filler outfeed. It sees cosmetic defects (telescoping, denting, visible contamination, incomplete closing) that weight cannot see, and flags them unit by unit. It works with no network. If the plant loses WiFi, Edge keeps inspecting and rejecting units.
- Connect — captures the capsule filler's parameters (Bosch GKF, IMA Adapta/Practica, MG2 Planeta/Suprema, etc.) whichever way it can: OPC-UA if it is there, a local computer if the machine is old, a camera on the panel if there is nothing else. It captures the checkweigher, the API CoA, the MES recipe and the data from the granulator or the upstream powder batch.
- Agent — cross-references recipe + the capsule filler's real parameters + the checkweigher curve + the API CoA + the history of conforming batches. If the trend drifts out of the batch corridor, it holds before the blister and assembles the batch record section for the QP. The three safety rings guarantee that release stays a human decision.
Encapsulation on isolated systems vs. cross-referenced encapsulation with iLEAN
| Aspect | Capsule filler + checkweigher isolated | With iLEAN Edge + Connect + Agent |
|---|---|---|
| Cosmetic defect detection | AQL sampling at the outfeed | Edge vision per unit, inline |
| Dose uniformity control | Standalone checkweigher + later HPLC sampling | Curve cross-referenced with recipe + API CoA, continuously |
| Reaction to a deviation | Batch already blistered, OOS opened | Before the blister, batch on hold |
| Intermediate cleaning between batches | Paper checklist | Traced and cross-referenced with the next SKU |
| Batch record for the QP | Rebuilt by hand, days | Dossier ready when the batch closes |
| Operation with no network | n/a | Edge keeps inspecting on the cabinet's own light |
Impact estimate for your plant — to be validated with your numbers.
The block below is an estimate to be validated with the specific data of your plant. We put it forward so the QP and the committee have an order of magnitude; we refine it during the diagnostic.
- Pharma plant with one hard capsule line (HPMC or gelatin), multiple SKUs, 100% checkweigher + AQL for content uniformity.
- iLEAN Edge pilot (vision at the capsule filler outfeed) + Connect (capsule filler, checkweigher, MES, API CoA). First value expected within a few weeks.
- Batches with a uniformity OOS reduced by ≥ 30% against the documented history.
- Indicative payback between 4 and 9 months. The hard lever: a single full GMP deviation avoided (batch on hold, rework, CAPA, QP review, management time).
And the production director's reasonable doubt
“What if the agent stops a line over an alarm that was not real?” — the agent proposes, the person decides. The protocol is: the trend drifts out of the corridor → the agent alerts the shift lead with the most likely cause and the cross-referenced context → the shift lead decides whether to stop, adjust or carry on. Hallucination is a problem of free generation, not of anchored tasks: in reading the PLC against the MES spec, the best models brought error below 1.5% [1]. And even so, what is critical is never decided alone. That is what the three safety rings are for.
[1] OpenAI paper “Why Language Models Hallucinate”, 2025 — on the reliability of AI in anchored tasks.
What people ask about capsule filling with AI
What makes hard capsule filling go wrong?
Three families keep coming back: dose out of spec because the dosing unit has drifted (slug feed, tamping, dosator) or because powder density changed after an API batch change; closing defects (telescoping, half-closed capsules, denting) that the blister strip masks downstream; and cross-contamination between batches with and without an allergen, or with different potencies, when the intermediate cleaning was not fully documented. Outgoing quality controls catch it when there are already thousands of units in the blister strip.
How do you detect a capsule with an out-of-spec dose inline?
By individual weight (checkweigher) on every capsule and by Edge vision on the external appearance. iLEAN Edge adds a layer of judgment on cosmetic defects that weight cannot see — telescoping, denting, visible contamination — and cross-references it with the checkweigher reading and the MES recipe. If the weight trend drifts away from the batch's own corridor (not the absolute spec, but the history of this very batch), the agent raises the alert before it becomes widespread. The person validates the correction.
Does iLEAN integrate with Bosch/IMA/MG2 capsule fillers?
Yes, whichever way each capsule filler allows. Modern ones (Bosch GKF, IMA Adapta/Practica, MG2 Planeta/Suprema) have OPC-UA or proprietary protocols that Connect integrates directly. Older ones have a local computer the data can be pulled from. Very old ones with an analog panel are read with a camera. iLEAN does not force you to replace the capsule filler — it adds the capture and cross-referencing layer the native equipment cannot deliver on its own, and it files everything in the batch record.
What role does Annex 1 play in non-sterile oral solids?
Annex 1 strictly covers sterile products, but its Contamination Control Strategy (CCS) philosophy — continuous capture, continuous evidence, recorded interventions — is moving into oral solids through EU GMP Part I chapter 5 and ICH Q9/Q10. For a capsule line handling high-potency powders or dedicated to sensitizing products, the inspector already asks the same question: how do you demonstrate the intermediate cleaning was complete? where is the data? iLEAN gives you the answer with continuous capture, not with good faith.
How long does an Edge pilot take on an encapsulation line?
First value within a few weeks with an Edge pilot (vision over the capsule filler outfeed) + Connect (capsule filler, MES, checkweigher). Indicative payback between 4 and 9 months depending on how often you get dose uniformity OOS results and on the average cost of a batch on hold. A single GMP deviation avoided covers a good part of the pilot. Rolling it out to more lines is done by your own team with your own trained people — success is when they stop needing us. Estimate to be validated with your numbers.
Other related topics: Pharma blister with AI · Oral solid granulation and compression · Suppositories with AI.
Tell us your case and in 48h we'll send you the estimated ROI of this AI project for your encapsulation line.
We work on your plant's real data, not ours. Diagnostic with no commitment.
Request estimated ROI in 48h See pharma