Skip to content

mebishnusahu0595/SamarthyaBot

SamarthyaBot Logo — Privacy-First AI Agent OS

🇮🇳 SamarthyaBot — Privacy-First Local Agentic AI Operating System

The Best Open-Source Self-Hosted AI Agent for Indian Developers

Multi-Agent · Autonomous · Privacy-First · Offline-Capable · Made in India 🇮🇳

NPM Version NPM Downloads GitHub Stars MIT License

Node.js 20 LTS Go Worker React 19 MongoDB Express 5 Socket.IO Puppeteer PRs Welcome

Quick Start · Features · AI Providers · Integrations · FAQ · Contributing


🤔 What is SamarthyaBot?

SamarthyaBot (समर्थ्य बोट) is a privacy-first, self-hosted, multi-agent AI operating system that runs entirely on YOUR machine. Unlike cloud-based AI assistants, SamarthyaBot keeps all your data local, encrypted, and under your control.

It is not just a chatbot — it's a Full RPA (Robotic Process Automation) Agent that can:

  • ✍️ Write code and commit to GitHub automatically
  • 🚀 Deploy to servers via SSH (password or PEM key)
  • 🌐 Control real browsers with Puppeteer (scrape, click, navigate, fill forms)
  • 📧 Send real emails via SMTP — not simulations
  • 🇮🇳 Handle Indian workflows — GST calculations, UPI payment links, IRCTC queries
  • 🧠 Think autonomously using a ReAct planning engine
  • 💬 Chat on Telegram, Discord, and Web Dashboard
  • 🎙️ Understand voice messages via Groq/Whisper transcription
  • 🔌 Extend with plugins — drop a .js file for new AI capabilities

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).


🌟 Why SamarthyaBot? (Key Differentiators)

Why Choose SamarthyaBot Details
🔒 100% Privacy Your data NEVER leaves your machine. All memories encrypted with AES-256-CBC
🇮🇳 Built for India GST, UPI, IRCTC, Hindi/Hinglish — first-class Indian workflow support
🤖 True RPA Agent Not just chat — writes code, deploys servers, controls browsers autonomously
9 AI Providers Gemini (free), Claude, GPT, Ollama (offline), DeepSeek, Qwen, OpenRouter, Groq, Mistral
📦 One-Command Install npm install -g samarthya-bot — ready in 60 seconds
🔌 Plugin System Drop a .js file → instant new AI capability. Zero restart
💻 Beautiful Dashboard Modern React UI with dark theme, glassmorphism, and realtime updates
🌐 Multi-Channel Telegram + Discord + Web Dashboard — chat from anywhere
🔧 Go Micro-Worker Live terminal streaming — run npm build, git push without freezing Node.js

✨ Features & Capabilities

Feature Description Status
🤖 Full RPA Engine Writes code, commits to GitHub, deploys to VPS autonomously ✅ Live
Go Micro-Worker Live terminal streaming — npm build, git push without freezing Node.js ✅ Live
🌍 SSH Deployments Deploy to remote servers via password or PEM key from a chat prompt ✅ Live
🕸️ Browser Controller Puppeteer-based real DOM interaction — scrape, click, navigate websites ✅ Live
🛡️ Zero-Harm Blacklists OS regex block-layer protects against dangerous commands like rm -rf ✅ Live
🧠 Autonomous Planner ReAct engine breaks complex requests into discrete executable steps ✅ Live
🔐 Encrypted Memory AES-256-CBC encrypted local memory stored in MongoDB ✅ Live
🇮🇳 Indian Localization GST calculator, UPI payment links, IRCTC, Hindi/Hinglish fluency ✅ Live
📧 Real Email Send actual emails via Nodemailer SMTP — not a simulation ✅ Live
📁 File Manager Read, write, edit, append, list files in your workspace ✅ Live
👁️ Screen Vision Gemini Vision analyzes screenshots for UI/UX understanding ✅ Live
📱 Telegram Bot Full two-way Telegram integration with webhook + tunnel ✅ Live
🌐 Web Dashboard Beautiful React UI to manage agent, view logs, chat live ✅ Live
🔌 Plugin System Drop a .js file → new AI skill. Zero restart needed ✅ Live
🤖 Multi-LLM Support Gemini, Claude, GPT, DeepSeek, Qwen, OpenRouter, Ollama, Groq, Mistral ✅ Live
🎙️ Voice (Whisper) Groq/Whisper transcription for Telegram voice notes ✅ Live
💬 Discord Bot Full Discord integration with mention-only mode ✅ Live
🔒 Workspace Sandbox File ops restricted to workspace, configurable security ✅ Live
💓 Heartbeat Tasks Periodic autonomous tasks from HEARTBEAT.md ✅ Live
🚀 Sub-Agent Spawn Non-blocking background agents for long-running tasks ✅ Live

