Skip to main content

MiniBot 🤖

PyPI version

Your personal AI assistant for Telegram - self-hosted, auditable, extensible, and intentionally opinionated.

📖 Full documentation

Top features

  • 🤖 Personal assistant, not SaaS: your chats, memory, and scheduled prompts stay in your instance.
  • 🎯 Opinionated by design: Telegram-centric flow, small tool surface, and explicit config over hidden magic.
  • 🏠 Self-hostable: Dockerfile + docker-compose provided for easy local deployment.
  • 🧩 Python extensions: add your own tools, event subscribers, and background services from any importable module — plus channels.
  • 💻 Local console channel for development/testing without Telegram.
  • 💬 Telegram channel with chat/user allowlists, long-polling or webhook modes, and multimodal inputs.
  • 🧠 Provider support via llm-async: openai, openai_responses, openrouter, and more.
  • 🧰 Configurable tools: chat memory, KV notes, HTTP fetch, calculator, datetime, Python execution, Bash, patch-based editing (apply_patch), file storage, grep, speech-to-text, and MCP server bridges.
  • 🔎 RAG (optional): index local documents into SQLite (or Qdrant) and retrieve semantically relevant chunks.
  • 🕸️ Relation graph (optional): store and traverse typed relationships between entities.
  • ⏳ Async task workers: offload long-running jobs to a background queue (SQLite by default, optional RabbitMQ).
  • ⏰ Scheduled prompts (one-shot, fixed-interval, and cron recurrence) persisted in SQLite.
  • 🤝 Multi-agent orchestration with specialist agent definitions and skill packs.
  • ⚙️ minibot configure: interactive terminal wizard to create or update config.toml.
  • 📊 Structured logfmt logs and a focused async test suite.

Make it yours

MiniBot is built to be extended, and most changes need no Python:

Level What you get Where
Config toggle tools, providers, models, limits config.toml
No code rewrite the system prompt, add skills and prompt packs, add specialist agents prompts/, skills/, agents/*.md
External tools connect any MCP server [[tools.mcp.servers]]
Python your own tools, event subscribers, services, channels a module + [extensions].modules

Start at the least powerful layer that does the job. The most common asks — a new capability — usually stop at an MCP server or a ~10-line extension:

# my_tool.py — add "my_tool" to [extensions].modules
from pydantic import BaseModel, Field
from minibot.app.extensions import ExtensionContext
from minibot.llm.tools.base import ToolContext

class WordCountArgs(BaseModel):
    text: str = Field(description="Text to count words in.")

def register(mb: ExtensionContext) -> None:
    @mb.tool
    async def word_count(args: WordCountArgs, context: ToolContext) -> dict[str, int]:
        """Count the words in a piece of text."""
        return {"words": len(args.text.split())}

See the Extending MiniBot guide for the full customization ladder. The pluggable surfaces — tools, event subscriptions, services, channels — are covered in extensions and events; external tools arrive via MCP.

Quick start

pip install minibot
# add extras as needed, e.g.: pip install "minibot[telegram,stt,rag,rabbitmq]"

minibot configure   # interactive wizard, writes config.toml
minibot              # start the daemon

Extras: telegram (aiogram + Telegram markdown rendering — the daemon needs it only when [channels.telegram] is enabled), rag (pypdf, PDF ingestion for the RAG tool), stt (speech-to-text via faster-whisper), rabbitmq (RabbitMQ task queue backend — not needed with the default sqlite backend), graph (networkx, the optional relation-graph tool). Compact HTML rendering in http_request uses selectolax, which ships with the base install.

MCP needs no extra: the MCP client is a JSON-RPC implementation with no third-party SDK dependency.

No Telegram bot yet? Run minibot console instead of minibot to chat with it in your terminal.

Docker

cp config.example.toml config.toml
# edit config.toml (or run `minibot configure` in a venv first)

docker compose up -d

docker-compose.yml builds and starts the minibot image. The Qdrant and RabbitMQ services are commented out — [tools.rag].backend and [tasks].backend both default to "sqlite" — and are only needed if you switch either to "qdrant" or "rabbitmq".

Demo

Example: generate images with the python_execute tool and receive them in Telegram.

Generate image with python_execute (1) Generate image with python_execute (2)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minibot-0.14.0.tar.gz (246.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

minibot-0.14.0-py3-none-any.whl (336.3 kB view details)

Uploaded Python 3

File details

Details for the file minibot-0.14.0.tar.gz.

File metadata

  • Download URL: minibot-0.14.0.tar.gz
  • Upload date:
  • Size: 246.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for minibot-0.14.0.tar.gz
Algorithm Hash digest
SHA256 d2cac4793d08a1ab76e63eefb892ef1f35044a5e1f541370cc05926a23bae50d
MD5 d71981bf3d5bb96a90fc661a8adecd1b
BLAKE2b-256 5841ec62b24877105c1909429708aaa7f35e2018becf49a37ebab0d7baaba041

See more details on using hashes here.

File details

Details for the file minibot-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: minibot-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 336.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for minibot-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5714e0096b21aa5d817ca361565b0d4514ed59f69b8a96e8a733e81c66c6f5b6
MD5 1b634a7a00681de471e9ba11600b35d8
BLAKE2b-256 9b474dbb24706c50f009f20a67fe9ea147c9b9258559969f7cc14bdbcaa9871b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.15.0

2 files

0.14.3

2 files

0.14.2

2 files

0.14.1

2 files

This release

0.14.0 This release

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 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