chibi-bot 1.6.0b0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. chibi_bot-1.6.0b0/LICENSE +21 -0
  2. chibi_bot-1.6.0b0/PKG-INFO +340 -0
  3. chibi_bot-1.6.0b0/README.md +302 -0
  4. chibi_bot-1.6.0b0/chibi/__init__.py +0 -0
  5. chibi_bot-1.6.0b0/chibi/__main__.py +343 -0
  6. chibi_bot-1.6.0b0/chibi/cli.py +90 -0
  7. chibi_bot-1.6.0b0/chibi/config/__init__.py +6 -0
  8. chibi_bot-1.6.0b0/chibi/config/app.py +123 -0
  9. chibi_bot-1.6.0b0/chibi/config/gpt.py +108 -0
  10. chibi_bot-1.6.0b0/chibi/config/logging.py +15 -0
  11. chibi_bot-1.6.0b0/chibi/config/telegram.py +43 -0
  12. chibi_bot-1.6.0b0/chibi/config_generator.py +233 -0
  13. chibi_bot-1.6.0b0/chibi/constants.py +362 -0
  14. chibi_bot-1.6.0b0/chibi/exceptions.py +58 -0
  15. chibi_bot-1.6.0b0/chibi/models.py +496 -0
  16. chibi_bot-1.6.0b0/chibi/schemas/__init__.py +0 -0
  17. chibi_bot-1.6.0b0/chibi/schemas/anthropic.py +20 -0
  18. chibi_bot-1.6.0b0/chibi/schemas/app.py +54 -0
  19. chibi_bot-1.6.0b0/chibi/schemas/cloudflare.py +65 -0
  20. chibi_bot-1.6.0b0/chibi/schemas/mistralai.py +56 -0
  21. chibi_bot-1.6.0b0/chibi/schemas/suno.py +83 -0
  22. chibi_bot-1.6.0b0/chibi/service.py +135 -0
  23. chibi_bot-1.6.0b0/chibi/services/bot.py +276 -0
  24. chibi_bot-1.6.0b0/chibi/services/lock_manager.py +20 -0
  25. chibi_bot-1.6.0b0/chibi/services/mcp/manager.py +242 -0
  26. chibi_bot-1.6.0b0/chibi/services/metrics.py +54 -0
  27. chibi_bot-1.6.0b0/chibi/services/providers/__init__.py +16 -0
  28. chibi_bot-1.6.0b0/chibi/services/providers/alibaba.py +79 -0
  29. chibi_bot-1.6.0b0/chibi/services/providers/anthropic.py +40 -0
  30. chibi_bot-1.6.0b0/chibi/services/providers/cloudflare.py +98 -0
  31. chibi_bot-1.6.0b0/chibi/services/providers/constants/suno.py +2 -0
  32. chibi_bot-1.6.0b0/chibi/services/providers/customopenai.py +11 -0
  33. chibi_bot-1.6.0b0/chibi/services/providers/deepseek.py +15 -0
  34. chibi_bot-1.6.0b0/chibi/services/providers/eleven_labs.py +85 -0
  35. chibi_bot-1.6.0b0/chibi/services/providers/gemini_native.py +489 -0
  36. chibi_bot-1.6.0b0/chibi/services/providers/grok.py +40 -0
  37. chibi_bot-1.6.0b0/chibi/services/providers/minimax.py +96 -0
  38. chibi_bot-1.6.0b0/chibi/services/providers/mistralai_native.py +312 -0
  39. chibi_bot-1.6.0b0/chibi/services/providers/moonshotai.py +20 -0
  40. chibi_bot-1.6.0b0/chibi/services/providers/openai.py +74 -0
  41. chibi_bot-1.6.0b0/chibi/services/providers/provider.py +892 -0
  42. chibi_bot-1.6.0b0/chibi/services/providers/suno.py +130 -0
  43. chibi_bot-1.6.0b0/chibi/services/providers/tools/__init__.py +23 -0
  44. chibi_bot-1.6.0b0/chibi/services/providers/tools/cmd.py +132 -0
  45. chibi_bot-1.6.0b0/chibi/services/providers/tools/common.py +127 -0
  46. chibi_bot-1.6.0b0/chibi/services/providers/tools/constants.py +78 -0
  47. chibi_bot-1.6.0b0/chibi/services/providers/tools/exceptions.py +1 -0
  48. chibi_bot-1.6.0b0/chibi/services/providers/tools/file_editor.py +875 -0
  49. chibi_bot-1.6.0b0/chibi/services/providers/tools/mcp_management.py +274 -0
  50. chibi_bot-1.6.0b0/chibi/services/providers/tools/mcp_simple.py +72 -0
  51. chibi_bot-1.6.0b0/chibi/services/providers/tools/media.py +451 -0
  52. chibi_bot-1.6.0b0/chibi/services/providers/tools/memory.py +252 -0
  53. chibi_bot-1.6.0b0/chibi/services/providers/tools/schemas.py +10 -0
  54. chibi_bot-1.6.0b0/chibi/services/providers/tools/send.py +435 -0
  55. chibi_bot-1.6.0b0/chibi/services/providers/tools/tool.py +163 -0
  56. chibi_bot-1.6.0b0/chibi/services/providers/tools/utils.py +146 -0
  57. chibi_bot-1.6.0b0/chibi/services/providers/tools/web.py +261 -0
  58. chibi_bot-1.6.0b0/chibi/services/providers/utils.py +182 -0
  59. chibi_bot-1.6.0b0/chibi/services/task_manager.py +93 -0
  60. chibi_bot-1.6.0b0/chibi/services/user.py +269 -0
  61. chibi_bot-1.6.0b0/chibi/storage/abstract.py +54 -0
  62. chibi_bot-1.6.0b0/chibi/storage/database.py +86 -0
  63. chibi_bot-1.6.0b0/chibi/storage/dynamodb.py +257 -0
  64. chibi_bot-1.6.0b0/chibi/storage/local.py +70 -0
  65. chibi_bot-1.6.0b0/chibi/storage/redis.py +91 -0
  66. chibi_bot-1.6.0b0/chibi/utils/__init__.py +0 -0
  67. chibi_bot-1.6.0b0/chibi/utils/app.py +249 -0
  68. chibi_bot-1.6.0b0/chibi/utils/telegram.py +521 -0
  69. chibi_bot-1.6.0b0/data/.keep +0 -0
  70. chibi_bot-1.6.0b0/pyproject.toml +90 -0
  71. chibi_bot-1.6.0b0/skills/imagen_prompting_skill.md +470 -0
  72. chibi_bot-1.6.0b0/skills/jina_reader_skill.md +26 -0
  73. chibi_bot-1.6.0b0/skills/nano_banana_prompting_skill.md +454 -0
  74. chibi_bot-1.6.0b0/skills/suno_skill.md +94 -0
  75. chibi_bot-1.6.0b0/skills/wan_prompting_skill.md +234 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Sergei Nagaev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,340 @@
