simplecontext-bot 1.2.0__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.
@@ -0,0 +1,315 @@
1
+ Metadata-Version: 2.4
2
+ Name: simplecontext-bot
3
+ Version: 1.2.0
4
+ Summary: AI Telegram Bot powered by SimpleContext โ€” one-command setup, auto-downloads engine and agents.
5
+ Author: zacxyonly
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/zacxyonly/SimpleContext-Bot
8
+ Project-URL: Documentation, https://zacxyonly.github.io/SimpleContext-Docs/bot/setup/
9
+ Project-URL: Repository, https://github.com/zacxyonly/SimpleContext-Bot
10
+ Project-URL: Issues, https://github.com/zacxyonly/SimpleContext-Bot/issues
11
+ Keywords: telegram,bot,ai,chatbot,simplecontext,llm,gemini,openai,ollama,agent,memory
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Topic :: Communications :: Chat
20
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ Requires-Dist: python-telegram-bot>=21.0
24
+ Requires-Dist: litellm>=1.40.0
25
+
26
+ <div align="center">
27
+
28
+ <h1>๐Ÿค– SimpleContext-Bot</h1>
29
+
30
+ <p><strong>AI Telegram Bot powered by <a href="https://github.com/zacxyonly/SimpleContext">SimpleContext</a></strong><br/>
31
+ Setup wizard ยท Auto-routing agents ยท Works with Gemini, OpenAI, Ollama</p>
32
+
33
+ [![Python](https://img.shields.io/badge/Python-3.10%2B-blue?style=flat-square&logo=python&logoColor=white)](https://python.org)
34
+ [![Telegram](https://img.shields.io/badge/Telegram-Bot-2CA5E0?style=flat-square&logo=telegram)](https://telegram.org)
35
+ [![License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)](LICENSE)
36
+ [![SimpleContext](https://img.shields.io/badge/Powered%20by-SimpleContext%20v4.2-blueviolet?style=flat-square)](https://github.com/zacxyonly/SimpleContext)
37
+ [![Plugins](https://img.shields.io/badge/Plugins-SimpleContext--Plugin-orange?style=flat-square)](https://github.com/zacxyonly/SimpleContext-Plugin)
38
+ [![Dynamic Plugins](https://img.shields.io/badge/Plugins-Dynamic%20Auto--Load-brightgreen?style=flat-square)]()
39
+
40
+ </div>
41
+
42
+ ---
43
+
44
+ ## โœจ What is this?
45
+
46
+ SimpleContext-Bot is a **ready-to-run Telegram bot** that uses [SimpleContext](https://github.com/zacxyonly/SimpleContext) as its AI brain.
47
+
48
+ A built-in setup wizard **automatically downloads** the engine and agents, then walks you through configuration step by step.
49
+
50
+ ---
51
+
52
+ ## ๐Ÿš€ Installation
53
+
54
+ ### 1. Clone & Install
55
+
56
+ ```bash
57
+ git clone https://github.com/zacxyonly/SimpleContext-Bot.git
58
+ cd SimpleContext-Bot
59
+ pip install .
60
+ ```
61
+
62
+ ### 2. Run Setup Wizard
63
+
64
+ ```bash
65
+ simplecontext-bot setup
66
+ ```
67
+
68
+ The wizard will handle everything:
69
+
70
+ ```
71
+ Step 1/6 Download SimpleContext engine from GitHub โœ…
72
+ Step 2/6 Download 9 agent definitions โœ…
73
+ Step 3/6 Plugin Ecosystem (Optional) โ†’ pilih plugin yang diinginkan
74
+ Step 4/6 Telegram Bot Token โ†’ paste from @BotFather
75
+ Step 5/6 LLM Provider & API Key โ†’ choose Gemini/OpenAI/Ollama
76
+ Step 6/6 Final configuration โœ… Done!
77
+ ```
78
+
79
+ ### 3. Start
80
+
81
+ ```bash
82
+ simplecontext-bot start
83
+ ```
84
+
85
+ ---
86
+
87
+ ## ๐Ÿ”‘ Getting Your Tokens
88
+
89
+ **Telegram Bot Token**
90
+ 1. Open Telegram โ†’ search `@BotFather`
91
+ 2. Send `/newbot` and follow the steps
92
+ 3. Copy the token
93
+
94
+ **Gemini API Key** *(free, recommended)*
95
+ 1. Go to [aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey)
96
+ 2. Click **Create API Key** โ†’ copy
97
+
98
+ **OpenAI API Key**
99
+ 1. Go to [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
100
+ 2. Click **Create new secret key** โ†’ copy
101
+
102
+ **Ollama** *(local, no API key needed)*
103
+ 1. Install from [ollama.ai](https://ollama.ai)
104
+ 2. Run `ollama pull llama3`
105
+ 3. Make sure Ollama is running before starting the bot
106
+
107
+ ---
108
+
109
+ ## ๐Ÿง  Powered By
110
+
111
+ | | Repo | Role |
112
+ |---|---|---|
113
+ | **SimpleContext** | [โ†’](https://github.com/zacxyonly/SimpleContext) | AI brain โ€” tiered memory, context scoring, intent planning |
114
+ | **SimpleContext-Agents** | [โ†’](https://github.com/zacxyonly/SimpleContext-Agents) | 9 ready-to-use agent definitions |
115
+ | **SimpleContext-Plugin** | [โ†’](https://github.com/zacxyonly/SimpleContext-Plugin) | Official plugin registry โ€” extend bot capabilities |
116
+ | **LiteLLM** | pip | Universal LLM connector |
117
+
118
+ ---
119
+
120
+ ## ๐ŸŽฏ Auto-Routing
121
+
122
+ No need to manually switch agents. The bot detects the best agent for every message automatically:
123
+
124
+ ```
125
+ "ada bug di python saya" โ†’ ๐Ÿ–ฅ๏ธ coding
126
+ "deploy ke server nginx" โ†’ ๐Ÿš€ devops
127
+ "tulis caption instagram" โ†’ โœ๏ธ writer
128
+ "terjemahkan ke english" โ†’ ๐ŸŒ translator
129
+ "jelaskan konsep ini" โ†’ ๐Ÿ“š tutor
130
+ "ringkas artikel ini" โ†’ ๐Ÿ“ summarizer
131
+ "cek fakta berita ini" โ†’ ๐Ÿ” researcher
132
+ "komplain order saya" โ†’ ๐ŸŽง customer_service
133
+ "analisis data penjualan" โ†’ ๐Ÿ“Š analyst
134
+ ```
135
+
136
+ ---
137
+
138
+ ## ๐Ÿค– Available Agents
139
+
140
+ | | Agent | Description |
141
+ |---|---|---|
142
+ | ๐Ÿ–ฅ๏ธ | `coding` | Expert programmer โ€” debug, review, all languages |
143
+ | ๐Ÿš€ | `devops` | Server, Docker, CI/CD, Linux infrastructure |
144
+ | โœ๏ธ | `writer` | Content, copywriting, email, social media |
145
+ | ๐Ÿ“Š | `analyst` | Data analysis, business insights, KPIs |
146
+ | ๐ŸŽง | `customer_service` | Empathetic CS, complaint handling |
147
+ | ๐ŸŒ | `translator` | Multi-language, idiom-aware translation |
148
+ | ๐Ÿ“š | `tutor` | Patient adaptive teacher for any subject |
149
+ | ๐Ÿ” | `researcher` | Fact-checking, research, source evaluation |
150
+ | ๐Ÿ“ | `summarizer` | Condense any content into clear summaries |
151
+
152
+ ---
153
+
154
+ ## ๐Ÿ’ฌ Bot Commands
155
+
156
+ | Command | Description |
157
+ |---|---|
158
+ | `/start` | Welcome message, saves your name |
159
+ | `/help` | Show all commands |
160
+ | `/agents` | List available agents |
161
+ | `/agent <name>` | Switch to a specific agent |
162
+ | `/agent auto` | Back to auto-routing |
163
+ | `/clear` | Clear conversation history |
164
+ | `/status` | Show current agent and stats |
165
+ | `/memory` | Show your saved profile |
166
+ | `/plugins` | List installed plugins & available plugins |
167
+ | `/semantic <query>` | Search memory by meaning (requires vector-search plugin) |
168
+
169
+ ---
170
+
171
+
172
+ ## ๐Ÿ”Œ Plugin Ecosystem
173
+
174
+ SimpleContext-Bot dapat diperluas dengan plugin dari [SimpleContext-Plugin](https://github.com/zacxyonly/SimpleContext-Plugin).
175
+
176
+ ### Plugin yang tersedia
177
+
178
+ | Plugin | Deskripsi | Tested โœ… |
179
+ |--------|-----------|-----------|
180
+ | [`vector-search`](https://github.com/zacxyonly/SimpleContext-Plugin/tree/main/official/plugin-vector-search) | Semantic similarity search โ€” temukan memory berdasarkan makna, bukan kata persis | โœ… |
181
+
182
+ ### Cara install plugin
183
+
184
+ **Saat setup wizard** โ€” wizard menawarkan plugin di Step 3.
185
+
186
+ **Setelah setup โ€” via CLI:**
187
+ ```bash
188
+ simplecontext-bot plugins install vector-search
189
+ ```
190
+
191
+ **Manual (plugin komunitas):**
192
+ Cukup drop file `.py` ke folder `~/.simplecontext-bot/plugins/` lalu restart bot.
193
+ Bot akan **auto-detect dan load** semua plugin di folder tersebut โ€” termasuk plugin
194
+ komunitas dari [SimpleContext-Plugin](https://github.com/zacxyonly/SimpleContext-Plugin)
195
+ atau plugin buatan sendiri.
196
+
197
+ ```bash
198
+ # Contoh: install plugin komunitas secara manual
199
+ cp my_custom_plugin.py ~/.simplecontext-bot/plugins/
200
+ simplecontext-bot start # plugin langsung aktif
201
+ ```
202
+
203
+ ### Plugin commands โ€” auto-register ke Telegram
204
+
205
+ Plugin bisa mendeklarasikan command sendiri via `BOT_COMMANDS`. Bot otomatis
206
+ mendaftarkannya ke Telegram โ€” tidak perlu ubah kode bot sama sekali.
207
+
208
+ ```python
209
+ # Di file plugin kamu:
210
+ class MyPlugin(BasePlugin):
211
+ BOT_COMMANDS = {
212
+ "mycommand": {
213
+ "description": "Deskripsi command",
214
+ "usage": "/mycommand <arg>",
215
+ "handler": "bot_cmd_mycommand", # nama method di class ini
216
+ }
217
+ }
218
+
219
+ async def bot_cmd_mycommand(self, sc, update, ctx, args):
220
+ return f"Kamu kirim: {' '.join(args)}"
221
+ ```
222
+
223
+ Setelah bot restart, `/mycommand` langsung tersedia di Telegram โ€” muncul di
224
+ menu command dan terdaftar di `/help` secara otomatis.
225
+
226
+ ```
227
+ /plugins
228
+ โ†’ โœ… vector_search_plugin v1.0.0
229
+ โ†’ Semantic vector search berbasis embedding
230
+ โ†’ โ€ข /semantic โ€” Cari memory berdasarkan makna
231
+ โ†’ Usage: /semantic <query>
232
+
233
+ /semantic kenangan liburan
234
+ โ†’ 1. [Semantic | โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 84%] user suka pantai dan hiking ...
235
+ โ†’ 2. [Episodic | โ–ˆโ–ˆโ–ˆโ–‘โ–‘ 67%] sesi kemarin bahas rencana trip ...
236
+ ```
237
+
238
+ ---
239
+
240
+ ## โš™๏ธ CLI Commands
241
+
242
+ ```bash
243
+ simplecontext-bot setup # First-time setup wizard (includes plugin selection)
244
+ simplecontext-bot start # Start the bot
245
+ simplecontext-bot start --debug # Start with verbose logging
246
+ simplecontext-bot status # Show configuration
247
+ simplecontext-bot status --test # Check + test LLM connection
248
+ simplecontext-bot agents # List installed agents
249
+ simplecontext-bot update # Update engine + agents
250
+ simplecontext-bot update --engine-only # Update engine only
251
+ simplecontext-bot update --agents-only # Update agents only
252
+ simplecontext-bot plugins list # List all plugins
253
+ simplecontext-bot plugins install <id> # Install a plugin
254
+ simplecontext-bot plugins remove <id> # Remove a plugin
255
+ ```
256
+
257
+ ---
258
+
259
+ ## ๐Ÿ“ Files After Setup
260
+
261
+ Everything is stored in `~/.simplecontext-bot/`:
262
+
263
+ ```
264
+ ~/.simplecontext-bot/
265
+ โ”œโ”€โ”€ config.json โ† your settings (tokens, LLM config)
266
+ โ”œโ”€โ”€ bot.db โ† conversation memory (SQLite)
267
+ โ”œโ”€โ”€ simplecontext/ โ† SimpleContext engine (auto-downloaded)
268
+ โ”œโ”€โ”€ agents/ โ† agent YAML files (auto-downloaded)
269
+ โ”‚ โ”œโ”€โ”€ coding.yaml
270
+ โ”‚ โ”œโ”€โ”€ devops.yaml
271
+ โ”‚ โ””โ”€โ”€ ...
272
+ โ””โ”€โ”€ plugins/ โ† installed plugins (auto-downloaded via wizard)
273
+ โ””โ”€โ”€ vector_search_plugin.py
274
+ ```
275
+
276
+ ---
277
+
278
+ ## ๐Ÿ”ง Troubleshooting
279
+
280
+ **Something not working?**
281
+ ```bash
282
+ simplecontext-bot status --test
283
+ ```
284
+
285
+ **Update engine and agents:**
286
+ ```bash
287
+ simplecontext-bot update
288
+ ```
289
+
290
+ **Start fresh:**
291
+ ```bash
292
+ rm -rf ~/.simplecontext-bot
293
+ simplecontext-bot setup
294
+ ```
295
+
296
+ ---
297
+
298
+ ## ๐Ÿ”— Ecosystem
299
+
300
+ | Repositori | Deskripsi |
301
+ |------------|----------|
302
+ | [SimpleContext](https://github.com/zacxyonly/SimpleContext) | Core engine โ€” Universal AI Brain |
303
+ | [SimpleContext-Plugin](https://github.com/zacxyonly/SimpleContext-Plugin) | Plugin registry โ€” extend with semantic search, summarizer, and more |
304
+ | [SimpleContext-Bot](https://github.com/zacxyonly/SimpleContext-Bot) | This repo โ€” Telegram Bot |
305
+ | [SimpleContext-Agents](https://github.com/zacxyonly/SimpleContext-Agents) | Ready-to-use agent definitions |
306
+
307
+ ---
308
+
309
+ <div align="center">
310
+
311
+ Built with โค๏ธ on top of [SimpleContext](https://github.com/zacxyonly/SimpleContext)
312
+
313
+ **[โญ Star the engine repo](https://github.com/zacxyonly/SimpleContext)** if you find this useful!
314
+
315
+ </div>
@@ -0,0 +1,290 @@
1
+ <div align="center">
2
+
3
+ <h1>๐Ÿค– SimpleContext-Bot</h1>
4
+
5
+ <p><strong>AI Telegram Bot powered by <a href="https://github.com/zacxyonly/SimpleContext">SimpleContext</a></strong><br/>
6
+ Setup wizard ยท Auto-routing agents ยท Works with Gemini, OpenAI, Ollama</p>
7
+
8
+ [![Python](https://img.shields.io/badge/Python-3.10%2B-blue?style=flat-square&logo=python&logoColor=white)](https://python.org)
9
+ [![Telegram](https://img.shields.io/badge/Telegram-Bot-2CA5E0?style=flat-square&logo=telegram)](https://telegram.org)
10
+ [![License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)](LICENSE)
11
+ [![SimpleContext](https://img.shields.io/badge/Powered%20by-SimpleContext%20v4.2-blueviolet?style=flat-square)](https://github.com/zacxyonly/SimpleContext)
12
+ [![Plugins](https://img.shields.io/badge/Plugins-SimpleContext--Plugin-orange?style=flat-square)](https://github.com/zacxyonly/SimpleContext-Plugin)
13
+ [![Dynamic Plugins](https://img.shields.io/badge/Plugins-Dynamic%20Auto--Load-brightgreen?style=flat-square)]()
14
+
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## โœจ What is this?
20
+
21
+ SimpleContext-Bot is a **ready-to-run Telegram bot** that uses [SimpleContext](https://github.com/zacxyonly/SimpleContext) as its AI brain.
22
+
23
+ A built-in setup wizard **automatically downloads** the engine and agents, then walks you through configuration step by step.
24
+
25
+ ---
26
+
27
+ ## ๐Ÿš€ Installation
28
+
29
+ ### 1. Clone & Install
30
+
31
+ ```bash
32
+ git clone https://github.com/zacxyonly/SimpleContext-Bot.git
33
+ cd SimpleContext-Bot
34
+ pip install .
35
+ ```
36
+
37
+ ### 2. Run Setup Wizard
38
+
39
+ ```bash
40
+ simplecontext-bot setup
41
+ ```
42
+
43
+ The wizard will handle everything:
44
+
45
+ ```
46
+ Step 1/6 Download SimpleContext engine from GitHub โœ…
47
+ Step 2/6 Download 9 agent definitions โœ…
48
+ Step 3/6 Plugin Ecosystem (Optional) โ†’ pilih plugin yang diinginkan
49
+ Step 4/6 Telegram Bot Token โ†’ paste from @BotFather
50
+ Step 5/6 LLM Provider & API Key โ†’ choose Gemini/OpenAI/Ollama
51
+ Step 6/6 Final configuration โœ… Done!
52
+ ```
53
+
54
+ ### 3. Start
55
+
56
+ ```bash
57
+ simplecontext-bot start
58
+ ```
59
+
60
+ ---
61
+
62
+ ## ๐Ÿ”‘ Getting Your Tokens
63
+
64
+ **Telegram Bot Token**
65
+ 1. Open Telegram โ†’ search `@BotFather`
66
+ 2. Send `/newbot` and follow the steps
67
+ 3. Copy the token
68
+
69
+ **Gemini API Key** *(free, recommended)*
70
+ 1. Go to [aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey)
71
+ 2. Click **Create API Key** โ†’ copy
72
+
73
+ **OpenAI API Key**
74
+ 1. Go to [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
75
+ 2. Click **Create new secret key** โ†’ copy
76
+
77
+ **Ollama** *(local, no API key needed)*
78
+ 1. Install from [ollama.ai](https://ollama.ai)
79
+ 2. Run `ollama pull llama3`
80
+ 3. Make sure Ollama is running before starting the bot
81
+
82
+ ---
83
+
84
+ ## ๐Ÿง  Powered By
85
+
86
+ | | Repo | Role |
87
+ |---|---|---|
88
+ | **SimpleContext** | [โ†’](https://github.com/zacxyonly/SimpleContext) | AI brain โ€” tiered memory, context scoring, intent planning |
89
+ | **SimpleContext-Agents** | [โ†’](https://github.com/zacxyonly/SimpleContext-Agents) | 9 ready-to-use agent definitions |
90
+ | **SimpleContext-Plugin** | [โ†’](https://github.com/zacxyonly/SimpleContext-Plugin) | Official plugin registry โ€” extend bot capabilities |
91
+ | **LiteLLM** | pip | Universal LLM connector |
92
+
93
+ ---
94
+
95
+ ## ๐ŸŽฏ Auto-Routing
96
+
97
+ No need to manually switch agents. The bot detects the best agent for every message automatically:
98
+
99
+ ```
100
+ "ada bug di python saya" โ†’ ๐Ÿ–ฅ๏ธ coding
101
+ "deploy ke server nginx" โ†’ ๐Ÿš€ devops
102
+ "tulis caption instagram" โ†’ โœ๏ธ writer
103
+ "terjemahkan ke english" โ†’ ๐ŸŒ translator
104
+ "jelaskan konsep ini" โ†’ ๐Ÿ“š tutor
105
+ "ringkas artikel ini" โ†’ ๐Ÿ“ summarizer
106
+ "cek fakta berita ini" โ†’ ๐Ÿ” researcher
107
+ "komplain order saya" โ†’ ๐ŸŽง customer_service
108
+ "analisis data penjualan" โ†’ ๐Ÿ“Š analyst
109
+ ```
110
+
111
+ ---
112
+
113
+ ## ๐Ÿค– Available Agents
114
+
115
+ | | Agent | Description |
116
+ |---|---|---|
117
+ | ๐Ÿ–ฅ๏ธ | `coding` | Expert programmer โ€” debug, review, all languages |
118
+ | ๐Ÿš€ | `devops` | Server, Docker, CI/CD, Linux infrastructure |
119
+ | โœ๏ธ | `writer` | Content, copywriting, email, social media |
120
+ | ๐Ÿ“Š | `analyst` | Data analysis, business insights, KPIs |
121
+ | ๐ŸŽง | `customer_service` | Empathetic CS, complaint handling |
122
+ | ๐ŸŒ | `translator` | Multi-language, idiom-aware translation |
123
+ | ๐Ÿ“š | `tutor` | Patient adaptive teacher for any subject |
124
+ | ๐Ÿ” | `researcher` | Fact-checking, research, source evaluation |
125
+ | ๐Ÿ“ | `summarizer` | Condense any content into clear summaries |
126
+
127
+ ---
128
+
129
+ ## ๐Ÿ’ฌ Bot Commands
130
+
131
+ | Command | Description |
132
+ |---|---|
133
+ | `/start` | Welcome message, saves your name |
134
+ | `/help` | Show all commands |
135
+ | `/agents` | List available agents |
136
+ | `/agent <name>` | Switch to a specific agent |
137
+ | `/agent auto` | Back to auto-routing |
138
+ | `/clear` | Clear conversation history |
139
+ | `/status` | Show current agent and stats |
140
+ | `/memory` | Show your saved profile |
141
+ | `/plugins` | List installed plugins & available plugins |
142
+ | `/semantic <query>` | Search memory by meaning (requires vector-search plugin) |
143
+
144
+ ---
145
+
146
+
147
+ ## ๐Ÿ”Œ Plugin Ecosystem
148
+
149
+ SimpleContext-Bot dapat diperluas dengan plugin dari [SimpleContext-Plugin](https://github.com/zacxyonly/SimpleContext-Plugin).
150
+
151
+ ### Plugin yang tersedia
152
+
153
+ | Plugin | Deskripsi | Tested โœ… |
154
+ |--------|-----------|-----------|
155
+ | [`vector-search`](https://github.com/zacxyonly/SimpleContext-Plugin/tree/main/official/plugin-vector-search) | Semantic similarity search โ€” temukan memory berdasarkan makna, bukan kata persis | โœ… |
156
+
157
+ ### Cara install plugin
158
+
159
+ **Saat setup wizard** โ€” wizard menawarkan plugin di Step 3.
160
+
161
+ **Setelah setup โ€” via CLI:**
162
+ ```bash
163
+ simplecontext-bot plugins install vector-search
164
+ ```
165
+
166
+ **Manual (plugin komunitas):**
167
+ Cukup drop file `.py` ke folder `~/.simplecontext-bot/plugins/` lalu restart bot.
168
+ Bot akan **auto-detect dan load** semua plugin di folder tersebut โ€” termasuk plugin
169
+ komunitas dari [SimpleContext-Plugin](https://github.com/zacxyonly/SimpleContext-Plugin)
170
+ atau plugin buatan sendiri.
171
+
172
+ ```bash
173
+ # Contoh: install plugin komunitas secara manual
174
+ cp my_custom_plugin.py ~/.simplecontext-bot/plugins/
175
+ simplecontext-bot start # plugin langsung aktif
176
+ ```
177
+
178
+ ### Plugin commands โ€” auto-register ke Telegram
179
+
180
+ Plugin bisa mendeklarasikan command sendiri via `BOT_COMMANDS`. Bot otomatis
181
+ mendaftarkannya ke Telegram โ€” tidak perlu ubah kode bot sama sekali.
182
+
183
+ ```python
184
+ # Di file plugin kamu:
185
+ class MyPlugin(BasePlugin):
186
+ BOT_COMMANDS = {
187
+ "mycommand": {
188
+ "description": "Deskripsi command",
189
+ "usage": "/mycommand <arg>",
190
+ "handler": "bot_cmd_mycommand", # nama method di class ini
191
+ }
192
+ }
193
+
194
+ async def bot_cmd_mycommand(self, sc, update, ctx, args):
195
+ return f"Kamu kirim: {' '.join(args)}"
196
+ ```
197
+
198
+ Setelah bot restart, `/mycommand` langsung tersedia di Telegram โ€” muncul di
199
+ menu command dan terdaftar di `/help` secara otomatis.
200
+
201
+ ```
202
+ /plugins
203
+ โ†’ โœ… vector_search_plugin v1.0.0
204
+ โ†’ Semantic vector search berbasis embedding
205
+ โ†’ โ€ข /semantic โ€” Cari memory berdasarkan makna
206
+ โ†’ Usage: /semantic <query>
207
+
208
+ /semantic kenangan liburan
209
+ โ†’ 1. [Semantic | โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 84%] user suka pantai dan hiking ...
210
+ โ†’ 2. [Episodic | โ–ˆโ–ˆโ–ˆโ–‘โ–‘ 67%] sesi kemarin bahas rencana trip ...
211
+ ```
212
+
213
+ ---
214
+
215
+ ## โš™๏ธ CLI Commands
216
+
217
+ ```bash
218
+ simplecontext-bot setup # First-time setup wizard (includes plugin selection)
219
+ simplecontext-bot start # Start the bot
220
+ simplecontext-bot start --debug # Start with verbose logging
221
+ simplecontext-bot status # Show configuration
222
+ simplecontext-bot status --test # Check + test LLM connection
223
+ simplecontext-bot agents # List installed agents
224
+ simplecontext-bot update # Update engine + agents
225
+ simplecontext-bot update --engine-only # Update engine only
226
+ simplecontext-bot update --agents-only # Update agents only
227
+ simplecontext-bot plugins list # List all plugins
228
+ simplecontext-bot plugins install <id> # Install a plugin
229
+ simplecontext-bot plugins remove <id> # Remove a plugin
230
+ ```
231
+
232
+ ---
233
+
234
+ ## ๐Ÿ“ Files After Setup
235
+
236
+ Everything is stored in `~/.simplecontext-bot/`:
237
+
238
+ ```
239
+ ~/.simplecontext-bot/
240
+ โ”œโ”€โ”€ config.json โ† your settings (tokens, LLM config)
241
+ โ”œโ”€โ”€ bot.db โ† conversation memory (SQLite)
242
+ โ”œโ”€โ”€ simplecontext/ โ† SimpleContext engine (auto-downloaded)
243
+ โ”œโ”€โ”€ agents/ โ† agent YAML files (auto-downloaded)
244
+ โ”‚ โ”œโ”€โ”€ coding.yaml
245
+ โ”‚ โ”œโ”€โ”€ devops.yaml
246
+ โ”‚ โ””โ”€โ”€ ...
247
+ โ””โ”€โ”€ plugins/ โ† installed plugins (auto-downloaded via wizard)
248
+ โ””โ”€โ”€ vector_search_plugin.py
249
+ ```
250
+
251
+ ---
252
+
253
+ ## ๐Ÿ”ง Troubleshooting
254
+
255
+ **Something not working?**
256
+ ```bash
257
+ simplecontext-bot status --test
258
+ ```
259
+
260
+ **Update engine and agents:**
261
+ ```bash
262
+ simplecontext-bot update
263
+ ```
264
+
265
+ **Start fresh:**
266
+ ```bash
267
+ rm -rf ~/.simplecontext-bot
268
+ simplecontext-bot setup
269
+ ```
270
+
271
+ ---
272
+
273
+ ## ๐Ÿ”— Ecosystem
274
+
275
+ | Repositori | Deskripsi |
276
+ |------------|----------|
277
+ | [SimpleContext](https://github.com/zacxyonly/SimpleContext) | Core engine โ€” Universal AI Brain |
278
+ | [SimpleContext-Plugin](https://github.com/zacxyonly/SimpleContext-Plugin) | Plugin registry โ€” extend with semantic search, summarizer, and more |
279
+ | [SimpleContext-Bot](https://github.com/zacxyonly/SimpleContext-Bot) | This repo โ€” Telegram Bot |
280
+ | [SimpleContext-Agents](https://github.com/zacxyonly/SimpleContext-Agents) | Ready-to-use agent definitions |
281
+
282
+ ---
283
+
284
+ <div align="center">
285
+
286
+ Built with โค๏ธ on top of [SimpleContext](https://github.com/zacxyonly/SimpleContext)
287
+
288
+ **[โญ Star the engine repo](https://github.com/zacxyonly/SimpleContext)** if you find this useful!
289
+
290
+ </div>
@@ -0,0 +1,46 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "simplecontext-bot"
7
+ version = "1.2.0"
8
+ description = "AI Telegram Bot powered by SimpleContext โ€” one-command setup, auto-downloads engine and agents."
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ authors = [{ name = "zacxyonly" }]
12
+ requires-python = ">=3.10"
13
+ dependencies = [
14
+ "python-telegram-bot>=21.0",
15
+ "litellm>=1.40.0",
16
+ ]
17
+
18
+ keywords = [
19
+ "telegram", "bot", "ai", "chatbot", "simplecontext",
20
+ "llm", "gemini", "openai", "ollama", "agent", "memory"
21
+ ]
22
+
23
+ classifiers = [
24
+ "Development Status :: 4 - Beta",
25
+ "Programming Language :: Python :: 3",
26
+ "Programming Language :: Python :: 3.10",
27
+ "Programming Language :: Python :: 3.11",
28
+ "Programming Language :: Python :: 3.12",
29
+ "License :: OSI Approved :: MIT License",
30
+ "Operating System :: OS Independent",
31
+ "Topic :: Communications :: Chat",
32
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
33
+ ]
34
+
35
+ [project.scripts]
36
+ simplecontext-bot = "simplecontext_bot.cli:main"
37
+
38
+ [project.urls]
39
+ Homepage = "https://github.com/zacxyonly/SimpleContext-Bot"
40
+ Documentation = "https://zacxyonly.github.io/SimpleContext-Docs/bot/setup/"
41
+ Repository = "https://github.com/zacxyonly/SimpleContext-Bot"
42
+ Issues = "https://github.com/zacxyonly/SimpleContext-Bot/issues"
43
+
44
+ [tool.setuptools.packages.find]
45
+ where = ["."]
46
+ include = ["simplecontext_bot*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,4 @@
1
+ """SimpleContext-Bot โ€” AI Telegram Bot powered by SimpleContext."""
2
+
3
+ __version__ = "1.0.0"
4
+ __author__ = "zacxyonly"