Executive Architectural Synthesis · Semantic Machinery · Module 03
Architectural Specification Plates (8)
Session Transcript, Workflow State, Compiled Context & Memory Separation
The Four Distinct Memory & State Scopes in Production Agent Systems
| State / Memory Scope | Persistence Lifespan | Write Authority | Compiler Projection Policy | Governance Risk if Conflated |
|---|---|---|---|---|
| 01 · Ephemeral Session Transcript | Single conversation thread (TTL hours/days) | Append-only turn log | Sliding window + summarization compression | Prompt bloat & cross-turn error amplification |
| 02 · Authoritative Workflow State | Lifecycle of bounded business transaction | Deterministic FSM / Layer 3 Gate only | Injected verbatim as structured JSON header | Agent hallucinates that a skipped step succeeded |
| 03 · Bitemporal Knowledge Graph (SoR) | Institutional multi-year ledger | Verified ETL + Proof-Carrying Writeback | Parameterized SPARQL/Cypher subgraph slice (60% budget) | Stale or superseded pricing/policy leakage |
| 04 · Evaluated Episodic/Semantic Memory | Cross-session user/tenant profile | Asynchronous Memory Evaluator + Redaction Gate | Least-privilege relevance projection (10% budget) | Memory poisoning via indirect prompt injection |
Executable Architecture & Verification Specification
# Parameterized Bitemporal SPARQL 1.1 Context Compiler Query (60% Primary Entity Slice)
PREFIX ex: <https://agentichorizon.ai/ontology/enterprise#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?entityUri ?attribute ?canonicalValue ?validFrom ?sourceSystem
WHERE {
BIND(ex:VIN_1FA6P8CF0R5100001 AS ?entityUri)
GRAPH ex:AuthoritativeInventoryGraph {
?assertion a ex:BitemporalFact ;
ex:subject ?entityUri ;
ex:predicate ?attribute ;
ex:objectValue ?canonicalValue ;
ex:validFrom ?validFrom ;
prov:wasDerivedFrom ?sourceSystem .
FILTER NOT EXISTS { ?assertion ex:supersededBy ?newerAssertion }
FILTER (?validFrom <= NOW())
}
} ORDER BY ASC(?attribute)Core Architectural Specifications & Treatises (4 Sections)
01Why Vector-Only RAG Fails on Enterprise Structure & Temporal Supersession
Cosine similarity over 500-token document chunks cannot answer multi-hop relational queries, enforce entity disambiguation across homonymous SKUs, or know that a pricing bulletin from Tuesday superseded Monday’s contract. Hybrid GraphRAG uses dense/sparse vector search strictly for candidate entity entry-point discovery, then executes parameterized SPARQL 1.1 or Cypher subgraph queries to assemble verified relational facts and provenance chains.
02Bitemporal World Models (Valid-Time vs. Transaction-Time)
Enterprise facts evolve continuously and are frequently restated retroactively. Our bitemporal knowledge graphs track two orthogonal time axes on every assertion using W3C PROV-O: Valid-Time (t_valid: when the fact was true in the physical/commercial world) and Transaction-Time (t_tx: when the fact was committed to the institutional ledger). This enables point-in-time decision replay for regulatory audits and prevents agents from acting on expired incentives or superseded policies.
03The Deterministic 60 / 30 / 10 Context Compilation Budget
Rather than concatenating raw retrieval chunks until the context window overflows, the Context Compiler treats every LLM invocation like a budgeted compiler pass. It allocates 60% of the token budget to canonical primary-entity facts extracted via SPARQL/Cypher, 30% to authoritative workflow state, persona rules, and SHACL/policy constraints, and 10% to episodic memory and live market telemetry—projecting only the least-privilege slice each specialist agent requires.
04Separating Session, State, Memory & Artifacts Against Memory Poisoning
Conflating conversational chat history with authoritative workflow state allows a user or injected document to convince the agent that a payment or verification step already succeeded. We enforce strict separation across Invocation Context, Session Transcript, Authoritative Workflow State (mutated only by Layer 3/4), and Long-Term Memory (guarded by an asynchronous quarantine evaluator that strips PII, checks taint provenance, and blocks instruction-injection persistence).
Probabilistic vs. Deterministic Execution Boundary & Verified Benchmark Ledger
Synthesizing grounded narratives and reasoning over the compiled context slice without extrapolating missing facts.
60/30/10 Token Budget Compiler, 21 parameterized SPARQL 1.1 resolvers, Bitemporal (t_valid, t_tx) filters, and ABSTAIN_KNOWLEDGE_GAP gate.