Ollamarama is a powerful AI chatbot for the Matrix chat protocol powered by Ollama. Transform your Matrix channels with an AI that can roleplay as virtually anything you can imagine.
- 🎭 Dynamic Personalities: Switch between different AI personalities on the fly
- 👥 Per-User Chat History: Each user maintains their own conversation context
- 🔒 Channel Isolation: Conversations are separated by channel and user
- 🤝 Collaborative Mode: Users can interact with each other's chat histories
- 🛠️ Admin Controls: Model switching and global reset capabilities
- 🎯 Custom Prompts: Use your own system prompts for specialized interactions
- 💬 IRC Version: ollamarama-irc
- 🖥️ Terminal Version: ollamarama
Install and familiarize yourself with Ollama to run local LLMs.
curl https://ollama.com/install.sh | shDownload the models you want to use from the Ollama library.
🎯 Recommended model:
ollama pull qwen3pip install -r requirements.txtThis installs matrix-nio with encryption support so the bot can work in encrypted rooms.
- Set up a Matrix account for your bot
- Get your server URL, username, and password
- Update the
config.jsonfile with your credentials:
{
"matrix": {
"server": "https://matrix.org",
"username": "@your_bot:matrix.org",
"password": "your_password",
"channels": ["#your-channel:matrix.org"],
"store_path": "store"
}
}python ollamarama.py| Command | Description | Example |
|---|---|---|
.ai <message> or botname: <message> |
Basic chat with the AI | .ai Hello there! |
.x <user> <message> |
Talk to another user's chat history | .x Alice What did we discuss? |
.persona <personality> |
Change AI personality | .persona helpful librarian |
.custom <prompt> |
Use custom system prompt | .custom You are a coding expert |
.reset |
Clear history, reset to default personality | .reset |
.stock |
Clear history, use without system prompt | .stock |
| Command | Description | Example |
|---|---|---|
.model [model_name] |
Show/change current model | .model qwen3 |
.clear |
Reset bot for all users | .clear |
- Personality Examples: Try
detective,pirate,shakespeare,helpful assistant,sarcastic critic - Collaborative Mode: Use
.x usernameto continue someone else's conversation - Custom Prompts: Perfect for specialized tasks like code review or creative writing
- This bot supports end-to-end encryption (E2E) in Matrix rooms using
matrix-nio[e2e]and a built-in device verification system. - You must have
libolminstalled and available to Python for E2E to work. - On Windows, you need to build and install
libolmfrom source for encryption support. If you do not need encrypted rooms or have issues withlibolm, use the files in theno-e2e/folder, or run it using Windows Subsystem for linux (WSL).
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
Contributions are welcome! Feel free to:
- 🐛 Report bugs
- 💡 Suggest features
- 🔧 Submit pull requests
If you find this project useful, please consider giving it a star on GitHub!