{ "schema_version": 1, "diagram_type": "architecture", "meta": { "title": "Poimen Memory — Schema Relations", "quality_profile": "showcase", "viewBox": [900, 480] }, "components": [ { "id": "node", "type": "database", "label": "memory_node", "sublabel": "Episodes (raw messages)", "pos": [40, 60], "size": [150, 55], "tag": "BIGSERIAL" }, { "id": "entity", "type": "database", "label": "memory_entity", "sublabel": "Extracted entities", "pos": [260, 60], "size": [150, 55], "tag": "UUID" }, { "id": "edge", "type": "database", "label": "memory_edge", "sublabel": "Facts / relationships", "pos": [480, 60], "size": [150, 55], "tag": "UUID" }, { "id": "community", "type": "database", "label": "memory_community", "sublabel": "Entity clusters", "pos": [700, 60], "size": [150, 55], "tag": "UUID" }, { "id": "pgvector", "type": "cloud", "label": "pgvector HNSW", "sublabel": "768-dim cosine search", "pos": [140, 260], "size": [160, 55], "tag": "nomic-embed-v2" }, { "id": "tsvector", "type": "cloud", "label": "pg ts_rank", "sublabel": "Full-text search", "pos": [400, 260], "size": [160, 55], "tag": "GIN index" }, { "id": "tenant", "type": "security", "label": "tenant_id", "sublabel": "Multi-tenant isolation", "pos": [660, 260], "size": [140, 55], "tag": "W7 / mig 014" } ], "boundaries": [ { "kind": "region", "label": "Temporal Knowledge Graph (Zep §2)", "wraps": ["node", "entity", "edge", "community"] }, { "kind": "security-group", "label": "Search & Isolation", "wraps": ["pgvector", "tsvector", "tenant"] } ], "connections": [ { "id": "node-entity", "from": "node", "to": "entity", "variant": "emphasis" }, { "id": "entity-edge", "from": "entity", "to": "edge", "variant": "emphasis" }, { "id": "entity-community", "from": "community", "to": "entity", "variant": "dashed" }, { "id": "edge-node", "from": "edge", "to": "node", "variant": "dashed" }, { "id": "entity-vec", "from": "entity", "to": "pgvector", "variant": "default" }, { "id": "entity-fts", "from": "entity", "to": "tsvector", "variant": "dashed" }, { "id": "edge-fts", "from": "edge", "to": "tsvector", "variant": "dashed" }, { "id": "tenant-all", "from": "tenant", "to": "entity", "variant": "security" } ], "cards": [ { "dot": "emerald", "title": "Three-Tier Graph", "items": ["memory_node → episode subgraph", "memory_entity → entity subgraph", "memory_edge → fact relationships", "memory_community → clusters (Phase 4)"] }, { "dot": "rose", "title": "Bi-Temporal", "items": ["t_valid / t_invalid: event time", "t_created / t_expired: transaction time", "Contradiction: active → candidate → confirmed"] }, { "dot": "cyan", "title": "Search", "items": ["HNSW: name, summary, fact embeddings", "ts_rank: BM25 fallback (always available)", "tenant_id: per-table isolation (mig 014)"] } ] }