BotVa

March 22, 2026 Β· View on GitHub

License: MIT Node.js 20+ TypeScript

πŸ‡ΊπŸ‡¦ Π£ΠΊΡ€Π°Ρ—Π½ΡΡŒΠΊΠ°

Multi-bot Telegram platform powered by Claude AI. One server β€” many bots, each with its own role, memory, knowledge, and integrations.

BotVa Dashboard

What Makes BotVa Different

  • Memory as a first-class entity. Facts in SQLite (topic, tags, access_count) + daily diary logs + weekly consolidations via Claude. Consolidation runs automatically every night
  • Bot team. Bots communicate via Unix sockets (Colleague MCP), a manager distributes tasks in parallel via Promise.allSettled()
  • Full isolation. Each bot is a separate process with its own .env, database, knowledge, memory, voice, and role. All managed from one admin panel
  • Live management. Web panel for creating bots, image gallery, cron tasks, backups, diagnostics. Model and temperature change without restart; .env changes require restart via UI
  • Dynamic integrations. MCP servers connect based on env variables β€” add BITRIX24_WEBHOOK_URL, restart the bot and it gets CRM. No code changes
  • Philosophy. The base role (_soul.md) is a manifesto: how to think, how to communicate, when to stay silent. Not "certainly!", but a human conversation

Key Features

Bot in action β€” parallel tools

Parallel execution: web search, image generation, Python chart, currency rates β€” in a single request

  • Multiple bots from a single Node.js instance
  • 12 ready-made roles β€” from personal assistant to webmaster
  • Memory β€” facts (long-term storage) + daily diary logs with consolidation
  • Voice β€” voice messages and responses (Groq STT + Edge TTS)
  • Images β€” generation and editing via Gemini with auto-gallery
  • Gemini AI β€” second opinion (AskGemini) and search with citations (GeminiSearch)
  • Bot team β€” communication via Unix sockets, task delegation
  • Scheduler β€” cron tasks with full tool access
  • Utilities β€” currency rates, time, Python sandbox, email, Telegraph
  • Integrations β€” Google Workspace, smart home, any MCP servers
  • Web search β€” search, scraping, AI browser (Stagehand)
  • Admin panel β€” full web interface for management
  • Backups β€” full and per-bot, with SHA256 verification

Quick Start

Install on VPS (fastest way)

Open https://botva-installer.onrender.com/, enter your server IP and Telegram token -- and in 3-5 minutes the bot is running. Details: DEPLOY.md

Local Installation

# 1. Clone
git clone https://github.com/cohe4ko/BotVa.git BotVa
cd BotVa

# 2. Install dependencies and build
./scripts/deploy.sh setup

# 3. Create your first bot (option A: CLI)
npm run new-bot -- my-bot personal-assistant --emoji πŸ§‘β€πŸ’Ό --name "My Bot"

# 3. Create your first bot (option B: web interface)
./scripts/deploy.sh admin  # Start admin panel
#    Open http://localhost:3000 β†’ Create Bot
#    Token and chat ID are entered in the creation form

# 4. Configure tokens (if using CLI)
#    Edit bots/my-bot/.env:
#    - TELEGRAM_BOT_TOKEN  (get from @BotFather in Telegram)
#    - ALLOWED_CHAT_ID     (send /chatid to the bot after starting)

# 5. Start
./scripts/deploy.sh start

After starting, message your bot in Telegram β€” it will respond.

Creating a bot via web interface Create Bot

Choose a role, enter the Telegram token from @BotFather and your chat ID. API keys can be added later.

Bot created

After creation β€” file structure and next steps.

Bot Roles

When creating a bot you choose a role β€” it defines specialization, tools, and style.

RoleSlugDescription
Personal Assistantpersonal-assistantDaily tasks, calendar, CRM, smart home
ResearcherresearcherDeep analysis, fact verification, reports
Healthhealth-advisorHealth metrics monitoring, lab results, recommendations
AcademicacademicScientific papers, methodology, PhD, teaching
CreativecreativeDesign, images, presentations, copywriting
SalessalesLeads, deals, sales analysis, proposals
PlannerplannerTasks, deadlines, prioritization
Knowledge Baseknowledge-baseDocumentation, FAQ, knowledge search
ManagermanagerBot team coordination, task delegation
Product/Marketproduct-marketCRM analytics, positioning, competitors
WebmasterwebmasterWebsite, content, deploy, SEO
Debate Researcherdebate-researcherAnalysis from opposing perspectives
npm run new-bot -- <slug> <role> [--emoji πŸ€–] [--name "Name"]

Features

Telegram

First interaction with the bot β€” greeting, profile setup, reminders, and search with clarifying questions:

First interaction AskUser β€” clarifying questions

Voice

The bot understands voice messages and can respond with voice. STT via Groq Whisper (requires GROQ_API_KEY), TTS via Edge-TTS (free). The /voice command toggles voice responses.

Images

Generation and editing via Gemini (GOOGLE_API_KEY). Use /img description or just ask in chat. All images are saved to the gallery.

Memory

Three-tier system: facts (persistent storage with topics and tags), daily markdown logs, workspace files (USER.md, MEMORY.md). Consolidation at NIGHT_OWL_HOUR.

Saving facts to memory User profile via AskUser

Left: saving facts via SaveFact/SearchMemory. Right: profile setup via AskUser

Scheduler

