AI agent audit prototype · Built on Stockurai

Quarterly supplier audit decisions

Prepared for Jane Doe · Pharmaceutical manufacturing · December 3, 2026

Sample data for illustration.
DecisionWhich suppliers to audit, monitor or disqualify each quarter
OptionsAudit · Monitor · Disqualify
Data sourcesInspection, CoA and SCAR records, Public FDA 483s and warning letters, Audit calendar and reports
PolicyDisqualify only with quality council; critical suppliers keep a backup
Deploying an AI agent for a decision like this? Request a formal proposal, or describe the agent’s decision to create a custom AI agent audit prototype.
STEP 01

Targets

Targets are what the system watches. Here, they are the suppliers of materials and components, with their category, last audit date and open SCARs from the quality records.
TargetCategoryLast auditOpen SCARsStatus
Vial stopper supplierPrimary packagingMar 20242Active
Filter membrane supplierSterile filtrationAug 20251Active
Lactose supplierExcipientJun 20250Watching
API intermediate supplierAPI intermediateOct 20241Active
Label printerLabelingFeb 20233Active
STEP 02

Target detail

Where the feeds meet: the regulators (FDA 483s and warning letters) and the organization's own quality records (inspection results, CoAs, complaints, SCARs and audit history). Every signal is weighed against both.

Vial stopper lots, last 6 months

MonthLots inRejectedReject rateCoA gaps
Nov 202612216.7%2
Oct 202614214.3%2
Sep 202615213.3%1
Aug 20261317.7%1
Jul 20261417.1%0
Jun 20261200.0%0

Supplier file

CategoryCritical, primary packaging
Last auditMar 2024 (32 months ago)
Open SCARs2, oldest open 68 days
Approved backupYes, qualified Jan 2026
FDA 483sNone found
Feeds
QualityLot rejects, CoA mismatches, complaints, open SCARs · Daily
RegulatoryNew 483s and warning letters by supplier site · Daily
AuditsLast audit date, findings and approved backups · Weekly
STEP 03

Alerts: what the system watches for

Alerts are code-free. Pick a field, an operator and a value. Each alert watches one thing, such as a reject rate, an overdue SCAR or a new 483, and fires when it happens.

Edit alert

Lot reject rate above 10% limit
Lot reject rate (monthly)
Above
10% reject limit
1 Month
PreviewLot reject rate above 10% reject limit

Configured alerts

Reject rate above 10%Quality
CoA mismatch on 2+ lotsQuality
SCAR open more than 60 daysQuality
New FDA 483 or warning letterRegulatory
Last audit older than 24 monthsAudits
STEP 04

Decision logic: alerts, conditions, plays and rules

Alerts evaluate data in real time. Conditions add triggered alerts up to a score, and plays organize the conditions. Rules turn a play’s score into a real-time recommendation on the live feed. The policy gate stops any disqualification the quality council hasn't approved, and any move that would leave a critical supplier without an approved backup. Rules drive the recommendations, not AI.

Play: Audit suppliers showing early signs of trouble

+15Quality is slipping
  • Reject rate above 10%
  • CoA mismatch on 2+ lots
+15Regulator is looking
  • New FDA 483 or warning letter
+10Complaints unresolved
  • SCAR open more than 60 days
+5Audit overdue
  • Last audit older than 24 months

Rules

3+ SCARs open past 60 days, score ≥ 30DISQUALIFY
Score 20–39AUDIT
Score < 20MONITOR

Policy gate

Disqualify approvalQuality council
Critical suppliersApproved backup required first
Max audits per quarter12 supplier audits
STEP 05

Live feed

This is the screen the decision team watches. Each card is a recommendation on one supplier, printed the moment its rule is met, with the score and time it fired.

Audit (2)

Vial stopper supplier  Reject rate 16.7% · Score 30
For-cause audit; 2 SCARs open, last audit 32 months ago
11/20 09:46 AM
Filter membrane supplier  New FDA 483 · Score 25
Audit site; 1 SCAR open, critical supplier
11/20 10:12 AM

Disqualify (1)

Label printer  3 SCARs open 60+ days · Score 30
Send to quality council; backup already approved
11/20 11:02 AM

Monitor (1)

Lactose supplier  Clean lots · Score 0
One CoA mismatch; keep on routine calendar
11/20 08:15 AM
STEP 06

Audit trail: one recommendation, start to finish

Every recommendation is logged and traceable. Anyone can see which inspection results and letters arrived, which conditions were met, who approved the recommendation and how early it came compared with the audit calendar.
Vial stopper supplier — Audit trail

Data received

Quality feed2 of 12 lots rejected in Nov (16.7%); 2 SCARs open
Audits feedLast audit Mar 2024; routine slot Q3 2027
Regulatory feedNo 483s or warning letters found

