Telegram bot gateway to multiple LLMs & Image models. Asynchronous, context-aware, for arm64/amd64.
50K+
Self-hosted, asynchronous Telegram bot that orchestrates multiple AI providers, tools, and sub-agents to get real work done.
Get Chibi running in under 2 minutes.
Prerequisites: Docker, a Telegram Bot Token, and at least one AI provider API key.
docker run -d \
--name chibi \
-v chibi_data:/app/data \
-e TELEGRAM_BOT_TOKEN=your_bot_token_here \
-e USERS_WHITELIST=your_telegram_id_or_nickname \
-e OPENAI_API_KEY=sk-... \
pysergio/chibi:latest
Verify it works: Open Telegram, find your bot, and send /start.
| I want to… | Jump to |
|---|---|
| Deploy with Docker Compose | Docker Compose Example |
| See all configuration options | Environment Variables |
| Understand what Chibi can do | What is Chibi? |
Chibi is a Telegram-based digital companion that orchestrates multiple AI providers and tools to deliver outcomes — code changes, research syntheses, media generation, and operational tasks.
Built for the moment you need more than "an AI tool": a partner that coordinates models, runs work in the background, and integrates with your systems.
Key Features:
Supported Providers: LLMs: OpenAI · Anthropic · Google Gemini · DeepSeek · xAI · Mistral AI · Alibaba (Qwen) · Moonshot AI · MiniMax · ZhipuAI · Cloudflare Workers AI OpenAI-compatible: Ollama · vLLM · LM Studio · any OpenAI-compatible API Image Generation: Google (Imagen, Nano Banana) · OpenAI (DALL·E) · Alibaba · xAI · Wan · ZhipuAI · MiniMax Music: Suno · Voice: ElevenLabs · MiniMax · OpenAI (Whisper)
latest — most recent stable releasevX.Y.Z (e.g., v2.5.0) — specific version, pinnedvX.Y (e.g., v2.5) — latest patch within a minor version| Architecture | Platform | Examples |
|---|---|---|
amd64 | x86_64 | Intel/AMD servers, most cloud VMs |
arm64/v8 | ARM 64-bit | Apple Silicon, AWS Graviton, RPi 4+, etc |
All tags are multi-arch manifests — Docker automatically pulls the correct image for your platform.
Recommended for production deployments. Redis enables persistent conversation history across container restarts.
Create a compose.yaml:
services:
chibi:
image: pysergio/chibi:latest
container_name: chibi
restart: unless-stopped
depends_on:
- redis
volumes:
- chibi_data:/app/data
- ./skills:/app/skills:ro # Custom skills (optional, read-only)
environment:
# Required
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
USERS_WHITELIST: ${USERS_WHITELIST}
REDIS_URL: redis://redis:6379/0
# At least one AI provider
OPENAI_API_KEY: ${OPENAI_API_KEY}
# ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
# GEMINI_API_KEY: ${GEMINI_API_KEY}
# Optional: Agent mode
# FILESYSTEM_ACCESS: "true"
# ENABLE_MCP_STDIO: "true"
env_file:
- .env
redis:
image: redis:alpine
container_name: chibi-redis
restart: unless-stopped
volumes:
- redis_data:/data
volumes:
chibi_data:
redis_data:
Create a .env file alongside it:
TELEGRAM_BOT_TOKEN=your_bot_token_here
USERS_WHITELIST=your_telegram_id
OPENAI_API_KEY=sk-...
Then start:
docker compose up -d
Important: Never hardcode API keys in
compose.yaml. Use the.envfile and keep it out of version control.
| Variable | Description | Example |
|---|---|---|
TELEGRAM_BOT_TOKEN | Telegram Bot Token from @BotFather | 1234567890:ABCdefGHIjklMNOpqrsTUVwxyz |
USERS_WHITELIST | Comma-separated Telegram user IDs or usernames | 123456789,@username |
At least one provider API key is required.
| Variable | Provider |
|---|---|
OPENAI_API_KEY | OpenAI |
ANTHROPIC_API_KEY | Anthropic |
GEMINI_API_KEY | Google Gemini |
DEEPSEEK_API_KEY | DeepSeek |
For the full list of environment variables (50+), see the Configuration Reference.
| Mount Point | Purpose | Required? |
|---|---|---|
/app/data | Conversations, user data, settings | Yes — use a named volume |
/app/skills | Custom skills directory | No — mount read-only if used |
# Backup data volume
docker run --rm -v chibi_data:/data -v $(pwd):/backup alpine tar czf /backup/chibi-backup.tar.gz /data
Chibi connects to MCP servers dynamically at runtime — there is no static configuration file to mount. The AI agent uses built-in tools to establish and manage MCP connections on demand:
initialize_stdio_mcp_server — connect to an MCP server via stdio (e.g., a local CLI tool).initialize_sse_mcp_server — connect to an MCP server via SSE (e.g., a remote HTTP endpoint).deinitialize_mcp_server — disconnect from a previously connected server.Once connected, the MCP server's tools are automatically registered and become available to the agent for the duration of the session.
Environment variables:
| Variable | Default | Description |
|---|---|---|
ENABLE_MCP_SSE | true | Allow the agent to connect to MCP servers via SSE |
ENABLE_MCP_STDIO | false | Allow the agent to connect to MCP servers via stdio |
Note:
ENABLE_MCP_STDIOisfalseby default because stdio-based servers execute local processes inside the container. Enable it only when you understand the security implications.
Example usage (from Telegram):
Simply ask the bot to connect to an MCP server. The agent will call the appropriate tool internally.
No config files needed — MCP is fully managed through the conversation.
Chibi ships with secure defaults:
chibi)TOOLS_WHITELISTBest Practices:
USERS_WHITELIST — never run without itFILESYSTEM_ACCESS=false unless you need agent mode.env files or Docker secrets, never in compose filesTOOLS_WHITELIST to restrict available tools in productionRead-only filesystem (enhanced security):
docker run --read-only \
-v chibi_data:/app/data \
-v /tmp:/tmp \
-v /var/run:/var/run \
pysergio/chibi:latest
The
/app/datavolume must remain read-write for conversation history and user data.
Bot not starting?
docker logs chibiTELEGRAM_BOT_TOKEN is correctUSERS_WHITELIST contains your Telegram IDCannot connect to a provider?
Data not persisting?
-v chibi_data:/app/datadocker pull pysergio/chibi:latest
docker compose up -d
Always back up your data volume before updating (see Volumes and Persistence).
MIT License — see LICENSE.
Content type
Image
Digest
sha256:7f9dd1dec…
Size
168 MB
Last updated
14 days ago
docker pull pysergio/chibi