samarthya-bot 2.2.1 → 2.3.0
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.
- package/CHANGELOG.md +25 -0
- package/README.md +340 -353
- package/backend/bin/samarthya.js +29 -10
- package/backend/config/constants.js +4 -4
- package/backend/controllers/chatController.js +72 -0
- package/backend/controllers/telegramController.js +8 -0
- package/backend/package.json +1 -1
- package/backend/public/assets/index-DiMx9ERJ.css +1 -0
- package/backend/public/assets/index-Dn5WYZTH.js +32 -0
- package/backend/public/index.html +186 -16
- package/backend/public/robots.txt +32 -0
- package/backend/public/sitemap.xml +39 -0
- package/backend/services/agent/commandService.js +168 -0
- package/backend/services/llm/llmService.js +8 -0
- package/backend/services/planner/plannerService.js +17 -0
- package/backend/services/security/sandboxService.js +11 -4
- package/backend/services/system/platform.js +150 -0
- package/backend/services/tools/toolRegistry.js +521 -36
- package/backend/services/worker/workerClient.js +141 -29
- package/package.json +1 -1
- package/backend/public/assets/index-6PCzI3K2.js +0 -40
- package/backend/public/assets/index-6TF5jVRQ.js +0 -149
- package/backend/public/assets/index-B0U7rt6f.js +0 -46
- package/backend/public/assets/index-BF0RZh9i.js +0 -149
- package/backend/public/assets/index-BFRAq8Y1.js +0 -149
- package/backend/public/assets/index-CGw8cc8z.js +0 -149
- package/backend/public/assets/index-Ckf0GO1B.css +0 -1
- package/backend/public/assets/index-Cx0Ei-z7.js +0 -149
- package/backend/public/assets/index-DIPdcLv-.js +0 -25
- package/backend/public/assets/index-Da1E-MYB.js +0 -53
- package/backend/public/assets/index-DdCKkq38.js +0 -149
- package/backend/public/assets/index-Do4jNsZS.js +0 -19
- package/backend/public/assets/index-DyjpBYmS.js +0 -51
- package/backend/public/assets/index-DzlXcaXT.js +0 -149
- package/backend/public/assets/index-J7XSVHCz.css +0 -1
- package/backend/public/assets/index-Ui-pyZvK.js +0 -25
- package/backend/public/assets/index-kzffNwzo.js +0 -149
package/README.md
CHANGED
|
@@ -1,336 +1,341 @@
|
|
|
1
|
+
<!-- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ HERO ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ -->
|
|
2
|
+
|
|
1
3
|
<div align="center">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</
|
|
4
|
+
|
|
5
|
+
<img src="https://capsule-render.vercel.app/api?type=waving&color=0:FF9933,50:FFFFFF,100:138808&height=200§ion=header&text=SamarthyaBot&fontSize=70&fontColor=222222&animation=fadeIn&fontAlignY=38&desc=Privacy-First%20Local%20Agentic%20AI%20Operating%20System&descAlignY=60&descSize=18" width="100%" alt="SamarthyaBot"/>
|
|
6
|
+
|
|
7
|
+
<a href="https://github.com/mebishnusahu0595/SamarthyaBot">
|
|
8
|
+
<img src="https://readme-typing-svg.demolab.com?font=Fira+Code&weight=600&size=22&pause=1000&color=FF9933¢er=true&vCenter=true&width=720&lines=Self-hosted+multi-agent+RPA+for+Windows%2C+macOS+%26+Linux;Writes+code+%E2%80%A2+Deploys+via+SSH+%E2%80%A2+Controls+browsers;34%2B+skills+%E2%80%A2+9+AI+providers+%E2%80%A2+100%25+offline+with+Ollama;Made+in+India+%F0%9F%87%AE%F0%9F%87%B3+for+the+world" alt="Typing SVG" />
|
|
9
|
+
</a>
|
|
10
|
+
|
|
11
|
+
<p>
|
|
12
|
+
<strong>Multi-Agent · Autonomous · Privacy-First · Offline-Capable · Cross-Platform · Made in India 🇮🇳</strong>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p>
|
|
16
|
+
<a href="https://www.npmjs.com/package/samarthya-bot"><img src="https://img.shields.io/npm/v/samarthya-bot?color=FF9933&style=for-the-badge&logo=npm&logoColor=white&label=NPM" alt="NPM Version"></a>
|
|
17
|
+
<a href="https://www.npmjs.com/package/samarthya-bot"><img src="https://img.shields.io/npm/dm/samarthya-bot?color=138808&style=for-the-badge&logo=npm&logoColor=white&label=Downloads" alt="NPM Downloads"></a>
|
|
18
|
+
<a href="https://github.com/mebishnusahu0595/SamarthyaBot/stargazers"><img src="https://img.shields.io/github/stars/mebishnusahu0595/SamarthyaBot?style=for-the-badge&color=FFD600&logo=github" alt="GitHub Stars"></a>
|
|
19
|
+
<a href="https://github.com/mebishnusahu0595/SamarthyaBot/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-138808?style=for-the-badge" alt="MIT License"></a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p>
|
|
23
|
+
<img src="https://img.shields.io/badge/Windows-0078D6?style=flat&logo=windows&logoColor=white" alt="Windows">
|
|
24
|
+
<img src="https://img.shields.io/badge/macOS-000000?style=flat&logo=apple&logoColor=white" alt="macOS">
|
|
25
|
+
<img src="https://img.shields.io/badge/Linux-FCC624?style=flat&logo=linux&logoColor=black" alt="Linux">
|
|
26
|
+
<img src="https://img.shields.io/badge/Node.js-20_LTS-339933?style=flat&logo=nodedotjs&logoColor=white" alt="Node.js 20 LTS">
|
|
27
|
+
<img src="https://img.shields.io/badge/Go-Worker-00ADD8?style=flat&logo=go&logoColor=white" alt="Go Worker">
|
|
28
|
+
<img src="https://img.shields.io/badge/React-19-61DAFB?style=flat&logo=react&logoColor=black" alt="React 19">
|
|
29
|
+
<img src="https://img.shields.io/badge/MongoDB-Local-47A248?style=flat&logo=mongodb&logoColor=white" alt="MongoDB">
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
<p>
|
|
33
|
+
<a href="#-quick-start-60-seconds">Quick Start</a> ·
|
|
34
|
+
<a href="#️-cross-platform-by-design">Cross-Platform</a> ·
|
|
35
|
+
<a href="#-skills-catalog-34-built-in-tools">Skills</a> ·
|
|
36
|
+
<a href="#-chat-slash-commands">Commands</a> ·
|
|
37
|
+
<a href="#-supported-ai-providers">AI Providers</a> ·
|
|
38
|
+
<a href="#-frequently-asked-questions">FAQ</a> ·
|
|
39
|
+
<a href="CONTRIBUTING.md">Contribute</a>
|
|
40
|
+
</p>
|
|
41
|
+
|
|
35
42
|
</div>
|
|
36
43
|
|
|
37
44
|
---
|
|
38
45
|
|
|
39
46
|
## 🤔 What is SamarthyaBot?
|
|
40
47
|
|
|
41
|
-
**SamarthyaBot** (समर्थ्य बोट) is a **privacy-first, self-hosted, multi-agent AI operating system** that runs entirely on
|
|
48
|
+
**SamarthyaBot** (समर्थ्य बोट) is a **privacy-first, self-hosted, multi-agent AI operating system** that runs entirely on **your** machine — Windows, macOS, or Linux. Unlike cloud assistants, it keeps your data local, encrypted, and under your control.
|
|
42
49
|
|
|
43
|
-
It is **not just a chatbot** — it's a **
|
|
50
|
+
It is **not just a chatbot** — it's a full **RPA (Robotic Process Automation) agent** that can:
|
|
44
51
|
|
|
45
|
-
- ✍️ **Write code** and commit to GitHub
|
|
52
|
+
- ✍️ **Write code** and commit to GitHub
|
|
46
53
|
- 🚀 **Deploy to servers** via SSH (password or PEM key)
|
|
47
|
-
- 🌐 **Control real browsers** with Puppeteer (scrape, click,
|
|
48
|
-
- 📧 **Send real emails** via SMTP
|
|
49
|
-
- 🇮🇳 **Handle Indian workflows** — GST
|
|
50
|
-
- 🧠 **Think autonomously**
|
|
51
|
-
- 💬 **Chat on Telegram, Discord
|
|
52
|
-
- 🎙️ **Understand voice
|
|
53
|
-
- 🔌 **Extend with plugins** — drop a `.js` file for new
|
|
54
|
-
|
|
55
|
-
> **SamarthyaBot is the most feature-rich, self-hosted AI agent built specifically for Indian developers.** It supports Hindi, Hinglish, and English seamlessly, and works with 9 AI providers including free options like Gemini and Ollama (fully offline).
|
|
54
|
+
- 🌐 **Control real browsers** with Puppeteer (scrape, click, fill forms)
|
|
55
|
+
- 📧 **Send real emails** via SMTP
|
|
56
|
+
- 🇮🇳 **Handle Indian workflows** — GST, UPI, IRCTC, QR codes, Hindi/Hinglish
|
|
57
|
+
- 🧠 **Think autonomously** with a 20-step ReAct planning loop
|
|
58
|
+
- 💬 **Chat on Telegram, Discord & a Web Dashboard** — with `/slash` commands
|
|
59
|
+
- 🎙️ **Understand voice** via Groq/Whisper transcription
|
|
60
|
+
- 🔌 **Extend with plugins** — drop a `.js` file for a new skill
|
|
56
61
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## 🌟 Why SamarthyaBot? (Key Differentiators)
|
|
60
|
-
|
|
61
|
-
| Why Choose SamarthyaBot | Details |
|
|
62
|
-
| :--- | :--- |
|
|
63
|
-
| 🔒 **100% Privacy** | Your data NEVER leaves your machine. All memories encrypted with AES-256-CBC |
|
|
64
|
-
| 🇮🇳 **Built for India** | GST, UPI, IRCTC, Hindi/Hinglish — first-class Indian workflow support |
|
|
65
|
-
| 🤖 **True RPA Agent** | Not just chat — writes code, deploys servers, controls browsers autonomously |
|
|
66
|
-
| ⚡ **9 AI Providers** | Gemini (free), Claude, GPT, Ollama (offline), DeepSeek, Qwen, OpenRouter, Groq, Mistral |
|
|
67
|
-
| 📦 **One-Command Install** | `npm install -g samarthya-bot` — ready in 60 seconds |
|
|
68
|
-
| 🔌 **Plugin System** | Drop a `.js` file → instant new AI capability. Zero restart |
|
|
69
|
-
| 💻 **Beautiful Dashboard** | Modern React UI with dark theme, glassmorphism, and realtime updates |
|
|
70
|
-
| 🌐 **Multi-Channel** | Telegram + Discord + Web Dashboard — chat from anywhere |
|
|
71
|
-
| 🔧 **Go Micro-Worker** | Live terminal streaming — run `npm build`, `git push` without freezing Node.js |
|
|
62
|
+
> **The most feature-rich, self-hosted AI agent that runs identically on all three OSes** — with 34 built-in skills, 9 AI providers, and a free fully-offline mode via Ollama.
|
|
72
63
|
|
|
73
64
|
---
|
|
74
65
|
|
|
75
|
-
##
|
|
66
|
+
## 🖥️ Cross-Platform by Design
|
|
76
67
|
|
|
77
|
-
|
|
78
|
-
| :--- | :--- | :---: |
|
|
79
|
-
| 🤖 **Full RPA Engine** | Writes code, commits to GitHub, deploys to VPS autonomously | ✅ Live |
|
|
80
|
-
| ⚡ **Go Micro-Worker** | Live terminal streaming — `npm build`, `git push` without freezing Node.js | ✅ Live |
|
|
81
|
-
| 🌍 **SSH Deployments** | Deploy to remote servers via password or PEM key from a chat prompt | ✅ Live |
|
|
82
|
-
| 🕸️ **Browser Controller** | Puppeteer-based real DOM interaction — scrape, click, navigate websites | ✅ Live |
|
|
83
|
-
| 🛡️ **Zero-Harm Blacklists** | OS regex block-layer protects against dangerous commands like `rm -rf` | ✅ Live |
|
|
84
|
-
| 🧠 **Autonomous Planner** | ReAct engine breaks complex requests into discrete executable steps | ✅ Live |
|
|
85
|
-
| 🔐 **Encrypted Memory** | AES-256-CBC encrypted local memory stored in MongoDB | ✅ Live |
|
|
86
|
-
| 🇮🇳 **Indian Localization** | GST calculator, UPI payment links, IRCTC, Hindi/Hinglish fluency | ✅ Live |
|
|
87
|
-
| 📧 **Real Email** | Send actual emails via Nodemailer SMTP — not a simulation | ✅ Live |
|
|
88
|
-
| 📁 **File Manager** | Read, write, edit, append, list files in your workspace | ✅ Live |
|
|
89
|
-
| 👁️ **Screen Vision** | Gemini Vision analyzes screenshots for UI/UX understanding | ✅ Live |
|
|
90
|
-
| 📱 **Telegram Bot** | Full two-way Telegram integration with webhook + tunnel | ✅ Live |
|
|
91
|
-
| 🌐 **Web Dashboard** | Beautiful React UI to manage agent, view logs, chat live | ✅ Live |
|
|
92
|
-
| 🔌 **Plugin System** | Drop a `.js` file → new AI skill. Zero restart needed | ✅ Live |
|
|
93
|
-
| 🤖 **Multi-LLM Support** | Gemini, Claude, GPT, DeepSeek, Qwen, OpenRouter, Ollama, Groq, Mistral | ✅ Live |
|
|
94
|
-
| 🎙️ **Voice (Whisper)** | Groq/Whisper transcription for Telegram voice notes | ✅ Live |
|
|
95
|
-
| 💬 **Discord Bot** | Full Discord integration with mention-only mode | ✅ Live |
|
|
96
|
-
| 🔒 **Workspace Sandbox** | File ops restricted to workspace, configurable security | ✅ Live |
|
|
97
|
-
| 💓 **Heartbeat Tasks** | Periodic autonomous tasks from `HEARTBEAT.md` | ✅ Live |
|
|
98
|
-
| 🚀 **Sub-Agent Spawn** | Non-blocking background agents for long-running tasks | ✅ Live |
|
|
99
|
-
|
|
100
|
-
---
|
|
68
|
+
SamarthyaBot **detects your OS at runtime** and adapts every shell command, file path, browser launch, and "open" action accordingly. No more "works on Linux, breaks on Windows."
|
|
101
69
|
|
|
102
|
-
|
|
70
|
+
| Capability | 🪟 Windows | 🍎 macOS | 🐧 Linux |
|
|
71
|
+
| :--- | :---: | :---: | :---: |
|
|
72
|
+
| **Shell execution** | `cmd.exe` | `/bin/sh` | `/bin/sh` |
|
|
73
|
+
| **Open URL/file/app** | `start` | `open` | `xdg-open` |
|
|
74
|
+
| **Live terminal streaming** | ✅ Go worker → **Node fallback** | ✅ Go worker → **Node fallback** | ✅ Go worker |
|
|
75
|
+
| **Browser discovery** | Chrome / Edge / Brave | Chrome / Chromium / Edge / Brave | Chrome / Chromium / Edge / Brave |
|
|
76
|
+
| **Clipboard** | `clip` | `pbcopy` | `xclip` / `xsel` / `wl-copy` |
|
|
77
|
+
| **Port management (CLI)** | `netstat` + `taskkill` | `lsof` | `lsof` / `fuser` |
|
|
103
78
|
|
|
104
|
-
|
|
79
|
+
> ⚙️ **How it works:** A single source of truth — `backend/services/system/platform.js` — resolves OS-specific behaviour. The LLM is also told the exact host OS in its system prompt, so it only emits commands valid for your platform.
|
|
105
80
|
|
|
106
|
-
|
|
107
|
-
| :--- | :--- | :--- | :--- |
|
|
108
|
-
| **Google Gemini** | gemini-2.5-flash, gemini-2.5-pro | 🟢 Free tier | Default, great balance |
|
|
109
|
-
| **Ollama** | Llama 3, Mistral, Dolphin | 🟢 Free (local) | 100% offline, zero data leakage |
|
|
110
|
-
| **Groq** | Llama 3.3 70B, Qwen3 32B | 🟢 Free tier | Fastest inference |
|
|
111
|
-
| **Anthropic** | Claude 3.5 Sonnet, Claude 3 Opus | 🟡 Paid | Smartest reasoning |
|
|
112
|
-
| **OpenAI** | GPT-5.2, GPT-5-mini, o3-mini | 🟡 Paid | Coding & agentic tasks |
|
|
113
|
-
| **DeepSeek** | DeepSeek Chat, DeepSeek Coder | 🟢 Budget | Affordable coding |
|
|
114
|
-
| **Qwen** | Qwen Max, Qwen Turbo | 🟢 Budget | Alibaba's best |
|
|
115
|
-
| **OpenRouter** | 100+ models | 🟡 Varies | Access any model |
|
|
116
|
-
| **Mistral** | Mistral Large 3, Devstral 2 | 🟡 Paid | EU privacy, code agents |
|
|
81
|
+
> 🔁 **Zero-binary fallback:** The optional ultra-fast Go micro-worker streams long commands. If its binary isn't built for your platform, SamarthyaBot **transparently falls back to a native Node executor** — so heavy DevOps tasks work everywhere, out of the box.
|
|
117
82
|
|
|
118
83
|
---
|
|
119
84
|
|
|
120
|
-
## 🚀 Quick Start
|
|
85
|
+
## 🚀 Quick Start (60 Seconds)
|
|
121
86
|
|
|
122
87
|
> **Prerequisites:** [Node.js 20 LTS](https://nodejs.org/) · [MongoDB](https://www.mongodb.com/try/download/community) (local)
|
|
123
|
-
>
|
|
124
|
-
> Get API keys: [Gemini](https://aistudio.google.com/api-keys) (Free) · [Ollama](https://ollama.com) (Free, Local)
|
|
125
|
-
>
|
|
126
|
-
> Optional: [Telegram Bot Token](https://t.me/BotFather) · [Groq](https://console.groq.com) (Voice) · [OpenRouter](https://openrouter.ai/keys) (100+ models)
|
|
88
|
+
> Free API keys: [Gemini](https://aistudio.google.com/api-keys) · [Ollama](https://ollama.com) (offline)
|
|
127
89
|
|
|
128
|
-
### 📦 Install from NPM (
|
|
90
|
+
### 📦 Install from NPM (recommended)
|
|
129
91
|
|
|
130
92
|
```bash
|
|
131
|
-
# Install globally
|
|
93
|
+
# 1. Install globally (works on Windows, macOS, Linux)
|
|
132
94
|
npm install -g samarthya-bot
|
|
133
95
|
|
|
134
|
-
# Interactive setup wizard —
|
|
96
|
+
# 2. Interactive setup wizard — picks provider, keys, channels
|
|
135
97
|
samarthya onboard
|
|
136
98
|
|
|
137
|
-
# Launch
|
|
99
|
+
# 3. Launch engine + dashboard
|
|
138
100
|
samarthya gateway
|
|
139
101
|
|
|
140
|
-
# Expose to internet & link Telegram
|
|
102
|
+
# 4. (Optional) Expose to internet & link Telegram
|
|
141
103
|
samarthya tunnel
|
|
142
104
|
```
|
|
143
105
|
|
|
144
|
-
|
|
106
|
+
🎉 Open **http://localhost:5000** for the dashboard.
|
|
145
107
|
|
|
146
|
-
### 🛠️
|
|
108
|
+
### 🛠️ From source (development)
|
|
147
109
|
|
|
148
110
|
```bash
|
|
149
111
|
git clone https://github.com/mebishnusahu0595/SamarthyaBot.git
|
|
150
112
|
cd SamarthyaBot
|
|
151
|
-
|
|
152
|
-
# Install all dependencies
|
|
153
113
|
npm install
|
|
154
|
-
|
|
155
|
-
# Setup API keys interactively
|
|
156
114
|
samarthya onboard
|
|
157
|
-
|
|
158
|
-
# Start development server
|
|
159
115
|
npm run start
|
|
160
116
|
```
|
|
161
117
|
|
|
162
118
|
---
|
|
163
119
|
|
|
164
|
-
##
|
|
120
|
+
## ✨ Core Features
|
|
121
|
+
|
|
122
|
+
| Feature | Description | Status |
|
|
123
|
+
| :--- | :--- | :---: |
|
|
124
|
+
| 🖥️ **True Cross-Platform** | OS auto-detected; commands adapt to Windows/macOS/Linux | ✅ Live |
|
|
125
|
+
| 🤖 **Full RPA Engine** | Writes code, commits to GitHub, deploys to VPS | ✅ Live |
|
|
126
|
+
| ⚡ **Live Terminal** | Go micro-worker streaming + automatic Node fallback | ✅ Live |
|
|
127
|
+
| 🌍 **SSH Deployments** | Remote deploy via password or PEM key from a chat prompt | ✅ Live |
|
|
128
|
+
| 🕸️ **Browser Controller** | Puppeteer real DOM — scrape, click, navigate, fill forms | ✅ Live |
|
|
129
|
+
| 🛡️ **Hardened Sandbox** | Workspace path enforcement + chained-command blacklist | ✅ Live |
|
|
130
|
+
| 🧠 **Autonomous Planner** | 20-step ReAct loop with failure recovery & retries | ✅ Live |
|
|
131
|
+
| 💬 **Slash Commands** | `/status`, `/tools`, `/pack`, `/model` on every channel | ✅ Live |
|
|
132
|
+
| 🔐 **Encrypted Memory** | AES-256-CBC encrypted local memory in MongoDB | ✅ Live |
|
|
133
|
+
| 🇮🇳 **Indian Localization** | GST, UPI, QR codes, IRCTC, Hindi/Hinglish | ✅ Live |
|
|
134
|
+
| 🛠️ **34 Built-in Skills** | Files, web, crypto, translate, QR, currency & more | ✅ Live |
|
|
135
|
+
| 📱 **Telegram + Discord** | Two-way bots with webhooks, mentions & voice | ✅ Live |
|
|
136
|
+
| 🌐 **React Dashboard** | Dark glassmorphism UI with realtime updates | ✅ Live |
|
|
137
|
+
| 🔌 **Plugin System** | Drop a `.js` file → new AI skill, zero restart | ✅ Live |
|
|
138
|
+
| 🎙️ **Voice (Whisper)** | Groq/Whisper transcription for voice notes | ✅ Live |
|
|
139
|
+
| 💓 **Heartbeat Tasks** | Periodic autonomous tasks from `HEARTBEAT.md` | ✅ Live |
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 🧰 Skills Catalog (34 Built-in Tools)
|
|
144
|
+
|
|
145
|
+
<table>
|
|
146
|
+
<tr><th>📁 Files & System</th><th>🌐 Web & Network</th></tr>
|
|
147
|
+
<tr><td valign="top">
|
|
148
|
+
|
|
149
|
+
- `file_read` · `file_write` · `file_list`
|
|
150
|
+
- `run_command` *(OS-aware)*
|
|
151
|
+
- `devops_execute_stream` *(live)*
|
|
152
|
+
- `ssh_deploy`
|
|
153
|
+
- `open_path` *(start/open/xdg-open)*
|
|
154
|
+
- `clipboard_copy` *(cross-platform)*
|
|
155
|
+
- `capture_desktop_screenshot`
|
|
156
|
+
- `system_info`
|
|
157
|
+
- `schedule_background_task`
|
|
158
|
+
|
|
159
|
+
</td><td valign="top">
|
|
160
|
+
|
|
161
|
+
- `web_search` *(DuckDuckGo)*
|
|
162
|
+
- `weather_info` *(live)*
|
|
163
|
+
- `http_request` *(any REST API)*
|
|
164
|
+
- `url_shorten`
|
|
165
|
+
- `ip_geolocate`
|
|
166
|
+
- `crypto_price`
|
|
167
|
+
- `currency_convert`
|
|
168
|
+
- `browser_action` *(Puppeteer)*
|
|
169
|
+
- `send_email` *(SMTP)*
|
|
170
|
+
|
|
171
|
+
</td></tr>
|
|
172
|
+
<tr><th>🇮🇳 India & Productivity</th><th>🔐 Utilities & Security</th></tr>
|
|
173
|
+
<tr><td valign="top">
|
|
174
|
+
|
|
175
|
+
- `upi_generate` *(UPI deep link)*
|
|
176
|
+
- `qr_generate` *(QR for UPI/links)*
|
|
177
|
+
- `gst_reminder`
|
|
178
|
+
- `translate_text` *(Hindi & more)*
|
|
179
|
+
- `calculate` · `summarize_text`
|
|
180
|
+
- `note_take` · `reminder_set`
|
|
181
|
+
- `calendar_schedule`
|
|
182
|
+
|
|
183
|
+
</td><td valign="top">
|
|
184
|
+
|
|
185
|
+
- `password_generate` *(crypto-secure)*
|
|
186
|
+
- `hash_text` *(md5/sha1/256/512)*
|
|
187
|
+
- `base64_tool` *(encode/decode)*
|
|
188
|
+
- `timezone_now` *(world clock)*
|
|
189
|
+
- `simulate_task` *(dry-run)*
|
|
190
|
+
- 🔌 *+ unlimited custom plugins*
|
|
191
|
+
|
|
192
|
+
</td></tr>
|
|
193
|
+
</table>
|
|
165
194
|
|
|
166
|
-
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## 💬 Chat Slash-Commands
|
|
198
|
+
|
|
199
|
+
Control the agent directly from **any channel** (Web, Telegram, Discord) — instant, no LLM call:
|
|
200
|
+
|
|
201
|
+
| Command | Action |
|
|
202
|
+
| :--- | :--- |
|
|
203
|
+
| `/help` | List all commands |
|
|
204
|
+
| `/status` | Provider, model, active pack & host OS |
|
|
205
|
+
| `/tools` `/skills` | List skills in your current pack |
|
|
206
|
+
| `/pack [name]` | Show or switch pack (student/business/developer/personal) |
|
|
207
|
+
| `/model` | Show active AI provider + model |
|
|
208
|
+
| `/memory` | Count of stored memories |
|
|
209
|
+
| `/whoami` | Your profile & permissions |
|
|
210
|
+
| `/new` `/clear` `/reset` | Start a fresh conversation |
|
|
211
|
+
| `/version` | SamarthyaBot version |
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## 🧠 Supported AI Providers
|
|
216
|
+
|
|
217
|
+
| Provider | Models | Cost | Best For |
|
|
218
|
+
| :--- | :--- | :--- | :--- |
|
|
219
|
+
| **Google Gemini** | gemini-2.5-flash / pro | 🟢 Free tier | Default, great balance |
|
|
220
|
+
| **Ollama** | Llama 3, Mistral, Dolphin | 🟢 Free (local) | 100% offline, zero data leakage |
|
|
221
|
+
| **Groq** | Llama 3.3 70B, Qwen3 32B | 🟢 Free tier | Fastest inference |
|
|
222
|
+
| **Anthropic** | Claude 3.5 Sonnet / Opus | 🟡 Paid | Smartest reasoning |
|
|
223
|
+
| **OpenAI** | GPT-5.2, GPT-5-mini, o3-mini | 🟡 Paid | Coding & agentic tasks |
|
|
224
|
+
| **DeepSeek** | DeepSeek Chat / Coder | 🟢 Budget | Affordable coding |
|
|
225
|
+
| **Qwen** | Qwen Max / Turbo | 🟢 Budget | Alibaba's best |
|
|
226
|
+
| **OpenRouter** | 100+ models | 🟡 Varies | Access any model |
|
|
227
|
+
| **Mistral** | Mistral Large 3, Devstral 2 | 🟡 Paid | EU privacy, code agents |
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## 💬 Chat Channels & Integrations
|
|
167
232
|
|
|
168
233
|
| Channel | Setup | Status |
|
|
169
234
|
| :--- | :--- | :---: |
|
|
170
|
-
| **📱 Telegram** |
|
|
235
|
+
| **📱 Telegram** | Bot token + `samarthya tunnel` | ✅ Live |
|
|
171
236
|
| **🟣 Discord** | Bot token + intents + invite URL | ✅ Live |
|
|
172
237
|
| **🌐 Web Dashboard** | Built-in at `http://localhost:5000` | ✅ Live |
|
|
173
238
|
| **📱 WhatsApp** | Business API integration | 🔜 Coming |
|
|
174
239
|
| **💼 Slack** | Webhook + App | 📋 Planned |
|
|
175
240
|
|
|
176
241
|
<details>
|
|
177
|
-
<summary><b>📱 Telegram Setup</b
|
|
178
|
-
|
|
179
|
-
**1. Create a bot**
|
|
180
|
-
* Open Telegram → search `@BotFather`
|
|
181
|
-
* Send `/newbot`, follow prompts
|
|
182
|
-
* Copy the token
|
|
183
|
-
|
|
184
|
-
**2. Configure** — Add to your `.env`:
|
|
185
|
-
```bash
|
|
186
|
-
TELEGRAM_BOT_TOKEN=YOUR_BOT_TOKEN
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
**3. Run**
|
|
190
|
-
```bash
|
|
191
|
-
# Terminal 1
|
|
192
|
-
samarthya gateway
|
|
193
|
-
|
|
194
|
-
# Terminal 2 (new terminal!)
|
|
195
|
-
samarthya tunnel
|
|
196
|
-
```
|
|
242
|
+
<summary><b>📱 Telegram Setup</b></summary>
|
|
197
243
|
|
|
198
|
-
|
|
244
|
+
1. Open Telegram → `@BotFather` → `/newbot` → copy token
|
|
245
|
+
2. Add to `.env`: `TELEGRAM_BOT_TOKEN=YOUR_BOT_TOKEN`
|
|
246
|
+
3. Run `samarthya gateway` then `samarthya tunnel` (new terminal). The tunnel auto-sets the webhook. 🚀
|
|
199
247
|
|
|
200
248
|
</details>
|
|
201
249
|
|
|
202
250
|
<details>
|
|
203
251
|
<summary><b>🟣 Discord Setup</b></summary>
|
|
204
252
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
**3. Configure** — Add to your `.env`:
|
|
214
|
-
```bash
|
|
215
|
-
DISCORD_BOT_TOKEN=YOUR_BOT_TOKEN
|
|
216
|
-
DISCORD_ALLOW_FROM=YOUR_USER_ID
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
**4. Invite the bot**
|
|
220
|
-
* OAuth2 → URL Generator → Scope: `bot`
|
|
221
|
-
* Permissions: `Send Messages`, `Read Message History`
|
|
222
|
-
* Open the generated URL → add to your server
|
|
223
|
-
|
|
224
|
-
**5. Run**
|
|
225
|
-
```bash
|
|
226
|
-
samarthya gateway
|
|
227
|
-
```
|
|
253
|
+
1. https://discord.com/developers/applications → Application → Bot → copy token
|
|
254
|
+
2. Enable **MESSAGE CONTENT INTENT**
|
|
255
|
+
3. Add to `.env`:
|
|
256
|
+
```bash
|
|
257
|
+
DISCORD_BOT_TOKEN=YOUR_BOT_TOKEN
|
|
258
|
+
DISCORD_ALLOW_FROM=YOUR_USER_ID
|
|
259
|
+
```
|
|
260
|
+
4. OAuth2 → URL Generator → scope `bot` → invite → `samarthya gateway`
|
|
228
261
|
|
|
229
262
|
</details>
|
|
230
263
|
|
|
231
264
|
---
|
|
232
265
|
|
|
233
|
-
##
|
|
234
|
-
|
|
235
|
-
How does SamarthyaBot compare to other open-source AI agents?
|
|
236
|
-
|
|
237
|
-
| | OpenClaw | PicoClaw | **SamarthyaBot** 🇮🇳 |
|
|
238
|
-
| ---------------------- | -------------- | -------------------- | ----------------------------------- |
|
|
239
|
-
| **Language** | TypeScript | Go | **Node.js + Go + React** |
|
|
240
|
-
| **Browser Control** | ❌ None | ❌ Search APIs only | **✅ Real Puppeteer DOM** |
|
|
241
|
-
| **Web Dashboard** | ✅ Yes | ❌ CLI only | **✅ Beautiful React UI** |
|
|
242
|
-
| **Live Terminal** | ❌ No | ❌ Spawn (async) | **✅ Go Worker Streaming** |
|
|
243
|
-
| **Indian Workflows** | ❌ No | ❌ No | **✅ GST/UPI/IRCTC/Hindi** |
|
|
244
|
-
| **Encrypted Memory** | ❌ Plain text | ❌ Markdown files | **✅ AES-256-CBC + MongoDB** |
|
|
245
|
-
| **Voice Transcription**| ❌ No | ✅ Groq Whisper | **✅ Groq Whisper** |
|
|
246
|
-
| **Chat Channels** | 2 | 7 | **Telegram + Discord + Web** |
|
|
247
|
-
| **SSH Deploy** | ❌ No | ❌ No | **✅ Password + PEM Key** |
|
|
248
|
-
| **Plugin System** | ❌ No | Skills folder | **✅ Drop-in JS plugins** |
|
|
249
|
-
| **Startup RAM** | >1GB | <10MB | ~100MB (Full-stack + DB) |
|
|
250
|
-
| **Install Complexity** | High | Single binary | `npm i -g samarthya-bot` ✨ |
|
|
251
|
-
| **AI Providers** | 1-2 | 3-4 | **9 Providers, 20+ Models** |
|
|
252
|
-
|
|
253
|
-
---
|
|
266
|
+
## 🔒 Security & Privacy
|
|
254
267
|
|
|
255
|
-
|
|
268
|
+
SamarthyaBot is **defense-in-depth** by default:
|
|
256
269
|
|
|
257
|
-
|
|
270
|
+
| Layer | What it does |
|
|
271
|
+
| :--- | :--- |
|
|
272
|
+
| 🏠 **Local control plane** | Runs entirely on your machine — zero cloud dependency |
|
|
273
|
+
| 🔐 **AES-256-CBC** | All memories & secrets encrypted at rest |
|
|
274
|
+
| 🛡️ **Workspace sandbox** | File reads/writes confined to the workspace (`RESTRICT_TO_WORKSPACE`) — **enforced in every file tool** |
|
|
275
|
+
| 🚫 **Command blacklist** | Blocks `rm -rf`, `mkfs`, `dd`, fork bombs, `format`, `del /f`, remote-shell downloads — **per-segment**, so `echo x && rm -rf /` is also blocked |
|
|
276
|
+
| 🌐 **SSRF guard** | `http_request` rejects non-`http(s)` schemes; `file://` is blocked |
|
|
277
|
+
| 🔑 **Secret-safe** | Generated passwords are never logged or stored |
|
|
278
|
+
| 🔌 **Offline mode** | Ollama = 100% offline, zero data leakage |
|
|
279
|
+
| 🚨 **Kill switch** | `samarthya stop` — instant shutdown |
|
|
258
280
|
|
|
259
|
-
|
|
260
|
-
# ═══════════════ REQUIRED ═══════════════
|
|
261
|
-
GEMINI_API_KEY=your_gemini_api_key
|
|
262
|
-
MEMORY_ENCRYPTION_KEY=your_32_char_secret_key
|
|
263
|
-
|
|
264
|
-
# ═══════════════ AI PROVIDERS ═══════════════
|
|
265
|
-
ACTIVE_PROVIDER=gemini # gemini | ollama | anthropic | openai | deepseek | openrouter | qwen | groq | mistral
|
|
266
|
-
ACTIVE_MODEL=gemini-2.5-flash
|
|
267
|
-
|
|
268
|
-
# Provider API Keys (set the one you use)
|
|
269
|
-
ANTHROPIC_API_KEY=
|
|
270
|
-
DEEPSEEK_API_KEY=
|
|
271
|
-
OPENROUTER_API_KEY=
|
|
272
|
-
OPENAI_API_KEY=
|
|
273
|
-
GROQ_API_KEY=
|
|
274
|
-
MISTRAL_API_KEY=
|
|
275
|
-
|
|
276
|
-
# Ollama (local, free, offline)
|
|
277
|
-
USE_OLLAMA=false
|
|
278
|
-
|
|
279
|
-
# ═══════════════ CHANNELS ═══════════════
|
|
280
|
-
TELEGRAM_BOT_TOKEN=your_telegram_token
|
|
281
|
-
DISCORD_BOT_TOKEN=your_discord_token
|
|
282
|
-
|
|
283
|
-
# ═══════════════ VOICE ═══════════════
|
|
284
|
-
GROQ_API_KEY=your_groq_key # For Whisper voice transcription
|
|
285
|
-
|
|
286
|
-
# ═══════════════ SECURITY ═══════════════
|
|
287
|
-
RESTRICT_TO_WORKSPACE=true # Sandbox all file/exec operations
|
|
288
|
-
HEARTBEAT_INTERVAL=30 # Minutes between periodic tasks
|
|
289
|
-
|
|
290
|
-
# ═══════════════ DATABASE ═══════════════
|
|
291
|
-
MONGO_URI=mongodb://localhost:27017/samarthya
|
|
292
|
-
PORT=5000
|
|
293
|
-
```
|
|
281
|
+
> 🧪 Hardened in v2.3.0: the workspace sandbox is now wired into `file_read` / `file_write` / `file_list`, and the command guard validates **every** segment of chained commands. See [SECURITY.md](SECURITY.md) to report issues.
|
|
294
282
|
|
|
295
283
|
---
|
|
296
284
|
|
|
297
|
-
##
|
|
285
|
+
## 🏗️ Architecture
|
|
298
286
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
287
|
+
```
|
|
288
|
+
Telegram / Discord / WebUI / CLI
|
|
289
|
+
│
|
|
290
|
+
▼
|
|
291
|
+
┌────────────────────────────────────────────┐
|
|
292
|
+
│ SamarthyaBot Gateway │
|
|
293
|
+
│ (Control Plane :5000) │
|
|
294
|
+
├────────────────────────────────────────────┤
|
|
295
|
+
│ ┌────────────┐ ┌──────────┐ ┌──────────┐ │
|
|
296
|
+
│ │ Slash-Cmds │ │ Planner │ │ LLM Hub │ │
|
|
297
|
+
│ │ (instant) │ │ (ReAct) │ │ (9 prov) │ │
|
|
298
|
+
│ └────────────┘ └────┬─────┘ └────┬─────┘ │
|
|
299
|
+
│ │ │ │
|
|
300
|
+
│ ┌───────────────────┴────────────┴──────┐ │
|
|
301
|
+
│ │ Tools Engine (34 skills + plugins) │ │
|
|
302
|
+
│ └───────────────────┬───────────────────┘ │
|
|
303
|
+
│ │ │
|
|
304
|
+
│ ┌───────────┐ ┌─────┴──────┐ ┌──────────┐ │
|
|
305
|
+
│ │ platform │ │ Go Worker │ │ Sandbox /│ │
|
|
306
|
+
│ │ helper │ │ + Node │ │ Security │ │
|
|
307
|
+
│ │ (OS-aware)│ │ fallback │ │ guard │ │
|
|
308
|
+
│ └───────────┘ └────────────┘ └──────────┘ │
|
|
309
|
+
│ ┌───────────┐ ┌────────────┐ ┌──────────┐ │
|
|
310
|
+
│ │ Memory │ │ Browser │ │ Heartbeat│ │
|
|
311
|
+
│ │ (AES-256) │ │(Puppeteer) │ │ / Cron │ │
|
|
312
|
+
│ └───────────┘ └────────────┘ └──────────┘ │
|
|
313
|
+
└────────────────────────────────────────────┘
|
|
314
|
+
│
|
|
315
|
+
▼
|
|
316
|
+
MongoDB (Local, Encrypted)
|
|
317
|
+
```
|
|
311
318
|
|
|
312
319
|
---
|
|
313
320
|
|
|
314
321
|
## 🔌 Developing Plugins
|
|
315
322
|
|
|
316
|
-
Give your AI new superpowers —
|
|
323
|
+
Give your AI new superpowers — drop a `.js` file in `~/SamarthyaBot_Files/plugins/`:
|
|
317
324
|
|
|
318
325
|
```javascript
|
|
319
|
-
//
|
|
326
|
+
// weather.js
|
|
320
327
|
module.exports = {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
};
|
|
333
|
-
}
|
|
328
|
+
name: 'get_weather',
|
|
329
|
+
description: 'Gets current weather for a city',
|
|
330
|
+
parameters: { city: { type: 'string', required: true } },
|
|
331
|
+
execute: async (args) => {
|
|
332
|
+
const res = await fetch(`https://wttr.in/${args.city}?format=j1`);
|
|
333
|
+
const data = await res.json();
|
|
334
|
+
return {
|
|
335
|
+
success: true,
|
|
336
|
+
result: `${args.city}: ${data.current_condition[0].temp_C}°C`
|
|
337
|
+
};
|
|
338
|
+
}
|
|
334
339
|
};
|
|
335
340
|
```
|
|
336
341
|
|
|
@@ -338,151 +343,133 @@ Restart the gateway — the agent can now check weather autonomously! 🌦️
|
|
|
338
343
|
|
|
339
344
|
---
|
|
340
345
|
|
|
341
|
-
##
|
|
342
|
-
|
|
343
|
-
Create `~/SamarthyaBot_Files/HEARTBEAT.md` to schedule autonomous tasks:
|
|
346
|
+
## 🛠️ CLI Commands
|
|
344
347
|
|
|
345
|
-
|
|
346
|
-
|
|
348
|
+
| Command | Action |
|
|
349
|
+
| :--- | :--- |
|
|
350
|
+
| `samarthya onboard` | Interactive setup wizard |
|
|
351
|
+
| `samarthya gateway` | Start backend engine + dashboard |
|
|
352
|
+
| `samarthya tunnel` | Expose to internet & link Telegram |
|
|
353
|
+
| `samarthya model` | Swap LLM provider/model |
|
|
354
|
+
| `samarthya telegram` / `discord` | Configure a channel |
|
|
355
|
+
| `samarthya config` | View current configuration |
|
|
356
|
+
| `samarthya status` | Show engine status |
|
|
357
|
+
| `samarthya stop` / `restart` | Stop / restart the gateway |
|
|
347
358
|
|
|
348
|
-
|
|
349
|
-
- Search web for latest AI news and summarize
|
|
350
|
-
- Remind me about today's calendar events
|
|
351
|
-
```
|
|
359
|
+
---
|
|
352
360
|
|
|
353
|
-
|
|
361
|
+
## 🏆 Comparison
|
|
362
|
+
|
|
363
|
+
| | OpenClaw | PicoClaw | **SamarthyaBot** 🇮🇳 |
|
|
364
|
+
| ---------------------- | -------------- | ----------------- | --------------------------- |
|
|
365
|
+
| **Cross-Platform** | ✅ | ✅ | **✅ OS auto-adapts** |
|
|
366
|
+
| **Browser Control** | ❌ / search | ❌ search only | **✅ Real Puppeteer DOM** |
|
|
367
|
+
| **Web Dashboard** | ✅ | ❌ CLI only | **✅ React glassmorphism** |
|
|
368
|
+
| **Live Terminal** | ❌ | ❌ async spawn | **✅ Go + Node fallback** |
|
|
369
|
+
| **Slash Commands** | ✅ | partial | **✅ Every channel** |
|
|
370
|
+
| **Indian Workflows** | ❌ | ❌ | **✅ GST/UPI/QR/IRCTC** |
|
|
371
|
+
| **Encrypted Memory** | ❌ plaintext | ❌ markdown | **✅ AES-256-CBC + Mongo** |
|
|
372
|
+
| **Built-in Skills** | 100+ external | skills folder | **34 built-in + plugins** |
|
|
373
|
+
| **SSH Deploy** | ❌ | ❌ | **✅ Password + PEM** |
|
|
374
|
+
| **Install** | moderate | single binary | **`npm i -g samarthya-bot`**|
|
|
375
|
+
| **AI Providers** | many | 3-4 | **9 providers, 20+ models** |
|
|
354
376
|
|
|
355
377
|
---
|
|
356
378
|
|
|
357
|
-
##
|
|
379
|
+
## 📊 Real-World Use Cases
|
|
358
380
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
| **📁 Workspace Sandbox** | File/exec operations restricted to workspace folder |
|
|
365
|
-
| **🔌 Ollama Offline Mode** | 100% offline AI — zero data leakage |
|
|
366
|
-
| **🚨 Emergency Kill Switch** | `samarthya stop` — instant shutdown from CLI or Dashboard |
|
|
381
|
+
- **🧑💻 Developers:** *"Create an Express REST API, push to GitHub, deploy to my VPS."*
|
|
382
|
+
- **📊 Business:** *"Calculate 18% GST on ₹50,000, make a UPI QR, email the invoice."*
|
|
383
|
+
- **🎓 Students:** *"Summarize the top 5 transformer papers and save notes."*
|
|
384
|
+
- **🏢 DevOps:** *"SSH into my server, check disk space, restart nginx if down."*
|
|
385
|
+
- **🇮🇳 Professionals:** *"Generate a UPI link for ₹2,500, translate this to Hindi."*
|
|
367
386
|
|
|
368
387
|
---
|
|
369
388
|
|
|
370
|
-
##
|
|
389
|
+
## 🗺️ Roadmap
|
|
371
390
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
│ │ (ReAct) │ │ (Multi) │ │ Engine │ │
|
|
385
|
-
│ └────┬────┘ └────┬─────┘ └───┬────┘ │
|
|
386
|
-
│ │ │ │ │
|
|
387
|
-
│ ┌────┴────────────┴─────────────┴────┐ │
|
|
388
|
-
│ │ Go Micro-Worker │ │
|
|
389
|
-
│ │ (Live Terminal Streaming) │ │
|
|
390
|
-
│ └───────────────────────────────────┘ │
|
|
391
|
-
│ │
|
|
392
|
-
│ ┌─────────┐ ┌──────────┐ ┌────────┐ │
|
|
393
|
-
│ │ Memory │ │ Browser │ │ Cron / │ │
|
|
394
|
-
│ │ (AES) │ │(Puppeteer│ │Hearbeat│ │
|
|
395
|
-
│ └─────────┘ └──────────┘ └────────┘ │
|
|
396
|
-
│ │
|
|
397
|
-
└──────────────────────────────────────────┘
|
|
398
|
-
│
|
|
399
|
-
▼
|
|
400
|
-
MongoDB (Local, Encrypted)
|
|
401
|
-
```
|
|
391
|
+
- [x] **True cross-platform** (Windows / macOS / Linux auto-detect)
|
|
392
|
+
- [x] **Go micro-worker + Node fallback**
|
|
393
|
+
- [x] **34 built-in skills** (QR, currency, crypto, translate, hash…)
|
|
394
|
+
- [x] **Slash-commands** on every channel
|
|
395
|
+
- [x] **Hardened sandbox + command guard**
|
|
396
|
+
- [x] Full RPA · SSH deploy · Puppeteer browser
|
|
397
|
+
- [x] Telegram + Discord + Voice (Whisper)
|
|
398
|
+
- [ ] WhatsApp Business API
|
|
399
|
+
- [ ] Slack integration
|
|
400
|
+
- [ ] Docker Compose deployment
|
|
401
|
+
- [ ] RAG over local documents
|
|
402
|
+
- [ ] Multi-user role-based access
|
|
402
403
|
|
|
403
404
|
---
|
|
404
405
|
|
|
405
|
-
##
|
|
406
|
+
## 🤝 Contributing
|
|
406
407
|
|
|
407
|
-
|
|
408
|
+
PRs welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) and our [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
408
409
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
- **📱 Content Creators**: "Scrape trending topics from Twitter, summarize them, and post to my Discord"
|
|
414
|
-
- **🇮🇳 Indian Professionals**: "Generate UPI payment link for ₹2,500, book Rajdhani ticket status, translate to Hindi"
|
|
410
|
+
```bash
|
|
411
|
+
git clone https://github.com/mebishnusahu0595/SamarthyaBot.git
|
|
412
|
+
cd SamarthyaBot && npm install
|
|
413
|
+
```
|
|
415
414
|
|
|
416
|
-
|
|
415
|
+
<a href="https://github.com/mebishnusahu0595/SamarthyaBot/graphs/contributors">
|
|
416
|
+
<img src="https://contrib.rocks/image?repo=mebishnusahu0595/SamarthyaBot" alt="Contributors"/>
|
|
417
|
+
</a>
|
|
417
418
|
|
|
418
|
-
|
|
419
|
+
### ⭐ Star History
|
|
419
420
|
|
|
420
|
-
|
|
421
|
-
|
|
421
|
+
<a href="https://star-history.com/#mebishnusahu0595/SamarthyaBot&Date">
|
|
422
|
+
<img src="https://api.star-history.com/svg?repos=mebishnusahu0595/SamarthyaBot&type=Date" width="600" alt="Star History Chart">
|
|
423
|
+
</a>
|
|
422
424
|
|
|
423
|
-
|
|
424
|
-
Install SamarthyaBot with a single NPM command: `npm install -g samarthya-bot`. Then run `samarthya onboard` for guided setup. Requires Node.js 20+ and MongoDB.
|
|
425
|
+
---
|
|
425
426
|
|
|
426
|
-
|
|
427
|
-
Yes, SamarthyaBot is **100% free and open-source** under the MIT license. It supports free AI providers like Google Gemini and Ollama (fully offline).
|
|
427
|
+
## ❓ Frequently Asked Questions
|
|
428
428
|
|
|
429
|
-
|
|
430
|
-
|
|
429
|
+
<details>
|
|
430
|
+
<summary><b>Does it really work on Windows, macOS and Linux?</b></summary>
|
|
431
431
|
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
Yes. SamarthyaBot detects your OS at runtime and adapts every shell command, file path, browser launch and "open" action. The LLM is told your exact OS so it only emits valid commands, and the live-terminal worker falls back to native Node if the Go binary isn't built for your platform.
|
|
433
|
+
</details>
|
|
434
434
|
|
|
435
|
-
|
|
436
|
-
|
|
435
|
+
<details>
|
|
436
|
+
<summary><b>Is SamarthyaBot free?</b></summary>
|
|
437
437
|
|
|
438
|
-
|
|
439
|
-
|
|
438
|
+
Yes — 100% free and open-source under MIT. It supports free providers like Gemini and Ollama (fully offline).
|
|
439
|
+
</details>
|
|
440
440
|
|
|
441
|
-
|
|
442
|
-
|
|
441
|
+
<details>
|
|
442
|
+
<summary><b>Does it work offline?</b></summary>
|
|
443
443
|
|
|
444
|
-
|
|
445
|
-
|
|
444
|
+
Yes. With **Ollama**, SamarthyaBot runs 100% offline with zero data leakage.
|
|
445
|
+
</details>
|
|
446
446
|
|
|
447
|
-
|
|
448
|
-
|
|
447
|
+
<details>
|
|
448
|
+
<summary><b>Is my data safe?</b></summary>
|
|
449
449
|
|
|
450
|
-
|
|
450
|
+
Everything runs on your machine. Memories are AES-256-CBC encrypted, file tools are sandboxed to your workspace, and dangerous commands are blocked per-segment.
|
|
451
|
+
</details>
|
|
451
452
|
|
|
452
|
-
|
|
453
|
+
<details>
|
|
454
|
+
<summary><b>How do I add a new skill?</b></summary>
|
|
453
455
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
- [x] Puppeteer Browser DOM Controller
|
|
457
|
-
- [x] Telegram Integration + Auto Tunnel
|
|
458
|
-
- [x] Multi-Provider LLM (Gemini, Claude, GPT, DeepSeek, Qwen, OpenRouter, Ollama, Groq, Mistral)
|
|
459
|
-
- [x] Discord Bot Integration
|
|
460
|
-
- [x] Groq/Whisper Voice Transcription
|
|
461
|
-
- [x] Workspace Security Sandbox
|
|
462
|
-
- [x] Heartbeat Periodic Tasks
|
|
463
|
-
- [x] Sub-Agent Spawn (Background Workers)
|
|
464
|
-
- [x] Premium CLI with ASCII Banner and Setup Wizard
|
|
465
|
-
- [ ] WhatsApp Business API
|
|
466
|
-
- [ ] Slack Integration
|
|
467
|
-
- [ ] Docker Compose deployment
|
|
468
|
-
- [ ] Mobile companion app
|
|
469
|
-
- [ ] RAG (Retrieval-Augmented Generation) with local documents
|
|
470
|
-
- [ ] Multi-user role-based access
|
|
456
|
+
Drop a `.js` file in `~/SamarthyaBot_Files/plugins/` with `name`, `description`, `parameters`, and an `execute` function. See [Developing Plugins](#-developing-plugins).
|
|
457
|
+
</details>
|
|
471
458
|
|
|
472
459
|
---
|
|
473
460
|
|
|
474
461
|
## 📄 License
|
|
475
462
|
|
|
476
|
-
**MIT License** —
|
|
463
|
+
**MIT License** — free to use, modify, and distribute.
|
|
477
464
|
|
|
478
465
|
Built with ❤️ in India 🇮🇳 by **[Bishnu Prasad Sahu](https://github.com/mebishnusahu0595)**
|
|
479
466
|
|
|
480
|
-
---
|
|
481
|
-
|
|
482
467
|
<div align="center">
|
|
483
468
|
|
|
484
|
-
|
|
469
|
+
**[📦 NPM](https://www.npmjs.com/package/samarthya-bot)** · **[🐙 GitHub](https://github.com/mebishnusahu0595/SamarthyaBot)** · **[🐛 Report Bug](https://github.com/mebishnusahu0595/SamarthyaBot/issues)** · **[✨ Request Feature](https://github.com/mebishnusahu0595/SamarthyaBot/issues)**
|
|
470
|
+
|
|
471
|
+
<sub>If SamarthyaBot helps you, please give it a ⭐ — it really helps!</sub>
|
|
485
472
|
|
|
486
|
-
|
|
473
|
+
<img src="https://capsule-render.vercel.app/api?type=waving&color=0:138808,50:FFFFFF,100:FF9933&height=100§ion=footer" width="100%" alt=""/>
|
|
487
474
|
|
|
488
475
|
</div>
|