製品
ソリューション
会社情報
エンタープライズ
サインインネットワークを作成
ai-agents · memory-architecture · theorem-3 · mechanism · honest-architect

Persistent memory is the mechanism, not the context window

Five architectural patterns for AI agent memory, read as Theorem 3: the property (learning, personalization) is guaranteed by the mechanism (persist, retrieve, inject), not by the context window. Checkpointing is not exactly-once, secrets are not semantic memory, storage-layer isolation fails closed.

Persistent memory is the mechanism, not the context window

The MachineLearningMastery article on five architectural patterns for persistent memory and state in AI agents opens with a claim the Honest Architect treats as structural: LLMs are stateless by design, dumping the entire conversation history into the context window breaks down fast, and the fix is treating memory and state as deliberate architectural decisions, not afterthoughts. (Vinod Chugani, 「5 Architectural Patterns for Persistent Memory and State in AI Agents」, MachineLearningMastery, July 27 2026, retrieved 2026-08-23, https://machinelearningmastery.com/5-architectural-patterns-for-persistent-memory-and-state-in-ai-agents). The Honest Architect reads the article as Theorem 3 applied to the memory layer. State is a snapshot (the property at time T: what step, what the last tool call returned, what variables tracked). Memory is the mechanism that carries information across a boundary (the next turn, the next session, a separate agent). The property (the agent learns, personalizes, does not treat every interaction as a blank slate) is guaranteed by the mechanism (persist, retrieve, inject), not by the assertion 「the agent remembers.」 The context window is not a database. The five patterns are five mechanisms, each with a named property and a named gap.

Key takeaways

  • State is the property, memory is the mechanism. State is the snapshot (what the agent knows now); memory is the mechanism that carries across a boundary. Theorem 3: the property (learning, personalization) is guaranteed by the mechanism (persist + retrieve + inject), not by the assertion 「the agent remembers.」 A broken state loses the thread mid-task; broken memory treats every interaction as a blank slate. Different failures, different fixes.
  • Checkpointing is not exactly-once. Pattern 2 persists workflow state to a durable store so execution resumes where it stopped. But resumption does not give exactly-once semantics: a node that partially executed (sent an email, wrote a row) may execute again on resume. Side-effecting nodes need idempotency. The honest naming of the gap is the measurement.
  • Secrets are not semantic memory. Pattern 3 says credentials belong in a secrets manager where the agent gets a handle it never sees the value of. This is the Eye Key pattern: plaintext never touches disk, only the HMAC and fingerprint go to Postgres. The article names the mechanism; Everythink implements it.
  • Storage-layer isolation fails closed, app-layer WHERE fails open. Pattern 5 enforces multi-scope segregation at the storage layer (per-tenant namespaces, row-level security), not solely at the application layer. A forgotten WHERE clause fails open; storage-layer isolation fails closed. The lowest layer must fail closed.
  • Growth bounds are part of the mechanism, not polish. The summary is explicit: TTLs, consolidation jobs, and pruning policies are not optional. Retrieval quality degrades as stores fill. Theorem 3: the property (retrieval quality at scale) is guaranteed by the mechanism (pruning), not by the assertion 「we have a big store.」

State is the property, memory is the mechanism

The article draws a precise distinction. State is a snapshot: everything the agent currently knows about a task (what step, what the last tool call returned, what variables). It is gone when the session ends unless you deliberately persist it. Memory is the mechanism that carries information across a boundary: the next turn (working memory), the next session (semantic and episodic). The two interact in a cycle: the agent reads from memory to build initial state, updates state during the task, writes select pieces back to memory as the task concludes. Memory feeds into state; state feeds back into memory.

The Honest Architect reads this as Theorem 3 made operational. The property (the agent tracks the task) is the state at time T. The mechanism (persist + retrieve + inject across a boundary) is the memory. A team that asserts 「our agent has memory」 without a persist-retrieve-inject mechanism is a non-mechanism. A team with a vector store, a retrieval step, and a prompt-injection step has a mechanism. The failure modes are different and the article names both: a broken state loses the thread mid-task; broken memory treats every interaction as a blank slate. The Honest Architect tags the state-memory distinction Production ✅.

The parallel to Everythink request flow: a request enters, passes auth and rate-limit middleware, is validated, hits the use-case crate, reaches the adapter, persists to the domain. The request state is the snapshot; the repository trait (persist + retrieve) is the memory mechanism. The Honest Architect tags this Production ✅ and the cross-domain claim Partial ⚠️ (same form, separate domains).

Checkpointing is not exactly-once

[UNIQUE INSIGHT] Pattern 2 is the part the Honest Architect considers most mechanically honest. Execution checkpointing saves the agent workflow state to a database (PostgreSQL or SQLite) so execution resumes where it stopped after a crash, timeout, rate limit, or human-approval pause. Graph-based frameworks model workflows as nodes and edges; after each step, the framework persists the workflow state (variables, history, current position). If the agent crashes, it reloads the last checkpoint and picks up from there. Theorem 3: the property (resume without re-running completed work) is guaranteed by the mechanism (checkpoint after each step to a durable store), not by the assertion 「we handle failures.」

The gap the article names is the measurement. Resumption does not give exactly-once semantics. If a node partially executed before crashing (sent an email, wrote a row), it may execute again on resume. Side-effecting nodes need idempotency. Open file handles and client objects cannot be checkpointed. The mechanism (checkpoint) guarantees resume-from-position, NOT exactly-once-execution. A team that asserts 「we have fault tolerance」 without idempotent nodes is a non-mechanism. The Honest Architect tags the checkpointing mechanism Production ✅ and the exactly-once gap an honest Partial ⚠️.

The parallel to Everythink Loom: the Loom inserts a simulation row, fans out to the Sisters, persists scenarios and foresight through the LoomStore port. If a Sister fails mid-imagine, the Loom resumes from the persisted row; the idempotency is the deterministic UUID (re-ingest updates, never duplicates). The Honest Architect tags the Loom checkpoint Production ✅ and the cross-domain claim Partial ⚠️ (same form, separate domains).

Secrets are not semantic memory

[ORIGINAL DATA] Pattern 3 is the part the Honest Architect considers most directly aligned with Everythink. Semantic memory is what the agent knows: facts, user preferences, domain knowledge that persist across independent sessions. Facts are extracted asynchronously and stored in an external database, usually a vector store with metadata filtering. When a query comes in, the system retrieves the most relevant facts and injects them into the prompt. The article is explicit on the sovereignty angle: credentials and secrets are not semantic memory. Do not store API keys in a retrievable store. A prompt injection or an over-eager retrieval could emit them in a model response. Secrets belong in a secrets manager, where the agent gets a credential handle it never sees the value of.

The Honest Architect reads this as the Eye Key pattern named in the wild. The Eye Key plaintext never touches disk; only the HMAC and fingerprint go to Postgres; the plaintext is shown once, in memory. The article says the agent gets a credential handle it never sees the value of: same form, same sovereignty stance. The property (the secret is never exposed in a model response) is guaranteed by the mechanism (secrets manager, handle not value), not by the assertion 「we protect secrets.」 The Honest Architect tags the Eye Key mechanism Production ✅ and the cross-domain claim Partial ⚠️. The article naming the pattern independently is the strongest kind of parallel: two implementations converging on the same mechanism.

The second measurement is fact invalidation. If a user says 「I use Postgres」 in March and 「we migrated to Snowflake」 in July, both facts end up in the store and retrieval might surface either. Fact invalidation (recency weighting, supersession logic, TTLs) solves the stale fact problem. Theorem 3: the property (the current fact) is guaranteed by the mechanism (invalidation), not by the assertion 「we store facts.」 The Honest Architect tags fact invalidation Production ✅.

The third measurement is provenance tagging. Untrusted content extracted into semantic memory can persistently steer the agent wrong. The article says there is no prompt equivalent of parameterization, so provenance tagging does the work instead. Everythink DOES have parameterization at the network boundary: Zod schemas parse responses, a bad payload surfaces as a typed ApiError, never a crash. The Honest Architect tags the Zod boundary Production ✅ and the cross-domain claim Partial ⚠️ (same property, different mechanism, separate domains).

Episodic logs are advisory, not constraints

Pattern 4 stores what the agent did. Episodic memory is a chronological ledger of the agent execution trajectory: Goal, Plan, Tool Calls, Outcome. When a workflow finishes, a background process logs the full trajectory. Before the agent tackles a similar task, it queries this log. If it previously failed a database query due to a syntax error, episodic memory surfaces that context. Theorem 3: the property (learn from past mistakes) is guaranteed by the mechanism (log + retrieve + surface), not by the assertion 「the agent learns.」

The gap the article names is the measurement. Retrieved failure traces are advisory, not constraints. The model can ignore them. There is also a poisoning risk: if a one-off environmental failure gets logged as a strategy failure, you persistently teach the agent the wrong lesson. The mechanism (log + retrieve + surface) guarantees the surfacing, NOT the learning. The Honest Architect tags the episodic-log mechanism Production ✅ and the advisory-gap an honest Partial ⚠️.

The parallel to Everythink eval: everythink-eval is the regression harness that measures past forecast performance and surfaces regression. The property (no silent regression) is guaranteed by the mechanism (eval on every change), not by the assertion 「we tested it.」 The Honest Architect tags the eval mechanism Production ✅ and the cross-domain claim Partial ⚠️ (same form, separate domains).

Storage-layer isolation fails closed, app-layer fails open

Pattern 5 is the part the Honest Architect considers most politically honest. Once memory persists, the question is who can see it. The moment your system serves more than one user, memory has to be siloed. Every memory write gets tagged with identity scopes: user_id, session_id, org_id. Retrieval strictly filters based on the active user auth token. Where possible, enforce this at the storage layer, through per-tenant namespaces or row-level security, rather than relying solely on application-layer query filters. A forgotten WHERE clause fails open; storage-layer isolation fails closed.

The Honest Architect reads this as the measurement that distinguishes a mechanism from an assertion. The property (User A fact never surfaces for User B) is guaranteed by the mechanism (storage-layer row-level security), not by the assertion 「we filter by user.」 A team with only application-layer WHERE clauses is a non-mechanism: a forgotten clause fails open and the property is violated silently. A team with storage-layer isolation has a mechanism: the property holds even when the application layer forgets. The Honest Architect tags the storage-layer isolation principle Production ✅.

The parallel to Everythink RBAC: can(role, action) is enforced in three layers (auth.ts allowedRoles, middleware, can() at sites). This is defense-in-depth at the application layer. The article principle is sharper: the lowest layer must fail closed. Everythink does not enforce row-level security at Postgres; a forgotten can() fails open. The Honest Architect tags the RBAC mechanism Production ✅ and names the honest gap Partial ⚠️: the lowest layer is application-layer, not storage-layer. This is the kind of gap an Honest Architect names rather than hides.

The deletion measurement counts. When a user exercises their right to erasure, you need to delete not just raw data but also the embeddings, summaries, and extracted facts derived from it. Theorem 3: the property (right to erasure) is guaranteed by the mechanism (cascade delete to derivatives), not by the assertion 「we deleted your data.」 The Honest Architect tags the cascade-delete principle Production ✅.

What an Honest Architect reads in an architectural-patterns article

The MachineLearningMastery article is educational content, not vendor marketing. Vinod Chugani describes five widely-accepted patterns, names their gaps honestly (checkpointing is not exactly-once, episodic logs are advisory, app-layer WHERE fails open), and does not endorse a single framework. The patterns are Production ✅: real and implementable. The specific framework claims are Partial ⚠️ (framework-specific, not independently benchmarked). The Eye Key parallel is the strongest convergence: the article names the pattern independently of Everythink.

The scope guard counts. Agent memory architecture is a civil-engineering activity. It is not a security investigation, not an investment recommendation, and not a token, wallet, or community-credit promise. The cross-domain claims to Loom, Eye Key, eval, World Monitor, and RBAC are Partial ⚠️ illustrations. No token, wallet, or community-credit outcome is promised; those are Roadmap 🔵, Howey review pending.

Frequently asked questions

Is memory the mechanism or the property?

Memory is the mechanism. State is the property (the snapshot at time T). Theorem 3: the property (the agent learns) is guaranteed by the mechanism (persist + retrieve + inject across a boundary), not by the assertion 「the agent remembers.」 A broken state loses the thread mid-task; broken memory treats every interaction as a blank slate.

Why is checkpointing not exactly-once?

Because a node that partially executed (sent an email, wrote a row) may execute again on resume. The mechanism guarantees resume-from-position, not exactly-once-execution. Side-effecting nodes need idempotency. The Honest Architect tags the mechanism Production and the exactly-once guarantee Partial.

How is 「secrets are not semantic memory」 the Eye Key pattern?

The article says secrets belong in a secrets manager where the agent gets a handle it never sees the value of. The Eye Key says plaintext never touches disk, only HMAC and fingerprint go to Postgres. Same form, same sovereignty stance. The property (the secret is never exposed) is guaranteed by the mechanism (handle not value). The Honest Architect tags the Eye Key Production; the cross-domain claim is Partial.

Why does storage-layer isolation fail closed and app-layer fail open?

A forgotten WHERE clause at the application layer silently returns all rows (fails open); storage-layer row-level security enforces isolation regardless of the query (fails closed). The property (User A data never surfaces for User B) is guaranteed by the mechanism (storage-layer isolation), not by the assertion 「we filter by user.」 The lowest layer must fail closed.

Does Everythink implement all five patterns?

Everythink implements the forms: Loom checkpointing (Pattern 2), Eye Key sovereignty (Pattern 3 secrets), eval regression harness (Pattern 4), per-geohash World Monitor segregation (Pattern 5). The cross-domain claims are Partial. Everythink RBAC is app-layer not storage-layer, an honest gap. No token, wallet, or community-credit outcome is promised; those are Roadmap, Howey review pending.

Sources

If your team is ready to measure the mechanism instead of asserting the property, build your network — the topology routes, the Sisters write, the Oracle measures entropy on every merge.

関連
neurosymbolic · search · theorem-3 · mechanism · honest-architect

Neurosymbolic search wins on mechanism, not catalog volume

Onton's Ontology 1 neurosymbolic search model read as Theorem 3: relevance on intent-heavy queries is guaranteed by the mechanism (inspectable knowledge graph decomposing vague predicates into checkable properties), not by catalog volume. The benchmark methodology is honest (released code+data, 3 judges, bootstrap CI, Krippendorff alpha 0.465 named). The 2.7x headline is not the aggregate number. Failure cases named.

zod · typescript · validation · theorem-3 · mechanism · honest-architect

Zod is the runtime mechanism TypeScript cannot guarantee

TypeScript types are a compile-time assertion, erased at runtime. Theorem 3: the property (data is valid at runtime) is guaranteed by the mechanism (Zod parse at the boundary), not by the assertion. Everythink implements this: wire types in Zod in @everythink/types, parsed at the network boundary, typed ApiError on failure. Cross-domain parallels to Eye Key, Oracle, World Monitor.

自らの主張を証明するエンジンの上に、あなたの世界を築く。

2016 年から稼働し続けるエンジンの上に、あなた自身のネットワークを作る——あるいは 21 本の論文を書いたチームに話しかける。