Back to Architecture

Snippbot — Process Flow

How a request moves through the system · layer-level view
--- config: layout: elk theme: base themeVariables: primaryColor: "#131a24" primaryTextColor: "#e6eef7" primaryBorderColor: "#2c3a4f" lineColor: "#6ab8ff" fontFamily: "-apple-system, BlinkMacSystemFont, SF Pro Text, system-ui" fontSize: "16px" clusterBkg: "#0d1117" clusterBorder: "#2c3a4f" flowchart: htmlLabels: true useMaxWidth: false elk: nodePlacementStrategy: BRANDES_KOEPF mergeEdges: true --- flowchart TD User2(["
👤 User
"]) subgraph Input2["INPUT CHANNELS"] direction LR Chat2["
💬 Chat UI
"] Channels2["
📨 Channels
"] CLI2["
🖥 CLI + API
"] end Interaction2["
Interaction
receive · validate
"] Cognitive2["
Agent Cognitive
think · plan · act
"] Execution2["
Tool Execution
gated · fail-closed
"] subgraph Knowledge2["KNOWLEDGE"] direction TB Memory2["
Memory
5-tier · knowledge graph
"] Data2["
Data Layer
SQLite · secrets
"] end Orchestration2["
Orchestration
workflows · hooks · bus
"] Models2["
Model Providers
9 providers
"] Marketplace2["
◆ Marketplace
signed · vetted
"] Response2(["
✔ Reply
"]) User2 ==> Chat2 User2 ==> Channels2 User2 ==> CLI2 Chat2 ==> Interaction2 Channels2 ==> Interaction2 CLI2 ==> Interaction2 Interaction2 ==> Cognitive2 Cognitive2 ==> Execution2 Cognitive2 ==> Memory2 Memory2 ==> Data2 Execution2 -.-> Data2 Cognitive2 ==> Models2 Orchestration2 ==> Execution2 Orchestration2 ==> Cognitive2 Marketplace2 -.-> Execution2 Cognitive2 ==> Response2 Response2 ==> User2 linkStyle 0,1,2,3,4,5,6,7 stroke:#6ab8ff,stroke-width:3px linkStyle 8,9 stroke:#a987ff,stroke-width:3px linkStyle 10 stroke:#f07ad4,stroke-width:2px,stroke-dasharray:6 4 linkStyle 11 stroke:#00e5cc,stroke-width:3px linkStyle 12,13 stroke:#ffb05c,stroke-width:3px linkStyle 14 stroke:#ffd466,stroke-width:2.5px,stroke-dasharray:6 4 linkStyle 15,16 stroke:#00e5cc,stroke-width:3px
--- config: layout: elk theme: base themeVariables: primaryColor: "#131a24" primaryTextColor: "#e6eef7" primaryBorderColor: "#2c3a4f" lineColor: "#6ab8ff" fontFamily: "-apple-system, BlinkMacSystemFont, SF Pro Text, system-ui" fontSize: "18px" clusterBkg: "#0d1117" clusterBorder: "#2c3a4f" flowchart: htmlLabels: true useMaxWidth: false elk: nodePlacementStrategy: BRANDES_KOEPF mergeEdges: true cycleBreakingStrategy: GREEDY --- flowchart TD User(["
👤 User
"]) subgraph Input["INPUT CHANNELS"] direction LR Chat["
💬 Chat UI
React 18 · streaming
"] Channels["
📨 Channels
6 messaging platforms
Slack · DiscordTelegram · WhatsAppTeams · Google Chat
"] CLI["
🖥 CLI + API
60+ commands · 236+ endpoints
"] end Interaction["
Interaction Layer
How agents receive input
Chat API · SSE streamingInteractive questionsRate limit (5 tiers)CSRF + input validationAuth middleware
"] Cognitive["
Agent Cognitive
Decomposition · autonomy · reflection
Team Mode (Architect → Executor → Reviewer)Inner Loop (Think → Plan → Act → Reflect)Proactivity Engine (5 levels)13+ Personas · trust scores
"] Execution["
Tool Execution
Gated dispatch · fail-closed
Permission Gate (grant · trust · env · evasion)Built-in Tools (15+ blocked cmds)MCP Tools (OAuth2 · schema hash)Custom Skills (Ed25519 signed)Browser CDP (stealth · record)
"] subgraph Knowledge["KNOWLEDGE"] direction TB Memory["
Memory & Knowledge
5-tier · agent-scoped
Episodic (valence · importance)Keyword FTS5 + Vector HNSW 384dHybrid RRF · query analyzerKnowledge Graph (no-LLM consolidation)Ebbinghaus decay curve
"] Data["
Data Layer
Persistence + secrets
SQLite · 100+ tables · WALSecret Store AES-256-GCMVector Index hnswlibFile / Asset storage (0o600)Audit Log · DLP-scanned
"] end Orchestration["
Orchestration
Automation spine
Workflows DAG (7 step types)Scheduler (cron · NL · chains)Hooks (Python · HTTP · builtin)Approval gatesEvent Bus (100+ events)
"] Models["
Model Providers
Multi-provider · egress-filtered
Anthropic (Claude Pro/Team sub)OpenAI · Groq · GoogleLocal (Ollama · llama.cpp)+ 4 additional providers
"] Marketplace["
◆ Singularity Marketplace
Permission-first ecosystem
Browse · Install · Publish · Earn43 security checksEd25519 signed manifestsSNIPP token economy
"] Response(["
✔ Reply
"]) %% Single-direction edges keep ELK orthogonal routing clean. %% Request path (blue) — linear top-to-bottom User ==> Chat User ==> Channels User ==> CLI Chat ==> Interaction Channels ==> Interaction CLI ==> Interaction Interaction ==> Cognitive Cognitive ==> Execution %% Memory + persistence branch Cognitive ==>|read · write| Memory Memory ==> Data Execution -.->|audit| Data %% External calls + orchestration + marketplace tap into execution/cognitive Cognitive ==>|LLM call| Models Orchestration ==>|trigger| Execution Orchestration ==>|events| Cognitive Marketplace -.->|install skills| Execution %% Reply path (cyan) — Cognitive emits, Interaction streams to user Cognitive ==>|reply| Response Response ==> User classDef user fill:#2b3a52,stroke:#a987ff,stroke-width:2.5px,color:#e6eef7,font-size:18px,font-weight:700 classDef interaction fill:#0d2030,stroke:#6ab8ff,stroke-width:2.5px,color:#e6eef7 classDef cognitive fill:#1a1529,stroke:#a987ff,stroke-width:2.5px,color:#e6eef7 classDef execution fill:#0d2218,stroke:#5ef0a0,stroke-width:2.5px,color:#e6eef7 classDef memory fill:#1e1929,stroke:#a987ff,stroke-width:2.5px,color:#e6eef7 classDef data fill:#261729,stroke:#f07ad4,stroke-width:2.5px,color:#e6eef7 classDef orchestration fill:#291f13,stroke:#ffb05c,stroke-width:2.5px,color:#e6eef7 classDef models fill:#0d2929,stroke:#00e5cc,stroke-width:2.5px,color:#e6eef7 classDef market fill:#2b2010,stroke:#ffd466,stroke-width:2.5px,color:#e6eef7 classDef input fill:#131a24,stroke:#6ab8ff,stroke-width:2px,color:#e6eef7 class User user class Response user class Chat input class Channels input class CLI input class Interaction interaction class Cognitive cognitive class Execution execution class Memory memory class Data data class Orchestration orchestration class Models models class Marketplace market %% Edge colors match the request / memory / orch / response / market legend linkStyle 0,1,2,3,4,5,6,7 stroke:#6ab8ff,stroke-width:3px linkStyle 8,9 stroke:#a987ff,stroke-width:3px linkStyle 10 stroke:#f07ad4,stroke-width:2px,stroke-dasharray:6 4 linkStyle 11 stroke:#00e5cc,stroke-width:3px linkStyle 12,13 stroke:#ffb05c,stroke-width:3px linkStyle 14 stroke:#ffd466,stroke-width:2.5px,stroke-dasharray:6 4 linkStyle 15,16 stroke:#00e5cc,stroke-width:3px
Request path Response path Memory flow Orchestration Persistence (dashed) Marketplace (dashed)

What happens in a single request

1. The user sends a message from one of three input surfaces — the Chat UI, any of six messaging channels, or the CLI. All three converge on the same REST + SSE API.

2. The Interaction Layer authenticates, rate-limits, and validates before anything else runs. Input never reaches the agent raw.

3. The Agent Cognitive Layer classifies complexity. Simple requests run the inner loop (Think → Plan → Act → Reflect). Complex requests trigger team mode: Architect → Executor → Reviewer.

4. Tool calls pass through the Tool Execution Layer. Every call hits the Permission Gate first — permissions · trust level · env scrub · evasion scan. Fail-closed.

5. Simultaneously the agent reads and writes memory: episodic write, keyword + vector index update, hybrid retrieval for context, knowledge-graph consolidation. All agent-scoped. All persisted to SQLite.

6. The Orchestration Layer runs in parallel — scheduled workflows fire, hooks react to events, job chains pass output forward.

7. When an LLM call is needed, the Model Provider Layer dispatches to whichever provider the agent is configured for. All outbound traffic is egress-filtered.

8. The response streams back through the Interaction Layer via SSE — the user sees tokens appear live.

9. The Marketplace sits beside the system — installed skills become new nodes in the Tool Execution Layer, subject to the same Permission Gate as everything else.

10. Every one of these steps runs inside the Security Envelope — seven layers of defense wrapping every component shown above.