Public-data-only, verifier-first, laptop-grade signal & PSUR evidence engine
for pharmacovigilance. Reuses BioWorld OS's key/model config (.env,
BIOWORLD_PROVIDER / BIOWORLD_MODEL), packages its agents as Agent
Plugins 1.0 (plugin.json + SKILL.md + MCP server config), and delivers a
monthly signal-evaluation / PSUR evidence dossier whose every number is
re-derived on a fresh Python kernel and recorded in an auditable manifest.
| Layer | Status |
|---|---|
| Public data (openFDA/FAERS) | ✅ live (metformin → 440k reports), cached |
| PubMed eutils citation desk | ✅ live |
| Signal stats (ROR / PRR / IC / Bayesian small-count) | ✅ deterministic |
| Evidence engine + PSUR narrative render | ✅ |
| Fresh-kernel verifier (+ manifest) | ✅ exact-match re-derive |
CLI python -m vigipharm.cli |
✅ |
| Streamlit UI | ✅ (run streamlit run vigipharm/ui_app.py) |
| MCP server | ✅ (python -m vigipharm.mcp_server) |
| Deep agent (bioworld model) | ✅ wired (provider switch) |
| Agent-Plugins packaging | ✅ (pv/plugins/plugin.json + skills) |
cd E:\ai-safety
python -m vigipharm.cli --drug metformin --events 12Expected: gather openFDA counts → run the engine → fresh-kernel verify →
pv/artifacts/metformin-signal-report.md + pv/manifests/metformin.json.
python -m vigipharm.mcp_serverstreamlit run vigipharm/ui_app.pypython -m vigipharm.cli --agent "Run a signal review for metformin"Provider switch (same as BioWorld): set BIOWORLD_PROVIDER=openrouter|gemini|groq|ollama.
vigipharm/
config.py -> reuses bioworld config (keys/provider/model) + PV paths
pvdata.py -> openFDA/FAERS + PubMed eutils (public only, cached)
signal_stats.py -> ROR / ror + CI, PRR, IC, Gamma-Poisson small-count
engine.py -> orchestrated pipeline; report render; manifests
verifier.py -> fresh-kernel re-derive + exact-match ledger
agents.py -> LangGraph deep agent over the PV tools
mcp_server.py -> FastMCP surface (`vigi-proof-pv`)
cli.py -> deterministic CLI (--drug, --agent, --json)
ui_app.py -> Streamlit demo
pv/
cache/ -> public-data cache (deterministic re-runs)
workspace/ -> run scripts
artifacts/ -> <drug>-signal-report.md, <drug>-signals.json
manifests/ -> auditable manifests (records-keeper)
plugins/ -> Agent-Plugins 1.0 packaging (plugin.json + skills)
- Deterministic. Same inputs + code => same output, on any machine.
- Verifiable. Fresh-kernel re-run reproduces every reported field 0-tolerance (the layer Veeva/RXLogix do not ship).
- Public-only. No licensed/private clinical data anywhere in the stack.
- Recurring statutory. Monthly signal-eval + PSUR deliverable maps to EMA GVP Module IX + EU AI Act Art.10 traceability.
- Portable. Agent Plugins 1.0 packaging: same capability works in Cursor/Copilot/Codex/ChatGPT/VS-Code; MCP exposure for any host.
See docs/DEMO.md for the MVP script and the full end-to-end walkthrough.
- Pinned deps in
requirements-vigiplugs.txt(numpy 1.26.4, pandas 2.2.3). - Install:
pip install -r requirements-vigiplugs.txt. - Verified path:
python -m vigipharm.cli --drug metformin --events 12.