AI Telegram Bot powered by SimpleContext โ one-command setup, auto-downloads engine and agents.
Project description
๐ค SimpleContext-Bot
AI Telegram Bot powered by SimpleContext
Setup wizard ยท Auto-routing agents ยท Works with Gemini, OpenAI, Ollama
โจ What is this?
SimpleContext-Bot is a ready-to-run Telegram bot that uses SimpleContext as its AI brain.
A built-in setup wizard automatically downloads the engine and agents, then walks you through configuration step by step.
๐ Installation
1. Clone & Install
git clone https://github.com/zacxyonly/SimpleContext-Bot.git
cd SimpleContext-Bot
pip install .
2. Run Setup Wizard
simplecontext-bot setup
The wizard will handle everything:
Step 1/6 Download SimpleContext engine from GitHub โ
Step 2/6 Download 9 agent definitions โ
Step 3/6 Plugin Ecosystem (Optional) โ pilih plugin yang diinginkan
Step 4/6 Telegram Bot Token โ paste from @BotFather
Step 5/6 LLM Provider & API Key โ choose Gemini/OpenAI/Ollama
Step 6/6 Final configuration โ
Done!
3. Start
simplecontext-bot start
๐ Getting Your Tokens
Telegram Bot Token
- Open Telegram โ search
@BotFather - Send
/newbotand follow the steps - Copy the token
Gemini API Key (free, recommended)
- Go to aistudio.google.com/app/apikey
- Click Create API Key โ copy
OpenAI API Key
- Go to platform.openai.com/api-keys
- Click Create new secret key โ copy
Ollama (local, no API key needed)
- Install from ollama.ai
- Run
ollama pull llama3 - Make sure Ollama is running before starting the bot
๐ง Powered By
| Repo | Role | |
|---|---|---|
| SimpleContext | โ | AI brain โ tiered memory, context scoring, intent planning |
| SimpleContext-Agents | โ | 9 ready-to-use agent definitions |
| SimpleContext-Plugin | โ | Official plugin registry โ extend bot capabilities |
| LiteLLM | pip | Universal LLM connector |
๐ฏ Auto-Routing
No need to manually switch agents. The bot detects the best agent for every message automatically:
"ada bug di python saya" โ ๐ฅ๏ธ coding
"deploy ke server nginx" โ ๐ devops
"tulis caption instagram" โ โ๏ธ writer
"terjemahkan ke english" โ ๐ translator
"jelaskan konsep ini" โ ๐ tutor
"ringkas artikel ini" โ ๐ summarizer
"cek fakta berita ini" โ ๐ researcher
"komplain order saya" โ ๐ง customer_service
"analisis data penjualan" โ ๐ analyst
๐ค Available Agents
| Agent | Description | |
|---|---|---|
| ๐ฅ๏ธ | coding |
Expert programmer โ debug, review, all languages |
| ๐ | devops |
Server, Docker, CI/CD, Linux infrastructure |
| โ๏ธ | writer |
Content, copywriting, email, social media |
| ๐ | analyst |
Data analysis, business insights, KPIs |
| ๐ง | customer_service |
Empathetic CS, complaint handling |
| ๐ | translator |
Multi-language, idiom-aware translation |
| ๐ | tutor |
Patient adaptive teacher for any subject |
| ๐ | researcher |
Fact-checking, research, source evaluation |
| ๐ | summarizer |
Condense any content into clear summaries |
๐ฌ Bot Commands
| Command | Description |
|---|---|
/start |
Welcome message, saves your name |
/help |
Show all commands |
/agents |
List available agents |
/agent <name> |
Switch to a specific agent |
/agent auto |
Back to auto-routing |
/clear |
Clear conversation history |
/status |
Show current agent and stats |
/memory |
Show your saved profile |
/plugins |
List installed plugins & available plugins |
/semantic <query> |
Search memory by meaning (requires vector-search plugin) |
๐ Plugin Ecosystem
SimpleContext-Bot dapat diperluas dengan plugin dari SimpleContext-Plugin.
Plugin yang tersedia
| Plugin | Deskripsi | Tested โ |
|---|---|---|
vector-search |
Semantic similarity search โ temukan memory berdasarkan makna, bukan kata persis | โ |
Cara install plugin
Saat setup wizard โ wizard menawarkan plugin di Step 3.
Setelah setup โ via CLI:
simplecontext-bot plugins install vector-search
Manual (plugin komunitas):
Cukup drop file .py ke folder ~/.simplecontext-bot/plugins/ lalu restart bot.
Bot akan auto-detect dan load semua plugin di folder tersebut โ termasuk plugin
komunitas dari SimpleContext-Plugin
atau plugin buatan sendiri.
# Contoh: install plugin komunitas secara manual
cp my_custom_plugin.py ~/.simplecontext-bot/plugins/
simplecontext-bot start # plugin langsung aktif
Plugin commands โ auto-register ke Telegram
Plugin bisa mendeklarasikan command sendiri via BOT_COMMANDS. Bot otomatis
mendaftarkannya ke Telegram โ tidak perlu ubah kode bot sama sekali.
# Di file plugin kamu:
class MyPlugin(BasePlugin):
BOT_COMMANDS = {
"mycommand": {
"description": "Deskripsi command",
"usage": "/mycommand <arg>",
"handler": "bot_cmd_mycommand", # nama method di class ini
}
}
async def bot_cmd_mycommand(self, sc, update, ctx, args):
return f"Kamu kirim: {' '.join(args)}"
Setelah bot restart, /mycommand langsung tersedia di Telegram โ muncul di
menu command dan terdaftar di /help secara otomatis.
/plugins
โ โ
vector_search_plugin v1.0.0
โ Semantic vector search berbasis embedding
โ โข /semantic โ Cari memory berdasarkan makna
โ Usage: /semantic <query>
/semantic kenangan liburan
โ 1. [Semantic | โโโโโ 84%] user suka pantai dan hiking ...
โ 2. [Episodic | โโโโโ 67%] sesi kemarin bahas rencana trip ...
โ๏ธ CLI Commands
simplecontext-bot setup # First-time setup wizard (includes plugin selection)
simplecontext-bot start # Start the bot
simplecontext-bot start --debug # Start with verbose logging
simplecontext-bot status # Show configuration
simplecontext-bot status --test # Check + test LLM connection
simplecontext-bot agents # List installed agents
simplecontext-bot update # Update engine + agents
simplecontext-bot update --engine-only # Update engine only
simplecontext-bot update --agents-only # Update agents only
simplecontext-bot plugins list # List all plugins
simplecontext-bot plugins install <id> # Install a plugin
simplecontext-bot plugins remove <id> # Remove a plugin
๐ Files After Setup
Everything is stored in ~/.simplecontext-bot/:
~/.simplecontext-bot/
โโโ config.json โ your settings (tokens, LLM config)
โโโ bot.db โ conversation memory (SQLite)
โโโ simplecontext/ โ SimpleContext engine (auto-downloaded)
โโโ agents/ โ agent YAML files (auto-downloaded)
โ โโโ coding.yaml
โ โโโ devops.yaml
โ โโโ ...
โโโ plugins/ โ installed plugins (auto-downloaded via wizard)
โโโ vector_search_plugin.py
๐ง Troubleshooting
Something not working?
simplecontext-bot status --test
Update engine and agents:
simplecontext-bot update
Start fresh:
rm -rf ~/.simplecontext-bot
simplecontext-bot setup
๐ Ecosystem
| Repositori | Deskripsi |
|---|---|
| SimpleContext | Core engine โ Universal AI Brain |
| SimpleContext-Plugin | Plugin registry โ extend with semantic search, summarizer, and more |
| SimpleContext-Bot | This repo โ Telegram Bot |
| SimpleContext-Agents | Ready-to-use agent definitions |
Built with โค๏ธ on top of SimpleContext
โญ Star the engine repo if you find this useful!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simplecontext_bot-1.2.1.tar.gz.
File metadata
- Download URL: simplecontext_bot-1.2.1.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad838e90bb1751380b7028fe2ebcd47359073879e128c16002ced7604291dce8
|
|
| MD5 |
f473237ae2aea998be65f65c96018dcc
|
|
| BLAKE2b-256 |
02693763720bd5f895020af3b2af2502f82a6ba8ace64f6aea14362360ae769d
|
File details
Details for the file simplecontext_bot-1.2.1-py3-none-any.whl.
File metadata
- Download URL: simplecontext_bot-1.2.1-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52cfad55c2447959c2025045d545cef07ae6a296f16937119aa63cdc61e3dfbc
|
|
| MD5 |
2153e20347a27127ce8cfcd337e7ab83
|
|
| BLAKE2b-256 |
7f12968a74841d966577333b2c4bb1677b49f6ccc9ab3cb83dceef6c3b57908a
|