Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VigiPlugns — Statutory PV Evidence Engine (MVP running)

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.


What works today (verified on this machine)

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)

Quick start

cd E:\ai-safety
python -m vigipharm.cli --drug metformin --events 12

Expected: gather openFDA counts → run the engine → fresh-kernel verify → pv/artifacts/metformin-signal-report.md + pv/manifests/metformin.json.

MCP surface

python -m vigipharm.mcp_server

UI

streamlit run vigipharm/ui_app.py

Agent (LLM) mode — uses bioworld .env keys / provider

python -m vigipharm.cli --agent "Run a signal review for metformin"

Provider switch (same as BioWorld): set BIOWORLD_PROVIDER=openrouter|gemini|groq|ollama.


Repo layout

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)

The demonstrable claims (what the demo proves)

  1. Deterministic. Same inputs + code => same output, on any machine.
  2. Verifiable. Fresh-kernel re-run reproduces every reported field 0-tolerance (the layer Veeva/RXLogix do not ship).
  3. Public-only. No licensed/private clinical data anywhere in the stack.
  4. Recurring statutory. Monthly signal-eval + PSUR deliverable maps to EMA GVP Module IX + EU AI Act Art.10 traceability.
  5. 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.


Release 0.1.0

  • 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages