---
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(["
"])
subgraph Input["INPUT CHANNELS"]
direction LR
Chat["
"]
Channels["
"]
CLI["
"]
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(["
"])
%% 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