Asynchronous AI Chat for Limnoria IRC
Asyncio is a production-ready AI chat plugin for Limnoria IRC bots. It provides natural conversation with OpenAI models while ensuring safe multi-user behaviour, isolated memory, and stable long-running operation.
Bot Name: Puss
Plugin: Asyncio — Asynchronous AI Chat for Limnoria IRC
Author: Barry Suridge
Version: 1.1
Date: 2026-02-26
- Commands Cheat Sheet
- Conversation Memory
- Plugin Configuration
- Best Practices
- Optional Tips
- Operator Notes
- Exporting to PDF
| Command | Example Usage | Description |
|---|---|---|
🗨️ !chat <message> |
!chat What is the acceleration due to gravity on Earth? |
Sends your message to the AI assistant. Moderation, cooldowns, and token limits apply automatically. |
🧹 !reset |
!reset |
Clears your conversation memory for the current channel or private message only. |
💡 Tip: Each channel and private message keeps its own conversation context.
The plugin maintains conversation history per user AND channel.
This ensures:
• Conversations in different channels stay separate
• Private messages are treated as their own context
• Users do not share memory with each other
• History auto-trims to prevent growth
In #test:
!chat Remember my favourite colour is blue
!chat What is my favourite colour?
Bot remembers.
In another channel: !chat What is my favourite colour?
Bot does not remember.
| Setting | Example | Description |
|---|---|---|
🔢 maxUserTokens |
@config plugins.Asyncio.maxUserTokens 2048 |
Maximum tokens allowed per user input. |
⏱ cooldownSeconds |
@config plugins.Asyncio.cooldownSeconds 5 |
Minimum delay between messages per user & channel. |
🐞 debugMode |
@config plugins.Asyncio.debugMode True |
Enables detailed logging for troubleshooting. |
🤖 botnick |
@config plugins.Asyncio.botnick Puss |
Bot name used in responses. |
🌐 language |
@config plugins.Asyncio.language British |
English style preference for AI responses. |
- Stay under
maxUserTokens. - Split very long content into multiple messages.
- Avoid offensive, illegal, or harmful content.
- If a message is flagged, rephrase it.
- Cooldowns apply per user AND per channel.
- Other users are unaffected.
- Other channels are unaffected.
- Private messages have their own cooldown.
- Use
!resetto start a fresh conversation. - Only resets the current channel or PM.
- Enable
debugModefor full logs. - Check Limnoria logs if AI stops responding.
- Adjust
botnickandlanguageto change style.
- Encourage users to ask clear, structured questions.
- Avoid sending many queries rapidly (may hit API limits).
- Keep dependencies (
openai,dotenv, etc.) updated. - Restarting Limnoria clears all conversation memory.
This plugin is designed for production IRC use.
It includes:
• Async-safe execution (non-blocking bot behaviour)
• Built-in moderation filtering
• Token length protection
• Per-user + per-channel memory isolation
• Automatic history trimming
• Safe cooldown enforcement
The design prevents:
• Cross-channel memory leakage
• One user affecting another’s context
• Excessive API usage
• Runaway memory growth
Optional future upgrades include:
• Persistent memory to disk
• Admin control commands
• Usage statistics
• Channel enable/disable toggles
⚡ Quick Command (Pandoc)
pandoc AsyncioPluginGuide.md -o AsyncioPluginGuide.pdf \
--pdf-engine=xelatex \
-V geometry:margin=1in
© License
Copyright © MMXXIV Barry Suridge
All rights reserved.