From 369e6f35f9f73756f120fa4e8cb83a02f43668ed Mon Sep 17 00:00:00 2001
From: Story Crater Bot <19826264+Riotpiaole@users.noreply.github.com>
Date: Thu, 10 Sep 2026 08:04:28 +0900
Subject: [PATCH] feat: add Poimen Memory deep dive page at /poimen/memory
- Architecture, dataflow, and sequence diagrams (700px iframes)
- Three-tier retrieval section (signature match, graph-boosted, Obsidian)
- Technology stack grid (Rust, pgvector, TEI, Authentik, etc.)
- Wire deepDive link from Memory project card
- Add Poimen timeline card to ExperienceTimeline
---
app/page.tsx | 4 +-
app/poimen/memory/page.tsx | 292 +
lib/translations.json | 12 +-
public/poimen-memory/architecture.html | 14935 ++++++++++++++++++++++
public/poimen-memory/architecture.json | 35 +
public/poimen-memory/dataflow.html | 14933 ++++++++++++++++++++++
public/poimen-memory/dataflow.json | 36 +
public/poimen-memory/sequence.html | 15025 +++++++++++++++++++++++
public/poimen-memory/sequence.json | 51 +
9 files changed, 45320 insertions(+), 3 deletions(-)
create mode 100644 app/poimen/memory/page.tsx
create mode 100644 public/poimen-memory/architecture.html
create mode 100644 public/poimen-memory/architecture.json
create mode 100644 public/poimen-memory/dataflow.html
create mode 100644 public/poimen-memory/dataflow.json
create mode 100644 public/poimen-memory/sequence.html
create mode 100644 public/poimen-memory/sequence.json
diff --git a/app/page.tsx b/app/page.tsx
index 576742d..d7625c8 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -29,7 +29,9 @@ export default function Home() {
: undefined,
videoUrl: '#',
articleUrl: index === 4 ? 'https://lnkd.in/p/gm2PZkWw' : '#',
- deepDive: index === 2 ? { url: '/homelab', label: 'Explore the Architecture →' } : undefined,
+ deepDive: index === 2 ? { url: '/homelab', label: 'Explore the Architecture →' }
+ : index === 1 ? { url: '/poimen/memory', label: 'Explore the Memory System →' }
+ : undefined,
ciRepos: index === 0 ? [
{ label: 'poimen-wf', repo: 'riotpiao-poimen/poimen-workflows', forgejoBase: 'https://forgejo.riotpiao.com/riotpiao-poimen/poimen-workflows' },
] : index === 1 ? [
diff --git a/app/poimen/memory/page.tsx b/app/poimen/memory/page.tsx
new file mode 100644
index 0000000..0cb2e00
--- /dev/null
+++ b/app/poimen/memory/page.tsx
@@ -0,0 +1,292 @@
+'use client'
+
+import Link from 'next/link'
+import { ArrowLeft } from 'lucide-react'
+import { motion } from 'framer-motion'
+
+const skillCategories = [
+ {
+ title: 'Core Runtime',
+ skills: ['Rust', 'actix-web', 'tokio', 'serde'],
+ },
+ {
+ title: 'Storage & Search',
+ skills: ['PostgreSQL (CloudNativePG)', 'pgvector (HNSW)', 'Cosine Similarity', 'BFS Graph Traversal'],
+ },
+ {
+ title: 'LLM & Embeddings',
+ skills: ['Ollama (ornith:35b)', 'TEI (nomic-embed)', '768-dim Embeddings'],
+ },
+ {
+ title: 'Identity & Security',
+ skills: ['Authentik OIDC', 'JWT Verification', 'SOPS Encrypted Secrets', 'RBAC'],
+ },
+ {
+ title: 'Data Pipeline',
+ skills: ['Fixed-Window Chunking', 'Entity Extraction', 'Fact Extraction', 'Reflection Filtering'],
+ },
+ {
+ title: 'Infrastructure',
+ skills: ['Kubernetes', 'ArgoCD', 'Kustomize', 'cert-manager'],
+ },
+]
+
+const sectionVariants = {
+ hidden: { opacity: 0, y: 40 },
+ visible: { opacity: 1, y: 0, transition: { duration: 0.6 } },
+}
+
+export default function PoimenMemoryPage() {
+ return (
+
+
+
+
+ Back to Projects
+
+
+ {/* Hero */}
+
+
+ Poimen (Ποιμήν) · Memory System
+
+
+ Teaching the Shepherd to Remember
+
+
+ A Graph-RAG memory system that gives AI agents long-term recall, semantic search, and self-compacting knowledge.
+
+
+ Agents forget. Every conversation starts from zero unless you build memory into the system.
+ Poimen Memory is a Rust-based Graph-RAG service that ingests conversations,
+ extracts entities and relationships via LLM, stores them in a temporal knowledge graph backed
+ by pgvector , and serves them back through three-tier retrieval — signature
+ match at 50ms, graph-boosted hybrid search, and Obsidian fallback. The cache self-compacts:
+ stale embeddings are evicted, frequently-accessed chunks are promoted, and the graph auto-reconciles
+ on every write.
+
+
+
+ {/* Section 1: Architecture Overview */}
+
+
+
+ System Design
+
+
+ Architecture Overview
+
+
+
+
+
+ The memory system runs as a Rust microservice inside the Kubernetes poimen namespace.
+ An actix-web API server handles HTTP requests, authenticates via Authentik OIDC JWT ,
+ and routes to either the search path (direct pgvector query) or the ingest path (async
+ pipeline through an internal queue → LLM extraction → graph persistence). All data lives in a
+ CloudNativePG cluster with HNSW indexes for vector similarity.
+
+
+
+ {/* Architecture Diagram */}
+
+
+ 🏗️ System Architecture
+
+
+
+
+
+
+
+ {/* Section 2: Ingest Pipeline */}
+
+
+
+ Data Flow
+
+
+ Ingest Pipeline
+
+
+
+
+
+ Conversations arrive as episodes — raw message sequences. The pipeline splits into two
+ parallel LLM extraction paths: entity extraction (people, tools, concepts with type + summary)
+ and fact extraction (relationships between entity pairs as directed edges). A reflection
+ pass filters hallucinated entities before persistence. The result is a temporal knowledge
+ graph where every edge carries t_valid and t_invalid timestamps — knowledge
+ that knows when it was true.
+
+
+
+ {/* Dataflow Diagram */}
+
+
+ 🔄 Ingest Data Flow
+
+
+
+
+
+
+
+ {/* Section 3: Request Lifecycle */}
+
+
+
+ Sequence
+
+
+ Ingest Request Lifecycle
+
+
+
+
+
+ The ingest path is fully async . The agent sends a POST /memory/ingest and
+ gets a 202 Accepted immediately — no blocking on LLM latency. A background worker
+ polls jobs from the queue, runs two sequential LLM calls (entity extraction → fact extraction),
+ cleans JSON responses of thinking tags and fences, then persists entities, edges, and embeddings
+ to pgvector. The agent can query the graph within seconds of ingestion completing.
+
+
+
+ {/* Sequence Diagram */}
+
+
+ ⚡ Request Sequence
+
+
+
+
+
+
+
+ {/* Section 4: Retrieval Strategy */}
+
+
+
+ Search
+
+
+ Three-Tier Retrieval
+
+
+
+
+
+
+
⚡
+
Tier 1: Signature Match
+
+ 50ms exact entity lookup by name hash. Instant recall for known entities —
+ no embedding computation needed.
+
+
+
+
🔍
+
Tier 2: Graph-Boosted Hybrid
+
+ HNSW cosine similarity + BFS graph traversal . RRF fusion ranks
+ results across vector matches and graph neighbors. Context-aware retrieval that follows relationships.
+
+
+
+
📚
+
Tier 3: Obsidian Fallback
+
+ When graph search yields low confidence, falls back to wiki-link indexed Obsidian
+ vault. Bidirectional link traversal surfaces related notes the graph hasn't captured yet.
+
+
+
+
+
+
+ {/* Skills Grid */}
+
+
+ Technology Stack
+
+
+ {skillCategories.map((category) => (
+
+
+ {category.title}
+
+
+ {category.skills.map((skill) => (
+
+ {skill}
+
+ ))}
+
+
+ ))}
+
+
+
+
+ )
+}
diff --git a/lib/translations.json b/lib/translations.json
index fa55cae..552a39e 100644
--- a/lib/translations.json
+++ b/lib/translations.json
@@ -164,7 +164,11 @@
"Graph-RAG with Wiki-Link Indexing (Rust, pgvector, OpenSearch): Built bidirectional link graph from [[wiki-link]] syntax during ingestion. PageRank-style score propagation boosts linked documents' relevance. RRF fusion merges HNSW cosine (pgvector) + BM25 lexical (OpenSearch). WikiScopedFilter constrains traversal to project boundaries.",
"Three-Tier Context Retrieval (Actix-web, tokio): Async pipeline — Tier 1: MD5 signature match (<50ms), Tier 2: graph-boosted hybrid search with link-distance decay, Tier 3: Obsidian API fallback. Budget-aware assembly drops lower tiers first. Shingle-based Jaccard deduplication (>0.5) prevents redundant chunks.",
"Hierarchical RBAC (Authentik OIDC, JWT, Kubernetes): Role → AccessRule[] → AccessScope model with project/visibility/owner/group constraints. JWT roles claim maps to YAML rules; AccessGuard.filter_resources() applies post-retrieval filtering. Dual-write indexer (eventual consistency via queue) maintains RBAC-aware views. SOPS/age encryption, ArgoCD deployment."
- ]
+ ],
+ "deepDive": {
+ "label": "Explore the Memory System →",
+ "url": "/poimen/memory"
+ }
},
{
"title": "Homelab: Production-Grade Kubernetes Platform",
@@ -437,7 +441,11 @@
"图-RAG维基链接索引化(Rust、pgvector、OpenSearch):从[[维基链接]]语法构建双向链接图。PageRank风格评分传播提升链接文档的相关性。RRF融合合并HNSW余弦相似度(pgvector)+ BM25词汇排名(OpenSearch)。WikiScopedFilter将遍历限制在项目边界内。",
"三层上下文检索(Actix-web, tokio):异步管道——第1层:MD5签名匹配(<50ms),第2层:图增强混合搜索含链接距离衰减,第3层:Obsidian API兜底。预算感知的响应组装优先丢弃低优先层。基于瓦片的Jaccard去重(>0.5)防止冗余块。",
"分层RBAC(Authentik OIDC、JWT、Kubernetes):角色→AccessRule[]→AccessScope模型,包含项目/可见性/所有者/组约束。JWT角色声明映射到YAML规则;AccessGuard.filter_resources()应用检索后过滤。双写索引器(通过队列保证最终一致性)维护RBAC感知视图。SOPS/age加密,ArgoCD部署。"
- ]
+ ],
+ "deepDive": {
+ "label": "探索记忆系统 →",
+ "url": "/poimen/memory"
+ }
},
{
"title": "家庭实验室:生产级 Kubernetes 平台",
diff --git a/public/poimen-memory/architecture.html b/public/poimen-memory/architecture.html
new file mode 100644
index 0000000..6b08b30
--- /dev/null
+++ b/public/poimen-memory/architecture.html
@@ -0,0 +1,14935 @@
+
+
+
+
+
+
+ Poimen Memory System Diagram
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
←
+
+
+ Guided views
+
+
+
+
+
Explore this system
+
Step through curated paths without changing the source diagram.
+
+
+ Beat
+
+
+
+ Next
+
+
+
+
+
→
+
+
+ ▶
+ Play story
+
+
+ #
+ Copy moment
+
+ Show all
+
+
+
+
+
+
+
+
+
+ Poimen Memory System
+ An architecture diagram generated by Archify.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AI Agent · LLM client · Architecture component
+
+
+
+
+
+
+ AI Agent
+ LLM client
+
+
+
+ Memory API · actix-web :8080 · K8s: poimen · Rust
+
+
+
+
+
+ Memory API
+ actix-web :8080
+ Rust
+
+
+
+ Authentik · OIDC / JWT · K8s: poimen
+
+
+
+
+
+
+ Authentik
+ OIDC / JWT
+
+
+
+ Ingest Worker · LLM pipeline · K8s: poimen
+
+
+
+
+
+ Ingest Worker
+ LLM pipeline
+
+
+
+ LLM · ornith:35b · Architecture component
+
+
+
+
+
+
+ LLM
+ ornith:35b
+
+
+
+ pgvector · CNPG cluster · K8s: poimen · HNSW
+
+
+
+
+
+
+ pgvector
+ CNPG cluster
+ HNSW
+
+
+
+ Embeddings · nomic-embed · K8s: poimen
+
+
+
+
+
+
+ Embeddings
+ nomic-embed
+
+
+
+
+
+ HTTP
+
+
+
+ verify JWT
+
+
+
+ enqueue
+
+
+
+ extract
+
+
+
+ persist
+
+
+
+ embed
+
+
+
+ search
+
+
+
+
+
+ K8s: poimen
+
+
+
+
+ Legend
+
+
+ Backend
+
+
+
+ Database
+
+
+
+ Security
+
+
+
+ External
+
+
+
+
+
+
+ Ready
+ Chapter 01 / 01
+
+
+ Guided chapter
+
+
+
+
+
+
+
+
+ Diagram guide
+ Explore this system
+
+ ×
+
+
Inspecting compiled semantics
+
+
+ 01
+ Find any node Search labels, responsibilities, kinds, and stable IDs.
+ /
+
+
+ 02
+ Trace a route Ask how two semantic nodes connect in authored direction.
+ R
+
+
+ 03
+ See the whole system Open Semantic Radar with a live viewport and stable nodes.
+ M
+
+
+ 04
+ Compare semantic kinds Count roles, reveal their traffic, and compare direct authored links.
+ L
+
+
+ 05
+ Play the guided story Walk the authored chapters and real relationships.
+ P
+
+
+ 06
+ Enter Presentation Stage Give the live diagram the viewport without changing export.
+ F
+
+
+
+ E ExportT ThemeS Style0 Reset+ Zoom in- Zoom outEsc Close
+
+
+
+
+
+ Find a node
+ ×
+
+
+ ⌕
+
+ /
+
+
+
No matching nodes
+
+
+
+
+
+
Semantic passport
+
+
+
+
+
+
+
+
+
+
+
+
+
Authored reach
+
+
+ Upstream 0
+
+
+ Downstream 0
+
+
+
+
+
+
+ ×
+ Copy link
+ Relations
+
+
+
+
+
+
+
+ Route probe
+ Choose a start node
+
+
+ Find start
+ Copy link
+ Clear
+
+
+
+ Pick two semantic nodes on the diagram
+
+
+ ←
+
+ ▶
+ Journey
+
+ →
+ Overview
+
+
Choose the source, then the destination. Direction matters.
+
+
+
+
+ Semantic lens
+ Compare system roles
+
+ ×
+
+
Choose up to two semantic kinds. One reveals its real traffic; two compare only direct authored relationships.
+
+
Choose a kind to inspect its nodes and touching relationships.
+
+ Copy link
+ Clear
+
+
+
+
+
+
+ Semantic radar
+ Building overview
+
+ Open radar
+ ×
+
+
+
Click node Drag to pan
+
+
Semantic radar needs more MAP space.
+
+ PATH
+ MAP
+ LENS
+
+
+
+ READ 100%
+
+
+
+
+
+
+
+
+
+ • Conversations ingested via HTTP
+ • LLM extracts entities + relationships
+ • Temporal graph persisted to pgvector
+
+
+
+
+
+
+ • HNSW cosine similarity search
+ • BFS graph traversal for context
+
+
+
+
+
+
+ • Authentik OIDC JWT verification
+ • SOPS-encrypted K8s secrets
+
+
+
+
+
+
+
+
+
diff --git a/public/poimen-memory/architecture.json b/public/poimen-memory/architecture.json
new file mode 100644
index 0000000..2f4295c
--- /dev/null
+++ b/public/poimen-memory/architecture.json
@@ -0,0 +1,35 @@
+{
+ "schema_version": 1,
+ "diagram_type": "architecture",
+ "meta": {
+ "title": "Poimen Memory System",
+ "quality_profile": "showcase",
+ "viewBox": [1060, 560]
+ },
+ "components": [
+ { "id": "agent", "type": "external", "label": "AI Agent", "sublabel": "LLM client", "pos": [40, 220], "size": [130, 60] },
+ { "id": "api", "type": "backend", "label": "Memory API", "sublabel": "actix-web :8080", "pos": [270, 220], "size": [140, 60], "tag": "Rust" },
+ { "id": "auth", "type": "security", "label": "Authentik", "sublabel": "OIDC / JWT", "pos": [270, 60], "size": [140, 60] },
+ { "id": "worker", "type": "backend", "label": "Ingest Worker", "sublabel": "LLM pipeline", "pos": [540, 220], "size": [140, 60] },
+ { "id": "llm", "type": "external", "label": "LLM", "sublabel": "ornith:35b", "pos": [540, 380], "size": [140, 60] },
+ { "id": "pgvector", "type": "database", "label": "pgvector", "sublabel": "CNPG cluster", "pos": [540, 60], "size": [140, 60], "tag": "HNSW" },
+ { "id": "embed", "type": "external", "label": "Embeddings", "sublabel": "nomic-embed", "pos": [810, 220], "size": [140, 60] }
+ ],
+ "boundaries": [
+ { "kind": "region", "label": "K8s: poimen", "wraps": ["api", "auth", "worker", "pgvector", "embed"] }
+ ],
+ "connections": [
+ { "id": "c1", "from": "agent", "to": "api", "label": "HTTP", "variant": "emphasis" },
+ { "id": "c2", "from": "api", "to": "auth", "label": "verify JWT", "variant": "security" },
+ { "id": "c3", "from": "api", "to": "worker", "label": "enqueue", "labelAt": [445, 178] },
+ { "id": "c4", "from": "worker", "to": "llm", "label": "extract", "labelAt": [630, 356] },
+ { "id": "c5", "from": "worker", "to": "pgvector", "label": "persist" },
+ { "id": "c6", "from": "worker", "to": "embed", "label": "embed", "variant": "dashed" },
+ { "id": "c7", "from": "api", "to": "pgvector", "label": "search", "variant": "emphasis" }
+ ],
+ "cards": [
+ { "dot": "emerald", "title": "Ingest", "items": ["Conversations ingested via HTTP", "LLM extracts entities + relationships", "Temporal graph persisted to pgvector"] },
+ { "dot": "cyan", "title": "Retrieval", "items": ["HNSW cosine similarity search", "BFS graph traversal for context"] },
+ { "dot": "rose", "title": "Auth", "items": ["Authentik OIDC JWT verification", "SOPS-encrypted K8s secrets"] }
+ ]
+}
diff --git a/public/poimen-memory/dataflow.html b/public/poimen-memory/dataflow.html
new file mode 100644
index 0000000..8af4cb3
--- /dev/null
+++ b/public/poimen-memory/dataflow.html
@@ -0,0 +1,14933 @@
+
+
+
+
+
+
+ Poimen Ingest Pipeline Diagram
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
←
+
+
+ Guided views
+
+
+
+
+
Explore this system
+
Step through curated paths without changing the source diagram.
+
+
+ Beat
+
+
+
+ Next
+
+
+
+
+
→
+
+
+ ▶
+ Play story
+
+
+ #
+ Copy moment
+
+ Show all
+
+
+
+
+
+
+
+
+
+ Poimen Ingest Pipeline
+ A data-flow diagram generated by Archify.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 01 / Input
+
+
+ 02 / Extract
+
+
+ 03 / Store
+
+
+ 04 / Serve
+
+
+
+
+
+
+
+
+
+
+
+ Episode · conversation text · 01 / Input · messages
+
+
+
+
+
+
+ Episode
+ conversation text
+ messages
+
+
+
+ Entity Extractor · LLM + reflection · 02 / Extract · person / tool
+
+
+
+
+
+ Entity Extractor
+ LLM + reflection
+ person / tool
+
+
+
+ Fact Extractor · LLM relationships · 02 / Extract · edges
+
+
+
+
+
+ Fact Extractor
+ LLM relationships
+ edges
+
+
+
+ Temporal Graph · pgvector · 03 / Store · HNSW
+
+
+
+
+
+
+ Temporal Graph
+ pgvector
+ HNSW
+
+
+
+ Query API · hybrid search · 04 / Serve · BFS + cosine
+
+
+
+
+
+ Query API
+ hybrid search
+ BFS + cosine
+
+
+
+ Visualization · React Flow · 04 / Serve · graph UI
+
+
+
+
+
+
+
+
+ Visualization
+ React Flow
+ graph UI
+
+
+
+
+
+ text
+ ingest
+
+
+
+ text
+ ingest
+
+
+
+ persist nodes
+ write
+
+
+
+ persist edges
+ write
+
+
+
+ search
+ read
+
+
+
+ graph data
+ read
+
+
+
+
+ Legend
+
+
+ primary data
+
+
+
+ async batch
+
+
+
+ data store
+
+
+
+ data flow
+
+
+
+
+
+
+ Ready
+ Chapter 01 / 01
+
+
+ Guided chapter
+
+
+
+
+
+
+
+
+ Diagram guide
+ Explore this system
+
+ ×
+
+
Inspecting compiled semantics
+
+
+ 01
+ Find any node Search labels, responsibilities, kinds, and stable IDs.
+ /
+
+
+ 02
+ Trace a route Ask how two semantic nodes connect in authored direction.
+ R
+
+
+ 03
+ See the whole system Open Semantic Radar with a live viewport and stable nodes.
+ M
+
+
+ 04
+ Compare semantic kinds Count roles, reveal their traffic, and compare direct authored links.
+ L
+
+
+ 05
+ Play the guided story Walk the authored chapters and real relationships.
+ P
+
+
+ 06
+ Enter Presentation Stage Give the live diagram the viewport without changing export.
+ F
+
+
+
+ E ExportT ThemeS Style0 Reset+ Zoom in- Zoom outEsc Close
+
+
+
+
+
+ Find a node
+ ×
+
+
+ ⌕
+
+ /
+
+
+
No matching nodes
+
+
+
+
+
+
Semantic passport
+
+
+
+
+
+
+
+
+
+
+
+
+
Authored reach
+
+
+ Upstream 0
+
+
+ Downstream 0
+
+
+
+
+
+
+ ×
+ Copy link
+ Relations
+
+
+
+
+
+
+
+ Route probe
+ Choose a start node
+
+
+ Find start
+ Copy link
+ Clear
+
+
+
+ Pick two semantic nodes on the diagram
+
+
+ ←
+
+ ▶
+ Journey
+
+ →
+ Overview
+
+
Choose the source, then the destination. Direction matters.
+
+
+
+
+ Semantic lens
+ Compare system roles
+
+ ×
+
+
Choose up to two semantic kinds. One reveals its real traffic; two compare only direct authored relationships.
+
+
Choose a kind to inspect its nodes and touching relationships.
+
+ Copy link
+ Clear
+
+
+
+
+
+
+ Semantic radar
+ Building overview
+
+ Open radar
+ ×
+
+
+
Click node Drag to pan
+
+
Semantic radar needs more MAP space.
+
+ PATH
+ MAP
+ LENS
+
+
+
+ READ 100%
+
+
+
+
+
+
+
+
+
+ • LLM extracts entities with type + summary
+ • Second LLM call extracts edges between entities
+ • Reflection filters hallucinated entities
+
+
+
+
+
+
+ • Temporal graph with bi-temporal edges
+ • 768-dim HNSW embeddings for similarity
+
+
+
+
+
+
+ • BFS traversal + cosine similarity
+ • React Flow JSON for interactive graph
+
+
+
+
+
+
+
+
+
diff --git a/public/poimen-memory/dataflow.json b/public/poimen-memory/dataflow.json
new file mode 100644
index 0000000..cbaaaf6
--- /dev/null
+++ b/public/poimen-memory/dataflow.json
@@ -0,0 +1,36 @@
+{
+ "schema_version": 1,
+ "diagram_type": "dataflow",
+ "meta": {
+ "title": "Poimen Ingest Pipeline",
+ "quality_profile": "showcase",
+ "viewBox": [1020, 540]
+ },
+ "stages": [
+ { "label": "Input" },
+ { "label": "Extract" },
+ { "label": "Store" },
+ { "label": "Serve" }
+ ],
+ "nodes": [
+ { "id": "episode", "type": "external", "label": "Episode", "sublabel": "conversation text", "stage": 0, "row": 1, "tag": "messages" },
+ { "id": "entities", "type": "backend", "label": "Entity Extractor", "sublabel": "LLM + reflection", "stage": 1, "row": 0, "tag": "person / tool" },
+ { "id": "facts", "type": "backend", "label": "Fact Extractor", "sublabel": "LLM relationships", "stage": 1, "row": 2, "tag": "edges" },
+ { "id": "graph", "type": "database", "label": "Temporal Graph", "sublabel": "pgvector", "stage": 2, "row": 1, "tag": "HNSW" },
+ { "id": "query", "type": "backend", "label": "Query API", "sublabel": "hybrid search", "stage": 3, "row": 0, "tag": "BFS + cosine" },
+ { "id": "viz", "type": "frontend", "label": "Visualization", "sublabel": "React Flow", "stage": 3, "row": 2, "tag": "graph UI" }
+ ],
+ "flows": [
+ { "id": "f1", "from": "episode", "to": "entities", "label": "text", "classification": "ingest", "variant": "emphasis" },
+ { "id": "f2", "from": "episode", "to": "facts", "label": "text", "classification": "ingest", "variant": "default" },
+ { "id": "f3", "from": "entities", "to": "graph", "label": "persist nodes", "classification": "write", "variant": "emphasis" },
+ { "id": "f4", "from": "facts", "to": "graph", "label": "persist edges", "classification": "write", "variant": "emphasis" },
+ { "id": "f5", "from": "graph", "to": "query", "label": "search", "classification": "read", "variant": "emphasis" },
+ { "id": "f6", "from": "graph", "to": "viz", "label": "graph data", "classification": "read", "variant": "dashed" }
+ ],
+ "cards": [
+ { "dot": "emerald", "title": "Extraction", "items": ["LLM extracts entities with type + summary", "Second LLM call extracts edges between entities", "Reflection filters hallucinated entities"] },
+ { "dot": "cyan", "title": "Storage", "items": ["Temporal graph with bi-temporal edges", "768-dim HNSW embeddings for similarity"] },
+ { "dot": "orange", "title": "Retrieval", "items": ["BFS traversal + cosine similarity", "React Flow JSON for interactive graph"] }
+ ]
+}
diff --git a/public/poimen-memory/sequence.html b/public/poimen-memory/sequence.html
new file mode 100644
index 0000000..6d31f5e
--- /dev/null
+++ b/public/poimen-memory/sequence.html
@@ -0,0 +1,15025 @@
+
+
+
+
+
+
+ Poimen Ingest Request Lifecycle Diagram
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
←
+
+
+ Guided views
+
+
+
+
+
Explore this system
+
Step through curated paths without changing the source diagram.
+
+
+ Beat
+
+
+
+ Next
+
+
+
+
+
→
+
+
+ ▶
+ Play story
+
+
+ #
+ Copy moment
+
+ Show all
+
+
+
+
+
+
+
+
+
+ Poimen Ingest Request Lifecycle
+ A sequence diagram generated by Archify.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ POST /memory/ingest
+
+
+
+
+
+
+
+ enqueue job
+
+
+
+
+
+
+
+ 202 pending
+
+
+
+
+
+
+
+ poll job
+
+
+
+
+
+
+
+ episode records
+
+
+
+
+
+
+
+ extract entities
+
+
+
+
+
+
+
+ JSON entities
+
+
+
+
+
+
+
+ extract facts (entity pairs)
+
+
+
+
+
+
+
+ JSON edges
+
+
+
+
+
+
+
+ INSERT memory_entity
+
+
+
+
+
+
+
+ INSERT memory_edge
+
+
+
+
+
+
+
+ store embeddings
+
+
+
+
+
+
+
+ mark done
+
+
+
+
+
+
+ Ingest
+
+
+
+ Extraction
+
+
+
+ Persist
+
+
+
+
+ AI Agent · client · Sequence participant
+
+
+
+
+
+
+ AI Agent
+ client
+
+
+
+ Memory API · actix-web · Sequence participant
+
+
+
+
+
+ Memory API
+ actix-web
+
+
+
+ Queue · ingest jobs · Sequence participant
+
+
+
+
+
+
+
+
+ Queue
+ ingest jobs
+
+
+
+ Worker · pipeline · Sequence participant
+
+
+
+
+
+ Worker
+ pipeline
+
+
+
+ LLM · Ollama · Sequence participant
+
+
+
+
+
+
+ LLM
+ Ollama
+
+
+
+ pgvector · postgres · Sequence participant
+
+
+
+
+
+
+ pgvector
+ postgres
+
+
+
+
+ Legend
+
+
+ request
+
+
+
+ return
+
+
+
+ async trace
+
+
+
+ default message
+
+
+
+
+
+
+ Ready
+ Chapter 01 / 01
+
+
+ Guided chapter
+
+
+
+
+
+
+
+
+ Diagram guide
+ Explore this system
+
+ ×
+
+
Inspecting compiled semantics
+
+
+ 01
+ Find any node Search labels, responsibilities, kinds, and stable IDs.
+ /
+
+
+ 02
+ Trace a route Ask how two semantic nodes connect in authored direction.
+ R
+
+
+ 03
+ See the whole system Open Semantic Radar with a live viewport and stable nodes.
+ M
+
+
+ 04
+ Compare semantic kinds Count roles, reveal their traffic, and compare direct authored links.
+ L
+
+
+ 05
+ Play the guided story Walk the authored chapters and real relationships.
+ P
+
+
+ 06
+ Enter Presentation Stage Give the live diagram the viewport without changing export.
+ F
+
+
+
+ E ExportT ThemeS Style0 Reset+ Zoom in- Zoom outEsc Close
+
+
+
+
+
+ Find a node
+ ×
+
+
+ ⌕
+
+ /
+
+
+
No matching nodes
+
+
+
+
+
+
Semantic passport
+
+
+
+
+
+
+
+
+
+
+
+
+
Authored reach
+
+
+ Upstream 0
+
+
+ Downstream 0
+
+
+
+
+
+
+ ×
+ Copy link
+ Relations
+
+
+
+
+
+
+
+ Route probe
+ Choose a start node
+
+
+ Find start
+ Copy link
+ Clear
+
+
+
+ Pick two semantic nodes on the diagram
+
+
+ ←
+
+ ▶
+ Journey
+
+ →
+ Overview
+
+
Choose the source, then the destination. Direction matters.
+
+
+
+
+ Semantic lens
+ Compare system roles
+
+ ×
+
+
Choose up to two semantic kinds. One reveals its real traffic; two compare only direct authored relationships.
+
+
Choose a kind to inspect its nodes and touching relationships.
+
+ Copy link
+ Clear
+
+
+
+
+
+
+ Semantic radar
+ Building overview
+
+ Open radar
+ ×
+
+
+
Click node Drag to pan
+
+
Semantic radar needs more MAP space.
+
+ PATH
+ MAP
+ LENS
+
+
+
+ READ 100%
+
+
+
+
+
+
+
+
+
+ • Agent gets 202 immediately, no blocking
+ • Worker polls jobs from queue independently
+ • Decoupled ingest from extraction latency
+
+
+
+
+
+
+ • First call: extract named entities with types
+ • Second call: extract relationships between entity pairs
+ • JSON response cleaned of thinking tags and fences
+
+
+
+
+
+
+ • Entities saved with type, summary, confidence
+ • Edges saved with temporal fields (t_valid, t_invalid)
+ • Embeddings stored for vector similarity search
+
+
+
+
+
+
+
+
+
diff --git a/public/poimen-memory/sequence.json b/public/poimen-memory/sequence.json
new file mode 100644
index 0000000..6f551da
--- /dev/null
+++ b/public/poimen-memory/sequence.json
@@ -0,0 +1,51 @@
+{
+ "schema_version": 1,
+ "diagram_type": "sequence",
+ "meta": {
+ "title": "Poimen Ingest Request Lifecycle",
+ "quality_profile": "showcase",
+ "viewBox": [1020, 620],
+ "column_fit": "spread"
+ },
+ "participants": [
+ { "id": "agent", "type": "external", "label": "AI Agent", "sublabel": "client" },
+ { "id": "api", "type": "backend", "label": "Memory API", "sublabel": "actix-web" },
+ { "id": "queue", "type": "messagebus", "label": "Queue", "sublabel": "ingest jobs" },
+ { "id": "worker", "type": "backend", "label": "Worker", "sublabel": "pipeline" },
+ { "id": "llm", "type": "external", "label": "LLM", "sublabel": "Ollama" },
+ { "id": "db", "type": "database", "label": "pgvector", "sublabel": "postgres" }
+ ],
+ "segments": [
+ { "from": 150, "to": 240, "label": "Ingest" },
+ { "from": 250, "to": 440, "label": "Extraction" },
+ { "from": 450, "to": 560, "label": "Persist" }
+ ],
+ "messages": [
+ { "id": "ingest-req", "from": "agent", "to": "api", "y": 160, "label": "POST /memory/ingest", "variant": "emphasis" },
+ { "id": "enqueue", "from": "api", "to": "queue", "y": 185, "label": "enqueue job", "variant": "default" },
+ { "id": "accept", "from": "api", "to": "agent", "y": 210, "label": "202 pending", "variant": "return" },
+ { "id": "poll", "from": "worker", "to": "queue", "y": 258, "label": "poll job", "variant": "default" },
+ { "id": "job", "from": "queue", "to": "worker", "y": 290, "label": "episode records", "variant": "return" },
+ { "id": "extract-entities", "from": "worker", "to": "llm", "y": 315, "label": "extract entities", "variant": "emphasis" },
+ { "id": "entities-resp", "from": "llm", "to": "worker", "y": 345, "label": "JSON entities", "variant": "return" },
+ { "id": "extract-facts", "from": "worker", "to": "llm", "y": 375, "label": "extract facts (entity pairs)", "variant": "emphasis" },
+ { "id": "facts-resp", "from": "llm", "to": "worker", "y": 405, "label": "JSON edges", "variant": "return" },
+ { "id": "save-entities", "from": "worker", "to": "db", "y": 460, "label": "INSERT memory_entity", "variant": "default" },
+ { "id": "save-edges", "from": "worker", "to": "db", "y": 490, "label": "INSERT memory_edge", "variant": "default" },
+ { "id": "embed", "from": "worker", "to": "db", "y": 520, "label": "store embeddings", "variant": "dashed" },
+ { "id": "done", "from": "worker", "to": "queue", "y": 535, "label": "mark done", "variant": "return" }
+ ],
+ "activations": [
+ { "participant": "api", "from": 155, "to": 220, "type": "backend" },
+ { "participant": "queue", "from": 180, "to": 295, "type": "messagebus" },
+ { "participant": "worker", "from": 255, "to": 555, "type": "backend" },
+ { "participant": "llm", "from": 310, "to": 350, "type": "external" },
+ { "participant": "llm", "from": 370, "to": 410, "type": "external" },
+ { "participant": "db", "from": 455, "to": 530, "type": "database" }
+ ],
+ "cards": [
+ { "dot": "emerald", "title": "Async Ingest", "items": ["Agent gets 202 immediately, no blocking", "Worker polls jobs from queue independently", "Decoupled ingest from extraction latency"] },
+ { "dot": "cyan", "title": "LLM Extraction", "items": ["First call: extract named entities with types", "Second call: extract relationships between entity pairs", "JSON response cleaned of thinking tags and fences"] },
+ { "dot": "orange", "title": "Persistence", "items": ["Entities saved with type, summary, confidence", "Edges saved with temporal fields (t_valid, t_invalid)", "Embeddings stored for vector similarity search"] }
+ ]
+}