Next upHack for Humanity: San Francisco (powered by Google Gemini)
News

AWS Outlines Three Policies for AgentCore Memory

AWS has outlined three ways to manage Amazon Bedrock AgentCore memory—TTL expiration, relevance scoring and model-based consolidation—in a nightly sample workflow.

D
Sep 10, 2026 · 2 min read

AWS has published a technical guide outlining three lifecycle policies for Amazon Bedrock AgentCore memory: time-to-live expiration, relevance-decay scoring and model-based consolidation before pruning. Together, they form a reference design for scoring, consolidating and pruning records over time.

The accompanying AWS Samples implementation runs the policies nightly through AWS Step Functions. The workflow records results for audits and sends failures to an Amazon SNS notification topic. AWS describes the repository as non-production sample code.

AWS divides agent memory into episodic, semantic and procedural types, with different retention guidance for each. The sample gives episodic memories a 90-day TTL. Separately, the guide suggests 30–60 days for summary memories, six to 12 months for semantic memories and potentially no TTL for procedural memories.

AgentCore memory does not provide built-in automatic TTL deletion, according to AWS. Instead, the sample filters ListMemoryRecords by the system-created timestamp with the BEFORE operator, then deletes the records that match.

For relevance scoring, each record receives a value from 0.0 to 1.0 based on creation recency, last-access recency and access frequency. AWS documents default weights of 0.4, 0.35 and 0.25, respectively. The other defaults are a 0.3 relevance threshold, a 45-day pruning window and 50 accesses as the maximum-frequency baseline.

Because MemoryRecordSummary does not expose a lastAccessedAt field, the design reconstructs usage data from CloudTrail GetMemoryRecord events. Each run looks back over the previous 25 hours, then merges access timestamps and counts into a persistent Amazon S3 ledger.

Low-scoring memories can move into the consolidation policy. The workflow sends batches to an Amazon Bedrock model, requesting a compact summary, a confidence score and preserved key facts. It writes the consolidated result as semantic memory before deleting the originals. AWS says a failed model call leaves the originals unchanged, while failed deletions are logged for review.

An Amazon EventBridge rule starts the Step Functions state machine each day at 2:00 a.m. UTC. The state machine expires records, scores the remaining memories, conditionally consolidates low-scoring batches, handles metrics and saves the run output. Mutation logs go to CloudWatch Logs. CloudTrail captures AgentCore memory API activity in an S3-backed trail, while a separate S3 destination stores workflow results.

AWS does not present the repository as production-ready. Its documentation tells users to consult their security and legal teams and identifies further hardening work, including S3 access logging, a secure-transport policy for SNS and Step Functions execution logging.

More news