🧠 Supported AI Providers

SamarthyaBot supports 9 AI providers — including free and fully offline options:

Provider Models Cost Best For
Google Gemini gemini-2.5-flash, gemini-2.5-pro 🟢 Free tier Default, great balance
Ollama Llama 3, Mistral, Dolphin 🟢 Free (local) 100% offline, zero data leakage
Groq Llama 3.3 70B, Qwen3 32B 🟢 Free tier Fastest inference
Anthropic Claude 3.5 Sonnet, Claude 3 Opus 🟡 Paid Smartest reasoning
OpenAI GPT-5.2, GPT-5-mini, o3-mini 🟡 Paid Coding & agentic tasks
DeepSeek DeepSeek Chat, DeepSeek Coder 🟢 Budget Affordable coding
Qwen Qwen Max, Qwen Turbo 🟢 Budget Alibaba's best
OpenRouter 100+ models 🟡 Varies Access any model
Mistral Mistral Large 3, Devstral 2 🟡 Paid EU privacy, code agents

🚀 Quick Start — Install in 60 Seconds

Prerequisites: Node.js 20 LTS · MongoDB (local)

Get API keys: Gemini (Free) · Ollama (Free, Local)

Optional: Telegram Bot Token · Groq (Voice) · OpenRouter (100+ models)

📦 Install from NPM (Recommended)

# Install globally
npm install -g samarthya-bot

# Interactive setup wizard — configures AI keys, channels, everything
samarthya onboard

# Launch the engine + dashboard (Terminal 1)
samarthya gateway

# Expose to internet & link Telegram (Terminal 2)
samarthya tunnel

That's it! 🎉 Open http://localhost:5000 for the Dashboard.

🛠️ Install from Source (Development)

git clone https://github.com/mebishnusahu0595/SamarthyaBot.git
cd SamarthyaBot

# Install all dependencies
npm install

# Setup API keys interactively
samarthya onboard

# Start development server
npm run start

💬 Chat Channels & Integrations

Talk to SamarthyaBot on your favorite platform:

Channel Setup Status
📱 Telegram Easy — just a bot token + samarthya tunnel ✅ Live
🟣 Discord Bot token + intents + invite URL ✅ Live
🌐 Web Dashboard Built-in at http://localhost:5000 ✅ Live
📱 WhatsApp Business API integration 🔜 Coming
💼 Slack Webhook + App 📋 Planned
📱 Telegram Setup (Recommended)

1. Create a bot

  • Open Telegram → search @BotFather
  • Send /newbot, follow prompts
  • Copy the token

2. Configure — Add to your .env:

TELEGRAM_BOT_TOKEN=YOUR_BOT_TOKEN

3. Run

# Terminal 1
samarthya gateway

# Terminal 2 (new terminal!)
samarthya tunnel

The tunnel automatically sets the webhook URL. You're live! 🚀

🟣 Discord Setup

1. Create a bot

2. Enable Intents — In Bot settings:

  • ✅ MESSAGE CONTENT INTENT
  • ✅ SERVER MEMBERS INTENT (optional)

3. Configure — Add to your .env:

DISCORD_BOT_TOKEN=YOUR_BOT_TOKEN
DISCORD_ALLOW_FROM=YOUR_USER_ID

4. Invite the bot

  • OAuth2 → URL Generator → Scope: bot
  • Permissions: Send Messages, Read Message History
  • Open the generated URL → add to your server

5. Run

samarthya gateway

🏆 Comparison with Alternative AI Agents

How does SamarthyaBot compare to other open-source AI agents?

OpenClaw PicoClaw SamarthyaBot 🇮🇳
Language TypeScript Go Node.js + Go + React
Browser Control ❌ None ❌ Search APIs only ✅ Real Puppeteer DOM
Web Dashboard ✅ Yes ❌ CLI only ✅ Beautiful React UI
Live Terminal ❌ No ❌ Spawn (async) ✅ Go Worker Streaming
Indian Workflows ❌ No ❌ No ✅ GST/UPI/IRCTC/Hindi
Encrypted Memory ❌ Plain text ❌ Markdown files ✅ AES-256-CBC + MongoDB
Voice Transcription ❌ No ✅ Groq Whisper ✅ Groq Whisper
Chat Channels 2 7 Telegram + Discord + Web
SSH Deploy ❌ No ❌ No ✅ Password + PEM Key
Plugin System ❌ No Skills folder ✅ Drop-in JS plugins
Startup RAM >1GB <10MB ~100MB (Full-stack + DB)
Install Complexity High Single binary npm i -g samarthya-bot
AI Providers 1-2 3-4 9 Providers, 20+ Models

