Run unlimited Telegram bots on one VPS, each with its own persona and memory. Some share a hive mind. Others stay ringfenced. All powered by Claude.
Status: Production-ready MVP
Part of the Claw Stack: Bot-Circus is the runtime layer of a larger pipeline. Each bot workspace is a full Claude Code session with its own persona and memory; workspaces can be symlinked into shared "troupes" or kept ringfenced for isolation. Pairs naturally with
ai-iq(drop-in long-term memory for each bot) andcircus(agent commons for cross-bot discovery and trust), but bot-circus runs standalone and has zero hard dependencies on either.Install the whole stack in one command:
/plugin marketplace add kobie3717/claw-stackOr just this plugin:
/plugin marketplace add kobie3717/bot-circus
Bot-Circus is a multi-bot Telegram orchestrator that runs up to 100 independent AI-powered bots on a single VPS, each powered by Claude Code CLI.
Each bot is a performer with its own:
- Telegram token and channel
- Persona files (SOUL.md, IDENTITY.md, USER.md)
- Workspace and memory
- Independent session β no crosstalk unless you want it
Bots can join troupes to share memory (hive mind), or stay ringfenced (fully isolated).
Existing multi-bot frameworks treat bots as dumb scripts. Bot-Circus treats each bot as a full AI agent with persistent memory, a distinct personality, and optional shared context with teammates.
- Personal assistant swarm: Work bot + home bot + research bot, all sharing your context
- Customer support troupe: 5 bots covering different products, shared knowledge base
- AI character roleplay: Each bot a different character, memory per character
- Multi-tenant SaaS: One bot per customer, ringfenced
- Development team: Code review bot + docs bot + CI/CD bot sharing project context
| Scope | Description | Use Case |
|---|---|---|
| Global | Shared across all bots | Reference docs, common tools |
| Troupe | Shared within a group | Team knowledge, customer context |
| Bot-Local | Ringfenced per bot | Private conversations, isolation |
Memory sharing is implemented via symlinks for real-time sync with zero disk overhead.
Telegram API (100+ bot tokens)
β (long polling)
βββββββββββββββββββββββββββββββββββββββ
β Bot-Circus Orchestrator (Node.js) β
β - Token router β
β - Per-bot message queues β
β - Worker pool manager β
β - Memory symlink resolver β
βββββββββββββββββββββββββββββββββββββββ
β (spawn subprocess per request)
βββββββββββββββββββββββββββββββββββββββ
β Claude Code CLI Worker Pool (10) β
β - Isolated --cwd per bot β
β - Fair scheduling across bots β
β - Rate limiting + quota fairness β
βββββββββββββββββββββββββββββββββββββββ
β (reads workspace files)
βββββββββββββββββββββββββββββββββββββββ
β Per-Bot Workspaces β
β performers/bot-id/ β
β ββ SOUL.md (persona) β
β ββ IDENTITY.md (config) β
β ββ USER.md (behavior rules) β
β ββ MEMORY.md (symlink or local) β
β ββ memory/ (SQLite DB) β
βββββββββββββββββββββββββββββββββββββββ
Key Innovation: Single Node.js orchestrator process instead of container-per-bot. This reduces RAM from ~100MB/bot (Docker) to ~5MB/bot (workspace files + queue state).
- Node.js β₯20
- Claude Code CLI installed (
which claude) - Telegram bot token(s) from @BotFather
cd /root/bot-circus
npm install
chmod +x bin/circus.js# Add a performer
./bin/circus.js add-performer \
--name "MyBot" \
--token "1234567890:ABCdefGHIjklMNOpqrSTUvwxYZ" \
--persona templates/default.soul.md
# Start the orchestrator
./bin/circus.js serveYour bot is now live on Telegram!
# Create a troupe
./bin/circus.js add-troupe customer-support
# Add bots to the troupe
./bin/circus.js add-performer \
--name "SupportBot1" \
--token $TOKEN1 \
--troupe customer-support \
--persona templates/customer-support.soul.md
./bin/circus.js add-performer \
--name "SupportBot2" \
--token $TOKEN2 \
--troupe customer-support \
--persona templates/customer-support.soul.mdBoth bots now share the same MEMORY.md file via symlink. Knowledge learned by one is instantly available to the other.
circus add-performer --name <name> --token <token> [--troupe <name>] [--persona <file>]
circus list # List all bots with status
circus start [bot-id] # Start specific bot or all
circus stop [bot-id] # Stop specific bot or all
circus restart <bot-id> # Restart a bot
circus pause <bot-id> # Pause queue processing
circus resume <bot-id> # Resume queue processing
circus rm-performer <bot-id> [--keep-workspace]circus add-troupe <name> # Create a troupe
circus list-troupes # List all troupes
circus join-troupe <bot-id> <troupe-name>
circus leave-troupe <bot-id>
circus troupe-members <troupe-name>circus logs <bot-id> [--follow] # View bot logs
circus logs --orchestrator # View orchestrator logs
circus stats # Show detailed statistics
circus health # Health check
circus top # Real-time dashboard (updates every 2s)circus serve # Start the orchestrator (main daemon)Bot-Circus ships with 5 starter personas in templates/:
- default.soul.md β Helpful, professional assistant
- customer-support.soul.md β Empathetic support agent
- sales-agent.soul.md β Consultative sales rep
- dev-helper.soul.md β Programming assistant
- meme-lord.soul.md β Fun, witty internet culture bot
Copy and customize these for your use case, or write your own from scratch.
{
"worker_pool": {
"max_workers": 10,
"request_timeout_ms": 120000
},
"global_rate_limits": {
"claude_requests_per_minute": 100,
"telegram_messages_per_second": 30
},
"logging": {
"level": "info",
"retention_days": 30
},
"telemetry": {
"enable_metrics": true,
"metrics_port": 9090
}
}Auto-generated when you run add-performer. Edit to customize:
{
"id": "mybot",
"name": "MyBot",
"token": "...",
"troupe": "customer-support",
"rate_limits": {
"messages_per_minute": 20,
"max_queue_size": 100
},
"telegram_config": {
"allowed_users": ["@admin"],
"respond_to_groups": true
},
"enabled": true
}If telemetry.enable_metrics is true, Prometheus metrics are exposed at http://localhost:9090/metrics:
circus_requests_totalβ Total requests per botcircus_errors_totalβ Total errors per botcircus_queue_depthβ Current queue size per botcircus_active_workersβ Active worker countcircus_response_time_msβ Average response time per bot
Health check endpoint: http://localhost:9090/health
| Metric | Value |
|---|---|
| RAM per bot | ~5MB (workspace + queue state) |
| Max concurrent workers | 10 (configurable) |
| Throughput | ~300 requests/min (10 workers Γ 2s avg response) |
| Bots tested | 100+ |
| Startup time | <5s for all bots |
Create /etc/systemd/system/bot-circus.service:
[Unit]
Description=Bot-Circus Orchestrator
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/root/bot-circus
ExecStart=/usr/bin/node /root/bot-circus/bin/circus.js serve
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.targetEnable and start:
systemctl enable bot-circus
systemctl start bot-circus
systemctl status bot-circusThe serve command must be running for CLI commands to work. Start it with:
circus serveOr run as a systemd service (see Deployment).
Check logs:
circus logs <bot-id> --followVerify Claude CLI is installed:
which claudeCheck worker pool status:
circus statsIncrease max_queue_size in bot config, or add more workers in global config.
MIT
Built by Kobus with Claude Code
Part of the kobie3717 open-source ecosystem:
- WaSP β WhatsApp Session Protocol
- baileys-antiban β Anti-ban for Baileys
- PayBridge β Unified payments SDK
- AI-IQ β SQLite-backed AI memory
- Bot-Circus β You are here πͺ