A personal health advisor that lives in your Discord server. Tracks symptoms, manages your supplement stack, researches topics on demand, and proactively surfaces longevity research weekly.
- Go to https://discord.com/developers/applications
- Click New Application → name it "Health Agent"
- Go to Bot (left sidebar) → click Add Bot
- Under Token → click Reset Token → copy it (you only see it once)
- Scroll down to Privileged Gateway Intents → enable:
- ✅ Message Content Intent
- Go to OAuth2 → URL Generator:
- Scopes: ✅
bot - Bot Permissions: ✅
Send Messages,Read Message History,View Channels
- Scopes: ✅
- Copy the generated URL → open it in browser → add bot to your server
In your server, create these channels (or use existing ones):
#health— main conversation channel#research— weekly research digests land here
pip install -r requirements.txt
ollama pull llama3 # or your preferred model
Set your bot token as an environment variable:
export DISCORD_BOT_TOKEN="your_token_here"
# Optional: customise channel names (defaults shown)
export HEALTH_CHANNEL_NAME="health"
export RESEARCH_CHANNEL_NAME="research"
To make the token persist across reboots, add to your ~/.bashrc or ~/.zshrc:
echo 'export DISCORD_BOT_TOKEN="your_token_here"' >> ~/.bashrc
python bot.py
To keep it running permanently:
# Using screen
screen -S health-agent
python bot.py
# Ctrl+A then D to detach
# Or using nohup
nohup python bot.py > logs/bot.log 2>&1 &
I have a sore throat since yesterday
Should I take zinc with my current stack?
I've been feeling fatigued for 3 days
Research lion's mane for cognitive function
Tell me about berberine
!stack view your supplement stack
!add Vitamin D 5000IU daily for immune support
!add Magnesium Glycinate 400mg at night for sleep
!remove Vitamin D
!interactions full stack interaction check
!checkin 7 8 7.5 log mood/energy/sleep (out of 10)
!checkin 6 5 6 felt foggy, mild headache
!history recent symptoms + advice log
!research ashwagandha deep research on a topic
!summary monthly health trend summary
- 8am daily — morning check-in prompt
- Sunday 9am — weekly research digest posted to #research
- 1st of month — monthly trend summary
health-agent/
├── bot.py ← Discord bot + orchestrator
├── requirements.txt
├── agents/
│ ├── router.py ← classifies incoming messages
│ ├── adviser.py ← LLM health advice
│ ├── research.py ← PubMed + longevity feeds
│ └── stack.py ← supplement management
└── data/
├── db.py ← SQLite layer
└── health.db ← created on first run (your data)
In agents/adviser.py, agents/research.py, agents/stack.py:
OLLAMA_MODEL = "llama3" # change to "phi3:mini", "mistral", etc.