⚙️ Configuration

All configuration is in backend/.env:

# ═══════════════ REQUIRED ═══════════════
GEMINI_API_KEY=your_gemini_api_key
MEMORY_ENCRYPTION_KEY=your_32_char_secret_key

# ═══════════════ AI PROVIDERS ═══════════════
ACTIVE_PROVIDER=gemini          # gemini | ollama | anthropic | openai | deepseek | openrouter | qwen | groq | mistral
ACTIVE_MODEL=gemini-2.5-flash

# Provider API Keys (set the one you use)
ANTHROPIC_API_KEY=
DEEPSEEK_API_KEY=
OPENROUTER_API_KEY=
OPENAI_API_KEY=
GROQ_API_KEY=
MISTRAL_API_KEY=

# Ollama (local, free, offline)
USE_OLLAMA=false

# ═══════════════ CHANNELS ═══════════════
TELEGRAM_BOT_TOKEN=your_telegram_token
DISCORD_BOT_TOKEN=your_discord_token

# ═══════════════ VOICE ═══════════════
GROQ_API_KEY=your_groq_key      # For Whisper voice transcription

# ═══════════════ SECURITY ═══════════════
RESTRICT_TO_WORKSPACE=true       # Sandbox all file/exec operations
HEARTBEAT_INTERVAL=30            # Minutes between periodic tasks

# ═══════════════ DATABASE ═══════════════
MONGO_URI=mongodb://localhost:27017/samarthya
PORT=5000

🛠️ CLI Commands

Command Action
samarthya onboard Interactive setup wizard — API keys, permissions, everything
samarthya gateway Start the backend engine + serve the Dashboard
samarthya tunnel Expose to internet & auto-link Telegram webhook
samarthya model Swap LLM provider (gemini, ollama, claude, deepseek...)
samarthya telegram Configure Telegram bot token
samarthya discord Configure Discord bot token
samarthya config View current configuration
samarthya status Show status of the engine
samarthya stop Gracefully stop the gateway
samarthya restart Restart the gateway

🔌 Developing Plugins

Give your AI new superpowers — just drop a .js file:

// ~/SamarthyaBot_Files/plugins/weather.js
module.exports = {
    name: 'get_weather',
    description: 'Gets current weather for a city',
    parameters: {
        city: { type: 'string', required: true }
    },
    execute: async (args) => {
        const res = await fetch(`https://wttr.in/${args.city}?format=j1`);
        const data = await res.json();
        return {
            success: true,
            result: `${args.city}: ${data.current_condition[0].temp_C}°C, ${data.current_condition[0].weatherDesc[0].value}`
        };
    }
};

Restart the gateway — the agent can now check weather autonomously! 🌦️


💓 Heartbeat (Periodic Autonomous Tasks)

Create ~/SamarthyaBot_Files/HEARTBEAT.md to schedule autonomous tasks:

# Periodic Tasks

- Check my email for important messages
- Search web for latest AI news and summarize
- Remind me about today's calendar events

SamarthyaBot reads this file every 30 minutes (configurable) and executes each task using available tools. Results are sent via your active channel (Telegram/Discord/Dashboard).


🔒 Security & Privacy

Feature Description
🏠 Local Control Plane Gateway runs on YOUR machine — zero cloud dependency
🔐 AES-256-CBC Encryption All memories and API keys encrypted at rest
🛡️ Command Blacklists rm -rf, mkfs, format, dd if= — all blocked
📁 Workspace Sandbox File/exec operations restricted to workspace folder
🔌 Ollama Offline Mode 100% offline AI — zero data leakage
🚨 Emergency Kill Switch samarthya stop — instant shutdown from CLI or Dashboard