Play evaluated → rule fired

✓ Quality is slipping (+15)
✓ Complaints unresolved (+10)
✓ Audit overdue (+5)
Score30 → AUDIT
Policy gatePassed: within 12 audits this quarter; no disqualification

Decision

ActionFor-cause audit scheduled for Jan 2027
Approved byQA director, 10:05

Outcome

Routine calendar slotQ3 2027
ResultAudit brought forward about 8 months
STEP 07

Daily flags

A short daily list of things worth a look, separate from the live feed. Rising reject rates, new FDA actions against supplier sites, SCARs going stale and audits falling overdue.
RegulatoryFDA 483 at filter membrane supplier site
Sterile filtration is critical; approved backup on file
QualityVial stopper rejects at 16.7% in Nov
Third month above the 10% limit
QualitySCAR open 68 days at vial stopper supplier
No corrective action reply received
Audits3 suppliers past 24-month audit interval
Fixed calendar has no visit before 2027
STEP 08

ROI scoring and baseline

The optimization engine scores every decision. Every recommendation is measured against the fixed audit calendar by category, and against the earliest point the warning signs were visible. The gap is the ROI you can measure.
TargetDecisionsDays of warningBaselineBest possibleCapturedResult vs baseline
Primary packaging858158066%+43 days earlier
Excipients1144207048%+24 days earlier
API intermediates671309563%+41 days earlier

Baseline: Fixed audit calendar by category. Best possible: Earliest visible warning sign. Sample figures; in a live installation, these come from the organization’s own decisions and data.

STEP 09

AI Agent Decision Data

The agent is one more feed. Stockurai doesn’t call or run the agent. It records every output and scores it against the rules, the decision makers and the outcome, in shadow: flags never block anything.
GradesSupplier risk grader

Grades each supplier's quality risk A to D every week from open SCARs, lot results and regulatory notices.

When it acts: Weekly, before the quality team plans audits; the grade informs the decision and doesn't make it.

Risk grade:ABCD
Suppliers graded45
D grades followed by a finding3 of 3
Policy breaches flagged1
Findings with no warning1

Agent feed: sample records

TimeTargetRisk gradeModelAgent’s reason
11/20 09:40 AMVial stopper supplierCv1.22 SCARs open; reject rate rising for 3 lots
11/20 09:40 AMFilter membrane supplierBv1.2One late SCAR; lot results clean
11/20 09:40 AMLactose supplierAv1.2Clean lots for 4 quarters
11/20 09:40 AMAPI intermediate supplierDv1.23 SCARs open past 60 days; FDA 483 issued

Policy breaches flagged

API intermediate supplier · D
Grade note advised disqualifying a critical supplier with no approved backup
11/06 09:40 AM · Flagged; quality council kept the supplier on Audit

Checked against the policy gate the moment each output arrives.

Grade against what followed, last 4 quarters

GradeSuppliersMajor finding within 2 quartersAvg days of warning
A211–
B14248
C7361
D3374

Lower grades were followed by far more major findings, so the grade separates risk. The single A-grade finding is the one with no warning.

Disagreements, graded on the outcome

TargetAgentRulesDecision makersWhat followedBetter call
Filter membrane supplierCMonitorMonitorMembrane integrity failure 7 weeks laterAgent
Label printerBAuditAuditAudit found no major issuesAgent
Lactose supplierAMonitorMonitorNo findingsTie

Drift

PeriodModelAgreement
Q1v1.078%
Q2v1.1new81%
Q3v1.183%
Q4v1.2new80%

Agreement here is the share of grades that matched what followed. It dipped after v1.2, which grades packaging suppliers more harshly.

Where scoring is limited. A disqualified supplier can't show later findings, so D grades are scored only where the supplier stayed in use. The audit produces scoring and evidence; it doesn’t certify the agent.
STEP 10

Fit and next steps

What we’d check first

Why
  • A repeated quarterly decision with clear choices and approvals
  • Public FDA data plus the organization's own quality records give real signals
To verify
  • How quality records can be exported from the QMS
  • Validation expectations for decision-support tools
Extend with AI
  • Reading CoA documents and SCAR text for early warning signs

Next step: a formal proposal

ScopeThe decision, targets and data feeds
RulesRules and policy gate, written out
ROIHow ROI is measured against the current process
TermsSetup estimate, timeline and license terms
Where it runsThe organization’s own AWS account
Request a formal proposal Create a custom AI agent audit prototype

For IT and data teams: an AI data pipeline

Stockurai is licensed to researchers and institutions for real-time analysis of equity markets, with AI and machine learning built into the process. The same AI data pipeline can be built for this decision.

Design prototype prepared by Stockurai · Sample data for illustration only · stockurai.com