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 questions about PolarDB memory management, search for the DingTalk group number to join the group for assistance. You can @ an expert in the group and include your question. DingTalk group number: 34560007316.
How it works
PolarDB memory management, in your PolarDB for PostgreSQL cluster, creates an isolated Schema for storing and managing memory for AI applications. When your application interacts with a user, it sends conversation content to the memory management service. Internally, the service uses a large language model (LLM) to automatically extract, summarize, and structure information before storing the processed memories in PolarDB. In subsequent interactions, the application can retrieve relevant memories from the service at any time and inject them as context into new prompts, enabling the LLM to provide 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
Schemato ensure data isolation.Long-term memory: Information persistently stored in PolarDB. It retains knowledge across different stages and records:
Factual memory: User preferences, account details, and domain facts.
Episodic memory: Summaries of past interactions or completed tasks.
Semantic memory: Relationships between concepts that enable an AI agent to 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.
Applicability
Before you use PolarDB memory management, make sure that your environment meets the following conditions. This section helps you quickly determine whether the feature is suitable for you; it is not an operational preparation checklist.
Cluster type: Centralized PolarDB for PostgreSQL clusters are supported. PolarDB for PostgreSQL Distributed Edition clusters are not currently supported.
Database engine: PostgreSQL 16.
Billing
Component fees: PolarDB memory management charges for resource components. Fees are calculated based on the component specifications (CPU and memory) that you select and the purchase duration.
Single component pricing
Chinese mainland
Node specification
CPU and memory
Subscription (CNY/month)
Pay-as-you-go (CNY/hour)
polar.app.g1.tiny
1 core 1 GB
11
0.02
polar.app.g2.small
1 core 2 GB
18
0.04
polar.app.g2.medium
2 cores 4 GB
250
0.52
polar.app.g4.medium
2 cores 8 GB
270
0.56
polar.app.g8.medium
2 cores 16 GB
330
0.6875
polar.app.g2.large
4 cores 8 GB
475
0.99
polar.app.g4.large
4 cores 16 GB
630
1.31
polar.app.g8.large
4 cores 32 GB660
1.375
polar.app.g2.xlarge
8 cores 16 GB
1,000
2.08
polar.app.g4.xlarge
8 cores 32 GB
1,240
2.58
polar.app.g8.xlarge
8 cores 64 GB1,320
2.75
polar.app.g2.2xlarge
16 cores 32 GB
2,000
4.17
polar.app.g4.2xlarge
16 cores 64 GB
2,400
5.00
polar.app.g8.2xlarge
16 cores 128 GB2,640
5.5
polar.app.g2.4xlarge
32 cores 64 GB4,000
8.32
polar.app.g4.4xlarge
32 cores 128 GB4,320
8.96
polar.app.g8.4xlarge
32 cores 256 GB5,280
11
China (Hong Kong)
Node specification
CPU and memory
Subscription (CNY/mo)
Pay-as-you-go (CNY/hr)
polar.app.g1.tiny
1 core 1 GB
17.6
0.032
polar.app.g2.small
1 core 2 GB
28.8
0.064
polar.app.g2.medium
2 cores 4 GB
400
0.832
polar.app.g4.medium
2 cores 8 GB
432
0.896
polar.app.g8.medium
2 cores 16 GB528
1.100
polar.app.g2.large
4 cores 8 GB
760
1.584
polar.app.g4.large
4 cores 16 GB
1,008
2.096
polar.app.g8.large
4 cores 32 GB1,056
2.200
polar.app.g2.xlarge
8 cores 16 GB
1,600
3.330
polar.app.g4.xlarge
8 cores 32 GB
1,984
4.130
polar.app.g8.xlarge
8 cores 64 GB2,112
4.400
polar.app.g2.2xlarge
16 cores 32 GB
3,200
6.670
polar.app.g4.2xlarge
16 cores 64 GB
3,840
8.000
polar.app.g8.2xlarge
16 cores 128 GB4,224
8.800
Japan (Tokyo)
Node specification
CPU and memory
Subscription (CNY/mo)
Pay-as-you-go (CNY/hr)
polar.app.g1.tiny
1 core 1 GB
17.6
0.032
polar.app.g2.small
1 core 2 GB
28.8
0.064
polar.app.g2.medium
2 cores 4 GB
400
0.832
polar.app.g4.medium
2 cores 8 GB
432
0.896
polar.app.g8.medium
2 cores 16 GB528
1.100
polar.app.g2.large
4 cores 8 GB
760
1.584
polar.app.g4.large
4 cores 16 GB
1,008
2.096
polar.app.g8.large
4 cores 32 GB1,056
2.200
polar.app.g2.xlarge
8 cores 16 GB
1,600
3.330
polar.app.g4.xlarge
8 cores 32 GB
1,984
4.130
polar.app.g8.xlarge
8 cores 64 GB2,112
4.400
polar.app.g2.2xlarge
16 cores 32 GB
3,200
6.670
polar.app.g4.2xlarge
16 cores 64 GB
3,840
8.000
polar.app.g8.2xlarge
16 cores 128 GB4,224
8.800
South Korea (Seoul)
Node specification
CPU and memory
Subscription (CNY/mo)
Pay-as-you-go (CNY/hr)
polar.app.g1.tiny
1 core 1 GB
17.6
0.032
polar.app.g2.small
1 core 2 GB
28.8
0.064
polar.app.g2.medium
2 cores 4 GB
400
0.832
polar.app.g4.medium
2 cores 8 GB
432
0.896
polar.app.g8.medium
2 cores 16 GB528
1.100
polar.app.g2.large
4 cores 8 GB
760
1.584
polar.app.g4.large
4 cores 16 GB
1,008
2.096
polar.app.g8.large
4 cores 32 GB1,056
2.200
polar.app.g2.xlarge
8 cores 16 GB
1,600
3.330
polar.app.g4.xlarge
8 cores 32 GB
1,984
4.130
polar.app.g8.xlarge
8 cores 64 GB2,112
4.400
polar.app.g2.2xlarge
16 cores 32 GB
3,200
6.670
polar.app.g4.2xlarge
16 cores 64 GB
3,840
8.000
polar.app.g8.2xlarge
16 cores 128 GB4,224
8.800
Singapore
Node specification code
CPU and memory
Subscription (CNY/month)
Pay-as-you-go (CNY/hour)
polar.app.g1.tiny
1 core 1 GB
17.6
0.032
polar.app.g2.small
1 core 2 GB
28.8
0.064
polar.app.g2.medium
2 cores 4 GB
400
0.832
polar.app.g4.medium
2 cores 8 GB
432
0.896
polar.app.g8.medium
2 cores 16 GB528
1.100
polar.app.g2.large
4 cores 8 GB
760
1.584
polar.app.g4.large
4 cores 16 GB
1,008
2.096
polar.app.g8.large
4 cores 32 GB1,056
2.200
polar.app.g2.xlarge
8 cores 16 GB
1,600
3.330
polar.app.g4.xlarge
8 cores 32 GB
1,984
4.130
polar.app.g8.xlarge
8 cores 64 GB2,112
4.400
polar.app.g2.2xlarge
16 cores 32 GB
3,200
6.670
polar.app.g4.2xlarge
16 cores 64 GB
3,840
8.000
polar.app.g8.2xlarge
16 cores 128 GB4,224
8.800
polar.app.g2.4xlarge
32 cores 64 GB6,400
13.310
polar.app.g4.4xlarge
32 cores 128 GB6,912
14.340
polar.app.g8.4xlarge
32 cores 256 GB8,448
17.600
Malaysia (Kuala Lumpur)
Node specification
CPU and memory
Subscription (CNY/mo)
Pay-as-you-go (CNY/hr)
polar.app.g1.tiny
1 core 1 GB
17.6
0.032
polar.app.g2.small
1 core 2 GB
28.8
0.064
polar.app.g2.medium
2 cores 4 GB
400
0.832
polar.app.g4.medium
2 cores 8 GB
432
0.896
polar.app.g8.medium
2 cores 16 GB528
1.100
polar.app.g2.large
4 cores 8 GB
760
1.584
polar.app.g4.large
4 cores 16 GB
1,008
2.096
polar.app.g8.large
4 cores 32 GB1,056
2.200
polar.app.g2.xlarge
8 cores 16 GB
1,600
3.330
polar.app.g4.xlarge
8 cores 32 GB
1,984
4.130
polar.app.g8.xlarge
8 cores 64 GB2,112
4.400
polar.app.g2.2xlarge
16 cores 32 GB
3,200
6.670
polar.app.g4.2xlarge
16 cores 64 GB
3,840
8.000
polar.app.g8.2xlarge
16 cores 128 GB4,224
8.800
Indonesia (Jakarta)
Node specification
CPU and memory
Subscription (CNY/month)
Pay-as-you-go (CNY/hour)
polar.app.g1.tiny
1 core 1 GB
15.4
0.028
polar.app.g2.small
1 core 2 GB
25.2
0.056
polar.app.g2.medium
2 cores 4 GB
350
0.728
polar.app.g4.medium
2 cores 8 GB
378
0.784
polar.app.g8.medium
2 cores 16 GB462
0.9625
polar.app.g2.large
4 cores 8 GB
665
1.386
polar.app.g4.large
4 cores 16 GB
882
1.834
polar.app.g8.large
4 cores 32 GB924
1.925
polar.app.g2.xlarge
8 cores 16 GB
1,400
2.910
polar.app.g4.xlarge
8 cores 32 GB
1,736
3.610
polar.app.g8.xlarge
8 cores 64 GB1,848
3.850
polar.app.g2.2xlarge
16 cores 32 GB
2,800
5.840
polar.app.g4.2xlarge
16 cores 64 GB
3,360
7.000
polar.app.g8.2xlarge
16 cores 128 GB3,696
7.700
polar.app.g2.4xlarge
32 cores 64 GB5,600
11.650
polar.app.g4.4xlarge
32 cores 128 GB6,048
12.540
polar.app.g8.4xlarge
32 cores 256 GB7,392
15.400
Philippines
Specification
CPU and memory
Subscription (CNY/month)
Pay-as-you-go (CNY/hour)
polar.app.g1.tiny
1 core 1 GB
15.4
0.028
polar.app.g2.small
1 core 2 GB
25.2
0.056
polar.app.g2.medium
2 cores 4 GB
350
0.728
polar.app.g4.medium
2 cores 8 GB
378
0.784
polar.app.g8.medium
2 cores 16 GB462
0.9625
polar.app.g2.large
4 cores 8 GB
665
1.386
polar.app.g4.large
4 cores 16 GB
882
1.834
polar.app.g8.large
4 cores 32 GB924
1.925
polar.app.g2.xlarge
8 cores 16 GB
1,400
2.910
polar.app.g4.xlarge
8 cores 32 GB
1,736
3.610
polar.app.g8.xlarge
8 cores 64 GB1,848
3.850
polar.app.g2.2xlarge
16 cores 32 GB
2,800
5.840
polar.app.g4.2xlarge
16 cores 64 GB
3,360
7.000
polar.app.g8.2xlarge
16 cores 128 GB3,696
7.700
Thailand (Bangkok)
Specification
CPU and memory
Subscription (CNY/month)
Pay-as-you-go (CNY/hour)
polar.app.g1.tiny
1 core 1 GB
15.4
0.028
polar.app.g2.small
1 core 2 GB
25.2
0.056
polar.app.g2.medium
2 cores 4 GB
350
0.728
polar.app.g4.medium
2 cores 8 GB
378
0.784
polar.app.g8.medium
2 cores 16 GB462
0.9625
polar.app.g2.large
4 cores 8 GB
665
1.386
polar.app.g4.large
4 cores 16 GB
882
1.834
polar.app.g8.large
4 cores 32 GB924
1.925
polar.app.g2.xlarge
8 cores 16 GB
1,400
2.910
polar.app.g4.xlarge
8 cores 32 GB
1,736
3.610
polar.app.g8.xlarge
8 cores 64 GB1,848
3.850
polar.app.g2.2xlarge
16 cores 32 GB
2,800
5.840
polar.app.g4.2xlarge
16 cores 64 GB
3,360
7.000
polar.app.g8.2xlarge
16 cores 128 GB3,696
7.700
Germany (Frankfurt)
Specification
CPU and memory
Subscription (CNY/month)
Pay-as-you-go (CNY/hour)
polar.app.g1.tiny
1 core 1 GB
15.4
0.028
polar.app.g2.small
1 core 2 GB
25.2
0.056
polar.app.g2.medium
2 cores 4 GB
350
0.728
polar.app.g4.medium
2 cores 8 GB
378
0.784
polar.app.g8.medium
2 cores 16 GB462
0.9625
polar.app.g2.large
4 cores 8 GB
665
1.386
polar.app.g4.large
4 cores 16 GB
882
1.834
polar.app.g8.large
4 cores 32 GB924
1.925
polar.app.g2.xlarge
8 cores 16 GB
1,400
2.910
polar.app.g4.xlarge
8 cores 32 GB
1,736
3.610
polar.app.g8.xlarge
8 cores 64 GB1,848
3.850
polar.app.g2.2xlarge
16 cores 32 GB
2,800
5.840
polar.app.g4.2xlarge
16 cores 64 GB
3,360
7.000
polar.app.g8.2xlarge
16 cores 128 GB3,696
7.700
UK (London)
Specification
CPU and memory
Subscription (CNY/month)
Pay-as-you-go (CNY/hour)
polar.app.g1.tiny
1 core 1 GB
15.4
0.028
polar.app.g2.small
1 core 2 GB
25.2
0.056
polar.app.g2.medium
2 cores 4 GB
350
0.728
polar.app.g4.medium
2 cores 8 GB
378
0.784
polar.app.g8.medium
2 cores 16 GB462
0.9625
polar.app.g2.large
4 cores 8 GB
665
1.386
polar.app.g4.large
4 cores 16 GB
882
1.834
polar.app.g8.large
4 cores 32 GB924
1.925
polar.app.g2.xlarge
8 cores 16 GB
1,400
2.910
polar.app.g4.xlarge
8 cores 32 GB
1,736
3.610
polar.app.g8.xlarge
8 cores 64 GB1,848
3.850
polar.app.g2.2xlarge
16 cores 32 GB
2,800
5.840
polar.app.g4.2xlarge
16 cores 64 GB
3,360
7.000
polar.app.g8.2xlarge
16 cores 128 GB3,696
7.700
US (Silicon Valley)
Node specification
CPU and memory
Subscription (CNY/month)
Pay-as-you-go (CNY/hour)
polar.app.g1.tiny
1 vCPU 1 GB
13.2
0.024
polar.app.g2.small
1 vCPU 2 GB
21.6
0.048
polar.app.g2.medium
2 vCPUs 4 GB
300
0.624
polar.app.g4.medium
2 vCPUs 8 GB
324
0.672
polar.app.g8.medium
2 vCPUs 16 GB396
0.825
polar.app.g2.large
4 vCPUs 8 GB
570
1.188
polar.app.g4.large
4 vCPUs 16 GB
756
1.572
polar.app.g8.large
4 vCPUs 32 GB792
1.650
polar.app.g2.xlarge
8 vCPUs 16 GB
1,200
2.500
polar.app.g4.xlarge
8 vCPUs 32 GB
1,488
3.100
polar.app.g8.xlarge
8 vCPUs 64 GB1,584
3.300
polar.app.g2.2xlarge
16 vCPUs 32 GB
2,400
5.000
polar.app.g4.2xlarge
16 vCPUs 64 GB
2,880
6.000
polar.app.g8.2xlarge
16 vCPUs 128 GB3,168
6.600
polar.app.g2.4xlarge
32 vCPUs 64 GB4,800
9.980
polar.app.g4.4xlarge
32 vCPUs 128 GB5,184
10.750
polar.app.g8.4xlarge
32 vCPUs 256 GB6,336
13.200
US (Virginia)
Node type
CPU and memory
Subscription (CNY/month)
Pay-as-you-go (CNY/hour)
polar.app.g1.tiny
1 core 1 GB
13.2
0.024
polar.app.g2.small
1 core 2 GB
21.6
0.048
polar.app.g2.medium
2 cores 4 GB
300
0.624
polar.app.g4.medium
2 cores 8 GB
324
0.672
polar.app.g8.medium
2 cores 16 GB396
0.825
polar.app.g2.large
4 cores 8 GB
570
1.188
polar.app.g4.large
4 cores 16 GB
756
1.572
polar.app.g8.large
4 cores 32 GB792
1.650
polar.app.g2.xlarge
8 cores 16 GB
1,200
2.500
polar.app.g4.xlarge
8 cores 32 GB
1,488
3.100
polar.app.g8.xlarge
8 cores 64 GB1,584
3.300
polar.app.g2.2xlarge
16 cores 32 GB
2,400
5.000
polar.app.g4.2xlarge
16 cores 64 GB
2,880
6.000
polar.app.g8.2xlarge
16 cores 128 GB3,168
6.600
Storage fees: Data and files generated by PolarDB memory management are stored in the storage space of the PolarDB for PostgreSQL cluster.
Model fees: The models used by PolarDB memory management, such as qwen3-max, text-embedding-v4, and qwen3-rerank, are models from Alibaba Cloud Model Studio. For detailed billing rules, see Model inference pricing.
Traffic and bandwidth: No fees are charged.
References
Create memory management: Describes how to prepare a cluster environment and create PolarDB 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 of PolarDB memory management.
Access memory management from agents: Describes how to integrate memory management capabilities into an AI application through the MCP protocol.