Skip to content

[Blog] Introducing the memory retention policy for agentic memory in OpenSearch - #4201

Open
AirFunnyB wants to merge 3 commits into
opensearch-project:mainfrom
AirFunnyB:blog-agentic-memory-retention
Open

[Blog] Introducing the memory retention policy for agentic memory in OpenSearch#4201
AirFunnyB wants to merge 3 commits into
opensearch-project:mainfrom
AirFunnyB:blog-agentic-memory-retention

Conversation

@AirFunnyB

Copy link
Copy Markdown

Description

Adds a blog post introducing automatic memory lifecycle management for agentic memory in OpenSearch (the memory retention policy feature in ml-commons). The post covers:

  • Why retention matters — unbounded memory growth drives up storage and inference cost and pollutes agent context with stale information.
  • How it works — per-memory-type rules (retention_days and/or max_count) on a memory container for sessions, long-term memory, and history, enforced by a scheduled background job.
  • Key behaviors — session-cascade deletion (working memory is removed with its parent session), pinning to exempt individual memories, and the orphan sweep.
  • Opt-in by default — the feature is gated behind plugins.ml_commons.memory.retention_enabled, which defaults to false; an admin enables it explicitly.
  • Getting started — a walkthrough of enabling retention, setting a policy at container creation, updating it, and pinning critical memories.

No code changes — this PR adds blog content only.

Issues Resolved

N/A

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the BSD-3-Clause License.

Supersedes #4191, which was closed with a corrupted commit; this PR reopens the same content on a clean history.

…OpenSearch

Signed-off-by: Erfan Ballew <ballewer@amazon.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Thank you for submitting a blog post!

The blog post review process is: Submit a PR -> (Optional) Peer review -> Doc review -> Marketing review -> Published.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Hi @AirFunnyB,

It looks like you're adding a new blog post but don't have an issue mentioned. Please link this PR to an open issue using one of these keywords in the PR description:

  • Closes #issue-number
  • Fixes #issue-number
  • Resolves #issue-number

If an issue hasn't been created yet, please create one and then link it to this PR.

@kolchfa-aws kolchfa-aws self-assigned this Aug 4, 2026
@kolchfa-aws kolchfa-aws added New blog New blog post Editorial review The blog is under editorial review labels Aug 4, 2026
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>

@kolchfa-aws kolchfa-aws left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AirFunnyB Editorial review complete and rewrites applied. The blog is ready for final marketing review/publishing. cc: @pajuric

@kolchfa-aws kolchfa-aws added Done and ready to publish The blog is approved and ready to publish and removed Editorial review The blog is under editorial review labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Done and ready to publish The blog is approved and ready to publish New blog New blog post

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants