Manolo Bot
Your own AI agent in Telegram — with tools, memory, and MCP.
manolo-bot is a self-hosted AI agent for Telegram and a reusable Python library. It reasons with an LLM, uses tools,
reads your documents with RAG, keeps long-term memory, and can run scheduled actions — with OpenAI, Gemini, or local
models via Ollama or LM Studio.
Why Manolo?
- Agentic, not just chat — multi-step tool use for search, documents, MCP, and web content.
- Bring your own model — OpenAI, Google Gemini, Ollama, or any OpenAI-compatible endpoint.
- Your data stays yours — self-host it, use local models, and keep conversations on your infrastructure.
- Telegram-native — private chats, groups, documents, images, voice notes, and scheduled actions.
- Library-first — import
LLMAgentorLLMDeepAgentand build your own assistant.
Quick start
1. Create a Telegram bot
Talk to @BotFather, create a bot, and copy its token.
2. Run it from PyPI
pip install manolo-bot
Create a .env file:
TELEGRAM_BOT_NAME=Manolo
TELEGRAM_BOT_USERNAME=your_bot_username
TELEGRAM_BOT_TOKEN=your_bot_token
GOOGLE_API_KEY=your_google_api_key
Then start the bot:
manolo-bot
3. Or run it with Docker
git clone https://github.com/cccaballero/manolo_bot.git
cd manolo_bot
cp env.example .env
# edit .env
docker compose up -d
See DOCKER.md for details.
Features
| Feature | What it does |
|---|---|
| Agent modes | agent (default), deep_agent (planning, skills, virtual filesystem, memory), and llm (simple) |
| MCP | Connect external tools and data sources through the Model Context Protocol |
| RAG | Index local documents and let the agent search them with rag_search |
| Memory | Per-chat long-term memory in deep_agent mode |
| Scheduling | Ask the agent to run a prompt later or on a cron schedule |
| Multimodal | Images, voice notes, and documents (when enabled) |
| Providers | OpenAI, Gemini, Ollama, LM Studio, and OpenAI-compatible APIs |
Documentation
Full documentation, configuration reference, and library examples are at manolo-bot.readthedocs.io.
Configuration
The bot is configured entirely through environment variables. The minimum for a Gemini-backed bot:
TELEGRAM_BOT_NAME=Manolo
TELEGRAM_BOT_USERNAME=your_bot_username
TELEGRAM_BOT_TOKEN=your_bot_token
GOOGLE_API_KEY=your_google_api_key
Use OPENAI_API_KEY, OPENAI_API_BASE_URL (LM Studio, vLLM, or another OpenAI-compatible endpoint), or OLLAMA_MODEL instead of Gemini if you prefer. AI_MODE selects agent (default), deep_agent, or llm. PROJECT_GITHUB_URL and PROJECT_DOCS_URL control the buttons shown by /start and /help.
See the full configuration reference for RAG, MCP, the scheduler, multimodal input, storage, rate limiting, and every other variable.
Commands
/start— welcome message and project links./help— command reference and project links./flushcontext— clear the conversation context (admins in groups)./flushmemory— reset long-term memory (deep_agentmode; admins in groups)./flushschedules— remove scheduled actions (admins in groups).
Library usage
manolo-bot can also be used as a library. Install it and build an agent:
import asyncio
from manolo_bot.ai.config import BotConfig, LLMConfig
from manolo_bot.ai.llmagent import LLMAgent
from manolo_bot.ai.llmbot import LLMBuilder
from manolo_bot.ai.tools import get_tools
from manolo_bot.storage.messages.memory_storage import MemoryMessagesStorage
async def main():
llm = LLMBuilder(
LLMConfig(
google_api_key="your_api_key",
google_api_model="",
openai_api_key="",
openai_api_model="",
openai_api_base_url="",
ollama_model="",
)
).get_llm()
bot_config = BotConfig(
bot_uuid="my-bot",
bot_name="Assistant",
bot_username="assistant_bot",
bot_token="123456:ABC",
user_id=0,
)
storage = MemoryMessagesStorage(bot_uuid="my-bot", chat_id=123)
await storage.refresh_messages()
agent = LLMAgent(
llm=llm,
bot_config=bot_config,
system_instructions="You are a helpful assistant.",
messages_storage=storage,
tools=get_tools(),
)
async with agent:
response = await agent.answer_message(chat_id=123, message="What is the current price of Bitcoin?")
print(response.content)
await storage.commit()
asyncio.run(main())
See the library guide for LLMDeepAgent, RAG, the scheduler, custom tools, MCP, and dynamic instructions. The API reference covers the lower-level classes.
Development
uv sync --dev
pre-commit install
uv run python -m unittest discover tests
See the installation guide for the full development setup and documentation build.
Contributing
If you'd like to contribute to this project, feel free to submit a pull request. We're always open to new ideas or improvements to the code.
Support the project
If Manolo Bot is useful to you, please give it a ⭐ on GitHub — it helps other people discover the project.
⭐ Star on GitHub · 🐛 Report an issue · 🤝 Contribute
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for manolo-bot 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| manolo_bot-0.6.1.tar.gz | 113.5 kB | Without provenance | Details for manolo_bot-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| manolo_bot-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for manolo_bot-0.6.1-py3-none-any.whl |
Total release size: 247.2 kB
Release files / manolo_bot-0.6.1.tar.gz
| Download URL | manolo_bot-0.6.1.tar.gz |
|---|---|
| Size | 113.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a0d7ec7504257cf3ec24be7a795d44eb30e2cb19cb832c17e0400e583e09c4b
|
|
BLAKE2b-256 checksum How to use checksums |
4315811a8f5717b3488ccdee62a423cbac928ac0ee68d235cbd934f992118a3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / manolo_bot-0.6.1-py3-none-any.whl
| Download URL | manolo_bot-0.6.1-py3-none-any.whl |
|---|---|
| Size | 133.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7db66ecb526247bbbda7b7d83d4da57361fd64dddea6149b3c94405f79c2795
|
|
BLAKE2b-256 checksum How to use checksums |
fcf884b9ee61ad0ef7ba29f06d2fb12628ed52665bf6d9d31532720cb5c273ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for manolo-bot 0.6.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.