Shroomy Architecture
Mac mini · Remote production 74.208.95.219 · K3s · OpenClaw · Relay · Observability
Snapshot: 2026-04-09 · connecting…
/portal canonical
Gateway :18789
Session API :18890
Neo4j 443 nodes
Discord + Telegram
Operational Live and functioning
Needs Wiring Built, needs integration
In Progress Actively building
Updated Wired this session (Mar 20)
Missing Absent or broken
Local Mac mini (dev/control)
Remote eager-curran (74.208.95.219)
Shared Spans both planes
Cloud External service
LOCAL · MAC MINI
Operational
| Component | Detail | Status |
| PentAGI Stack | Docker Compose · 21 containers at ~/clawd/pentagi/ | New |
| Grafana | :3000 · Full observability dashboard | OK |
| Prometheus | :9090 · Metrics TSDB | OK |
| Neo4j | :7474/:7687/:2004 · Enterprise w/ metrics | OK |
| Kafka | cp-kafka:7.8.0 · :9092 | OK |
| PentAGI | :8443 · AI agent orchestrator | OK |
| pgvector | :5433 · Vector similarity search | OK |
| ClickHouse | :8123/9000 · Analytics OLAP | OK |
REMOTE · EAGER-CURRAN
74.208.95.219 · Ubuntu 24.04 · K3s v1.34.5
| Service | Manager | Port | Role | Status |
| nginx | systemd | :80/:443 | TLS ingress · 5 sites (chat-app, civicswipe, dutystation, dutystation.ai, relay-gateway) | OK |
| OpenClaw Gateway | systemd | :18789 | Realtime chat for /portal · | OK |
| discussion-api | PM2 | :18804 | /discussion · 6 AI bots · Brave Search · SSH exec · M7/M9/M10 cognitive | OK |
| portal-api | PM2 | :18803 | /portal backend · model switching · 34 models | OK |
| Shroomy Session API | systemd | :18890 | Session CRUD + Graphiti + distillation | OK |
| Ingestion Preprocessor | systemd | :18793 | Dedup, sanitize, extract | OK |
| Neo4j | Docker | :7475→7474 :7689→7687 | Primary graph · Community 2026.02.2 (443 nodes) | OK |
| Ollama | Docker | :11434 | Local LLM inference | OK |
| PostgreSQL | systemd | :5432 | v16.13 · Relay + discussion + hosted apps | OK |
| Grafana | systemd | :3100 | v12.4.1 · Prometheus + Loki + Alertmanager datasources | New |
| ChromaDB | Docker | :8000 | Auxiliary vector store | OK |
RELAY BOT
Operational
| Component | Detail | Status |
| relay-discord-bot | PM2 · tsx · Discord.js · Prisma | OK |
| Discord ingress | lib/discord/bot.ts | OK |
| WhatsApp ingress | lib/whatsapp/client.ts | OK |
| AI pipeline | local | openai | anthropic | custom | OK |
| Loop guard | shouldProcessMessage depth check | OK |
| Persistence | Prisma → PostgreSQL :5432 | OK |
/portal Remote
Operational
Canonical web chat UI
Static app behind nginx/Plesk
Single public destination
Legacy paths redirect here
/gw/ Remote
Operational
→ Gateway :18789
Realtime WebSocket chat
Transport for /portal
/session-api/ Remote
Operational
→ Session API :18890
Session CRUD · Graphiti
Distillation endpoints
/discussion Remote
Operational
Native discussion workspace
Categories + channels + attachments
Discord import + AI in-thread actions
/api/dashboard Remote
Operational
JSON source for dashboard
Fed by live exporters
Mac mini + remote collectors
Integration Hub · Session API :18890 Remote
Session Persistence Remote
Operational
Token-scoped sessions
Neo4j: WebchatSession + WebchatMessage
Entity references + edges
Graph / Memory Bridge Remote
Operational
Transcript → add_memory
Status/search passthrough
Graphiti MCP :3010 bridge
Distillation Hub Remote
Operational
POST /consult · GET /consult/:id
GET /learned-patterns
GET /distillation/status
POST /distillation/flush-digest
Knowledge Distillation Remote
teacher-client.mjs Remote
Operational
Wraps standalone Copilot CLI
Execution/planning prompts
execFile(copilot -p ...)
distillation-pipeline.js Remote
Operational
Normalize → classify → score
Deduplicate → enrich → store
LearnedPattern + TeacherConsultation
discord-digest.js Remote
Wired
Batched digest summaries
Posts to #status-reports
DISCORD_BOT_TOKEN wired verified
via systemd service env
Pattern Storage Remote
Operational
TeacherConsultation →PRODUCED→
LearnedPattern →REFERENCES→
Entity + indexes
Neo4j Graph · 1405 Nodes Remote
Node Labels Remote
WebchatMessage 1122 · WebchatSession 70
Episodic 22 · Entity 26
WebchatUser 6 · LearnedPattern 77
TeacherConsultation 77 · SynProgram 2 · PainPoint 1
Relationships Remote
OWNS · HAS_MESSAGE · RELATES_TO
MENTIONS · NEXT_EPISODE
PRODUCED · REFERENCES
Browser → /portal Chat Remote
Operational
Browser→nginx :443→/gw/ WS→Gateway :18789→Ollama + Graphiti→Response
Session Persistence Remote
Operational
/session-api/→:18890→Preprocessor :18793→Neo4j graph + Graphiti add_memory
Discussion Workspace Remote
Operational
Browser→/discussion→discussion-api :18804→Prisma/PostgreSQL→attachments on disk
Knowledge Distillation Remote
Operational
POST /consult→teacher-client→Copilot CLI→pipeline→Neo4j (LearnedPattern)→Discord digest
Relay Bot Remote
Operational
Discord / WhatsApp→relay-bot→loop guard→AI providers→Prisma/PG→reply
Local Shroomy Local
Operational
Telegram→main.py→Memgraph :7687→heartbeat→agent-bridge :18790
Dashboard Collectors Shared
Operational
Mac mini collector→signed payload→/api/dashboard→snapshot refresh | Remote probe→PM2/systemd health→UI badges
discussion-api Remote
online · :18804
6 AI bots + Brave Search
M3 RLM · M7/M9/M10 cognitive
portal-api Remote
online · :18803
34 models via OpenClaw 2026.4.8
WebSocket chat transport
relay-bot Remote
online
Discord + WhatsApp relay
tsx · Prisma · AI pipeline
relay-web Remote
online
Web relay interface
dashboard-health Remote
online · :18802
Health API for this dashboard
Port probes + PM2 stats
shroomy-platform Remote
online · :18900
Platform services
hybrid-search Remote
online · :18895
pgvector + Neo4j + BM25
Three-tier RRF cascade
shroomy-runner Remote
online
Task execution agent
shroomgpt-grants Remote
online
Grants research pipeline
embed-pipeline Remote
stopped
Neo4j → Ollama → pgvector
624 vectors seeded
LOCAL · PENTAGI Local
21 Containers
| Service | Image | Port | Status |
| Grafana | grafana:11.4.0 | :3000 | OK |
| Prometheus | prom/prometheus:v2.48.1 | :9090 | OK |
| Alertmanager | prom/alertmanager:v0.28.1 | :9093 | OK |
| Loki | grafana/loki:3.3.2 | :3100 | OK |
| Promtail | grafana/promtail:3.3.2 | :9080 | OK |
| VictoriaMetrics | victoria-metrics:v1.108.1 | :8428 | OK |
| VMAlert | vmalert:v1.108.1 | :8880 | OK |
| Jaeger | jaeger-all-in-one:1.56.0 | :16686 | OK |
| OTel Collector | otel-contrib:0.116.1 | :4318 | OK |
| cAdvisor | cadvisor:v0.51.0 | :8080 | OK |
| Node Exporter | node-exporter:v1.8.2 | :9100 | OK |
| Kafka Exporter | kafka-exporter:latest | :9308 | OK |
| PG Exporter | postgres-exporter:v0.16.0 | :9187 | OK |
REMOTE · K3S MONITORING Remote
Deployed Mar 20
| Service | Helm Chart | Access | Status |
| Prometheus | kube-prometheus-stack v82.12.0 | :30090 | New |
| Alertmanager | kube-prometheus-stack | :30093 | New |
| Loki | loki-stack-2.10.3 | :30100 | New |
| Promtail | loki-stack (DaemonSet) | all nodes | New |
| Node Exporter | kube-prom-stack (DaemonSet) | host net | New |
| Kube State Metrics | kube-prom-stack | ClusterIP | New |
| Kafka Exporter | prometheus-kafka-exporter-3.0.1 | hostNet :9308 | New |
| Grafana | systemd (apt) | :3100 | New |
13/13 Prometheus targets UP → 3 Grafana datasources → Prometheus + Loki + Alertmanager
OBSERVABILITY PARITY
Local vs Remote
| Component | Local | Remote |
| Grafana | :3000 | :3100 |
| Prometheus | :9090 | :30090 |
| Alertmanager | :9093 | :30093 |
| Loki + Promtail | :3100 | :30100 |
| Node Exporter | :9100 | DaemonSet |
| Kafka Exporter | :9308 | hostNet |
| VictoriaMetrics | :8428 | — |
| Jaeger | :16686 | — |
| OTel Collector | :4318 | — |
| cAdvisor | :8080 | — |
| PG Exporter | :9187 | — |
| Neo4j Metrics | :2004 | Enterprise only |
LOCAL · KAFKA Local
Operational
| Service | Image | Port |
| Kafka | cp-kafka:7.8.0 | :9092 |
| Kafka Exporter | kafka-exporter:latest | :9308 |
REMOTE · KAFKA + DEBEZIUM Remote
Operational
| Service | Image | Port |
| Kafka | cp-kafka:7.5.0 | 127.0.0.1:29092 |
| Zookeeper | cp-zookeeper:7.5.0 | 127.0.0.1:2181 |
| Debezium Connect | debezium/connect:2.5 | 127.0.0.1:8083 |
Connector: shroomy-audit-connector → PostgreSQL CDC → Kafka topics
Discussion AI Bots new Remote
@ShroomyMac
Apple & design expert
SwiftUI, Xcode, macOS
Model: gemma4:31b · thinking: medium
Label: Mac
@ShroomyLinux
Linux & DevOps sysadmin
Servers, networking, shell
Model: deepseek-v3.2 · thinking: medium
Label: Linux
@ShroomyPolitics
Geopolitics & policy
Brave web search enabled
Model: kimi-k2.5 · thinking: off
Label: Politics
@ShroomyRunner
Task execution agent
Multi-pass autopilot
Model: deepseek-v3.2 · thinking: medium
Label: Runner
@ShroomyCafe
Rolled gelato, coffee, boba
Recipe dev + food cost
Model: qwen3.5 · thinking: medium
Label: Cafe
@ShroomyKPI
Cloud infra & SRE expert
SSH exec · RLM · auto_discover · emotion_state
Model: deepseek-v3.2 · thinking: medium
5 tool categories · Label: KPI
@ShroomyCopilot new
Code & dev assistant
Full-stack · architecture · review
Model: qwen3-coder-next · thinking: high
Label: Copilot
Ollama (Remote) Remote
Operational
llama3.2-vision:11b chat + vision
nomic-embed-text 768d embed
systemd · :11434
Ollama Cloud Cloud
Operational
minimax-m2.5 frontier chat
kimi-k2.5 geopolitics/research
deepseek-v3.2 code + infra
gemma4:31b Apple/design
qwen3.5 cafe/creative
qwen3-coder-next dev copilot
qwen3-vl:235b vision
Graphiti MCP :3010 Remote
Operational
add_memory · search_nodes
search_memory_facts
MCP-over-HTTP tool surface
GraphRAG — Community Reasoning new Remote
Community Detection
Active
Louvain algorithm · pure TypeScript
80 communities × 3 levels = 240
Modularity 0.58 · 1,368 Neo4j nodes
graphrag-daemon PM2 · 30min check
Community Summaries
Active
LLM summarization via gemma3:27b
240/240 communities summarized
Hash-based incremental re-summarization
Embeddings: nomic-embed-text 768d
Semantic Retrieval
Active
pgvector cosine similarity ≥ 0.55
ILIKE text fallback
local / global / hybrid classifier
Auto-injected into bot system prompts
Scheduled Jobs verified Remote
Operational
openclaw-compaction daily 01:00 · systemd timer
openclaw-backup daily 03:30 · systemd timer
discussion-backup daily 04:00 · systemd timer
failopen-recovery every 10min
Always-On Remote
Operational
failopen-recovery every 10min
memory-watcher always on
Pushes files → Graphiti episodes
Self-Healing Remote
Operational
openclaw-layer6 PM2
graphrag-daemon PM2 · 30min interval
Reconnect + fix-pattern
monitoring-dashboard :3011
Public Remote
:80/:443 nginx
:18789 Gateway (/gw/)
:18890 Session API (/session-api/)
:18803 portal-api · :18804 discussion-api
Observability Remote
:3100 Grafana
:30090 Prometheus (K3s)
:30093 Alertmanager (K3s)
:30100 Loki (K3s)
Data Stores Remote
:7475→7474 / :7689→7687 Neo4j
:5432 PostgreSQL · :6379 Redis
:8000 ChromaDB · :11434 Ollama
:29092 Kafka (localhost)
Local Plane Local
PentAGI Stack (21 containers):
:3000 Grafana · :9090 Prometheus
:8443 PentAGI · :9092 Kafka
:7474 Neo4j · :5433 pgvector
⚡ Session Update · Apr 9, 2026
8 improvements shipped this session:
· OpenClaw CLI 2026.4.8 — Updated local (2026.3.8→2026.4.8) and remote (2026.3.12→2026.4.8); doctor run on both, gateway service entrypoint fixed to dist/entry.js
· ShroomyCopilot Agent — NEW code & dev assistant (@ShroomyCopilot) on /discussion; model: qwen3-coder-next, thinking: high
· GraphRAG — Community Reasoning — 80 communities × 3 levels (240 total), Louvain detection, gemma3:27b summarization, pgvector 768d semantic retrieval; injected into all bot system prompts
· Discussion Backup Automation — daily timestamped archives (UI, API, attachments, SQL dump); server-side systemd timer + local Mac LaunchAgent mirror to ~/Backups/
· Inline Attachment Rendering — images attached to discussion posts now render inline in the thread view
· Mobile UI Hardening — fixed 2px collapsed comment boxes, channel click crash loop, scroll stability; all mobile threads now readable
· Agent Streaming Hardening — empty bot saves eliminated; proper SSE error propagation; retry next model on empty stream; default model corrected to gemma4:31b
· Bot Model Assignments — stable overrides in discussion-bots.json: ShroomyMac→gemma4:31b, ShroomyLinux→deepseek-v3.2, ShroomyPolitics→kimi-k2.5, ShroomyRunner→deepseek-v3.2, ShroomyCafe→qwen3.5, ShroomyKPI→deepseek-v3.2
⚡ Session Update · Mar 20, 2026
16 components wired this session:
· M3 RLM Engine — NEW Recursive Language Model wired into discussion-api: rlm_analyze tool for KPI + POST /rlm/analyze endpoint. 4-step recursive decomposition (arXiv:2512.24601v2)
· M7 Emotional Embed — NEW 5D emotional state (curiosity/frustration/confidence/fatigue/satisfaction), file persistence, prompt injection into all bots, GET /cognitive/emotion API
· M9 Context Continuity — NEW cognitive context (goals, topics, valence), boot restoration, prompt injection, GET /cognitive/context API
· M10 Auto-Discovery — NEW dependency correlation engine, auto_discover KPI tool, POST /cognitive/discover API
· Observability Stack (Remote) — Prometheus, Alertmanager, Loki, Promtail deployed via Helm on K3s (kube-prometheus-stack + loki-stack)
· Kafka Exporter (Remote) — hostNetwork patched to reach localhost-bound Kafka on :29092
· Node Exporter + Kube State Metrics — DaemonSet, all 13 Prometheus targets UP
· Grafana Datasources — Prometheus :30090, Loki :30100, Alertmanager :30093 configured
· ShroomyKPI Agent — NEW cloud infra/K8s expert bot on /discussion with SSH exec + RLM + auto_discover + emotion_state tools
· ShroomyCafe Agent — NEW rolled gelato/coffee/boba recipe specialist
· Model Sync — 34 models sorted alphabetically, parity verified /discussion ↔ /portal
· Typing Indicators — All 6 bots now show "is thinking…" / "is working…" / "is still working…"
· Helm v3.20.1 — Installed on remote with prometheus-community + grafana repos
· Neo4j Recreated — Migrated from systemd to Docker container, data volume preserved
· K3s Cluster — 3 namespaces: default, shroomy (app pods), monitoring (observability)
· DutyStation Stack — 5-container compose stack discovered (API, Postgres, Redis, Meili, Memgraph)
10-Model Cognitive Integration · Sentient Upgrade Directive Shared
SENTIENT UPGRADE DIRECTIVE Shared
SOUL.md Property 17 · MEMORY.md
M1 · Vector Search updated
nomic-embed-text
pgvector VECTOR(768) · HNSW index
Wired
M2 · Embed Pipeline updated
embed-pipeline.mjs
Neo4j → Ollama → pgvector · 624 vectors
Wired
M3 · RLM Engine new
Recursive decomp · 4-step analysis
rlm_analyze tool + POST /rlm/analyze
arXiv:2512.24601v2 · depth 3
Wired
M4 · Graph DB
Neo4j :7687
1405 nodes active
OK
M5 · Hybrid Search new
pgvector + Neo4j + BM25
Three-tier RRF cascade · :18895
Wired
M6 · Dream Migration new
dream-cycle.mjs
PM2 cron daily 02:00 · 10 dreams
Wired
M7 · Emotional Embed new
5D state: curiosity·frustration·confidence·fatigue·satisfaction
File persist · prompt injection · GET /cognitive/emotion
Wired
M8 · Reflection Pipeline updated
Weekly reflection
dream-cycle.mjs · consolidation + association
Wired
M9 · Context Continuity new
Goals · topics · valence scoring
Boot restore · prompt injection · GET /cognitive/context
Wired
M10 · Auto-Discovery new
LLM dependency correlation
auto_discover KPI tool · POST /cognitive/discover
Wired
M7 Cognitive State Remote
Live
Infrastructure Hardening Remote
Active
🛡️
Security Headers
Enabled
robots.txt · manifest.json · daily config backup at 03:00 UTC
/portal = canonical UI Remote
Browser users enter via /portal.
Realtime via /gw/.
Persistence via /session-api/.
Session API = hub Remote
Session persistence, Graphiti bridge,
distillation endpoints, digest hooks.
:18790 ≠ :18890 Remote
agent-bridge = :18790
session-api = :18890
Critical port split.
Relay = sibling ingress Remote
Not the portal. Discord/WhatsApp
with own AI pipeline + Prisma.
Discussion = native workspace Remote
Categories, channels, users,
attachments, imported Discord history,
now backed by Prisma/PostgreSQL.
Local = control node Local
Telegram, heartbeats, local graph.
Not the public web runtime.
Distillation = production Remote
Teacher consult, pattern storage,
Discord digests on remote host.