Skip to main content

ollamarama-matrix

License: Apache 2.0 Python 3.10+ Matrix Protocol Ollama GitHub

Ollamarama is a powerful AI chatbot for the Matrix chat protocol powered by the Ollama Chat API. Transform your Matrix rooms with an AI that can roleplay as virtually anything you can imagine — privately and locally.

Documentation

Features

  • Dynamic personalities with quick switching
  • Per‑user history, isolated per room and user
  • Collaborative mode to talk across histories
  • Admin controls for model switching and resets
  • Custom system prompts for specialized tasks

Related Projects

Installation

Options depending on how you prefer to run it:

  • From source (installs CLI):
    • Clone this repo, then run: pip install .
    • Or use pipx for isolation: pipx install .
  • From source without installing the package:
    • pip install -r requirements.txt
    • Run with: python -m ollamarama --config config.json

After installation, use the ollamarama-matrix command. For E2E encryption, ensure libolm is installed; see Operations & E2E.

Quick Start

Prerequisites

Install and familiarize yourself with Ollama to run local LLMs.

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

Pull at least one model (recommended):

ollama pull qwen3

For deeper setup and verification steps, see Ollama Setup.

1) Install dependencies

pip install -r requirements.txt

2) Configure

Create or edit config.json at the repo root. See Configuration for a minimal example, full schema, and validation guidance.

3) Run

Preferred (installed command):

ollamarama-matrix --config config.json

Fetch models from the server (ignores ollama.models in config):

ollamarama-matrix --config config.json --server-models

Short form:

ollamarama-matrix -S --config config.json

Alternatively, run as a module:

python -m ollamarama --config config.json

4) Try It

  • The bot logs in and joins the rooms listed in matrix.channels
  • Send .ai hello or BotName: hello in a joined room
  • The bot replies and maintains per‑user history
  • Invites to other rooms are declined automatically (the bot replies and leaves)

Usage Guide

Common commands (see Commands for the full list):

Command Description Example
.ai <message> or botname: <message> Chat with the AI .ai Hello there!
.x <user> <message> Continue another user's conversation .x Alice What did we discuss?
.persona <text> Change your personality .persona helpful librarian
.custom <prompt> Use a custom system prompt .custom You are a coding expert
.reset / .stock Clear history (default/stock prompt) .reset
.history [on,off,toggle] Enable or disable your conversation history .history off
.model [name] (admin) Show/change model .model qwen3
.clear (admin) Reset globally for all users .clear
.help Show inline help .help
.verbose [on,off,toggle] (admin) Control inclusion of brevity clause for new conversations .verbose on
.thinking [on,off,toggle] (admin) Show or hide the thinking placeholder while generating .thinking off

Encryption Support

  • Works in encrypted Matrix rooms using matrix-nio[e2e] with device verification.
  • Requires libolm available to Python for E2E. If unavailable, you can run without E2E; see Getting Started (Install Dependencies).
  • Persist the store/ directory to retain device keys and encryption state.

Community & Policies

License

Apache-2.0 — see LICENSE for details.

Metadata

Release files for ollamarama-matrix 1.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ollamarama-matrix 1.6.1
File Size Uploaded
ollamarama_matrix-1.6.1.tar.gz 65.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ollamarama-matrix 1.6.1
File Interpreter ABI Platform
ollamarama_matrix-1.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 127.9 kB

Release files / ollamarama_matrix-1.6.1.tar.gz

Download URL ollamarama_matrix-1.6.1.tar.gz
Size 65.4 kB
Tags Source
SHA-256 checksum
How to use checksums
95040d552842da762a4cbe2ce3ad089fc8cb0cc5ca30e4d318875e7033844614
BLAKE2b-256 checksum
How to use checksums
8851227a3164693bfadd7b4131532594c593d4551ae35d8bbe9548c6b8ac675b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.

Transparency log

Release files / ollamarama_matrix-1.6.1-py3-none-any.whl

Download URL ollamarama_matrix-1.6.1-py3-none-any.whl
Size 62.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee20a7fb6ad18cbd949f67229050b2ea251b3f4dc3a14bd58bc929e8adea720c
BLAKE2b-256 checksum
How to use checksums
bda79dec5fe152b0fb204d6e5e660640fe699a4ecaca69e32bc4ba7ae4ace5fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.6.1 This release

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page