Cron tasks: /schedule 0 9 * * * What's on my agenda today?. Standard 5-field cron.

Bot Team

A manager coordinates work, bots communicate via Colleague MCP (Unix sockets). Each bot can reach the manager via ask_manager().

Telegram

SendMedia (photos, documents, albums), ForwardMessage, SetReaction, PinMessage, OpenWebApp (Mini App), AskUser (buttons, polls).

Utilities

CurrencyRates (cash exchange rates), GetCurrentTime, RunPython (sandbox), SendEmail (SMTP), PublishTelegraph.

Workspace Files

The bot reads and updates its files between sessions: USER.md (profile), MEMORY.md (memory) via ReadWorkspaceFile / WriteWorkspaceFile.

Detailed guide: MANUAL.md

Integrations

IntegrationMCP ServerRequired Variables
Google Calendar, Gmail, Drivegoogle-workspaceGOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET
Home Assistanthome-assistantHA_URL, HA_TOKEN

Admin Panel

Dashboard β€” 5 bots

Web interface for bot management. Two ways to start:

# 1. From Telegram (on-demand, auto-stops after 20 min)
/admin

# 2. As a standalone service (persistent)
./scripts/deploy.sh admin
SectionDescription
DashboardBot status, requests, costs, services
ConfigModel, temperature, env variables, workspace files
KnowledgeBot knowledge files
FactsMemory: view, search, edit
TasksScheduled cron tasks
SettingsChat settings, sessions
UsageToken analytics and costs
SystemBuiltin tools, MCP servers, skills on/off
ImagesGenerated image gallery
LogsEvent audit log
DiagnosticsAI-powered system diagnostics
BackupCreate and restore backups
TeamBot team management
TemplatesRole templates
TerminalBrowser shell
Create BotNew bot creation wizard

Detailed guide: MANUAL.md

Telegram Commands

Telegram commands Bot settings

Commands /usage, /model, /facts, /settings β€” manage the bot from Telegram

CommandDescription
/startGreeting and chat ID
/chatidShow chat ID
/newchat, /forgetClear session (memory persists)
/voiceToggle voice responses
/img <description>Generate an image
/modelSwitch model (Opus/Sonnet/Haiku)
/schedule <cron> <text>Create a scheduled task
/usageToken statistics
/statsInline stats on/off
/langInterface language
/adminAdmin panel
/sessionBrowse CLI sessions
/cancelCancel current request

Project Structure

BotVa/
β”œβ”€β”€ src/                    # Platform code (TypeScript)
β”‚   β”œβ”€β”€ index.ts            # Entry point
β”‚   β”œβ”€β”€ bot.ts              # Telegram bot
β”‚   β”œβ”€β”€ agent.ts            # Claude agent with MCP
β”‚   β”œβ”€β”€ builtin-tools.ts    # Built-in tools
β”‚   β”œβ”€β”€ memory.ts           # Memory system
β”‚   β”œβ”€β”€ db.ts               # SQLite
β”‚   β”œβ”€β”€ voice.ts            # STT/TTS
β”‚   β”œβ”€β”€ imagen.ts           # Image generation
β”‚   β”œβ”€β”€ scheduler.ts        # Scheduler
β”‚   └── admin/              # Web admin panel
β”œβ”€β”€ roles/                  # Role templates
β”‚   β”œβ”€β”€ _soul.md            # Base character (for all bots)
β”‚   β”œβ”€β”€ _tools.md           # Base tool routing
β”‚   └── *.md                # Roles (personal-assistant, researcher, ...)
β”œβ”€β”€ mcp-servers/            # MCP servers
β”‚   β”œβ”€β”€ colleague/          # Inter-bot communication
β”‚   └── manager/            # Manager coordination
β”œβ”€β”€ scripts/                # Management scripts
β”œβ”€β”€ installer/              # Web installer
β”œβ”€β”€ bots/                   # Bot data (gitignored)
β”œβ”€β”€ workspace/              # Runtime data (gitignored)
β”œβ”€β”€ .env.example            # Configuration template
└── package.json

Management

./scripts/deploy.sh setup      # Install dependencies, build
./scripts/deploy.sh start      # Start all bots
./scripts/deploy.sh stop       # Stop
./scripts/deploy.sh restart    # Restart
./scripts/deploy.sh build      # Rebuild TypeScript + MCP
./scripts/deploy.sh status     # Status
./scripts/deploy.sh backup     # Backup
./scripts/deploy.sh restore    # Restore

Deploy

Detailed guide with configuration and all options: DEPLOY.md

Tech Stack

  • Runtime: Node.js 20+, TypeScript (strict)
  • Telegram: Grammy
  • AI: Anthropic Claude Agent SDK
  • Database: SQLite (built into Node.js)
  • Web: Hono
  • Voice: Edge-TTS (synthesis), Groq Whisper (recognition)
  • Images: Google Gemini
  • Browser: Stagehand / Playwright
  • Tests: Vitest 4.x

Contributing

See CONTRIBUTING.md.

FAQ

How do I find my chat ID? Start the bot and send /start or /chatid.

How do I add knowledge to a bot? Place .md or .txt files in bots/<name>/knowledge/. Also available via admin panel (Knowledge).

How do I connect an integration? Add the required variables to the bot's .env. After restart, the bot automatically gets the tools.

How do I migrate to another server? See the "Migration" section in DEPLOY.md.

License

MIT