Packages
A Snippbot install is composed of a handful of Python packages plus a bundled React frontend. Most users only ever install snippbot (the daemon, which includes the CLI) and, optionally, snippbot-device on remote machines.
What gets installed
Section titled “What gets installed”| Package | Installed as | Purpose |
|---|---|---|
| Daemon | pip install snippbot | The ASGI server, REST API, bundled web UI, and CLI entry point (snippbot). |
| Core library | (dependency of the daemon) | Shared business logic — agents, memory, scheduler, workflows, channels, dispatch, MCP, sandboxing. |
| Device agent | pip install snippbot-device on remote machines | Standalone WebSocket client that exposes a remote machine’s local tools to a paired daemon. |
Everything below describes the internals of those packages for developers who want to read or contribute to the source.
Daemon internals (snippbot_core)
Section titled “Daemon internals (snippbot_core)”The daemon depends on the snippbot_core library, which contains the major subsystems:
| Module | Responsibility |
|---|---|
config.py | Environment variable config with defaults |
agents/ | Agent models, memory, configuration |
executor/ | Task execution engine with DAG resolution |
scheduler/ | Cron/interval job scheduler (engine, models, stores) |
workflows/ | Workflow DAG builder, executor, template store |
sub_agent/ | Sub-agent spawning, lifecycle, messaging, aggregation |
tools/ | Built-in tool implementations (bash, browser, file, etc.) |
tools/browser/ | Full browser automation suite (12+ modules) |
sandbox/ | Container sandbox config and manager |
mcp/ | MCP client, connection manager, catalog, OAuth2 |
hooks/ | Hook engine, executor, store, analytics |
dispatch/ | Unified Intent Dispatcher — envelope types, 4-tier resolution pipeline, shadow controller, decision log, settings store |
channel_store.py | Messaging platform credential/binding storage |
skills_store.py | Tool registry and MCP server persistence |
event_bus.py | Async publish/subscribe event bus (orthogonal to the Intent Dispatcher) |
memory/ | Episodic, semantic, and graph memory layers |
Python requirement: 3.11+
Key dependencies: anthropic, aiosqlite, httpx, pydantic, cryptography, playwright
Daemon process (snippbot)
Section titled “Daemon process (snippbot)”The self-hosted daemon. Starts the HTTP API server and wires all core subsystems together.
| Module | Responsibility |
|---|---|
server.py | Main Starlette ASGI app + uvicorn startup |
api/routes.py | All API route definitions (382+ KB) |
api/chat.py | Chat endpoint with SSE streaming |
api/scheduler.py | Scheduler REST routes |
api/workflows.py | Workflow REST routes |
api/auth.py | Auth key management routes |
api/dispatcher.py | Intent Dispatcher admin REST (/api/dispatcher/{decisions,health,settings,inject}) |
channel_adapter/ | Platform-specific webhook adapters |
channel_adapter/adapters/ | slack, discord, telegram, whatsapp, teams, google_chat |
Port: 18781 (API + static UI)
Key dependencies: starlette, uvicorn, aiosqlite
CLI (snippbot_cli)
Section titled “CLI (snippbot_cli)”The command-line interface. Communicates with the daemon via HTTP.
| Module | Responsibility |
|---|---|
main.py | Click CLI entry point |
user_config.py | ~/.snippbot/config.toml read/write |
commands/ | Individual CLI command implementations |
Key dependencies: click, rich, httpx
The CLI ships in the same wheel as the daemon (pip install snippbot) — there is no separate install step.
Web UI
Section titled “Web UI”The React frontend served by the daemon at /ui/.
| Directory | Responsibility |
|---|---|
src/pages/ | Top-level pages (Chat, Projects, Agents, etc.) |
src/components/ | Reusable UI components |
src/stores/ | Zustand global state |
src/api/ | React Query API hooks |
src/styles/ | Tailwind config + Aurora theme |
Built with: React 18, TypeScript, Vite, Tailwind CSS, React Query, Zustand
Bundle output: Embedded in the snippbot Python package at build time — users do not need Node.js to run Snippbot.
Dev port: 5173 (proxies API calls to 18781)
Device agent (snippbot-device)
Section titled “Device agent (snippbot-device)”The lightweight device agent that runs on remote machines.
| Module | Responsibility |
|---|---|
main.py | Click CLI entry point (snippbot-device) |
agent.py | WebSocket client to daemon |
tools.py | Local tool implementations (bash, file, system_info) |
config.py | ~/.snippbot-device/config.toml management |
pair.py | Pairing flow with daemon |
Installed as: pip install snippbot-device on remote machines
Key dependencies: websockets, click, toml
Dependency graph
Section titled “Dependency graph”snippbot (daemon + CLI) └── snippbot_core (business logic) ├── anthropic SDK ├── aiosqlite ├── httpx ├── cryptography (Fernet) ├── playwright (browser) └── [optional] chromadb (vector memory)
snippbot-device (standalone, on remote machines) └── websockets, click, toml