View a markdown version of this page

What is Amazon OpenSearch Memory? - Amazon OpenSearch Service

What is Amazon OpenSearch Memory?

Amazon OpenSearch Memory is a fully managed memory service for AI agents. Your agent or application sends the conversations, data, and documents it works with to OpenSearch Memory as events. OpenSearch Memory extracts the facts, summaries, and other details worth keeping from those events and stores them as memories. Your agent then searches those memories to recall what it learned, across sessions and over time.

With OpenSearch Memory, you don't build or operate a memory system yourself. You don't run a vector database, write extraction prompts for common cases, or manage the pipeline that turns raw conversation into durable knowledge. You create a space, choose the kinds of memory you want, send events, and search.

Characteristics of OpenSearch Memory

Fully managed

OpenSearch Memory handles storage, indexing, extraction, and the model calls that extraction needs. There are no servers to provision, no software to patch, and no maintenance windows. You don't request access to any foundation model or grant any model permissions. OpenSearch Memory calls the extraction model on your behalf.

Write now, remember later

Writing an event is fast and durable. CreateEvent returns as soon as the event is stored. OpenSearch Memory extracts memories from the event afterward, in the background, so your agent's response time doesn't depend on how long extraction takes. For more information, see How Amazon OpenSearch Memory works.

Memories that stay current

By default, OpenSearch Memory consolidates new memories with what it already knows. When a user who said "I live in Seattle" later says "I moved to Austin," the stored fact is updated rather than duplicated or contradicted. For more information, see Consolidation.

You search memories with a subset of the OpenSearch Query DSL that you may already know, including match, neural, hybrid, and bool queries. Results come back ranked by relevance. For more information, see Searching memories and events in Amazon OpenSearch Memory.

OpenSearch Memory use cases

  • Personal assistants – Remember a user's preferences, constraints, and history so the assistant doesn't ask the same questions twice. For example, a travel assistant that recalls "prefers window seats" and "vegetarian" on every trip.

  • Customer support agents – Summarize each support session and extract case details, such as order IDs and their status, so an agent picking up a case later has the context without rereading the transcript.

  • Operational and coding agents – Record what an agent did and what happened, such as a deployment result, so later runs can recall outcomes and avoid repeating mistakes.

  • Knowledge from documents – Send PDFs and images that your agent should be able to recall, and search their content alongside conversation history.

Capabilities of OpenSearch Memory

Memory strategies

A memory strategy defines one kind of memory that a space extracts. OpenSearch Memory provides SEMANTIC strategies that extract facts, SUMMARY strategies that summarize each session, and CUSTOM strategies that extract whatever your own prompt describes. A space can use up to 10 strategies at once, each extracting from the same events. For more information, see Memory strategies in Amazon OpenSearch Memory.

Scoping by actor and session

Every event and memory belongs to an actor (the user it is about) and a session (one conversation). Searches are scoped to one actor, so one user's memories never surface for another. You can also enforce this in IAM with the osm:actorId condition key. For more information, see Identity and Access Management for Amazon OpenSearch Memory.

Retention you control

You choose how long a space keeps events (1 to 365 days) and memories (from 1 day to 10 years, or indefinitely). Expired events and memories are removed for you. For more information, see Configuring retention.

Direct writes

When your application already knows a fact, you can write it as a memory directly with CreateMemory instead of sending a conversation and waiting for extraction. For more information, see Working with memories in Amazon OpenSearch Memory.

Security

OpenSearch Memory uses AWS Identity and Access Management (IAM) to control who can create spaces and who can read and write the events and memories in them. Every operation is an IAM action with the osm prefix, authorized on the space's Amazon Resource Name (ARN). Condition keys let you limit a principal to specific actors, sessions, or strategies within a space.

OpenSearch Memory encrypts all data at rest. By default it uses an AWS owned key. You can instead use a customer managed key in AWS Key Management Service (AWS KMS) that you create and control. All requests use TLS 1.2 or later. For more information, see Security in Amazon OpenSearch Memory.

Resilience

OpenSearch Memory is a Regional service. It stores each space's events and memories redundantly across multiple Availability Zones in the AWS Region where you created the space. For more information, see Resilience in Amazon OpenSearch Memory.

Accessing OpenSearch Memory

You can work with OpenSearch Memory using the AWS Management Console, the AWS Command Line Interface (AWS CLI), the AWS SDKs, or the OpenSearch Memory API directly.

  • Console – Open the Amazon OpenSearch Service console and choose Memory in the navigation pane. The console supports creating, viewing, editing, tagging, and deleting spaces.

  • AWS CLI – OpenSearch Memory commands are under aws opensearchmemory. Each command is the operation name in lowercase words separated by hyphens, for example aws opensearchmemory create-space.

  • AWS SDKs – The service is available in every AWS SDK under the service ID OpenSearchMemory. The SDKs choose the correct endpoint for each operation, sign requests, and retry transient errors for you.

  • API – If you call the API directly, sign requests with Signature Version 4 using the service name osm. Space and tagging operations use the Regional endpoint https://osm.region.api.aws. Event and memory operations use the space's own endpoint, https://space-id.osm.region.on.aws. OpenSearch Memory doesn't have FIPS endpoints.

OpenSearch Memory is available in the following AWS Regions: US East (N. Virginia), US West (Oregon), Asia Pacific (Tokyo), and Europe (Frankfurt). For the endpoints, see Service endpoints.

Getting started with OpenSearch Memory

If you're a first-time user, we recommend that you begin with the following topics: