All templates
Pharmacystarter
Pharmacy Reorder Suggester
Watches medication stock, drafts purchase orders to the right supplier, asks pharmacist to approve in Slack.
Problem it solves
Manual stock tracking causes stock-outs of essential medicines (atropine, adrenaline, etc.). The pharmacist is reactive, not proactive.
Trigger
cron
Every 6 hours via Supabase scheduled functions
Time to ship
1 week (we shipped this in 2 hours)
Data sources
3
medicine_master.stock + reorder_level (HMS DB)
Inputs
- 1.medicine_master.stock + reorder_level (HMS DB)
- 2.suppliers table (HMS DB)
- 3.Threshold SOP (Markdown in vault)
Outputs
- 1.Slack alert per below-threshold drug
- 2.Draft purchase_orders row with supplier + qty
- 3.agent_audit_log entry with rationale
Scoring checklist
Every agent output is checked against these BEFORE a human reviews it. The agent self-loops on misses.
- Every PO has a non-null supplier
- Quantity rounds up to pack-size
- No quantity exceeds 180-day supply
- Emergency drugs (atropine/adrenaline) flagged for human approval
- Supplier matches medicine_master.supplier_id
Real reference
Hope Multi-Specialty Hospital is running this template in production right now. See case study
Build this against your own data
The wizard's Step 7 walks through every command — schema probe, bootstrap SQL, Edge Function template, deploy, smoke test.
Open Step 7 — Ship First Agent