I have a Discord server where my AI agent lives. One day I realized: I should have a doctor on call. Not a real one (obviously), but an agent that can take a symptom, ask the right follow-up questions, and give me an evidence-based read on what might be going on — sourced from actual medical literature, not WebMD panic spirals.
So I turned a Discord channel into a walk-in clinic.
Here’s how it’s wired up.
The Channel
Just a regular Discord text channel named #clinic in my server. No special permissions, no bots, no webhooks. The channel ID is 1496150919644184586 — that’s the only identifier Hermes cares about.
Anyone in the server can post a medical question there. No @mention needed — Hermes responds automatically.
The Config (Three Things)
Everything happens in ~/.hermes/config.yaml. Three sections make this work:
1. Free Response
| |
Adding the channel ID here tells Hermes to respond to every message in #clinic without waiting for a mention. For a clinic channel, this is essential — you don’t want to type @Hermes when you’re describing symptoms. It should feel like talking to a doctor, not invoking a CLI.
2. Channel Prompt (The Personality)
| |
This prompt defines the agent’s identity and clinical methodology. The personality is warm, empathetic, and professional — not cold or robotic. It’s designed to ask follow-up questions before jumping to conclusions, always screen for red flags, and cite real sources.
The six-step diagnostic approach (Gather → Differentiate → Investigate → Treat → Educate → Follow-up) mirrors real clinical reasoning. The red flag section is critical — the agent knows when to tell you to stop chatting and go to an actual hospital.
3. Skill Binding
| |
This auto-loads the physician-agent skill on every message in #clinic. The skill contains detailed clinical workflows, reference tables (vital signs, lab values, scoring systems), and a medical calculator script. The agent doesn’t need to be told to load it — it’s injected into every conversation automatically.
The Skill
The physician-agent skill lives at ~/.hermes/skills/healthcare/physician-agent/ and contains three files:
SKILL.md — The core skill definition: role, diagnostic workflows, SOAP note templates, clinical scoring systems (GCS, qSOFA, Wells, CHA₂DS₂-VASc), drug reference patterns, and red flag checklists.
references/clinical-quick-ref.md — A cheat sheet of normal ranges, common lab values, and scoring system details so the agent has instant access to reference data without searching.
scripts/medical_calc.py — A CLI calculator for quick clinical math:
| |
It handles BMI, MAP, Creatinine Clearance, eGFR, Corrected Calcium, Anion Gap, GCS, qSOFA, and CHA₂DS₂-VASc — the most commonly needed point-of-care calculations.
How It Works in Practice
You post a message in #clinic. Hermes picks it up, loads the physician-agent skill, and the Dr. MedAI persona takes over. The agent follows the diagnostic framework:
Here’s a real session from the logs:
utopictown: i seem to have bisul/jerawat in my armpit, what happened?
[23.7 seconds later]
Dr. MedAI: [gathers more history, asks about pain scale,
duration, discharge, fever, recent activities]
utopictown: baru pagi hari ini, skala sakit 3, tidak ada nanah
saat ini cuma benjol gunung aja
[28.1 seconds later]
Dr. MedAI: [differential diagnosis: furuncle vs folliculitis vs
hidradenitis suppurativa, evidence-based treatment plan,
red flag screening, follow-up timeframe]
The turnaround is under 30 seconds for a full diagnostic response with sourced recommendations. No API keys to manage, no separate service to deploy — it’s just a Discord channel with a YAML config.
Why Discord?
I could have built a web app. But Discord was already the hub for everything else — my AI agent lives there, my cron job outputs land there, my coding sessions happen there. Adding a clinic channel costs nothing: no frontend to build, no auth to manage, no deployment pipeline. It’s a text file edit and a gateway restart.
The channel format also means conversations are threaded (auto-thread is on), searchable, and persistent. I can scroll back through my medical history if I need to reference a previous assessment.
The Mandatory Disclaimer
Every response includes a disclaimer. This isn’t optional — it’s baked into the personality prompt:
⚠️ This is educational guidance only. Not a substitute for professional medical evaluation. In an emergency, call your local emergency services immediately.
The agent is not a doctor. It’s an evidence-based triage tool that helps me understand what might be going on and whether I need to see a real physician. The red flag screening is designed to err on the side of caution — if you describe chest pain with radiation, the agent won’t try to diagnose you. It’ll tell you to go to the ER.
The Stack
| Component | Choice |
|---|---|
| Platform | Discord (existing server) |
| Agent | Hermes (personal AI agent) |
| Channel config | config.yaml — free response + channel prompt + skill binding |
| Skill | physician-agent with clinical workflows, reference tables, medical calculator |
| Personality | Dr. MedAI — board-certified physician persona |
| Sources | PubMed, Cochrane, NEJM, Lancet, BMJ, Medscape, ClinicalTrials.gov |
| Tools | medical_calc.py for BMI, CrCl, eGFR, GCS, qSOFA, CHA₂DS₂-VASc |
What I Learned
1. Personality engineering matters more than prompt engineering. The diagnostic framework (Gather → Differentiate → Investigate → Treat → Educate → Follow-up) is useful, but what makes the agent feel like a doctor is the personality definition: warm, never rushes to diagnosis, always screens for red flags. That constraint produces better conversations than any amount of clinical knowledge.
2. Auto-loading skills removes friction. Binding physician-agent to the channel means you never have to type /skill physician-agent before asking a medical question. The agent just knows what context to use.
3. Free response is the right UX for a clinic. Requiring @Hermes before every message kills the immersion. You don’t shout a doctor’s name before describing symptoms — you just talk. The channel should feel the same way.
4. The calculator script earned its keep. Having a pre-built CLI for clinical math means the agent doesn’t burn tool calls computing BMI or GCS inline. It’s one command, one result, zero errors.
Next Steps
The clinic channel works, but there’s room to grow:
- Session memory — currently each message is stateless. Adding persistent patient history would let the agent track symptoms over time
- Drug interaction checking — cross-reference medications using the Medscape or OpenFDA APIs
- Image analysis — upload a photo of a rash or wound and have the agent analyze it visually
- Appointment reminders — combine with the cron scheduler to send follow-up check-in messages
For now, I have a doctor in my Discord server. It cost me a YAML file, a Python script, and an afternoon. That’s the kind of ROI that makes AI agents worth building.