Repository navigation
Source AgentCore Long Term Memory
AWS's Machine Learning blog post Building smarter AI agents: AgentCore long-term memory deep dive (October 2025), read on 2026-10-30. It explains how AgentCore Memory turns short-term events into long-term records. It was ingested because spec 003 ships AgentCore Memory, with built-in strategies, in the first deployment (Source-Spec-003, Q8). This page records what the post says and what the AWS documentation confirms. The documentation matters more.
Status: research. Nothing is adopted or changed here. Its most important finding comes from the documentation the post links to: the built-in strategies spec 003 plans to use route inference cross-Region. See § Bearing on Max Height.
- Extraction. When new events land in short-term memory, an asynchronous, LLM-driven process reads them with prior context. It writes records in each configured strategy's schema. Strategies run independently and in parallel. Events are processed in timestamp order.
- Consolidation. For each new record, the service retrieves the most similar existing records in the same namespace and strategy. An LLM then chooses ADD, UPDATE or NO-OP. Recency wins a conflict. Outdated records are "marked as INVALID instead of instantly deleting them", which the post calls an immutable audit trail.
- Failure handling. Consolidation retries with exponential backoff. If it still fails, the new record is added anyway rather than lost, which can leave a duplicate or a contradiction behind.
| Kind | Who runs the model | What you control |
|---|---|---|
| Built-in: semantic, user preference, summary | AWS | Namespaces only |
| Built-in with overrides | AWS, calling Bedrock in your account | Appended prompt instructions and the model. The output schema is fixed |
| Self-managed | You | Everything. Records go in through the batch APIs |
These are AWS's own benchmarks of its own system, run in 2025.
| Strategy | Dataset | Correctness | Compression |
|---|---|---|---|
| Full-history RAG baseline | LoCoMo / LongMemEval-S / PrefEval | 77.7% / 75.2% / 51% | 0% |
| Semantic | LoCoMo / LongMemEval-S | 70.6% / 73.6% | 89% / 94% |
| User preference | PrefEval | 79% | 68% |
| Summary | PolyBench-QA | 83.0% | 95% |
- Extraction and consolidation take 20–40 seconds after extraction is triggered.
-
RetrieveMemoryRecordsreturns in about 200 ms.
The post's advice is to choose strategies deliberately and design namespaces per actor. It also says to review what consolidation keeps and skips, and to plan for the asynchronous delay.
| Claim | Verdict | Primary source |
|---|---|---|
| Built-in strategies use an AWS-chosen model |
Verified, with a consequence the post omits. AgentCore Memory uses geography-bounded cross-Region inference. From us-west-2, it can run inference in us-east-1, us-east-2 or us-west-2. To avoid that, AWS points to built-in with overrides |
cross-region-inference.html |
| Overrides let you pick the model | Verified. They need a memoryExecutionRoleArn that the service assumes to call Bedrock. "LLM usage for extraction and consolidation will be charged separately to your AWS account." |
memory-custom-strategy.html |
| Every built-in step can be overridden | Not for summary. Semantic and user preference expose extraction and consolidation. Summary exposes consolidation only | memory-custom-strategy.html |
| Built-in pricing covers the model | Verified. Built-in strategies "include automatic processing". Overrides store records at $0.25 instead of $0.75 per 1,000, but bill model usage separately | AgentCore pricing page, read 2026-10-30 |
| Outdated records are kept as INVALID |
Not confirmed. The streaming docs list consolidation "de-duplication/superseding" as a deletion trigger. MemoryRecordOutput.status has only SUCCEEDED and FAILED. No API that we found exposes an INVALID record |
memory-record-streaming.html, API_MemoryRecordOutput.html
|
| Extraction is asynchronous | Verified. The CDK README says strategies run "after every few turns", so the 20–40 s starts at a trigger, not at the event |
memory-types.html, aws-cdk-lib aws_bedrockagentcore README |
| Namespace hierarchy |
ListMemoryRecords takes either an exact namespace or a hierarchical namespacePath. Whether RetrieveMemoryRecords accepts a prefix was not checked
|
boto3 list_memory_records
|
The built-in semantic prompt says "Extract information ONLY from the user
messages", and uses assistant messages only as context
(memory-custom-strategy.html).
-
Spec 003's Memory plan conflicts with its own inference rule. The plan uses one
CfnMemorywith the built-in semantic, summary and user-preference strategies (research.md§ Q8). But Q0 allows in-Region inference only: the Free plan documents no cross-Region inference. On 2026-10-29, the builder chose not to rely on it, even though S0 found that it works (Decision-LLM-Model-Selection). This is the same trap as Source-AgentCore-Evaluations.The builder clarified on 2026-10-30 that this stance is not absolute. It is driven by the budget (Concept-Budget-Ceiling): cross-Region routing out of
us-west-2was avoided because it might cost more. That changes the calculation for Memory. AWS documents "no additional cost for using cross-region inference" for AgentCore Memory, and built-in pricing already includes the extraction model. The cost reason may therefore not apply here.research.mdgives Free-plan enforcement risk as the reason. But the builder also ruled that the temporary Free plan rejects nothing (Decision-AWS-Account-Plan), so that reason lapses when the account upgrades in December 2026. The spec still needs to reconcile this. Three ways out, none chosen:- Built-in with overrides, using Nova Lite v1, the only S0-eligible model. It adds an execution role (P11) and model usage that the breaker must count. Summary cannot override extraction, so it may still run cross-Region. That is unverified, and dropping summary is one answer.
-
Self-managed. The runtime extracts and calls the batch APIs.
memoryAdapter.tsalready stores records this way withBatchCreateMemoryRecords, whichmemory-api.mdplans to remove. - Built-ins as planned. This accepts cross-Region inference, against Q0 as written. On cost alone it is likely the cheapest option at our scale, because there is no model bill and no execution role. Its only other objection, the Free plan, is temporary.
Choosing one is a spec 003 clarification, not a wiki edit: it changes the cost model and needs a constitution check.
-
The R-cost "extraction model cost" row now has an answer, and it depends on the choice. Built-in strategies include extraction in their storage price. Overrides bill it as Bedrock usage, which triggers the
PRICE_MEMORY_EXTRACTION_*branch incontracts/runtime-config.md. See Source-AgentCore-Pricing. -
Forget-me and the 30-day window may not reach superseded content. If consolidation keeps INVALID records out of reach of
ListMemoryRecords, then the all-or-errormemory.forgetand the pruner could report success while superseded text survives. That would break FR-053 and constitution:236. The docs model supersession as deletion, so this may be a non-issue. It is unverified, and only AWS can settle it. -
The async delay is already designed around. Spec 003 keeps in-session history in the per-session
Agent(N2), so a fact said this session does not depend on extraction. The quickstart records the observed extraction time instead of assuming one, and the post's 20–40 s gives that a baseline. -
User-only extraction suits the character. Max's in-character claims are not extracted about the friend, at least by the semantic prompt. An override would keep that rule only if it appends to the default prompt, which AWS recommends.
-
Namespaces already follow the advice. They are per actor (
/max-height/{actorId}/…), and spec 003 makes the actor the verified tokensub, which closes #55's spoofing for memory too.
Unverified:
- Whether summary-strategy extraction runs cross-Region under an override.
- Whether superseded records persist anywhere, and for how long.
- AWS's introductory Memory post says built-in strategies ignore PII by default. Whether a display name counts, and so whether the alias helper still has a job, was not checked against the docs.
- Whether a built-in strategy call fails on a Free-plan account. S0 suggests cross-Region calls may work today. This matters only until the upgrade (Decision-AWS-Account-Plan).
See also: Component-Agent-Runtime, Concept-Budget-Ceiling, Source-AgentCore-Platform-2026.
- Concept-Cloud-Only-Inference
- Concept-Budget-Ceiling
- Concept-Personality-Gate
- Concept-IP-And-Legal-Posture
- Concept-Supply-Chain-Discipline
- Concept-Graceful-Degradation
- Concept-Observability
- Concept-Testing-And-TDD
- Concept-Credential-Hygiene
Editing in the browser? Wiki edits are live and bypass wiki:lint. Read
Guide-Wiki-Contributing first.