PharmAgent is a clinical note assistant for pharmacists. It helps turn a patient scenario into a concise French intervention note that can be reviewed and copied into the pharmacy file.
The tool is designed for practical pharmacotherapy questions: hypertension, diabetes, anticoagulation, asthma, dyslipidemia, hypothyroidism, migraine, COPD/MPOC, ADHD/TDAH, and other supported domains as the knowledge base grows. PharmAgent retrieves evidence from local professional documents before drafting; if it cannot find relevant local knowledge, it refuses to provide a clinical recommendation.
PharmAgent supports documentation. It does not replace the pharmacist's clinical judgment.
Pharmacists often need to document a clear intervention quickly while still grounding the recommendation in clinical references. The goal of PharmAgent is to reduce drafting friction without turning the answer into a generic chatbot response.
The expected output is always structured for charting:
- Collecte de données — only the facts provided in the case.
- Analyse — targeted clinical reasoning for this patient.
- Intervention et recommandations — the recommended plan, monitoring, and follow-up.
- Sources — the main references found in the retrieved documents.
- The pharmacist enters a patient scenario and may attach supporting documents.
- PharmAgent retrieves relevant excerpts from the local clinical knowledge base.
- If the retrieved evidence is sufficient, an OpenClaw-authenticated model drafts the note.
- If the evidence is insufficient, PharmAgent returns a refusal note instead of guessing.
The current demo corpus includes parsed French clinical toolboxes covering:
- anticoagulation
- asthme
- dyslipidémie
- diabète
- hypertension artérielle
- hypothyroïdie
- migraine
- MPOC
- TDAH
The PDF-derived content is converted into JSON-LD/RDF source excerpts. Generated clinical source entries are marked for human review before any verified-memory promotion.
npm run check
PORT=3088 npm startThe default generation path expects a local OpenClaw installation already authenticated with OAuth.
Install Python dependencies:
python3 -m venv kg-pipeline/.venv
kg-pipeline/.venv/bin/pip install -r kg-pipeline/requirements.txtValidate JSON-LD:
kg-pipeline/.venv/bin/python kg-pipeline/scripts/validate_jsonld.pyBuild the keyword retrieval index:
kg-pipeline/.venv/bin/python kg-pipeline/scripts/build_embeddings.py --keyword-onlyStage reviewed knowledge to the local graph memory layer:
DKG_AUTH_TOKEN=<token> node kg-pipeline/scripts/stage_working_memory.mjsRun readiness checks:
node bounty/verify-readiness.mjs- PharmAgent is for pharmacist documentation support, not autonomous prescribing.
- Recommendations are limited by the quality and coverage of the local knowledge base.
- Unsupported cases should return a clear refusal rather than an LLM-only answer.
- Do not commit local
.dkg,.openclaw,.env, API keys, OAuth tokens, embeddings, or runtime logs.