Snippbot Architecture
Seven layers, one security envelope, and one dispatcher that routes finished messages to their destinations — while your live replies stream straight back and never enter it. An event-driven event bus, the autonomy infrastructure that lets agents run unattended, and a marketplace as its own first-class system. Explore the architecture the way it is implemented — interactively.
System Architecture
The full layered architecture — seven layers inside the Security Envelope, the Unified Intent Dispatcher drawn as its two real lanes, plus the Singularity Marketplace Portal. Hover any layer to expand its internal components; hover each subcomponent to read implementation details.
- Seven numbered layers: Interaction · Cognitive · Execution · Memory · Orchestration · Data · Model Providers
- Execution layer shows the container sandbox (Off / Safe / Strict) alongside the permission gate and tool types
- Unified Intent Dispatcher — a reply path that stays live and a fan-out path for finished messages
- Routes — stored rules are the only source of fan-out destinations; AI suggests, you confirm
- Autonomy group — shared blackboard, resilience, durable jobs, escalation, approvals that wait for you
- Device Fleet — paired machines, remote desktop for you, AI control you allow at the machine
- Security Envelope with all seven defense layers labeled and linked
- Click-to-toggle expansion per layer with a visible collapse button
- Mode switcher — All / Reveal All / Flow / Dispatcher / Chapter 2 · 3 · 4 highlights
Process Flow
How a request moves through the system end-to-end. Orthogonal edges rendered by Mermaid + ELK, with color-coded request / response / memory / orchestration / persistence / marketplace paths.
- User → Interaction → Agent Cognitive → Tool Execution → Model Providers → Reply
- Two lanes: live replies stream straight back; finished messages go envelope → Tier 1 deterministic → Tier 2 policy gate → Tier 3 model → Tier 4 fallback → executors
- Autonomy lane — shared blackboard, resilience observe/act, durable jobs + check-ins, escalation cards, parked approvals
- Routes feed the dispatcher: destinations come from stored routes, never from message text
- Tier 2 (quiet hours · daily cap) applies to proactive insights only; the three scheduler flags are drawn default-OFF, as in the code
- Your Devices — device tools and AI control branch off Tool Execution, each off until enabled at the machine
- Memory and Data form a Knowledge lane; Orchestration (workflows, scheduler, goal-seeking loops) taps into Execution and Cognitive
- Singularity Marketplace installs skills into the Execution layer
- Toggle between Simple and Detailed views (keyboard: S / D)
Singularity Marketplace
The marketplace as its own complex system — a dedicated architectural page covering the eight layers behind publish, vet, install, and transact.
- Portal · Discovery · Vetting · Registry · Identity · Transaction · Governance · Delivery
- Permission-first package format with Ed25519 signed manifests
- Stripe is the live payment rail; USDC on Solana is built and switched off (SNIPPBOT_USDC_PAYMENTS_ENABLED=false)
- 55 static-analysis check codes across eight families, including five supply-chain checks (SUPPLY-001/002/003/010/011)
How to read these diagrams
Click to expand
Every layer starts collapsed showing just its title, subtitle, and stats. Click the header to expand and reveal subcomponents. Click the × in the top-right corner or the header again to close.
Hover for detail
Once a layer is expanded, hover any component card to see a floating tooltip with the implementation details — file paths, class names, and architectural notes.
Chapter highlights
The mode switcher at the top of the main diagram lets you isolate specific themes — security-only view, marketplace-only view, or architecture-only view — matching the chapters of the Snippbot walkthrough video.
Flow view
The process-flow diagram renders with the ELK orthogonal-routing algorithm, producing edges with minimum turns so you can trace every request from input to reply without visual noise.
Routes: where a finished message also goes
The dispatcher can send one finished message to several places. Where it goes is never read from the message text, a model's output or a tool call. It comes from stored routes: rules that say "finished messages from this chat also post there".
Suggest, then confirm
When you connect a channel, link a chat to one, or keep forwarding by hand, the AI proposes a route once, as a card in that chat. Nothing is routed until you accept, and a dismissed route is never proposed again.
Auto is opt-in
With Auto on, the AI adds routes itself, only to channels you already connected, and posts an Undo notice each time. A channel marked sensitive is never targeted by Auto.
Titles, not content
The route suggester sees chat titles, agent and channel names and how often you forward. It never sees message content, and sensitive channels are left out of what it is shown. Once a route exists, matching a message to it needs no model call.
Devices: your other machines, on your terms
A paired computer runs a small device agent and holds its own signing key. Everything below is off until someone turns it on at that machine, and nothing on the server can switch it on from a distance.
Remote desktop, for people
You can view or control a paired machine from the web or desktop app. Each session needs a grant signed by a key you enrolled by matching a six-digit code on both screens, and someone at the machine clicks Allow, unless that machine was set up there for unattended access from your own app. Screen and input are encrypted end to end, so the server relays them without being able to read them. Nothing is recorded.
AI control, one session at a time
An agent can click and type on a machine only after a person there allows that session, which names the agent and its task. By default it is limited to one app window and every action waits for your approval in chat. A purple banner with a Stop button stays on screen, and Plan Mode refuses it outright.
Bounded and logged
An AI session has a time limit, an action budget and a rate limit, and never runs unattended. Typing that looks like a password, card number or one-time code is refused. Each action is written to a tamper-evident log on the device, with typed text recorded as its length only.
Still being proven: Windows is the tested path so far. Control on macOS and Linux, the Windows service mode (built, unsigned) and video beyond your local network are still being proven.
Autonomous infrastructure
Snippbot agents can run with nobody watching. That needs things the original diagrams did not draw: a place to share what is known, a way to notice a tool failing and do something about it, work that survives the end of a chat turn, a way to ask you when it cannot decide, and a request for approval that is still there when you come back.
Shared blackboard
Facts, claimed work and events, scoped to a chat, an agent, a repo, a job, a group of session rooms, or globally — with an owner on every line, expiring leases, and prompt-injection screening on anything written by someone else.
Resilience: observe and act
A failing tool is classified against a closed set of failure classes and retried only when the retry is provably safe. Anything else becomes a hand-off. Observe is always on; automatic repair is a separate switch and off by default.
Durable jobs and check-ins
Long work runs in a detached runner that survives the end of a turn, and reports back with its exit code and log tail. Check-ins are durable timers that wake the agent to look at what it is waiting on.
Escalation cards
When a run cannot recover, the failure becomes a card in your chat with the evidence — screened and clipped — and options you pick from. A run started from a chat reports back to that chat; a run with no chat lands in Needs you on web, desktop and mobile.
Approvals that wait for you
An approval card is written down the moment it is raised. It never expires, survives a restart, and can be answered later from any device. Stepping away parks the request rather than rejecting it, and exactly one answer ever takes effect.
Steering sub-agents
You talk to a chat's main agent, and it can list, pause, resume, redirect or stop the sub-agents it started while they run. A message you send mid-turn still reaches the main agent while one of its sub-agents is working.
The full account, including which parts are off by default, is on the autonomy page.
See the architecture. Then install it.
Every component these diagrams describe exists in the open-source codebase. Some are opt-in and off by default — the diagrams mark which — so what you see is what the code actually does.