God Bot is a local, Ollama-powered Discord AI platform with:
- โ Deterministic tools for finance, fitness, nutrition, math, Wild Rift builds
- โ A Discord chat bot with streaming replies
- โ A web dashboard (live logs, model switcher, memory viewer, plugins, agents, voice toggle)
- โ Long-term memory (SQLite + JSON) and vector memory
- โ A plugin system with sandboxed tools (temporarily running in non-sandboxed mode)
- โ A scheduler for background tasks (heartbeats, plugin reload, memory cleanup, daily reports)
It's built to be your personal "AI OS" running on your own hardware, using your models.
- Streams responses from your local Ollama model (default:
dolphin-llama3:latest) - Chat in channels or DMs
- Image description for attachments
- Personality layer on top of LLM output
- Long-term memory of past conversations (per-user)
Located in deterministic/:
math_tools.pyโ arithmetic, percentages, tips, basic conversionsfinance_tools.pyโ runway, FI age, FIRE-style calculations (more to come)fitness_tools.pyโ 1RM & strength calculations (Epley, etc.)nutrition_tools.pyโ calories/macros helperswildrift_tools.pyโ Wild Rift build loader + deterministic build lookup
These tools are pure Python. When a message matches a deterministic pattern (e.g. specific finance/bench/Wild Rift queries), God Bot:
- Runs the Python tool first
- Returns the exact numeric answer
- Only uses the LLM for explanation or non-numeric reasoning
No hallucinations for math/finance/1RM once a tool is in place.
- Champion builds stored as Markdown in
data/wild_rift_builds/- e.g.
garen.md,vi.md,shyvana.md,jinx.md,leona.md,nasus.md
- e.g.
- Deterministic loader in
deterministic/wildrift_tools.py - Triggers when user asks for a Wild Rift build or mentions specific champs
Easy to extend: just drop a new .md file and the system can pick it up.
- Runway calculator (months/years left at your current burn)
- FI age / time to FI (baseline)
- Designed to be extended with:
- Coast FI, Lean FI
- Inflation-adjusted millionaire timelines
- Drawdown simulators
- Net worth projections
All of this lives in deterministic/finance_tools.py.
- 1RM estimation tools in
deterministic/fitness_tools.py - Basic macros/TDEE helpers in
deterministic/nutrition_tools.py - Extensible so you can add:
- Strength standard checks
- Program generators
- Volume recommendations
- Macro presets
godbot/core/memory.pyโ JSON + SQLite (MemoryDB) for long-term chat historymemory.jsonโ per-user "facts" (stable preferences, jobs, etc.)long_memory.dbโ long-term conversation logsgodbot/core/vector_memory.pyโ vector memory for semantic search
The bot uses a combination of:
- recent chat snippets
- long-term memory
- optional vector search results
โฆto build context for each LLM call.
Core scheduler lives in godbot/core/scheduler.py.
Tasks are registered in main.py (or via scheduled task modules) and can include:
- Heartbeat logs
- Plugin auto-reload checks
- Memory cleanup (dedup + trimming)
- Daily reports to a Discord channel
Runs in the background as an async loop.
The plugins/ directory contains:
plugin_manager.pyโ manages plugin loading, behavior injections, tools- Example plugin:
example_search_tool/ - Friendly behavior mode:
friendly_mode/
Plugins can:
- Inject behavior into prompts (e.g., tone, style)
- Provide tool functions callable by the LLM
- Be hot-reloaded (via plugin manager and scheduler)
Note: A temporary non-sandboxed
safe_execis in place during refactor; a stronger sandbox will be restored in a later phase.
dashboard.py + dashboard/ui/ provide a small web UI:
- Live logs
- Model list + switcher (via Ollama tags)
- Memory viewer/editor
- Plugin viewer
- Agent list
- Voice agent toggle
Runs at:
http://localhost:5000
when the bot is running.
High-level layout:
flowchart LR
subgraph Discord
U[User] -->|messages| B[God Bot Client]
end
subgraph Core
LLM[LLM Wrapper<br/>godbot/core/llm.py]
MEM[MemoryDB + JSON<br/>godbot/core/memory.py]
VM[Vector Memory<br/>godbot/core/vector_memory.py]
SCHED[Scheduler<br/>godbot/core/scheduler.py]
end
subgraph Deterministic
FIN[Finance Tools]
FIT[Fitness Tools]
NUT[Nutrition Tools]
MATH[Math Tools]
WR[Wild Rift Tools]
end
subgraph Plugins
PM[Plugin Manager]
PL[Plugins Folder]
end
subgraph Dashboard
FLASK[dashboard.py]
UI[dashboard/ui]
end
B --> LLM
B --> MEM
B --> VM
B --> SCHED
B --> PM
PM --> PL
B --> FIN
B --> FIT
B --> NUT
B --> MATH
B --> WR
B --> FLASK
FLASK --> UI
Current key layout:
ai_discord_bot/
โโโ main.py # Entry point (Discord bot bootstrap)
โโโ agents.py # Agent manager
โโโ audio.py # Voice agent
โโโ committee_agent.py # Committee-style multi-agent logic
โโโ dashboard.py # Flask backend for web UI
โโโ godbot/
โ โโโ core/
โ โ โโโ llm.py # Central Ollama streaming wrapper
โ โ โโโ memory.py # MemoryDB + JSON memory logic
โ โ โโโ vector_memory.py# Vector memory search
โ โ โโโ scheduler.py # Core scheduler
โ โโโ discord/
โ โโโ bot.py # MyClient definition & factory
โโโ deterministic/
โ โโโ finance_tools.py
โ โโโ fitness_tools.py
โ โโโ math_tools.py
โ โโโ nutrition_tools.py
โ โโโ wildrift_tools.py
โโโ data/
โ โโโ wild_rift_builds/
โ โโโ garen.md
โ โโโ vi.md
โ โโโ shyvana.md
โ โโโ leona.md
โ โโโ nasus.md
โ โโโ jinx.md
โโโ plugins/
โ โโโ plugin_manager.py
โ โโโ example_search_tool/
โ โโโ friendly_mode/
โโโ dashboard/
โ โโโ ui/
โ โโโ index.html
โ โโโ app.js
โ โโโ style.css
โโโ scheduled_tasks/ # (if present) memory cleanup, plugin reload, etc.
โโโ tests/ # basic test scaffolding
โโโ requirements.txt
โโโ pyproject.toml
โโโ README.md # (this file)
- Python 3.10+
- A working Ollama install with at least one model (e.g.
dolphin-llama3:latest) - A Discord bot token
git clone https://github.com/IStayLurkin/ai_discord_bot.git
cd ai_discord_bot
# Optional: create a virtual environment
python -m venv .venv
# Windows:
.venv\Scripts\activate
# Linux/macOS:
source .venv/bin/activate
pip install -r requirements.txtIn the project root (ai_discord_bot/):
DISCORD_TOKEN=your_discord_bot_token_here
OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=dolphin-llama3:latestollama serve
ollama list
# ensure the model in OLLAMA_MODEL is availablepython main.pyYou should see logs like:
Discord slash commands synced.
Dashboard running on http://localhost:5000
Logged in as God Bot#1234
[Scheduler] Started
Mention the bot or talk in a channel it can read.
Use slash commands like /ask, /research, /committee (depending on your current setup).
It will automatically:
- Use deterministic tools for math/finance/WR when applicable.
- Fall back to LLM for general reasoning.
Once the bot is running:
Open http://localhost:5000 in your browser.
View logs, switch models, inspect memory, and more.
- Pick a module in
deterministic/or create a new one. - Use the registry system in
deterministic/registry.py(if present) or integrate with the existing pattern inmain.py. - Write pure Python logic for the tool.
- Add pattern detection in the deterministic layer so the tool fires before the LLM.
- Create a new file in
data/wild_rift_builds/, e.g.darius.md - Follow the build format used in
garen.md/vi.md - Update
wildrift_tools.pyif needed to include any special logic
- Create a new folder under
plugins/ - Add a
manifest.jsonandtool.py(seeexample_search_toolfor reference) - The plugin manager will scan and load it on startup (or via auto-reload).
MIT License
Built for high-performance local AI with Ollama, using Deterministic-First architecture for reliability.