Layer 7 Data Plane Architecture
Status: Draft architecture overview (descriptive synthesis + gap register). Normative DDL remains in the per-store specs named below.
Date: October 2026
Authority for: How Layer 7 platforms relate; what is schema-complete vs open. Not authority for table DDL (see Agent DB Schema, Goal Model Spec, Outcome Spec, Identity Spec, Task Graph Spec, Observability Metrics Spec, Memory Runtime Integration Guide, Trading TRD DDL Spec, Trading alignment).
1. Purpose
Answer two questions after the Layer 7 schema completion work:
- Is the data-layer schema design complete for Synedrix OS core and the Trading domain pack?
- How do Supabase, Redis, Qdrant, Neo4j, and QuestDB relate as one governed memory fabric?
2. Verdict
Largely complete for OS + Trading schema specification after Architecture §6 items 2–5.
Remaining gaps are mainly Trading Qdrant contracts, Observability §8 satellite ownership, deferred hosting/erasure ADRs, and build-phase application of published DDL.
| Slice | Completeness (estimate) |
|---|---|
| OS Agent DB Groups A–H (listed tables) | ~98% (v1.4: Group H inventory + workflow_outcomes + lineage vocab) |
| OS hot / vector / trend store contracts | ~85% |
| OS work model (Goals + Task Graph + Outcomes) | ~95% (Goal + workflow_outcomes DDL present) |
| Identity / approval persistence | ~80% (Group H DDL present; Draft enforcement procedures open) |
| Trading TRD vs OS alignment + Phase‑1 DDL | ~95% (alignment v2.5; TRD DDL Spec v1.1; C5 Specified) |
| OS + Trading end-to-end as specified | ~85% |
3. High-level design — store relationships
3.1 Non-overlapping roles (Layer 7 five-store substrate)
flowchart TB
subgraph L7["Layer 7 — Memory & Data"]
SB[(Supabase PG17<br/>canonical relational truth)]
RD[(Redis<br/>working / coordination)]
QD[(Qdrant<br/>semantic vector index)]
NJ[(Neo4j<br/>graph projection)]
QS[(QuestDB<br/>temporal / trends)]
end
ORCH[n8n Orchestration L3] --> SB
ORCH --> RD
RT[LangGraph Agent Runtime L4] --> SB
RT --> RD
RT --> QD
GOV[Governance L9] --> SB
OBS[Observability L10] --> QS
OBS --> SB
SB -->|rebuildable projection| QD
SB -->|rebuildable projection| NJ
SB -->|derived samples| QS
RD -.->|never SoR| SB
Rule of truth. Supabase is write-authoritative for every audit-bearing record. Redis holds reconstructible hot state only. Qdrant and Neo4j are rebuildable projections. QuestDB holds temporal series and dashboard trends that must not be recomputed ad hoc from Supabase.
3.2 Write paths vs read paths
flowchart LR
subgraph Writers["Governed writers"]
N8N[n8n workflows]
LG[LangGraph agents]
MC[os-agt-010 Memory Curator]
ORCH2[os-agt-001 Orchestrator]
end
subgraph Postgres["Supabase PG17"]
DEF[Groups A–C definitions/policy]
EXEC[Group D invocations/outcomes]
MEM[Group G memory_*]
RTG[runtime.* task graphs]
TRD[(trading.* TRD)]
end
subgraph Projections["Projections / hot"]
QDr[(Qdrant mem_* / KB)]
NJr[(Neo4j Agent/Outcome/Task graph)]
RDr[(Redis os:* keys)]
QSr[(QuestDB metrics_samples)]
end
N8N --> EXEC
N8N --> RTG
N8N --> TRD
LG --> EXEC
ORCH2 --> RTG
MC --> MEM
MEM --> QDr
EXEC --> NJr
MEM --> NJr
DEF --> NJr
EXEC --> QSr
N8N --> RDr
LG --> RDr
3.3 Memory fabric tiers → stores
flowchart TB W[working] --> Redis E[episodic] --> Supabase E --> Qdrant S[semantic] --> Supabase S --> Qdrant P[procedural] --> Supabase P --> Qdrant Pr[profile] --> Supabase Pr --> Qdrant Pr --> Neo4j Rel[relational] --> Supabase G[graph lineage] --> Supabase G --> Neo4j T[temporal] --> QuestDB
Normative collection names for indexed tiers: mem_episodic, mem_semantic, mem_procedural, mem_profile (Memory Runtime Integration Guide §2.3). KB consumers (e.g. synedrix_os_kb) are a separate collection class.
3.4 Runtime object chain (Postgres)
erDiagram
GOAL_INSTANCE ||--o{ TASK_GRAPH : "plans"
TASK_GRAPH ||--|{ TASK : "contains"
TASK ||--o{ TASK_EDGE : "connects"
TASK ||--o{ EXECUTION : "attempts"
EXECUTION ||--o| AGENT_INVOCATION : "invocation_id"
EXECUTION ||--o| OUTCOME : "outcome_id"
AGENT_INVOCATION ||--|| AGENT_INVOCATION_OUTCOME : "terminates"
WORKFLOW_RUN ||--|| WORKFLOW_OUTCOME : "terminates"
GOAL_INSTANCE {
text tenant_id
text goal_id
text goal_type
}
TASK_GRAPH {
text tenant_id
text task_graph_id
int graph_version
}
EXECUTION {
text execution_id
text outcome_id
uuid invocation_id
}
WORKFLOW_OUTCOME {
text outcome_id
text status
}
Solid runtime-chain entities with normative DDL: Goal Instance (Goal Model Spec v0.3), workflow_outcomes (Outcome Spec v0.3 / Agent DB Group D), runtime.* (Task Graph Spec), and agent_invocation_*.
3.5 Trading domain pack placement
flowchart TB
subgraph OS["OS public schema"]
A[Groups A–G]
R[runtime.*]
end
subgraph TRD["trading schema — 26 TRD tables"]
CORE[orders · signals_log · consensus_log · …]
EXT[trades · agent_health · broker_sessions · …]
end
TRD -->|agent_scope FK| A
TRD -->|lineage via agent_lineage_links| A
TRD -->|hot keys pack-local| RedisT[Redis domain keys]
TRD -.->|regime / sentiment vectors TBD| QdT[Qdrant Trading collections]
Trading alignment v2.5 verifies all 26 tables against OS Groups A–G. Physical DDL is published as TRD DDL Spec v1.1; applying it remains Phase 1 build work.
3.6 Observability split
flowchart LR EVT[Event bus] --> SB2[Supabase audit rows] EVT --> QS2[QuestDB metrics_samples] SB2 -->|must not ad-hoc recompute for dashboards| GRAF[Grafana] QS2 --> GRAF LF[Langfuse traces] -.->|trace_id correlate| SB2
4. Completeness matrix
4.1 Synedrix OS core
| Area | Spec | Status |
|---|---|---|
| Agent definition / registry / policy / execution / eval / lineage / memory CP / identity inventory | Agent DB Schema v1.4 | Groups A–G DDL + Group H inventory; workflow_outcomes; lineage vocab unified |
Task Graph runtime.* | Task Graph Spec v0.3 | Normative SQL present |
| Goal Type / Goal Instance tables | Goal Model Spec v0.3 | DDL present |
workflow_outcomes | Outcome Spec v0.3 | DDL present (mirrored in Agent DB Group D) |
| Observability satellite tables §8.2–8.6 | Observability Metrics Spec v1.2 | Tenant-led sketches; full ownership vs Agent DB tool/eval tables still deferred |
| QuestDB trends | Observability §14a | metrics_samples DDL present |
| Redis OS keys | Task Graph + Redis | Normative templates present |
| Qdrant fabric + KB class | Memory Runtime Guide v0.2 | Collection/payload contract present |
| Neo4j Agent / Outcome graph | Agent Graph Data Model + Neo4j guide v0.2 | Specified; Postgres↔Cypher lineage mapping present |
| Neo4j Task Graph projection | Task Graph Spec | Illustrative only |
| Identity / tenant / user / approval tables | Identity Spec v0.3 | Group H DDL present; Agent DB inventories Group H |
| Temporal memory QuestDB (non-metrics) | Memory Fabric | Concept only |
4.2 Trading domain pack
| Area | Status |
|---|---|
| 26-table C1–C6 vs OS Groups A–G | Complete in Trading DB Schema Alignment v2.5 |
| OS-facing ↔ source name map | §3.1 present |
Formal CREATE TABLE for 26 TRD + tenant columns | Published — TRD DDL Spec v1.1 |
Numeric SMALLINT agent ids → canonical TEXT + agent_scope | DDL’d in TRD DDL Spec (build applies) |
| FILLED Step 5 Neo4j-before-Postgres (C5) | Specified (Step 5a/5b in TRD DDL Spec §6; contracts/skill remain build) |
| Trading Qdrant collection contracts | Missing |
Trading Redis keys without tenant_id | Documented pack-local exception |
5. Gap register
5.1 Blocking
| # | Gap | Where |
|---|---|---|
| B1 | Done — Goal Model Spec v0.3 | |
| B2 | workflow_outcomes DDL | Done — Outcome Spec v0.3 / Agent DB v1.4 |
| B3 | memory_promotions dual PK | Fixed in Agent DB Schema v1.3 |
| B4 | memory_tombstones missing PK | Fixed in Agent DB Schema v1.3 |
| B5 | agent_lineage_links missing UNIQUE (tenant_id, id) | Fixed in Agent DB Schema v1.3 |
| B6 | relation vocabulary vs Neo4j Outcome edge types | Done — Agent DB v1.4 + Neo4j guide v0.2 mapping |
| B7 | Done — TRD DDL Spec v1.0 (apply in build) | |
| B8 | Specified — TRD DDL Spec §6 / alignment v2.5 (contracts/skill remain build) | |
| B9 | Identity / organisation / user / role-assignment / approval persistence | DDL shape Done (Identity Spec v0.2 Group H); Draft — last-owner / grant auth / active-delegation procedure bodies remain open |
| B10 | Trading Qdrant collection contracts (regime / sentiment / scenario) | Trading domain pack |
5.2 Deferred (explicit open / ADR)
- Groups D/G hosting (Tenancy Spec §9)
- Offboarding / erasure of indefinitely retained tables
- Metering / entitlement ledger (ADR-OS-012)
- Memory Fabric 7-store vs 5 Layer‑7 platforms framing
- Task Graph Neo4j projection schema; Agent Graph registry sync trigger
- Observability §8.2–8.6 ownership vs Agent DB tool/eval tables
- Temporal QuestDB memory beyond metrics
- Trading Redis tenant-prefix rename
5.3 Editorial
- Domain pack text may still say “13 tables” vs alignment’s 26
- camel-concat vs snake_case physical rename
- Recommended
agent_config→trd_agent_config
6. Recommended next artifacts
Agent DB Schema v1.3 — fix B3–B5(done).Goal Model Spec v0.3 —(done).goal_types/goal_instancesDDLOutcome Spec / Agent DB —(done).workflow_outcomesDDLIdentity schema companion — Group H DDL(DDL done; Draft enforcement procedures still open).Trading TRD DDL Spec v1.0 — formal SQL for 26 tables(done; alignment stays verification-only).- Trading store contracts addendum — Redis namespace + Qdrant collections.
Neo4j lineage mapping — single relation vocabulary(done in Agent DB v1.4 + Neo4j guide v0.2).
7. Related documents
- Synedrix OS - Agent DB Schema
- Synedrix OS — Goal Model Spec
- Synedrix OS — Outcome Spec
- Synedrix OS — Identity and Access Spec
- Synedrix OS — Task Graph Spec
- Synedrix OS Memory Fabric Spec
- Synedrix OS — Memory Runtime Integration Guide
- Synedrix OS Observability Metrics Spec
- Synedrix OS — Neo4j Implementation Guide
- Synedrix Trading — DB Schema Alignment Verification
- Synedrix Trading — TRD DDL Spec
- Memory & Data layer page
- Supabase · Redis · Qdrant · Neo4j · QuestDB
Versioning
- Version: 0.2
- Supersedes: v0.1