Getting Started with Zubo
Zubo is a self-hosted AI agent with persistent semantic memory, multi-channel presence across Telegram, Discord, Slack, WhatsApp, Signal, Email, and Web Chat, 25+ smart built-in tools, MCP compatibility, sub-agent delegation, and workflow automation. It runs entirely on your machine — your data never leaves your infrastructure. Whether you need a personal assistant that remembers everything, an automation hub that connects your services, or an AI copilot embedded in every chat platform you use, Zubo handles it from a single process with a single configuration file.
Copy-Paste Task Cards
Secure API Access
Enable API auth and create a key before exposing ports beyond localhost.
zubo config set auth.enabled true
zubo auth create-key my-app
Set Local Model Fallback
Keep responses available during provider outages or API quota issues.
zubo config set failover '["openai","ollama"]'
zubo config set providers.ollama.model llama3.3
Common Errors
If auth.enabled is true, all /api/* calls require Authorization: Bearer <key>. Create a new key if needed.
curl -H "Authorization: Bearer YOUR_KEY" http://localhost:3000/api/dashboard/status
Use failover and switch temporarily to a responsive provider or smaller model. Check logs for repeated timeout patterns.
zubo model openai/gpt-4o-mini
zubo logs --follow
If local providers fail, ensure the runtime is running and a model is installed.
ollama serve
ollama pull llama3.3
Start Here (10 Minutes)
- Run
zubo setupand choose Quickstart for the fastest working config. - Start the agent with
zubo start, then open the dashboard athttp://localhost:<port>. - Set a budget guardrail early:
zubo config set budget.dailyLimitUsd 5. - Enable auth if exposed beyond localhost:
zubo config set auth.enabled truethenzubo auth create-key [label].
Next: read Configuration for defaults and safety settings, then CLI Commands for day-to-day operations.
Features
AI Engine
- Multi-provider LLM support — Claude (Anthropic), OpenAI (GPT-4o, GPT-4-turbo), Ollama (local models), Groq (fast inference), Together (open models), OpenRouter (multi-model gateway), DeepSeek, xAI (Grok), Fireworks, LM Studio (local GUI), and any OpenAI-compatible endpoint. Switch providers with a single config change.
- Smart routing — automatically routes simple queries to fast, cheap models and complex queries to more capable ones. Saves cost without sacrificing quality, with full manual override when you need it.
- Automatic failover — define an ordered list of backup providers. If the primary is down or rate-limited, Zubo seamlessly falls through to the next provider in the chain with no user-facing interruption.
- Streaming responses — token-by-token streaming for all providers that support it. Messages appear in real time across every channel.
- Context compaction — when the conversation approaches the context window limit, Zubo automatically summarizes older turns to free space while preserving critical details.
- 200k token context — supports the full 200,000 token context window on Claude models, with configurable context windows per provider.
Channels
- Telegram — full bot API integration with user allow-listing by numeric Telegram ID.
- Discord — bot presence in servers and DMs, with user allow-listing by Discord user ID.
- Slack — app-level integration using Bot Token and App Token, with user allow-listing by Slack member ID.
- WhatsApp — via the WhatsApp Web multi-device API, with phone number allow-listing.
- Signal — via signal-cli, with phone number allow-listing.
- Email — bidirectional email channel via IMAP/SMTP. Zubo polls for new messages and replies automatically. Supports sender allow-listing and configurable polling intervals.
- Web Chat — built-in web dashboard with real-time chat, served on a configurable port.
- All channels share the same memory, personality, tools, and conversation history. A fact learned in Telegram is immediately available in Discord.
Memory
- Persistent semantic memory with vector embeddings powered by all-MiniLM-L6-v2 (384 dimensions), running locally via ONNX Runtime with zero external API calls.
- Full-text search using SQLite FTS5 with BM25 ranking for keyword-based retrieval.
- Hybrid search that combines 60% vector similarity (cosine) with 40% FTS5 BM25 scoring for best-of-both-worlds recall.
- Automatic chunking with overlap for long documents, ensuring context is preserved across chunk boundaries.
- Document ingestion supporting PDF, DOCX, TXT, CSV, JSON, YAML, and common code file formats. Upload a document and Zubo indexes it into searchable memory automatically.
- Knowledge Graph — structured entity-relationship memory. The agent can store and query entities (people, projects, concepts, organizations) with typed relationships (works_at, knows, manages, part_of). Entity context is automatically injected into conversations when relevant names are mentioned.
Tools
- 25+ built-in tools including shell command execution, file I/O (read, write, list, search), web search (DuckDuckGo, Brave, Google), HTTP requests, memory read/write/search, secrets management, cron job scheduling, code interpreter, image generation, knowledge graph, and webhook management.
- Code Interpreter — execute Python, JavaScript, or TypeScript code in a sandboxed subprocess with timeout enforcement and output capture. Runs code via Bun (JS/TS) or python3 (Python) with process isolation.
- Image Generation — generate images using DALL-E 3, fal.ai (Flux), or Together AI. Images are saved locally and served through the web dashboard. Supports custom sizes and styles.
- Webhooks — create webhook endpoints that receive events from external services (GitHub, Stripe, CI/CD). Supports HMAC signature verification (X-Hub-Signature-256). Events trigger agent actions automatically.
- Self-configuration — the agent can read and modify its own config at runtime via the
config_updatetool. Switch providers, set budgets, enable features — all through natural conversation. - Tools are permission-gated with three levels:
safe,sensitive, anddangerous. Dangerous operations require explicit confirmation tokens.
Skills
- Extensible single-file TypeScript skills that you can write, install, or share. Each skill is a self-contained
.tsfile with a manifest header. - Hot-reload without restart — drop a skill file into
~/.zubo/workspace/skills/and it becomes available immediately. - Community skill registry for discovering and installing skills built by others.
- Skill sandboxing — user-installed skills run in isolated subprocesses with configurable timeouts, preventing runaway code from affecting the main process.
Personal Features
- Todos — add, list, complete, update, and remove tasks with priorities (
low/medium/high), due dates, and tags. A full task manager inside your agent. - Notes — save, search (FTS5), list, update, delete, and pin notes with tags. Fast full-text search across all your notes.
- Preferences — store user preferences as category/key/value pairs. Preferences are automatically injected into the system prompt so the agent always respects your settings.
- Topics — create, switch, list, and archive conversation topics. Each topic scopes a separate session, keeping context focused when you juggle multiple projects.
- Follow-ups — schedule proactive follow-up messages at a specific time or delay. Uses one-shot cron jobs that fire once and auto-delete.
Agents
- Custom sub-agents with focused system prompts, restricted tool access, and specialized behavior. Define a “code-reviewer” agent that only has access to file and git tools, or a “researcher” agent that only has web search.
- 2-level delegation — the main agent can delegate tasks to sub-agents, which can in turn delegate to their own sub-agents, up to two levels deep.
Workflows
- Multi-agent pipelines with dependency resolution, parallel execution of independent steps, and variable passing between stages.
- Define workflows as JSON or YAML in
~/.zubo/workspace/workflows/and trigger them by name or on a schedule.
Integrations
- GitHub — repositories, issues, pull requests, code search, commit history.
- Google — Calendar (read/write events), Gmail (read/send), Sheets (read/write), Docs (read), Drive (list/search/download).
- Notion — pages, databases, blocks.
- Linear — issues, projects, teams.
- Jira — issues, projects, sprints.
- Slack — channels, messages, users (beyond the chat channel).
- Twitter — post tweets, read timelines.
- Claude Code — delegate tasks to Claude Code CLI, use it as an LLM provider, or run Zubo as an MCP server so Claude Code can access Zubo's tools.
- OpenAI Codex — delegate coding tasks to Codex CLI, use it as an LLM provider, or run Zubo as an MCP server so Codex can use Zubo's memory and integrations.
- OAuth 2.0 support — connect Google, GitHub, Notion, Linear, and Slack via OAuth for short-lived tokens with automatic refresh. More secure than raw API keys, with a dashboard UI for managing connections and an
oauth_managetool for programmatic control. Falls back to API keys gracefully when no OAuth token is configured.
MCP (Model Context Protocol)
- Connect to external MCP servers and expose their tools alongside Zubo's built-in tools. Any MCP-compatible tool server works out of the box.
- JSON-RPC over stdio — each MCP server runs as a subprocess. Zubo handles the full protocol: initialization, tool discovery, and tool execution.
- Automatic tool registration — on boot, Zubo connects to each configured MCP server, discovers available tools, and registers them with a server-name prefix to avoid conflicts (e.g.,
filesystem__read_file). - Configure in JSON — add MCP servers via the
mcp.serversconfig array. Example:{ "name": "filesystem", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"] } - MCP server mode — run Zubo itself as an MCP server with
zubo mcp-serve. External tools like Claude Code and OpenAI Codex can then use Zubo's memory, knowledge graph, integrations, and scheduling as MCP tools.
Scheduling
- Natural language scheduling — describe schedules in plain English like “every weekday at 9am” or “twice a day”. Zubo parses natural language into cron expressions automatically.
- One-shot reminders — say “remind me in 30 minutes” or “ping me in 2 hours”. The reminder fires once and auto-deletes, so you never accumulate stale jobs.
- Cron jobs supporting any standard cron expression (e.g.,
0 9 * * 1-5for weekday mornings). - Configurable heartbeat from 1 to 1440 minutes (default 30), where Zubo wakes up, checks for pending tasks, processes scheduled jobs, and optionally sends proactive messages.
- Proactive memory-based triggers — Zubo can surface reminders and follow-ups based on things it has remembered.
- Morning briefing — a built-in scheduled task that summarizes your calendar, pending tasks, and unread messages each morning.
Voice
- Speech-to-text via OpenAI Whisper for transcribing voice messages received on any channel.
- Text-to-speech via OpenAI (voices: alloy, echo, fable, onyx, nova, shimmer) or ElevenLabs for generating spoken responses.
Dashboard
- Built-in web UI served as zero-dependency inline HTML on the configured port. No build step, no npm dependencies, no CDN calls.
- Includes real-time chat, analytics (token usage, tool calls, response times), memory browser with search, skill manager (install, enable, disable, delete), settings editor, and full data export/import.
Budget & Cost Controls
- Spending limits — set daily or monthly budgets per provider or globally. Zubo pauses requests when limits are reached, preventing surprise bills.
- Per-model cost tracking — view token usage and costs broken down by model in the dashboard. Full transparency into where your money goes.
Security
- API key authentication with Bearer tokens for all HTTP endpoints.
- Tool permission levels (safe, sensitive, dangerous) with confirmation tokens for destructive operations.
- Rate limiting per IP with configurable thresholds for chat and upload endpoints.
- File access restrictions preventing traversal outside the workspace directory.
- Shell command filtering blocking known-dangerous commands and patterns.
- Private IP blocking preventing SSRF attacks by blocking requests to internal network addresses.
Installation
Choose the installation method that fits your platform.
macOS & Linux
Zubo requires Bun v1.0+ as its runtime. If you do not have Bun installed, visit bun.sh and run the one-line installer.
One-liner (recommended):
curl -fsSL https://zubo.bot/install.sh | bash
This installs Bun (if needed), installs Zubo globally, and runs the setup wizard automatically.
Manual install:
# Using Bun (recommended)
bun add -g zubo
# Or using npm
npm i -g zubo
# Then run the setup wizard
zubo setup
Windows (via WSL)
Zubo runs on Windows through the Windows Subsystem for Linux (WSL). This gives you full compatibility with zero workarounds.
Step 1: Install WSL (requires Windows 10 version 2004+ or Windows 11):
wsl --install
Restart your computer when prompted. This installs Ubuntu by default.
Step 2: Open the Ubuntu terminal from the Start Menu and install Zubo:
curl -fsSL https://zubo.bot/install.sh | bash
That's it. Zubo runs inside WSL with full access to all features. The web dashboard is accessible from your Windows browser at http://localhost:3000.
Docker
Run Zubo as a container with no local dependencies.
# Clone the repo
git clone https://github.com/apwn/zubo.git && cd zubo
# Copy the example env and add your API key
cp .env.example .env
# Start Zubo
docker compose up -d
The container exposes port 8787 for the web dashboard and mounts ~/.zubo for persistent data. Stop with docker compose down.
To configure, edit .env or mount your own config.json:
volumes:
- ~/.zubo:/root/.zubo
- ./my-config.json:/root/.zubo/config.json
The Setup Wizard
After installing (on any platform), run the setup wizard:
zubo setup
You'll be asked to choose between Terminal (classic prompts) or Dashboard (a browser-based wizard with visual provider cards, auto-detection, and connection testing). Both paths configure the same thing — pick whichever you prefer.
The wizard walks you through 4 steps:
- Step 1: AI Provider — choose from 15 supported providers (Anthropic, OpenAI, Ollama, Groq, Together, OpenRouter, DeepSeek, xAI, MiniMax, Fireworks, Cerebras, LM Studio, Claude Code, Codex, or any OpenAI-compatible endpoint) and enter your API key. Optionally configure a fallback provider for automatic failover.
- Step 2: Channels — enable any combination of Telegram, Discord, Slack, WhatsApp, Signal, and Email. Enter the required tokens and credentials for each. Web Chat is always on and requires no configuration.
- Step 3: Personalization — set your agent's name and describe its personality. This shapes how Zubo talks to you across all channels.
- Step 4: Smart Cost Savings — optionally configure a fast model (e.g., Groq) for simple queries. Smart routing automatically detects low-complexity messages and routes them to the cheaper, faster model, saving 50–80% on costs without sacrificing quality for complex tasks.
The wizard also creates the ~/.zubo directory and all required subdirectories, generates your ~/.zubo/config.json file, and downloads the all-MiniLM-L6-v2 embedding model (~80 MB) for local semantic memory.
Starting Zubo
# Start in foreground (logs to stdout)
zubo start
# Start as a background daemon
zubo start --daemon
When started, Zubo initializes the SQLite database, loads the embedding model, connects to all enabled channels, and starts the heartbeat scheduler. The web dashboard opens automatically in your default browser at http://localhost:3000 (or your configured port). When running with --daemon, Zubo writes its PID to ~/.zubo/zubo.pid and logs to ~/.zubo/logs/zubo.log.
Quick Start
Here is what Zubo looks like in action. These are real conversations showing key capabilities — memory, self-configuration, skill building, service integration, and scheduling.
Memory
Self-Configuration
Building a Skill on the Fly
Connecting a Service
Scheduling
How Zubo Thinks
Zubo is not a chatbot that describes what it could do. It is an agent that acts. Here is the core behavior model that drives every interaction:
- Act first — Zubo does not describe what it could do or ask for permission on routine tasks. It executes immediately and reports results. If you say "check the weather," you get the weather, not an explanation of how weather APIs work.
- Be concise — the shortest answer that fully addresses the question. No filler, no preamble, no unnecessary caveats. Direct answers to direct questions.
- Find a way — Zubo builds tools on the fly when it does not have one. It never says "I can't do that." If a skill does not exist, it writes one. If an integration is not configured, it walks you through setup.
- Learn constantly — facts, preferences, names, projects, relationships — everything you tell Zubo goes into persistent memory and the knowledge graph automatically. The more you talk to it, the more context it has.
- Self-configuring — Zubo can read and modify its own configuration at runtime via the
config_updatetool. Switch LLM providers, set budgets, enable features, change its name — all through natural conversation. - Cross-channel — same memory, same personality, same tools, everywhere. A fact learned in Telegram is immediately available in Discord, Slack, WhatsApp, Signal, Email, and Web Chat.
Architecture
Zubo is a single-process application built around an event-driven agent loop. Here is a simplified view of how a message flows through the system:
+---------------------+
| User Message |
+----------+----------+
|
+----------v----------+
| Channel Adapter |
| (Telegram, Discord, |
| Slack, WhatsApp, |
| Signal, Email, |
| Web Chat) |
+----------+----------+
|
+----------v----------+
| Router |
| (auth, rate limit, |
| session lookup) |
+----------+----------+
|
+----------v----------+
| Agent Loop |
| |
| +------+ +-------+ |
| |Tools | |Memory | |
| +------+ +-------+ |
| +------+ +-------+ |
| |Skills| |Agents | |
| +------+ +-------+ |
| +-----------+ |
| |Scheduler | |
| +-----------+ |
+----------+----------+
|
+----------v----------+
| LLM Provider |
| (Claude / OpenAI / |
| Ollama / Groq ...) |
+----------+----------+
|
+----------v----------+
| Response |
+----------+----------+
|
+----------v----------+
| Channel Adapter |
+----------+----------+
|
+----------v----------+
| User |
+---------------------+
The Channel Adapter normalizes incoming messages from any platform into a unified internal format. The Router handles authentication, rate limiting, and session management. The Agent Loop is the core: it sends the conversation to the LLM, processes any tool calls the LLM requests, stores results in memory, and iterates until the LLM produces a final text response or the maximum turn count is reached. The response is then sent back through the Channel Adapter to the originating platform.
Directory Structure
All Zubo data lives under a single home directory, defaulting to ~/.zubo. You can override this with the ZUBO_HOME environment variable.
~/.zubo/
├── config.json # Main configuration file
├── zubo.db # SQLite database (WAL mode)
├── zubo.pid # Daemon PID file (created on --daemon)
├── logs/
│ └── zubo.log # Application logs (rotated daily)
├── sessions/
│ └── owner.jsonl # Conversation history (JSON Lines)
├── models/
│ └── all-MiniLM-L6-v2/ # Embedding model (auto-downloaded on setup)
│ ├── model.onnx
│ ├── tokenizer.json
│ └── config.json
└── workspace/
├── SYSTEM.md # Custom system prompt (editable)
├── MEMORY.md # Persistent memory file
├── memory/ # Dated memory files (YYYY-MM-DD.md)
├── skills/ # User-installed skill files (.ts)
├── agents/ # Custom agent definitions (.json)
├── workflows/ # Workflow definitions (.json / .yaml)
├── teams/ # Team definitions (.json)
├── uploads/ # Uploaded and ingested documents
└── backups/ # Daily SQLite backups (zubo-YYYY-MM-DD.db)
The config.json file is the single source of truth for all runtime configuration. The zubo.db SQLite database stores memory entries, embeddings, scheduled jobs, API keys, and analytics. Conversation history is stored as JSON Lines in the sessions/ directory for easy inspection and export.
Tech Stack
| Component | Technology |
|---|---|
| Runtime | Bun |
| Language | TypeScript |
| Database | SQLite via bun:sqlite (WAL mode for concurrent reads) |
| Embeddings | ONNX Runtime with all-MiniLM-L6-v2 (384 dimensions, ~80 MB) |
| Search | Hybrid: FTS5 BM25 (40%) + cosine vector similarity (60%) |
| Dashboard | Zero-dependency inline HTML (no build step, no CDN) |
| LLM SDK | @anthropic-ai/sdk for Claude + OpenAI-compatible REST for all others |
| Channels | Native API clients per platform (grammy, discord.js, @slack/bolt, whatsapp-web.js, signal-cli) |
| Voice | OpenAI Whisper (STT), OpenAI TTS / ElevenLabs (TTS) |
Best Practices
- Start with
zubo setup— let the interactive wizard configure everything. It handles directory creation, model downloading, and initial config generation so you do not have to do it manually. - You do not need a custom SYSTEM.md — Zubo's built-in personality is comprehensive and handles most use cases out of the box. Only customize
~/.zubo/workspace/SYSTEM.mdif you want to change the agent's name or personality. - Tell Zubo about yourself in conversation — it saves everything to memory automatically. Your name, your job, your preferences, your projects — the more you talk to it, the better it gets. No manual configuration needed.
- Use the dashboard for day-to-day management (chatting, browsing memory, managing skills) and the CLI for automation (scripting, cron, CI/CD pipelines).
- Enable API authentication if you are exposing the web port beyond localhost:
zubo config set auth.enabled true, then create an API key via the dashboard orzubo auth create-key [label]. - Set rate limits for production to prevent abuse:
zubo config set rateLimit.chatPerMinute 30. - Use
zubo start --daemonfor always-on operation. Zubo writes a PID file and rotates logs automatically. - Check
zubo statusandzubo logsfor troubleshooting. The status command shows uptime, memory usage, connected channels, and pending scheduled jobs. - Back up your data with
zubo exportfor a full JSON export, or rely on the automatic daily SQLite backups in~/.zubo/workspace/backups/. - Enable smart cost savings to automatically send simple queries to fast, cheap models. Set
smartRouting.enabledtotrueand configure afastProvider(e.g., Groq) alongside your primary. This can cut costs significantly. - Set a budget to avoid surprise bills:
zubo config set budget.dailyLimitUsd 5. Cost tracking is always active in the dashboard under Analytics → Costs. - Configure failover providers so your agent stays available even if your primary LLM provider has an outage. For example, set Anthropic as primary and Ollama as failover for fully offline operation when the cloud is down.
- Keep skills small and focused — one skill per task. This makes them easier to test, share, and debug.
Next Steps
Now that you have Zubo installed and running, explore the rest of the documentation to unlock its full potential:
- Configuration — deep dive into every configuration option: LLM providers, channels, voice, rate limiting, authentication, sandbox settings, and a complete annotated example.
- Agents & Workflows — learn how to create custom sub-agents with focused system prompts and restricted tools, and build multi-agent pipelines with dependency resolution and parallel execution.
- Memory System — understand how semantic memory works, how to ingest documents, search your knowledge base, and tune the hybrid search weights.
- Skills — write, install, and share single-file TypeScript skills. Learn the skill manifest format, the sandbox environment, and the community registry.
- Personal Features — built-in tools for todos, notes, preferences, conversation topics, and scheduled follow-ups. Your personal productivity layer, stored locally.
- Channel Setup — step-by-step guides for configuring each channel: creating bots, obtaining tokens, setting up webhooks, and configuring allow-lists.
- Conversation History — unified cross-channel history with FTS5 search, dashboard browsing, and API access for searching and analyzing past conversations across all channels.
- Webhooks — create webhook endpoints for GitHub, Stripe, CI/CD, and any external service. HMAC signature verification, prompt templates with
{{payload}}substitution, and dashboard management. - Visual Workflows — build multi-step automations with the drag-and-drop workflow builder. Step types (tool, agent, condition, message, delay), triggers (manual, cron, webhook), and template variables.
- Extensions Marketplace — browse, install, and manage MCP servers from the official registry. One-click installation with automatic tool registration.
- Integrations — connect Zubo to GitHub, Google Workspace, Notion, Linear, Jira, and more. OAuth 2.0 authentication with automatic token refresh, API key setup, and usage examples.
- Security & Auth — harden your Zubo instance: API key management, tool permission levels, confirmation tokens, rate limiting, file access restrictions, and network security.
- API Reference — complete HTTP API documentation for programmatic access: endpoints, request/response formats, authentication, and WebSocket streaming.
- CLI Commands — full reference for every
zuboCLI command: start, stop, status, config, auth, export, import, logs, and more.