What is memory management?
One of the core challenges of AI agent applications is forgetfulness. They cannot remember past interactions, user preferences, or long-term context.PolarDB memory management is a managed service that provides long-term memory capabilities for AI applications. It persistently stores critical information in PolarDB for PostgreSQL clusters and combines intelligent retrieval with dynamic context injection to reuse accumulated memories in subsequent interactions.
If you have any questions aboutPolarDB memory management, you can search for and join the DingTalk group to consult our experts. You can directly @ an expert in the group and describe your question. DingTalk group number: 34560007316.
How it works
PolarDB memory management creates an isolated PolarDB for PostgreSQL database schema (Schema), which is used to store and manage the memories of AI applications. When your application interacts with a user, it sends the conversation content to the memory management service. The service uses a large language model (LLM) to automatically extract, summarize, and structure the information, and stores the processed memories inPolarDB. In subsequent interactions, the application can retrieve relevant memories from the service at any time and inject them into new prompts as context, enabling the LLM to produce more accurate and coherent responses.
Core concepts
-
Memory project: An independent memory management unit that corresponds to one of your AI applications. At the database level, each project corresponds to a separate
Schema, which ensures data isolation. -
Long-term memory: Information that is persistently stored inPolarDB. It preserves knowledge across different stages and records the following:
-
Factual memory: User preferences, account details, and domain facts.
-
Episodic memory: Summaries of past interactions or completed tasks.
-
Semantic memory: Relationships between concepts, so that the agent can reason about them later.
-
-
AI agent: An AI application that you develop and that integrates memory management capabilities, such as an intelligent customer service bot or a personal assistant.
Scope of application
Before you usePolarDB memory management, make sure that your environment meets the following conditions. This section helps you quickly determine whether the feature applies to you. It is not an operation preparation checklist.
-
Cluster type: CentralizedPolarDB for PostgreSQL clusters are supported.PolarDB for PostgreSQL Distributed Edition clusters are not supported.
-
Database engine: PostgreSQL 16.
Billing
-
Component fees: PolarDB memory management charges resource component fees. The fees are calculated based on the component specifications (CPU and memory) and the purchase duration that you select.
-
Storage fees: PolarDB memory management generates data and files, which are stored in the PolarDB for PostgreSQL cluster storage.
-
Model fees: PolarDB memory management uses models such as qwen3-max, text-embedding-v4, and qwen3-rerank, all of which are provided by Alibaba Cloud Model Studio. For more information about the billing rules, seeModel inference pricing.
-
Traffic and bandwidth: Free of charge.
Related documentation
-
Create memory management: Describes how to prepare a cluster environment and createPolarDB memory management.
-
Use memory management: Describes how to obtain an endpoint, configure a whitelist, customize an extraction policy, and call API operations.
-
Summary of memory management features: Learn about the complete features ofPolarDB memory management.
-
Access memory management via MCP: Describes how to connect memory management capabilities to an AI application by using the MCP protocol.