kadiya is a fork of NanoBot optimized for Sri Lanka.
NanoBot is an ultra-lightweight AI assistant (~4,000 lines of core code). kadiya adds a cost-first routing layer, Sinhala/English support, and Sri Lanka-specific skills on top of it β so you get a personal AI assistant that runs on Telegram for under $2/month.
| Feature | kadiya | upstream NanoBot |
|---|---|---|
| Smart model routing | Routes to cheapest model that fits the task | Single model |
| Token optimization | Prompt compression, conversation summarization | Full context |
| Sri Lanka locale | Sinhala/English, LKR, Asia/Colombo, Singlish input | Global/CN focus |
| Sri Lanka skills | Translation, PII redaction, Telegram formatting | General skills |
| Office skills | Excel, Word, PowerPoint generation | -- |
| Cost target | $10+/mo LLM + $0-5/mo server | Varies |
| Primary channel | Telegram | Feishu, DingTalk, QQ, WeChat, etc. |
| Update checker | Checks GitHub releases on gateway startup | -- |
| Windows installer | One-click install.bat (native, no WSL) |
Manual |
Everything else -- the agent loop, tools, memory, cron, and all upstream channels -- is inherited from NanoBot.
Windows (recommended)
Download and double-click install.bat. It installs Python (if needed), sets up kadiya, runs guided setup, and adds kadiya to your PATH.
After install, open any terminal:
kadiya agent -m "Hello!"
From source (macOS/Linux)
git clone https://github.com/thaaaru/kadiya.git
cd kadiya
pip install -e .
kadiya onboard1. Initialize
kadiya onboardThe guided setup will ask you to:
- Choose a provider (DeepSeek, OpenAI, or OpenRouter)
- Enter your API key
- Optionally configure Telegram
2. Chat
kadiya agent -m "What is 2+2?"3. Interactive mode
kadiya agentExit with exit, quit, Ctrl+C, or :q.
4. Diagnostics
kadiya doctor1. Create a bot
- Open Telegram, search
@BotFather - Send
/newbot, follow the prompts - Copy the bot token
2. Run onboard (or edit ~/.nanobot/config.json manually)
kadiya onboardSelect your provider, enter your API key, then answer y to "Enable Telegram bot?" and paste your token.
3. Start the gateway
kadiya gatewayMessage your bot on Telegram -- kadiya replies.
Other channels (Discord, Slack, Email, Feishu, DingTalk, QQ) are available via upstream NanoBot -- see the NanoBot README for setup.
| Skill | What it does |
|---|---|
sl-translate |
Sinhala/English translation with formal/informal tone |
sl-telegram |
Telegram-friendly formatting |
sl-summarize |
Concise summaries optimized for mobile |
sl-pii-redact |
Redact personal information from text |
| Skill | What it does |
|---|---|
office-excel |
Generate Excel spreadsheets |
office-word |
Generate Word documents |
office-pptx |
Generate PowerPoint presentations |
| Skill | What it does |
|---|---|
web-search |
Search the web (DuckDuckGo default, Brave optional) |
GitHub integration, weather, cron/scheduling, memory, and the skill creator. See nanobot/skills/ for the full list.
kadiya is designed to cost $10-15/month for typical personal use, depending on your setup.
| Component | Local setup | Cloud setup |
|---|---|---|
| LLM API calls | $10+/mo | $10+/mo |
| Cloud server | $0 (runs on your PC) | $3-5/mo (cheap VPS) |
| Total | $10+/mo | $13-15/mo |
Local setup β run kadiya on your own PC or laptop (no server cost). Cloud setup β run 24/7 on a VPS so Telegram works while your PC is off (e.g., Oracle Cloud free tier, Hetzner $3.29/mo, DigitalOcean $4/mo).
| What makes it cheap | How |
|---|---|
| Smart routing | Routes most messages to DeepSeek Chat (~$0.14/M input tokens) |
| Token compression | Strips unnecessary tokens from prompts |
| Conversation summarization | Summarizes after 5 turns instead of sending full history |
| Lower defaults | max_tokens: 2048, max_tool_iterations: 10, memory_window: 30 |
| Escalation only when needed | Falls back to GPT-4o-mini only for structured/complex tasks |
| Service | Monthly cost | Includes |
|---|---|---|
| ChatGPT Plus | $20 | LLM only |
| Claude Pro | $20 | LLM only |
| Typical API usage (GPT-4o) | $10-50+ | LLM only |
| kadiya (local) | $10+ | LLM API |
| kadiya (cloud) | $13-15 | LLM API + VPS |
| Provider | Purpose | Get API key |
|---|---|---|
deepseek |
LLM (cheapest, recommended) | platform.deepseek.com |
openai |
LLM (GPT-3.5-turbo / GPT-4o-mini) | platform.openai.com |
openrouter |
LLM (multi-provider gateway) | openrouter.ai |
anthropic |
LLM (Claude direct) | console.anthropic.com |
groq |
LLM + voice transcription (Whisper, free) | console.groq.com |
gemini |
LLM (Gemini direct) | aistudio.google.com |
vllm |
LLM (local, any OpenAI-compatible server) | -- |
All providers from upstream NanoBot are supported. See the full provider list.
| Option | Default | Description |
|---|---|---|
tools.restrictToWorkspace |
false |
Sandbox agent to workspace directory |
channels.*.allowFrom |
[] |
Whitelist user IDs (empty = allow all) |
| Command | Description |
|---|---|
kadiya onboard |
Guided setup (provider, API key, Telegram) |
kadiya agent -m "..." |
Send a message |
kadiya agent |
Interactive chat |
kadiya gateway |
Start the gateway (Telegram, etc.) |
kadiya channels status |
Show channel status |
kadiya status |
Show system status |
kadiya doctor |
Run diagnostics |
kadiya cron add |
Add a scheduled task |
kadiya cron list |
List scheduled tasks |
kadiya/
βββ kadiya/ # kadiya additions
β βββ config.py # Configuration loader
β βββ router.py # Smart model routing
β βββ optimizer.py # Token optimization
β βββ provider.py # Cost-first provider wrapper
βββ skills/ # kadiya skills
β βββ sl/ # Sri Lanka (translate, telegram, summarize, pii-redact)
β βββ office/ # Office (excel, word, pptx)
β βββ web/ # Web (search)
βββ configs/
β βββ kadiya-sl.yaml # Sri Lanka configuration
βββ install.bat # Windows installer launcher
βββ install.ps1 # Windows installer (native, no WSL)
βββ kadiya.bat # Windows launcher
βββ nanobot/ # Upstream NanoBot engine
βββ agent/ # Core agent logic + skills loader
βββ skills/ # Built-in skills (memory, cron, weather, etc.)
βββ channels/ # Chat integrations (Telegram, Discord, Slack, etc.)
βββ providers/ # LLM providers
βββ bus/ # Message routing
βββ cron/ # Scheduled tasks
βββ config/ # Configuration
βββ cli/ # CLI commands
kadiya is built on NanoBot by HKUDS. All credit for the core agent, tools, channels, and architecture goes to the NanoBot team.
If you need channels beyond Telegram (Feishu, DingTalk, QQ, Discord, Slack, Email, Mochat), or want the full documentation, see the NanoBot repository.
MIT