One core challenge of AI agents is their inability to remember. They forget past interactions, user preferences, and long-term context. PolarDB Memory Management is a managed service that gives AI applications long-term memory. It stores key information in a PolarDB cluster. Using intelligent retrieval and dynamic context injection, it helps your AI application remember everything so you can build smarter, more personalized user experiences.
How it works
PolarDB memory management creates an isolated Schema in your PolarDB for PostgreSQL cluster to store and manage the memory of your 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 information. It then stores the processed memory in PolarDB. In subsequent interactions, the application can retrieve relevant memories from the service at any time. It injects these memories as context into new prompts. This allows the LLM to provide more accurate and consistent 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 an independent
Schemato ensure data isolation. -
Long-term Memory: Information that is persistently stored in PolarDB. It saves knowledge across different stages and records the following:
-
Factual memory: User preferences, account details, and domain-specific facts.
-
Episodic memory: Summaries of past interactions or completed tasks.
-
Semantic memory: Relationships between concepts, which allows the agent to reason about them later.
-
-
AI Agent: Your AI application that integrates memory management capabilities, such as an intelligent chatbot or a personal assistant.
Scope
Before you use PolarDB memory management, make sure your environment meets the following conditions. This section helps you quickly determine if the feature is suitable for you, and is not a preparation guide.
-
Cluster type: Centralized PolarDB for PostgreSQL clusters. PolarDB for PostgreSQL Distributed Edition clusters are not supported.
-
Database engine: PostgreSQL 16.
Billing
-
Component fees: PolarDB memory management charges fees for resource components. The fees are calculated based on the component specifications (CPU and memory) you select and the subscription duration.
Single component pricing
Chinese mainland
Node specification
CPU and memory
Subscription (USD/month)
Pay-as-you-go (USD/hour)
polar.app.g1.tiny
1 core 1 GB1.65
0.0029
polar.app.g2.small
1 core 2 GB2.71
0.0058
polar.app.g2.medium
2 cores 4 GB37.59
0.0753
polar.app.g4.medium
2 cores 8 GB40.60
0.0810
polar.app.g2.large
4 cores 8 GB71.43
0.1433
polar.app.g4.large
4 cores 16 GB94.74
0.1896
polar.app.g2.xlarge
8 cores 16 GB150.38
0.3010
polar.app.g4.xlarge
8 cores 32 GB186.47
0.3734
polar.app.g2.2xlarge
16 cores 32 GB300.75
0.6035
polar.app.g4.2xlarge
16 cores 64 GB360.90
0.7236
polar.app.g2.4xlarge
32 cores 64 GB601.50
1.2041
polar.app.g4.4xlarge
32 cores 128 GB649.62
1.2967
China (Hong Kong)
Node specification
CPU and memory
Subscription (USD/mo)
Pay-as-you-go (USD/hr)
polar.app.g1.tiny
1 core 1 GB2.65
0.0046
polar.app.g2.small
1 core 2 GB4.33
0.0093
polar.app.g2.medium
2 cores 4 GB60.15
0.1204
polar.app.g4.medium
2 cores 8 GB64.96
0.1297
polar.app.g2.large
4 cores 8 GB114.29
0.2292
polar.app.g4.large
4 cores 16 GB151.58
0.3033
polar.app.g2.xlarge
8 cores 16 GB240.60
0.4819
polar.app.g4.xlarge
8 cores 32 GB298.35
0.5977
polar.app.g2.2xlarge
16 cores 32 GB481.20
0.9653
polar.app.g4.2xlarge
16 cores 64 GB577.44
1.1577
Japan (Tokyo)
Node specification
CPU and memory
Subscription (USD/mo)
Pay-as-you-go (USD/hr)
polar.app.g1.tiny
1 core 1 GB2.65
0.0046
polar.app.g2.small
1 core 2 GB4.33
0.0093
polar.app.g2.medium
2 cores 4 GB60.15
0.1204
polar.app.g4.medium
2 cores 8 GB64.96
0.1297
polar.app.g2.large
4 cores 8 GB114.29
0.2292
polar.app.g4.large
4 cores 16 GB151.58
0.3033
polar.app.g2.xlarge
8 cores 16 GB240.60
0.4819
polar.app.g4.xlarge
8 cores 32 GB298.35
0.5977
polar.app.g2.2xlarge
16 cores 32 GB481.20
0.9653
polar.app.g4.2xlarge
16 cores 64 GB577.44
1.1577
South Korea (Seoul)
Node specification
CPU and memory
Subscription (USD/mo)
Pay-as-you-go (USD/hr)
polar.app.g1.tiny
1 core 1 GB2.65
0.0046
polar.app.g2.small
1 core 2 GB4.33
0.0093
polar.app.g2.medium
2 cores 4 GB60.15
0.1204
polar.app.g4.medium
2 cores 8 GB64.96
0.1297
polar.app.g2.large
4 cores 8 GB114.29
0.2292
polar.app.g4.large
4 cores 16 GB151.58
0.3033
polar.app.g2.xlarge
8 cores 16 GB240.60
0.4819
polar.app.g4.xlarge
8 cores 32 GB298.35
0.5977
polar.app.g2.2xlarge
16 cores 32 GB481.20
0.9653
polar.app.g4.2xlarge
16 cores 64 GB577.44
1.1577
Singapore
Node specification code
CPU and memory
Subscription (USD/month)
Pay-as-you-go (USD/hour)
polar.app.g1.tiny
1 core 1 GB2.65
0.0046
polar.app.g2.small
1 core 2 GB4.33
0.0093
polar.app.g2.medium
2 cores 4 GB60.15
0.1204
polar.app.g4.medium
2 cores 8 GB64.96
0.1297
polar.app.g2.large
4 cores 8 GB114.29
0.2292
polar.app.g4.large
4 cores 16 GB151.58
0.3033
polar.app.g2.xlarge
8 cores 16 GB240.60
0.4819
polar.app.g4.xlarge
8 cores 32 GB298.35
0.5977
polar.app.g2.2xlarge
16 cores 32 GB481.20
0.9653
polar.app.g4.2xlarge
16 cores 64 GB577.44
1.1577
polar.app.g2.4xlarge
32 cores 64 GB962.41
1.9262
polar.app.g4.4xlarge
32 cores 128 GB1,039.40
2.0753
Malaysia (Kuala Lumpur)
Node specification
CPU and memory
Subscription (USD/mo)
Pay-as-you-go (USD/hr)
polar.app.g1.tiny
1 core 1 GB2.65
0.0046
polar.app.g2.small
1 core 2 GB4.33
0.0093
polar.app.g2.medium
2 cores 4 GB60.15
0.1204
polar.app.g4.medium
2 cores 8 GB64.96
0.1297
polar.app.g2.large
4 cores 8 GB114.29
0.2292
polar.app.g4.large
4 cores 16 GB151.58
0.3033
polar.app.g2.xlarge
8 cores 16 GB240.60
0.4819
polar.app.g4.xlarge
8 cores 32 GB298.35
0.5977
polar.app.g2.2xlarge
16 cores 32 GB481.20
0.9653
polar.app.g4.2xlarge
16 cores 64 GB577.44
1.1577
Indonesia (Jakarta)
Node specification
CPU and memory
Subscription (USD/month)
Pay-as-you-go (USD/hour)
polar.app.g1.tiny
1 core 1 GB2.32
0.0041
polar.app.g2.small
1 core 2 GB3.79
0.0081
polar.app.g2.medium
2 cores 4 GB52.63
0.1054
polar.app.g4.medium
2 cores 8 GB56.84
0.1135
polar.app.g2.large
4 cores 8 GB100.00
0.2006
polar.app.g4.large
4 cores 16 GB132.63
0.2654
polar.app.g2.xlarge
8 cores 16 GB210.53
0.4211
polar.app.g4.xlarge
8 cores 32 GB261.05
0.5224
polar.app.g2.2xlarge
16 cores 32 GB421.05
0.8452
polar.app.g4.2xlarge
16 cores 64 GB505.26
1.0130
polar.app.g2.4xlarge
32 cores 64 GB842.11
1.6860
polar.app.g4.4xlarge
32 cores 128 GB909.47
1.8148
Philippines
Specification
CPU and memory
Subscription (USD/month)
Pay-as-you-go (USD/hour)
polar.app.g1.tiny
1 core 1 GB2.32
0.0041
polar.app.g2.small
1 core 2 GB3.79
0.0081
polar.app.g2.medium
2 cores 4 GB52.63
0.1054
polar.app.g4.medium
2 cores 8 GB56.84
0.1135
polar.app.g2.large
4 cores 8 GB100.00
0.2006
polar.app.g4.large
4 cores 16 GB132.63
0.2654
polar.app.g2.xlarge
8 cores 16 GB210.53
0.4211
polar.app.g4.xlarge
8 cores 32 GB261.05
0.5224
polar.app.g2.2xlarge
16 cores 32 GB421.05
0.8452
polar.app.g4.2xlarge
16 cores 64 GB505.26
1.0130
Thailand (Bangkok)
Specification
CPU and memory
Subscription (USD/month)
Pay-as-you-go (USD/hour)
polar.app.g1.tiny
1 core 1 GB2.32
0.0041
polar.app.g2.small
1 core 2 GB3.79
0.0081
polar.app.g2.medium
2 cores 4 GB52.63
0.1054
polar.app.g4.medium
2 cores 8 GB56.84
0.1135
polar.app.g2.large
4 cores 8 GB100.00
0.2006
polar.app.g4.large
4 cores 16 GB132.63
0.2654
polar.app.g2.xlarge
8 cores 16 GB210.53
0.4211
polar.app.g4.xlarge
8 cores 32 GB261.05
0.5224
polar.app.g2.2xlarge
16 cores 32 GB421.05
0.8452
polar.app.g4.2xlarge
16 cores 64 GB505.26
1.0130
Germany (Frankfurt)
Specification
CPU and memory
Subscription (USD/month)
Pay-as-you-go (USD/hour)
polar.app.g1.tiny
1 core 1 GB2.32
0.0041
polar.app.g2.small
1 core 2 GB3.79
0.0081
polar.app.g2.medium
2 cores 4 GB52.63
0.1054
polar.app.g4.medium
2 cores 8 GB56.84
0.1135
polar.app.g2.large
4 cores 8 GB100.00
0.2006
polar.app.g4.large
4 cores 16 GB132.63
0.2654
polar.app.g2.xlarge
8 cores 16 GB210.53
0.4211
polar.app.g4.xlarge
8 cores 32 GB261.05
0.5224
polar.app.g2.2xlarge
16 cores 32 GB421.05
0.8452
polar.app.g4.2xlarge
16 cores 64 GB505.26
1.0130
UK (London)
Specification
CPU and memory
Subscription (USD/month)
Pay-as-you-go (USD/hour)
polar.app.g1.tiny
1 core 1 GB2.32
0.0041
polar.app.g2.small
1 core 2 GB3.79
0.0081
polar.app.g2.medium
2 cores 4 GB52.63
0.1054
polar.app.g4.medium
2 cores 8 GB56.84
0.1135
polar.app.g2.large
4 cores 8 GB100.00
0.2006
polar.app.g4.large
4 cores 16 GB132.63
0.2654
polar.app.g2.xlarge
8 cores 16 GB210.53
0.4211
polar.app.g4.xlarge
8 cores 32 GB261.05
0.5224
polar.app.g2.2xlarge
16 cores 32 GB421.05
0.8452
polar.app.g4.2xlarge
16 cores 64 GB505.26
1.0130
US (Silicon Valley)
Node specification
CPU and memory
Subscription (USD/month)
Pay-as-you-go (USD/hour)
polar.app.g1.tiny
1 vCPU 1 GB1.98
0.0035
polar.app.g2.small
1 vCPU 2 GB3.25
0.0069
polar.app.g2.medium
2 vCPUs 4 GB45.11
0.0903
polar.app.g4.medium
2 vCPUs 8 GB48.72
0.0973
polar.app.g2.large
4 vCPUs 8 GB85.71
0.1719
polar.app.g4.large
4 vCPUs 16 GB113.68
0.2275
polar.app.g2.xlarge
8 vCPUs 16 GB180.45
0.3618
polar.app.g4.xlarge
8 vCPUs 32 GB223.76
0.4486
polar.app.g2.2xlarge
16 vCPUs 32 GB360.90
0.7236
polar.app.g4.2xlarge
16 vCPUs 64 GB433.08
0.8683
polar.app.g2.4xlarge
32 vCPUs 64 GB721.80
1.4443
polar.app.g4.4xlarge
32 vCPUs 128 GB779.55
1.5557
US (Virginia)
Node type
CPU and memory
Subscription (USD/month)
Pay-as-you-go (USD/hour)
polar.app.g1.tiny
1 core 1 GB1.98
0.0035
polar.app.g2.small
1 core 2 GB3.25
0.0069
polar.app.g2.medium
2 cores 4 GB45.11
0.0903
polar.app.g4.medium
2 cores 8 GB48.72
0.0973
polar.app.g2.large
4 cores 8 GB85.71
0.1719
polar.app.g4.large
4 cores 16 GB113.68
0.2275
polar.app.g2.xlarge
8 cores 16 GB180.45
0.3618
polar.app.g4.xlarge
8 cores 32 GB223.76
0.4486
polar.app.g2.2xlarge
16 cores 32 GB360.90
0.7236
polar.app.g4.2xlarge
16 cores 64 GB433.08
0.8683
-
Storage fees: Data and files generated by PolarDB memory management are stored in the storage space of the PolarDB for PostgreSQL cluster.
-
Traffic and bandwidth: No fees are charged.
Quick start
For more information, see Memory Management.