1
+ Metadata-Version: 2.3
2
+ Name: chibi-bot
3
+ Version: 1.6.0b0
4
+ Summary: An asynchronous Telegram bot providing access to various LLMs (OpenAI, Gemini, Anthropic, etc.) and image generation models, featuring context management and built-in tools for web search, news retrieval, and reading web pages.
5
+ License: MIT
6
+ Author: Sergei Nagaev
7
+ Author-email: nagaev.sv@gmail.com
8
+ Requires-Python: >=3.11,<4.0
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Requires-Dist: aiocache (==0.12.3)
15
+ Requires-Dist: anthropic (==0.75.0)
16
+ Requires-Dist: boto3 (==1.42.4)
17
+ Requires-Dist: click (>=8.0.0)
18
+ Requires-Dist: dashscope (==1.25.8)
19
+ Requires-Dist: ddgs (==9.9.3)
20
+ Requires-Dist: elevenlabs (==2.25.0)
21
+ Requires-Dist: fake-useragent (==2.2.0)
22
+ Requires-Dist: google-genai (==1.53.0)
23
+ Requires-Dist: httpx (==0.28.1)
24
+ Requires-Dist: influxdb-client (>=1.49.0,<2.0.0)
25
+ Requires-Dist: loguru (==0.7.3)
26
+ Requires-Dist: mcp (==1.23.1)
27
+ Requires-Dist: mistralai (>=1.9.11,<2.0.0)
28
+ Requires-Dist: openai (==1.77.0)
29
+ Requires-Dist: pydantic (==2.12.5)
30
+ Requires-Dist: pydantic-settings (==2.12.0)
31
+ Requires-Dist: python-telegram-bot[job-queue,socks] (>=22.0,<23.0)
32
+ Requires-Dist: redis[hiredis] (==5.2.1)
33
+ Requires-Dist: telegramify-markdown (==0.5.2)
34
+ Requires-Dist: tenacity (==9.1.2)
35
+ Requires-Dist: trafilatura (==2.0.0)
36
+ Description-Content-Type: text/markdown
37
+
38
+ <h1 align="center"><img width=150 src="https://github.com/s-nagaev/chibi/raw/main/docs/logo.png" alt="Chibi Logo"></h1>
39
+
40
+ <p align="center">
41
+ <strong>Your Digital Companion. Not a Tool. A Partner.</strong><br/>
42
+ <span>Self-hosted, asynchronous Telegram bot that orchestrates multiple AI providers, tools, and sub-agents to get real work done.</span>
43
+ </p>
44
+
45
+ <p align="center">
46
+ <a href="https://github.com/s-nagaev/chibi/actions/workflows/build.yml"><img src="https://github.com/s-nagaev/chibi/actions/workflows/build.yml/badge.svg" alt="Build"></a>
47
+ <a href="https://www.codefactor.io/repository/github/s-nagaev/chibi"><img src="https://www.codefactor.io/repository/github/s-nagaev/chibi/badge" alt="CodeFactor"></a>
48
+ <a href="https://hub.docker.com/r/pysergio/chibi"><img src="https://img.shields.io/docker/pulls/pysergio/chibi" alt="Docker Pulls"></a>
49
+ <a href="https://hub.docker.com/r/pysergio/chibi/tags"><img src="https://img.shields.io/badge/docker%20image%20arch-arm64%20%7C%20amd64-informational" alt="Architectures"></a>
50
+ <a href="https://github.com/s-nagaev/chibi/blob/main/LICENSE"><img src="https://img.shields.io/github/license/s-nagaev/chibi" alt="License"></a>
51
+ <a href="https://chibi.bot"><img src="https://img.shields.io/badge/docs-chibi.bot-blue" alt="Documentation"></a>
52
+
53
+ <p align="center">
54
+ <strong>🌍 Read this in other languages:</strong><br/>
55
+ <a href="docs/README.es.md">Español</a> •
56
+ <a href="docs/README.pt-BR.md">Português (Brasil)</a> •
57
+ <a href="docs/README.uk.md">Українська</a> •
58
+ <a href="docs/README.id.md">Bahasa Indonesia</a> •
59
+ <a href="docs/README.tr.md">Türkçe</a> •
60
+ <a href="docs/README.ru.md">Русский</a> •
61
+ <a href="docs/README.ja.md">日本語</a> •
62
+ <a href="docs/README.zh-TW.md">繁體中文</a> •
63
+ <a href="docs/README.zh-CN.md">简体中文</a>
64
+ </p>
65
+
66
+ ---
67
+
68
+ Chibi is built for the moment you realize you need more than “an AI tool.” You need a **partner** that can coordinate models, run work in the background, and integrate with your systems - without you babysitting prompts.
69
+
70
+ **Chibi** is an asynchronous, self-hosted **Telegram-based digital companion** that orchestrates multiple AI providers and tools to deliver outcomes: code changes, research syntheses, media generation, and operational tasks.
71
+
72
+ ---
73
+
74
+ ## Why Chibi
75
+
76
+ - **One interface (Telegram).** Mobile/desktop/web, always with you.
77
+ - **Provider-agnostic.** Use the best model for each task - without vendor lock-in.
78
+ - **Autonomous execution.** Sub-agents work in parallel; long tasks run asynchronously.
79
+ - **Tool-connected.** Filesystem + terminal + MCP integrations (GitHub, browser, DBs, etc.).
80
+ - **Self-hosted.** Your data, your keys, your rules.
81
+
82
+ ---
83
+
84
+ ## Supported AI providers (and endpoints)
85
+
86
+ Chibi supports multiple providers behind a single conversation. Add one key or many - Chibi can route per task.
87
+
88
+ ### LLM providers
89
+
90
+ - **OpenAI** (GPT models)
91
+ - **Anthropic** (Claude)
92
+ - **Google** (Gemini)
93
+ - **DeepSeek**
94
+ - **Alibaba Cloud** (Qwen)
95
+ - **xAI** (Grok)
96
+ - **Mistral AI**
97
+ - **Moonshot AI**
98
+ - **MiniMax**
99
+ - **Cloudflare Workers AI** (many open-source models)
100
+
101
+ ### OpenAI-compatible endpoints (self-host / local)
102
+
103
+ - **Ollama**
104
+ - **vLLM**
105
+ - **LM Studio**
106
+ - **Any** OpenAI-compatible API
107
+
108
+ ### Multimodal providers (optional)
109
+
110
+ - **Images:** Google (Imagen, Nano Banana), OpenAI (DALL·E), Alibaba (Qwen Image), xAI (Grok Image), Wan
111
+ - **Music:** Suno
112
+ - **Voice:** ElevenLabs, MiniMax, OpenAI (Whisper)
113
+
114
+ > Exact model availability depends on your configured provider keys and enabled features.
115
+
116
+ ---
117
+
118
+ ## 🚀 Quick Start (pip)
119
+
120
+ Install Chibi via pip and run it as a command-line application:
121
+
122
+ ```bash
123
+ # Install the package
124
+ pip install chibi
125
+
126
+ # Generate default configuration
127
+ chibi config
128
+
129
+ # Edit the configuration file
130
+ nano ~/.chibi/settings
131
+ # or
132
+ vim ~/.chibi/settings
133
+
134
+ # Start the bot
135
+ chibi start
136
+ ```
137
+
138
+ The bot will run as a background service. Use CLI commands to manage it.
139
+
140
+ ### CLI Commands
141
+
142
+ | Command | Description |
143
+ |---------|-------------|
144
+ | `chibi start` | Start the bot as a background service |
145
+ | `chibi stop` | Stop the running bot |
146
+ | `chibi restart` | Restart the bot |
147
+ | `chibi config` | Generate or edit configuration |
148
+ | `chibi logs` | View bot logs |
149
+
150
+ ---
151
+
152
+ ## 🚀 Quick start (Docker)
153
+
154
+ Create `docker-compose.yml`:
155
+
156
+ ```yaml
157
+ version: '3.8'
158
+
159
+ services:
160
+ chibi:
161
+ image: pysergio/chibi:latest
162
+ restart: unless-stopped
163
+ environment:
164
+ TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN} # Required
165
+ OPENAI_API_KEY: ${OPENAI_API_KEY} # Or any other provider
166
+ # Add more API keys as needed
167
+ volumes:
168
+ - chibi_data:/app/data
169
+
170
+ volumes:
171
+ chibi_data: {}
172
+ ```
173
+
174
+ 1) Get a bot token from [@BotFather](https://t.me/BotFather)
175
+
176
+ 2) Put secrets into `.env`
177
+
178
+ 3) Run:
179
+
180
+ ```bash
181
+ docker-compose up -d
182
+ ```
183
+
184
+ Next:
185
+ - **Installation guide:** https://chibi.bot/installation
186
+ - **Configuration reference:** https://chibi.bot/configuration
187
+
188
+ ---
189
+
190
+ ## 🔑 Getting API Keys
191
+
192
+ Each provider requires its own API key. Here are the direct links:
193
+
194
+ **Major Providers:**
195
+ - **OpenAI** (GPT, DALL·E): [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
196
+ - **Anthropic** (Claude): [console.anthropic.com](https://console.anthropic.com/)
197
+ - **Google** (Gemini, Nano Banana, Imagen): [aistudio.google.com/apikey](https://aistudio.google.com/app/apikey)
198
+ - **DeepSeek**: [platform.deepseek.com](https://platform.deepseek.com/)
199
+ - **xAI** (Grok): [console.x.ai](https://console.x.ai/)
200
+ - **Alibaba** (Qwen, Wan): [modelstudio.console.alibabacloud.com](https://modelstudio.console.alibabacloud.com?tab=playground#/api-key)
201
+ - **Mistral AI**: [console.mistral.ai](https://console.mistral.ai/)
202
+ - **Moonshot** (Kimi): [platform.moonshot.cn](https://platform.moonshot.cn/)
203
+ - **MiniMax** (Voice, MiniMax-M2.x): [minimax.io](https://www.minimax.io)
204
+ - **Cloudflare Workers AI**: [dash.cloudflare.com/profile/api-tokens](https://dash.cloudflare.com/profile/api-tokens)
205
+
206
+ **Creative Tools:**
207
+ - **ElevenLabs** (Voice): [elevenlabs.io](https://elevenlabs.io/)
208
+ - **Suno** (Music, unofficial): [sunoapi.org](https://sunoapi.org/)
209
+
210
+ > 📖 **Full guide with setup instructions:** [chibi.bot/guides/get-api-keys](https://chibi.bot/guides/get-api-keys)
211
+
212
+ ---
213
+
214
+ ## Try this in the first 5 minutes
215
+
216
+ Paste these into Telegram after you deploy.
217
+
218
+ 1) **Planning + execution**
219
+ > Ask me 3 questions to clarify my goal, then propose a plan and execute step 1.
220
+
221
+ 2) **Parallel work (sub-agents)**
222
+ > Spawn 3 sub-agents: one to research options, one to draft a recommendation, one to list risks. Return a single decision.
223
+
224
+ 3) **Agent mode (tools)**
225
+ > Inspect the project files and summarize what this repo does. Then propose 5 improvements and open a checklist.
226
+
227
+ 4) **Background task**
228
+ > Start a background task: gather sources on X and deliver a synthesis in 30 minutes. Keep me updated.
229
+
230
+ ---
231
+
232
+ ## What makes Chibi different
233
+
234
+ ### 🎭 Multi-provider orchestration
235
+ Chibi can keep context while switching providers mid-thread, or choose the best model per step - balancing **cost**, **capability**, and **speed**.
236
+
237
+ ### 🤖 Autonomous agent capabilities
238
+ - **Recursive delegation:** spawn sub-agents that can spawn their own sub-agents
239
+ - **Background processing:** long-running tasks execute asynchronously
240
+ - **Filesystem access:** read/write/search/organize files
241
+ - **Terminal execution:** run commands with LLM-moderated security
242
+ - **Persistent memory:** conversation history survives restarts with context management/summarization
243
+
244
+ ### 🔌 Extensible via MCP (Model Context Protocol)
245
+ Connect Chibi to external tools and services (or build your own):
246
+
247
+ - GitHub (PRs, issues, code review)
248
+ - Browser automation
249
+ - Docker / cloud services
250
+ - Databases
251
+ - Creative tools (Blender, Figma)
252
+
253
+ If a tool can be exposed via MCP, Chibi can learn to use it.
254
+
255
+ ### 🎨 Rich content generation
256
+ - **Images:** Nano Banana, Imagen, Qwen, Wan, DALL·E, Grok
257
+ - **Music:** Suno (including custom mode: style/lyrics/vocals)
258
+ - **Voice:** transcription + text-to-speech (ElevenLabs, MiniMax, OpenAI)
259
+
260
+ ---
261
+
262
+ ## Use cases
263
+
264
+ **Developers**
265
+ ```
266
+ You: “Run the tests and fix what’s broken. I’ll work on the frontend.”
267
+ Chibi: *spawns sub-agent, executes tests, analyzes failures, proposes fixes*
268
+ ```
269
+
270
+ **Researchers**
271
+ ```
272
+ You: “Research the latest developments in quantum computing. I need a synthesis by tomorrow.”
273
+ Chibi: *spawns multiple research agents, aggregates sources, delivers a report*
274
+ ```
275
+
276
+ **Creators**
277
+ ```
278
+ You: “Generate a cyberpunk cityscape and compose a synthwave track to match.”
279
+ Chibi: *generates an image, creates music, delivers both*
280
+ ```
281
+
282
+ **Teams**
283
+ ```
284
+ You: “Review this PR and update the documentation accordingly.”
285
+ Chibi: *analyzes changes, suggests improvements, updates docs via MCP*
286
+ ```
287
+
288
+ ---
289
+
290
+ ## Privacy, control, and safety
291
+
292
+ - **Self-hosted:** your data stays on your infrastructure
293
+ - **Public Mode:** users can bring their own API keys (no shared master key required)
294
+ - **Access control:** whitelist users/groups/models
295
+ - **Storage options:** local volumes, Redis, or DynamoDB
296
+ - **Tool safety:** agent tools are configurable; terminal execution is moderated and can be restricted
297
+
298
+ ---
299
+
300
+ ## Documentation
301
+
302
+ - **Start here:** https://chibi.bot
303
+ - Introduction & philosophy: https://chibi.bot/introduction
304
+ - Installation: https://chibi.bot/installation
305
+ - Configuration: https://chibi.bot/configuration
306
+ - Agent mode: https://chibi.bot/agent-mode
307
+ - MCP guide: https://chibi.bot/guides/mcp
308
+ - Support / troubleshooting: https://chibi.bot/support
309
+
310
+ ---
311
+
312
+ ## System requirements
313
+
314
+ - **Minimum:** Raspberry Pi 4 / AWS EC2 t4g.nano (2 vCPU, 512MB RAM)
315
+ - **Architectures:** `linux/amd64`, `linux/arm64`
316
+ - **Dependencies:** Docker (and optionally Docker Compose)
317
+
318
+ ---
319
+
320
+ ## Contributing
321
+
322
+ - Issues: https://github.com/s-nagaev/chibi/issues
323
+ - PRs: https://github.com/s-nagaev/chibi/pulls
324
+ - Discussions: https://github.com/s-nagaev/chibi/discussions
325
+
326
+ Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting.
327
+
328
+ ---
329
+
330
+ ## License
331
+
332
+ MIT - see [LICENSE](LICENSE).
333
+
334
+ ---
335
+
336
+ <p align="center">
337
+ <strong>Ready to meet your digital companion?</strong><br/>
338
+ <a href="https://chibi.bot/start"><strong>Get Started →</strong></a>
339
+ </p>
340
+
@@ -0,0 +1,302 @@
1
+ <h1 align="center"><img width=150 src="https://github.com/s-nagaev/chibi/raw/main/docs/logo.png" alt="Chibi Logo"></h1>
2
+
3
+ <p align="center">
4
+ <strong>Your Digital Companion. Not a Tool. A Partner.</strong><br/>
5
+ <span>Self-hosted, asynchronous Telegram bot that orchestrates multiple AI providers, tools, and sub-agents to get real work done.</span>
6
+ </p>
7
+
8
+ <p align="center">
9
+ <a href="https://github.com/s-nagaev/chibi/actions/workflows/build.yml"><img src="https://github.com/s-nagaev/chibi/actions/workflows/build.yml/badge.svg" alt="Build"></a>
10
+ <a href="https://www.codefactor.io/repository/github/s-nagaev/chibi"><img src="https://www.codefactor.io/repository/github/s-nagaev/chibi/badge" alt="CodeFactor"></a>
11
+ <a href="https://hub.docker.com/r/pysergio/chibi"><img src="https://img.shields.io/docker/pulls/pysergio/chibi" alt="Docker Pulls"></a>
12
+ <a href="https://hub.docker.com/r/pysergio/chibi/tags"><img src="https://img.shields.io/badge/docker%20image%20arch-arm64%20%7C%20amd64-informational" alt="Architectures"></a>
13
+ <a href="https://github.com/s-nagaev/chibi/blob/main/LICENSE"><img src="https://img.shields.io/github/license/s-nagaev/chibi" alt="License"></a>
14
+ <a href="https://chibi.bot"><img src="https://img.shields.io/badge/docs-chibi.bot-blue" alt="Documentation"></a>
15
+
16
+ <p align="center">
17
+ <strong>🌍 Read this in other languages:</strong><br/>
18
+ <a href="docs/README.es.md">Español</a> •
19
+ <a href="docs/README.pt-BR.md">Português (Brasil)</a> •
20
+ <a href="docs/README.uk.md">Українська</a> •
21
+ <a href="docs/README.id.md">Bahasa Indonesia</a> •
22
+ <a href="docs/README.tr.md">Türkçe</a> •
23
+ <a href="docs/README.ru.md">Русский</a> •
24
+ <a href="docs/README.ja.md">日本語</a> •
25
+ <a href="docs/README.zh-TW.md">繁體中文</a> •
26
+ <a href="docs/README.zh-CN.md">简体中文</a>
27
+ </p>
28
+
29
+ ---
30
+
31
+ Chibi is built for the moment you realize you need more than “an AI tool.” You need a **partner** that can coordinate models, run work in the background, and integrate with your systems - without you babysitting prompts.
32
+
33
+ **Chibi** is an asynchronous, self-hosted **Telegram-based digital companion** that orchestrates multiple AI providers and tools to deliver outcomes: code changes, research syntheses, media generation, and operational tasks.
34
+
35
+ ---
36
+
37
+ ## Why Chibi
38
+
39
+ - **One interface (Telegram).** Mobile/desktop/web, always with you.
40
+ - **Provider-agnostic.** Use the best model for each task - without vendor lock-in.
41
+ - **Autonomous execution.** Sub-agents work in parallel; long tasks run asynchronously.
42
+ - **Tool-connected.** Filesystem + terminal + MCP integrations (GitHub, browser, DBs, etc.).
43
+ - **Self-hosted.** Your data, your keys, your rules.
44
+
45
+ ---
46
+
47
+ ## Supported AI providers (and endpoints)
48
+
49
+ Chibi supports multiple providers behind a single conversation. Add one key or many - Chibi can route per task.
50
+
51
+ ### LLM providers
52
+
53
+ - **OpenAI** (GPT models)
54
+ - **Anthropic** (Claude)
55
+ - **Google** (Gemini)
56
+ - **DeepSeek**
57
+ - **Alibaba Cloud** (Qwen)
58
+ - **xAI** (Grok)
59
+ - **Mistral AI**
60
+ - **Moonshot AI**
61
+ - **MiniMax**
62
+ - **Cloudflare Workers AI** (many open-source models)
63
+
64
+ ### OpenAI-compatible endpoints (self-host / local)
65
+
66
+ - **Ollama**
67
+ - **vLLM**
68
+ - **LM Studio**
69
+ - **Any** OpenAI-compatible API
70
+
71
+ ### Multimodal providers (optional)
72
+
73
+ - **Images:** Google (Imagen, Nano Banana), OpenAI (DALL·E), Alibaba (Qwen Image), xAI (Grok Image), Wan
74
+ - **Music:** Suno
75
+ - **Voice:** ElevenLabs, MiniMax, OpenAI (Whisper)
76
+
77
+ > Exact model availability depends on your configured provider keys and enabled features.
78
+
79
+ ---
80
+
81
+ ## 🚀 Quick Start (pip)
82
+
83
+ Install Chibi via pip and run it as a command-line application:
84
+
85
+ ```bash
86
+ # Install the package
87
+ pip install chibi
88
+
89
+ # Generate default configuration
90
+ chibi config
91
+
92
+ # Edit the configuration file
93
+ nano ~/.chibi/settings
94
+ # or
95
+ vim ~/.chibi/settings
96
+
97
+ # Start the bot
98
+ chibi start
99
+ ```
100
+
101
+ The bot will run as a background service. Use CLI commands to manage it.
102
+
103
+ ### CLI Commands
104
+
105
+ | Command | Description |
106
+ |---------|-------------|
107
+ | `chibi start` | Start the bot as a background service |
108
+ | `chibi stop` | Stop the running bot |
109
+ | `chibi restart` | Restart the bot |
110
+ | `chibi config` | Generate or edit configuration |
111
+ | `chibi logs` | View bot logs |
112
+
113
+ ---
114
+
115
+ ## 🚀 Quick start (Docker)
116
+
117
+ Create `docker-compose.yml`:
118
+
119
+ ```yaml
120
+ version: '3.8'
121
+
122
+ services:
123
+ chibi:
124
+ image: pysergio/chibi:latest
125
+ restart: unless-stopped
126
+ environment:
127
+ TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN} # Required
128
+ OPENAI_API_KEY: ${OPENAI_API_KEY} # Or any other provider
129
+ # Add more API keys as needed
130
+ volumes:
131
+ - chibi_data:/app/data
132
+
133
+ volumes:
134
+ chibi_data: {}
135
+ ```
136
+
137
+ 1) Get a bot token from [@BotFather](https://t.me/BotFather)
138
+
139
+ 2) Put secrets into `.env`
140
+
141
+ 3) Run:
142
+
143
+ ```bash
144
+ docker-compose up -d
145
+ ```
146
+
147
+ Next:
148
+ - **Installation guide:** https://chibi.bot/installation
149
+ - **Configuration reference:** https://chibi.bot/configuration
150
+
151
+ ---
152
+
153
+ ## 🔑 Getting API Keys
154
+
155
+ Each provider requires its own API key. Here are the direct links:
156
+
157
+ **Major Providers:**
158
+ - **OpenAI** (GPT, DALL·E): [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
159
+ - **Anthropic** (Claude): [console.anthropic.com](https://console.anthropic.com/)
160
+ - **Google** (Gemini, Nano Banana, Imagen): [aistudio.google.com/apikey](https://aistudio.google.com/app/apikey)
161
+ - **DeepSeek**: [platform.deepseek.com](https://platform.deepseek.com/)
162
+ - **xAI** (Grok): [console.x.ai](https://console.x.ai/)
163
+ - **Alibaba** (Qwen, Wan): [modelstudio.console.alibabacloud.com](https://modelstudio.console.alibabacloud.com?tab=playground#/api-key)
164
+ - **Mistral AI**: [console.mistral.ai](https://console.mistral.ai/)
165
+ - **Moonshot** (Kimi): [platform.moonshot.cn](https://platform.moonshot.cn/)
166
+ - **MiniMax** (Voice, MiniMax-M2.x): [minimax.io](https://www.minimax.io)
167
+ - **Cloudflare Workers AI**: [dash.cloudflare.com/profile/api-tokens](https://dash.cloudflare.com/profile/api-tokens)
168
+
169
+ **Creative Tools:**
170
+ - **ElevenLabs** (Voice): [elevenlabs.io](https://elevenlabs.io/)
171
+ - **Suno** (Music, unofficial): [sunoapi.org](https://sunoapi.org/)
172
+
173
+ > 📖 **Full guide with setup instructions:** [chibi.bot/guides/get-api-keys](https://chibi.bot/guides/get-api-keys)
174
+
175
+ ---
176
+
177
+ ## Try this in the first 5 minutes
178
+
179
+ Paste these into Telegram after you deploy.
180
+
181
+ 1) **Planning + execution**
182
+ > Ask me 3 questions to clarify my goal, then propose a plan and execute step 1.
183
+
184
+ 2) **Parallel work (sub-agents)**
185
+ > Spawn 3 sub-agents: one to research options, one to draft a recommendation, one to list risks. Return a single decision.
186
+
187
+ 3) **Agent mode (tools)**
188
+ > Inspect the project files and summarize what this repo does. Then propose 5 improvements and open a checklist.
189
+
190
+ 4) **Background task**
191
+ > Start a background task: gather sources on X and deliver a synthesis in 30 minutes. Keep me updated.
192
+
193
+ ---
194
+
195
+ ## What makes Chibi different
196
+
197
+ ### 🎭 Multi-provider orchestration
198
+ Chibi can keep context while switching providers mid-thread, or choose the best model per step - balancing **cost**, **capability**, and **speed**.
199
+
200
+ ### 🤖 Autonomous agent capabilities
201
+ - **Recursive delegation:** spawn sub-agents that can spawn their own sub-agents
202
+ - **Background processing:** long-running tasks execute asynchronously
203
+ - **Filesystem access:** read/write/search/organize files
204
+ - **Terminal execution:** run commands with LLM-moderated security
205
+ - **Persistent memory:** conversation history survives restarts with context management/summarization
206
+
207
+ ### 🔌 Extensible via MCP (Model Context Protocol)
208
+ Connect Chibi to external tools and services (or build your own):
209
+
210
+ - GitHub (PRs, issues, code review)
211
+ - Browser automation
212
+ - Docker / cloud services
213
+ - Databases
214
+ - Creative tools (Blender, Figma)
215
+
216
+ If a tool can be exposed via MCP, Chibi can learn to use it.
217
+
218
+ ### 🎨 Rich content generation
219
+ - **Images:** Nano Banana, Imagen, Qwen, Wan, DALL·E, Grok
220
+ - **Music:** Suno (including custom mode: style/lyrics/vocals)
221
+ - **Voice:** transcription + text-to-speech (ElevenLabs, MiniMax, OpenAI)
222
+
223
+ ---
224
+
225
+ ## Use cases
226
+
227
+ **Developers**
228
+ ```
229
+ You: “Run the tests and fix what’s broken. I’ll work on the frontend.”
230
+ Chibi: *spawns sub-agent, executes tests, analyzes failures, proposes fixes*
231
+ ```
232
+
233
+ **Researchers**
234
+ ```
235
+ You: “Research the latest developments in quantum computing. I need a synthesis by tomorrow.”
236
+ Chibi: *spawns multiple research agents, aggregates sources, delivers a report*
237
+ ```
238
+
239
+ **Creators**
240
+ ```
241
+ You: “Generate a cyberpunk cityscape and compose a synthwave track to match.”
242
+ Chibi: *generates an image, creates music, delivers both*
243
+ ```
244
+
245
+ **Teams**
246
+ ```
247
+ You: “Review this PR and update the documentation accordingly.”
248
+ Chibi: *analyzes changes, suggests improvements, updates docs via MCP*
249
+ ```
250
+
251
+ ---
252
+
253
+ ## Privacy, control, and safety
254
+
255
+ - **Self-hosted:** your data stays on your infrastructure
256
+ - **Public Mode:** users can bring their own API keys (no shared master key required)
257
+ - **Access control:** whitelist users/groups/models
258
+ - **Storage options:** local volumes, Redis, or DynamoDB
259
+ - **Tool safety:** agent tools are configurable; terminal execution is moderated and can be restricted
260
+
261
+ ---
262
+
263
+ ## Documentation
264
+
265
+ - **Start here:** https://chibi.bot
266
+ - Introduction & philosophy: https://chibi.bot/introduction
267
+ - Installation: https://chibi.bot/installation
268
+ - Configuration: https://chibi.bot/configuration
269
+ - Agent mode: https://chibi.bot/agent-mode
270
+ - MCP guide: https://chibi.bot/guides/mcp
271
+ - Support / troubleshooting: https://chibi.bot/support
272
+
273
+ ---
274
+
275
+ ## System requirements
276
+
277
+ - **Minimum:** Raspberry Pi 4 / AWS EC2 t4g.nano (2 vCPU, 512MB RAM)
278
+ - **Architectures:** `linux/amd64`, `linux/arm64`
279
+ - **Dependencies:** Docker (and optionally Docker Compose)
280
+
281
+ ---
282
+
283
+ ## Contributing
284
+
285
+ - Issues: https://github.com/s-nagaev/chibi/issues
286
+ - PRs: https://github.com/s-nagaev/chibi/pulls
287
+ - Discussions: https://github.com/s-nagaev/chibi/discussions
288
+
289
+ Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting.
290
+
291
+ ---
292
+
293
+ ## License
294
+
295
+ MIT - see [LICENSE](LICENSE).
296
+
297
+ ---
298
+
299
+ <p align="center">
300
+ <strong>Ready to meet your digital companion?</strong><br/>
301
+ <a href="https://chibi.bot/start"><strong>Get Started →</strong></a>
302
+ </p>
File without changes