REM synthesis
Type: agentic-system-analyses/types/agentic-system-synthesis.md
Bounded synthesis
REM is agent-memory infrastructure, not the agent that executes a user's task. It combines a Go API, a Python model worker, PostgreSQL episode storage, Qdrant similarity search, Neo4j temporal links and Redis caching/queue publication. Its declared progression is Write → Consolidate → Retrieve. The inspected source implements episode admission, candidate-fact computation and context selection, but does not connect them into the claimed automatic durable semantic-memory loop. This account covers the shipped service, workers, clients, integrations and evaluators at commit 935e8be0a1fca5b23dbabfe16c48b562c1cd24cc, with cutoff 2026-10-14. SRC-1 supplies implementation and doctrine/design evidence only: no target execution, provider output, deployed state, benchmark result or causal experiment was admitted. Whole-system source coverage is not evidence of successful operation. See the boundary and evidence, Source register and RT-CLM-memory-loop.
From an interaction to a retained episode
A caller supplies agent/user identities and a description of an interaction. Conditional on an already running, prepared service and an existing agent row, Go checks required fields and a trimmed byte length strictly greater than 50 and less than 10000. It assigns a fresh episode identity, requests best-effort interpretation from Python, requires an embedding, then writes PostgreSQL, Qdrant and Neo4j sequentially. Parser failure can preserve defaults without rejecting the raw description. A later store failure can leave earlier effects behind; transport retries can create another episode because there is no request idempotency key. A 201 response acknowledges this write sequence, not truth, task success or consolidation. See RT-RTE-episode-write.
The retained parts have different jobs. Raw text is caller testimony, not authenticated execution evidence. Model-derived intent, domain, entities and scores add interpretation without an independent fidelity test. Dense vectors select similar material; graph topology supplies temporal neighbors; access counters affect later priority. PostgreSQL retains the text and localized fields, Qdrant retains numerical selection state, Redis caches reusable embeddings, and Neo4j retains topology. These are not interchangeable kinds of knowledge. See MEM-OBJ-raw-content, MEM-OBJ-episode-interpretation, MEM-OBJ-memory-vector, MEM-OBJ-memory-graph and MEM-OBJ-retrieval-count.
Admission is software-controlled, without a per-content human approval step on these paths. That does not establish who authored a generic caller's text. Nor does API authentication establish tenant isolation: cached authentication accepts a key prefix, public key issuance accepts an existing user ID without a separate possession proof, and episode/retrieval handlers do not apply the ownership checks found in agent handlers. These are static control-boundary findings, not observed attacks or a deployed security assessment. See RT-RTE-key-admission and the runtime account.
From episodes to proposed facts
The active engine groups episodes by domain and seed-intent overlap, requiring at least three per eligible cluster and two shared intent tokens. It asks a model for durable preferences, patterns, errors, skills and recurring rules. The request contains at most fifteen episodes and the first 500 raw-content characters of each. Code nevertheless attaches source IDs and an evidence count for the full cluster. Those attachments are neither proposition-specific support nor retained reasons. Output filtering checks fact presence and numeric conversion, not truth, entailment, confidence calibration or usefulness. Without actual input/output pairs, faithful extraction versus new generalization remains indeterminate. See EPI-RTE-pattern-extraction, EPI-RTE-candidate-filter and MEM-OBJ-semantic-lineage.
Three separate connections prevent crediting the declared loop. Go publishes plain JSON to a Redis list with no shipped bridge to Celery's named-task protocol. Explicit dispatch or the separate six-hour scheduler does not repair that connection. Fetched Go episodes use PascalCase fields while the engine reads lowercase keys, defeating intended intent-overlap grouping. Finally, the task's semantic POST and consolidated-episode PATCH have no accepting Go routes. A direct Python /consolidate request with compatible lowercase dictionaries can compute candidates, but returns them without retaining them. Thus the finding is disconnected durable admission, not an inability to generate anything. See RT-ABS-worker-bridge, RT-RTE-worker-consolidation, RT-ABS-writeback-routes and RT-RTE-direct-consolidation.
Separate Clusterer and Compressor helpers have different thresholds and stronger structural sanitation, but no shipped active caller was found. Their safeguards cannot be credited to the active engine; arbitrary output clipping also does not guarantee preserved meaning. See MEM-CMP-clusterer, MEM-CMP-compressor and EPI-RTE-compressor-helper.
From retained state to later context
On a host query, Go embeds the query, searches agent-filtered vectors, reloads episode rows, expands one-hop neighbors of the first three episode hits, and ranks episodes using similarity, recency and capped retrieval-frequency feedback. Final episode count is top_k, capped at twenty; semantic results have a separate budget. The formatted string includes raw descriptions and, if semantic payloads are present, fact/confidence lines. It has no aggregate token budget. This is requested read-back, not unsolicited delivery; automatic ranking inside a request does not create a second push route. See RT-RTE-context-retrieve and MEM-RTE-memory-listing.
A direct HTTP consumer can obtain that string. The ordinary SDK path cannot deliver nonempty Go episode or semantic results: required timestamp conversion fails before construction of the typed retrieval result. Go episodes emit CreatedAt, while the SDK asks for created_at; semantic retrieval omits the required timestamp entirely. Null semantic arrays independently fail iteration. Neither shipped adapter catches these failures or falls back to the raw string. Empty compatible responses are a different case, not a repair. See RT-OBJ-episode, RT-RTE-host-integration and RT-BAP-context-injection.
The representative workflow is LangChain's paired retrieve-before-response/save-after-response hooks. It is source-supported because one adapter connects both sides of an interaction, but it is not a demonstrated successful conversation. The before hook requests five episodes plus semantic context; the conversion failure prevents ordinary nonempty context reaching its memory variable. The separate save hook serializes human/assistant text and supplies a fixed success label, without checking the answer. Short exchanges can pass SDK validation but fail Go's stricter bound. Uncaught hook errors and uncertain writes leave recovery to the host. Host answer delivery, episode acknowledgement and semantic consolidation are distinct delivery boundaries. REM delegates parsing and embedding computation, not task execution to autonomous subagents. See the workflow account.
Where semantic data is externally present, retrieval reads Qdrant payloads without a PostgreSQL lifecycle recheck. SQL active/superseded/contradicted flags therefore do not implement consumer-effective withdrawal. Displayed learned facts omit source IDs and evidence counts. Temporal adjacency adds context, not causal warrant. No evidence-consuming truth acceptance or accepted-claim integration route was found within the inspected material loop. See MEM-OBJ-semantic-control, MEM-ABS-memory-withdrawal, EPI-ABS-semantic-withdrawal and EPI-CLM-causal-graph.
What changes through use, and what remains unproved
The strongest supported adaptive contribution is durable selection state: serialized session turns can feed retained metadata/vectors with later consumers, and retrieval events automatically update counters that can raise future ranking. These are wired trace-fed updates, not merely raw logging. Recency downweights older episodes; counts promote salience. The unresolved question is whether these changes improve future action. No outcome-based comparison or observed changed ranking establishes that benefit. The missing semantic writer does not erase the separate metadata/vector and counter mechanisms. See MEM-OBJ-episode-interpretation, MEM-OBJ-memory-vector, EPI-RTE-retrieval-feedback and profile verification.
The theory-related conclusions are narrower and independent. For actual generated theories, condition 1 (localized formulation) is unestablished without candidate contents; condition 2 (decisions depending on those contents) is not established by intended prompt delivery. Condition 3 (content-directed criticism) and condition 4 (retaining criticism to shape another round) are not established by fixed extraction guidance, filtering or popularity counts. No criticism of a consumed theory is shown to improve future capacity. Reflection's two-directional self-representation path is not demonstrated by the assessed counts/extraction routes. Software-controlled selection and proposed admission establish computational roles, not an autonomous theory builder or REM-owned task agent. Exercised self-improvement is also unestablished: ranking adaptation lacks an independently specified objective-evidence link and evidence that subsequent behavior exercised the changed path. These findings do not infer absence inside opaque models. See EPI-RTE-pattern-extraction, EPI-RTE-compressor-helper and EPI-RTE-retrieval-feedback.
For the scenario of a prepared service serving direct HTTP clients, the source supports conditional episodic retention and selected-context return. For the shipped nonempty SDK workflow or automatic durable semantic maintenance scenario, the identified handoffs do not complete. The source benchmarks do not settle benefit: they score retrieved context against synthetic references, not a host agent's answer, and their scores have no production revision consumer. Semantic inclusion is omitted, reset is ineffective, and ConvoMem reads the wrong snippet key. No result supports the public 81.6% accuracy or sub-50ms claim. See MEM-RTE-benchmark-evaluation, EPI-RTE-benchmark-evaluation, EPI-RTE-benchmark-cleanup and EPI-CLM-recall-performance.
An altered implementation with compatible API/SDK schemas, connected dispatch and registered semantic admission would change the wiring assessment. A trace linking episode production, checked candidates, durable storage and later consumption would change the operation assessment. Controlled outcome comparisons would be needed separately to attribute improvement; neither those repairs nor successful storage alone would establish warranted facts, reflection or theory criticism.
Limitations
| Limitation | Affected SRC IDs and record citations | Inspected boundary | Conclusion prevented | Evidence that would resolve it |
|---|---|---|---|---|
| Fresh-install and default benchmark setup remain unestablished; carried report-verification limit | SRC-1; report-verification limits, runtime account, RT-RTE-episode-write, MEM-RTE-benchmark-evaluation, EPI-RTE-benchmark-evaluation | Unapplied SQL migration creates the same trigger twice; transactional execution returns its error and startup is fatal. Default benchmark IDs lack required agent rows. | Fresh-stack readiness and self-provisioning default benchmark execution; prepared migrations and registered caller-supplied agents remain different conditions. | Corrected migration/startup and agent-provisioning implementation, plus inspectable fresh-stack and benchmark traces. |
| Static source only; no exercised loop or benefit evidence | SRC-1; boundary, RT-RTE-episode-write, RT-RTE-context-retrieve | Frozen repository, not live stores, provider responses or host runs. | Actual durability, successful delivery, activation, performance, recovery reliability or causal benefit. | Deployment-specific write/read traces and retained artifacts; controlled outcome comparisons for benefit attribution. |
| Automatic semantic progression has disconnected handoffs | SRC-1; RT-ABS-worker-bridge, RT-RTE-worker-consolidation, RT-ABS-writeback-routes | Redis publisher, Celery wiring, Go episode serialization and complete router. | Completed automatic durable consolidation from a successful episode write. Direct compatible computation remains supported. | A revised, connected dispatch/input/admission path and a trace through its later consumer. |
| Server context is not ordinary nonempty SDK delivery | SRC-1; RT-RTE-context-retrieve, RT-RTE-host-integration, workflow account | Go response structs through SDK constructors and both adapter handoffs. | Delivered nonempty context through the shipped SDK hooks; not direct HTTP string availability. | Compatible timestamps/field schemas and null handling, followed by an inspectable adapter handoff and host-use trace. |
| Semantic content, provenance and warrant remain unresolved | SRC-1; MEM-OBJ-semantic-candidate, MEM-OBJ-semantic-lineage, MEM-OBJ-semantic-control, EPI-OBJ-semantic-result | Request-local candidates, intended SQL representation and conditional Qdrant consumer; no stored instance or provider output. | Faithful extraction, produced accepted generalizations, human/software control of initial semantic population, or identity between a candidate and retrieved fact. | Paired inputs/outputs, proposition-specific support and acceptance records, admission provenance and durable instance-to-consumer links. |
| Withdrawal and acceptance are not supplied by lifecycle fields | SRC-1; MEM-ABS-memory-withdrawal, EPI-ABS-semantic-withdrawal | Searched shipped material loop; SQL listing and Qdrant selection, not administrator-added processes. | Operative forgetting, contradiction correction or accepted-claim lifecycle integration from these fields. | Implemented evidence-consuming disposition and coordinated consumer exclusion, with retained decision and read-back traces. |
| Provider and deployment contracts are not established | SRC-1; RT-CMP-parse-service, RT-CMP-consolidation-engine, RT-CMP-embed-service, MEM-OBJ-memory-vector, RT-RTE-key-admission | Mutable model aliases, omitted embedding dimension request, differing initializer conventions and inspected API checks. | Reproducible model behavior, live vector compatibility or deployed tenant-isolation guarantees. | Pinned provider/configuration evidence, compatible initialized-store artifacts and deployment-specific isolation checks. |
| Evaluator scope and missing results prevent performance attribution | SRC-1; EPI-RTE-benchmark-evaluation, EPI-RTE-benchmark-cleanup, EPI-CLM-recall-performance | Synthetic context probes, omitted semantic inclusion, mismatched snippet key, ineffective reset and reporting-only consumers. | Public accuracy/latency claims, fresh per-conversation state, semantic consolidation benefit or downstream answer improvement. | Correctly scoped executable evaluators, isolated state, admitted datasets/results and independently varied component comparisons. |
| Adaptive writes do not establish improved capacity or the independent theory properties | SRC-1; EPI-RTE-retrieval-feedback, EPI-RTE-pattern-extraction, EPI-RTE-compressor-helper | Inspected extraction/helper and counter routes, not opaque model internals. | Learning as improved capacity, criticism-driven improvement, a complete theory-builder loop, reflection or exercised self-improvement on these pathways. | Actual theory/criticism/iteration artifacts, two-directional self-representation evidence where claimed, and objective-linked update-to-later-action comparisons. |