How gmsoft-tuxicoman/gmbot works
GMbot is an asyncio IRC bot that engages when mentioned, follows active conversations using an OpenAI-compatible chat model, and returns to idle when the model ends the exchange or it times out. The runtime path is IRC messages through Bot’s routing and debounce logic, prompt construction from conversation history/persona/memory, LLM response parsing, then paced IRC replies and memory updates. Owner commands provide a separate direct-control path. The README documents protocol, memory, and command capabilities; some implementation details are unsampled, so unsupported links are omitted.
Main entry points: bot.py Bot orchestration · irc.py IRC client · __main__.py Runtime entry · commands.py Owner commands
Components 13
Runtime setup
- Runtime entry
gmbot/__main__.py - Configuration
gmbot/config.py
IRC transport
- IRC client
gmbot/irc.py
Conversation engine
- Bot orchestration
gmbot/bot.py - Conversation state
gmbot/conversation.py - LLM client
gmbot/llm.py
Context and memory
- History and prompts
gmbot/history.py - Persona file
INSTRUCTIONS.md - Long-term memory
gmbot/memory.py
Owner control
- Owner commands
gmbot/commands.py
Other components
- Operator
- IRC server
- Chat endpoint
Connections 19
- Operator → Runtime entry: starts bot
README.md - Runtime entry → Configuration: loads settings
gmbot/__main__.py - Runtime entry → Bot orchestration: runs
gmbot/__main__.py - Bot orchestration → IRC client: receives messages
gmbot/bot.py - IRC client → IRC server: connects and exchanges
README.md - IRC client → Bot orchestration: dispatches messages
gmbot/bot.py - Bot orchestration → Owner commands: routes owner commands
gmbot/bot.py - Owner commands → IRC client: sends control actions
gmbot/commands.py - Owner commands → Long-term memory: manages facts
gmbot/commands.py - Bot orchestration → Conversation state: activates and tracks
gmbot/bot.py - Bot orchestration → History and prompts: records messages
gmbot/bot.py - Bot orchestration → Persona file: loads persona
README.md - Bot orchestration → Long-term memory: updates and reads facts
gmbot/bot.py - Bot orchestration → History and prompts: builds prompt context
README.md - Bot orchestration → LLM client: requests generation
gmbot/bot.py - LLM client → Chat endpoint: posts completions
gmbot/llm.py - Bot orchestration → Conversation state: parses model decisions
gmbot/bot.py - Bot orchestration → IRC client: sends replies
gmbot/bot.py - IRC client → IRC server: sends paced IRC output
README.md