🏗️ Architecture

  Telegram / Discord / WebUI / CLI
                │
                ▼
  ┌──────────────────────────────────────────┐
  │         SamarthyaBot Gateway             │
  │        (The Control Plane)               │
  │        http://localhost:5000             │
  ├──────────────────────────────────────────┤
  │                                          │
  │  ┌─────────┐  ┌──────────┐  ┌────────┐  │
  │  │ Planner │  │ LLM Hub  │  │ Tools  │  │
  │  │ (ReAct) │  │ (Multi)  │  │ Engine │  │
  │  └────┬────┘  └────┬─────┘  └───┬────┘  │
  │       │            │             │       │
  │  ┌────┴────────────┴─────────────┴────┐  │
  │  │        Go Micro-Worker             │  │
  │  │   (Live Terminal Streaming)        │  │
  │  └───────────────────────────────────┘  │
  │                                          │
  │  ┌─────────┐  ┌──────────┐  ┌────────┐  │
  │  │ Memory  │  │ Browser  │  │ Cron / │  │
  │  │ (AES)   │  │(Puppeteer│  │Hearbeat│  │
  │  └─────────┘  └──────────┘  └────────┘  │
  │                                          │
  └──────────────────────────────────────────┘
                │
                ▼
        MongoDB (Local, Encrypted)

📊 Use Cases & Real-World Examples

SamarthyaBot is designed for real-world automation:

  • 🧑‍💻 Developers: "Samarthya, create a REST API with Express, push to GitHub, and deploy to my VPS"
  • 📊 Business Owners: "Calculate GST for ₹50,000 at 18% and send invoice to client@email.com"
  • 🎓 Students: "Research the latest papers on transformer architecture and summarize the top 5"
  • 🏢 DevOps Engineers: "SSH into my server, check disk space, restart nginx if it's down"
  • 📱 Content Creators: "Scrape trending topics from Twitter, summarize them, and post to my Discord"
  • 🇮🇳 Indian Professionals: "Generate UPI payment link for ₹2,500, book Rajdhani ticket status, translate to Hindi"

❓ Frequently Asked Questions (FAQ)

What is SamarthyaBot?

SamarthyaBot is a privacy-first, self-hosted AI operating system that runs locally on your machine. It combines chatbot capabilities with full RPA (Robotic Process Automation) — meaning it can write code, deploy servers, control browsers, send emails, and automate Indian workflows like GST and UPI, all from a single Telegram message or web dashboard.

How do I install SamarthyaBot?

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.

Is SamarthyaBot free?

Yes, SamarthyaBot is 100% free and open-source under the MIT license. It supports free AI providers like Google Gemini and Ollama (fully offline).

Does SamarthyaBot work offline?

Yes! Using Ollama as the AI provider, SamarthyaBot runs 100% offline with zero data leakage. No internet connection required after initial setup.

What AI models does SamarthyaBot support?

SamarthyaBot supports 9 AI providers with 20+ models: Google Gemini, Ollama (local), Anthropic Claude, OpenAI GPT, DeepSeek, Qwen, OpenRouter (100+ models), Groq, and Mistral.

Does SamarthyaBot support Hindi?

Yes! SamarthyaBot has first-class support for Hindi, Hinglish, and English. It's built specifically for Indian developers with Indian workflow support (GST, UPI, IRCTC).

Is my data safe with SamarthyaBot?

Absolutely. SamarthyaBot runs entirely on your local machine. All memories are encrypted with AES-256-CBC. Dangerous commands are blocked by regex blacklists. Your data never leaves your device.

How is SamarthyaBot different from ChatGPT?

Unlike ChatGPT, SamarthyaBot: (1) runs locally on your machine, (2) can execute real actions (deploy code, send emails, control browsers), (3) supports Indian workflows, (4) works offline via Ollama, and (5) your data never leaves your device.

Can SamarthyaBot deploy code to my server?

Yes! SamarthyaBot can SSH into remote servers using password or PEM key authentication, run commands, deploy code, and manage infrastructure — all from a simple chat message.

How do I create a plugin for SamarthyaBot?

Drop a .js file in ~/SamarthyaBot_Files/plugins/ with a name, description, parameters, and execute function. SamarthyaBot auto-discovers and loads it. See the Plugin Documentation above.


🗺️ Roadmap

  • Full RPA Engine (Code → Commit → Deploy)
  • Go Micro-Worker (Live Terminal Streaming)
  • Puppeteer Browser DOM Controller
  • Telegram Integration + Auto Tunnel
  • Multi-Provider LLM (Gemini, Claude, GPT, DeepSeek, Qwen, OpenRouter, Ollama, Groq, Mistral)
  • Discord Bot Integration
  • Groq/Whisper Voice Transcription
  • Workspace Security Sandbox
  • Heartbeat Periodic Tasks
  • Sub-Agent Spawn (Background Workers)
  • Premium CLI with ASCII Banner and Setup Wizard
  • WhatsApp Business API
  • Slack Integration
  • Docker Compose deployment
  • Mobile companion app
  • RAG (Retrieval-Augmented Generation) with local documents
  • Multi-user role-based access

📄 License

MIT License — Free to use, modify, and distribute.

Built with ❤️ in India 🇮🇳 by Bishnu Prasad Sahu


📦 NPM · 🐙 GitHub · 🐛 Report Bug · ✨ Request Feature

If SamarthyaBot helps you, consider giving it a ⭐ on GitHub!