This is a cache of https://github.com/h1ddenpr0cess20/ollamarama-matrix. It is a snapshot of the page as it appeared on 2025-08-09T11:30:58.459+0200.
GitHub - h1ddenpr0cess20/ollamarama-matrix: AI chatbot for Matrix with infinite personalties, using ollama
Skip to content

h1ddenpr0cess20/ollamarama-matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ollamarama-matrix

License: AGPL v3 Python 3.7+ Matrix Protocol Ollama GitHub

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.

✨ Features

  • 🎭 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

🌟 Related Projects

🚀 Quick Start

Prerequisites

Install and familiarize yourself with Ollama to run local LLMs.

curl https://ollama.com/install.sh | sh

1. Install AI Models

Download the models you want to use from the Ollama library.

🎯 Recommended model:

ollama pull qwen3

2. Install Dependencies

pip install -r requirements.txt

This installs matrix-nio with encryption support so the bot can work in encrypted rooms.

3. Configure Matrix Bot

  1. Set up a Matrix account for your bot
  2. Get your server URL, username, and password
  3. Update the config.json file with your credentials:
{
    "matrix": {
        "server": "https://matrix.org",
        "username": "@your_bot:matrix.org",
        "password": "your_password",
        "channels": ["#your-channel:matrix.org"],
        "store_path": "store"
    }
}

4. Run the Bot

python ollamarama.py

📖 Usage Guide

Basic Commands

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

👑 Admin Commands

Command Description Example
.model [model_name] Show/change current model .model qwen3
.clear Reset bot for all users .clear

💡 Pro Tips

  • Personality Examples: Try detective, pirate, shakespeare, helpful assistant, sarcastic critic
  • Collaborative Mode: Use .x username to continue someone else's conversation
  • Custom Prompts: Perfect for specialized tasks like code review or creative writing

Encryption Support

  • 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 libolm installed and available to Python for E2E to work.
  • On Windows, you need to build and install libolm from source for encryption support. If you do not need encrypted rooms or have issues with libolm, use the files in the no-e2e/ folder, or run it using Windows Subsystem for linux (WSL).

⚖️ License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Feel free to:

  • 🐛 Report bugs
  • 💡 Suggest features
  • 🔧 Submit pull requests

⭐ Show Your Support

If you find this project useful, please consider giving it a star on GitHub!

About

AI chatbot for Matrix with infinite personalties, using ollama

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages