智能体(AI Agent)应用的核心挑战之一是健忘特性——无法记住历史交互、用户偏好或长期上下文。PolarDB记忆管理是为 AI 应用提供长时记忆(Long-term Memory)能力的托管服务,将关键信息持久化存储在 PolarDB PostgreSQL 版集群中,并结合智能检索与动态上下文注入,在后续交互中复用已积累的记忆。
若您在PolarDB记忆管理上有任何问题,可通过钉钉搜索群号入群咨询。您可以直接@群内专家,并附上您要咨询的问题。钉钉群号:34560007316。
工作原理
PolarDB记忆管理在您的PolarDB PostgreSQL版集群中创建一个隔离的Schema,用于存储和管理AI应用的记忆。当您的应用与用户交互时,它会将对话内容发送给记忆管理服务。服务内部通过大语言模型(LLM)自动完成信息提取、摘要和结构化,并将处理后的记忆存入PolarDB。在后续交互中,应用可随时从服务中检索相关记忆,并将其作为上下文注入到新的Prompt中,从而让大模型做出更精准、更具连续性的回应。
核心概念
记忆项目(Memory Project):一个独立的记忆管理单元,对应您的一项AI应用。在数据库层面,每个项目对应一个独立的
Schema,确保数据隔离。长时记忆(Long-term Memory):被持久化存储在PolarDB中的信息。它能够将知识在不同的阶段保存下来,它记录了:
事实记忆(Factual memory):用户偏好、账户详情和领域事实。
情景记忆(Episodic memory):对过去交互或已完成任务的总结。
语义记忆(Semantic memory):概念之间的关系,以便智能体后续能对它们进行推理。
智能体(AI Agent):指代您开发的、集成了记忆管理能力的AI应用,例如智能客服或个人助手等。
适用范围
在使用PolarDB记忆管理前,请确认您的环境满足以下条件。本功能旨在帮助您快速判断是否适用,而非操作准备。
集群形态:集中式PolarDB PostgreSQL版集群,暂不支持PolarDB PostgreSQL分布式版集群。
数据库引擎:PostgreSQL 16。
计费说明
组件费用:PolarDB记忆管理收取资源组件费用,费用根据您选择的组件规格(CPU和内存)和购买时长计算。
单个组件价格信息
中国内地
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
11
0.02
polar.app.g2.small
1核2 GB
18
0.04
polar.app.g2.medium
2核4 GB
250
0.52
polar.app.g4.medium
2核8 GB
270
0.56
polar.app.g8.medium
2核16 GB
330
0.6875
polar.app.g2.large
4核8 GB
475
0.99
polar.app.g4.large
4核16 GB
630
1.31
polar.app.g8.large
4核32 GB660
1.375
polar.app.g2.xlarge
8核16 GB
1,000
2.08
polar.app.g4.xlarge
8核32 GB
1,240
2.58
polar.app.g8.xlarge
8核64 GB1,320
2.75
polar.app.g2.2xlarge
16核32 GB
2,000
4.17
polar.app.g4.2xlarge
16核64 GB
2,400
5.00
polar.app.g8.2xlarge
16核128 GB2,640
5.5
polar.app.g2.4xlarge
32核64 GB4,000
8.32
polar.app.g4.4xlarge
32核128 GB4,320
8.96
polar.app.g8.4xlarge
32核256 GB5,280
11
中国(香港)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
17.6
0.032
polar.app.g2.small
1核2 GB
28.8
0.064
polar.app.g2.medium
2核4 GB
400
0.832
polar.app.g4.medium
2核8 GB
432
0.896
polar.app.g8.medium
2核16 GB528
1.100
polar.app.g2.large
4核8 GB
760
1.584
polar.app.g4.large
4核16 GB
1,008
2.096
polar.app.g8.large
4核32 GB1,056
2.200
polar.app.g2.xlarge
8核16 GB
1,600
3.330
polar.app.g4.xlarge
8核32 GB
1,984
4.130
polar.app.g8.xlarge
8核64 GB2,112
4.400
polar.app.g2.2xlarge
16核32 GB
3,200
6.670
polar.app.g4.2xlarge
16核64 GB
3,840
8.000
polar.app.g8.2xlarge
16核128 GB4,224
8.800
日本(东京)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
17.6
0.032
polar.app.g2.small
1核2 GB
28.8
0.064
polar.app.g2.medium
2核4 GB
400
0.832
polar.app.g4.medium
2核8 GB
432
0.896
polar.app.g8.medium
2核16 GB528
1.100
polar.app.g2.large
4核8 GB
760
1.584
polar.app.g4.large
4核16 GB
1,008
2.096
polar.app.g8.large
4核32 GB1,056
2.200
polar.app.g2.xlarge
8核16 GB
1,600
3.330
polar.app.g4.xlarge
8核32 GB
1,984
4.130
polar.app.g8.xlarge
8核64 GB2,112
4.400
polar.app.g2.2xlarge
16核32 GB
3,200
6.670
polar.app.g4.2xlarge
16核64 GB
3,840
8.000
polar.app.g8.2xlarge
16核128 GB4,224
8.800
韩国
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
17.6
0.032
polar.app.g2.small
1核2 GB
28.8
0.064
polar.app.g2.medium
2核4 GB
400
0.832
polar.app.g4.medium
2核8 GB
432
0.896
polar.app.g8.medium
2核16 GB528
1.100
polar.app.g2.large
4核8 GB
760
1.584
polar.app.g4.large
4核16 GB
1,008
2.096
polar.app.g8.large
4核32 GB1,056
2.200
polar.app.g2.xlarge
8核16 GB
1,600
3.330
polar.app.g4.xlarge
8核32 GB
1,984
4.130
polar.app.g8.xlarge
8核64 GB2,112
4.400
polar.app.g2.2xlarge
16核32 GB
3,200
6.670
polar.app.g4.2xlarge
16核64 GB
3,840
8.000
polar.app.g8.2xlarge
16核128 GB4,224
8.800
新加坡
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
17.6
0.032
polar.app.g2.small
1核2 GB
28.8
0.064
polar.app.g2.medium
2核4 GB
400
0.832
polar.app.g4.medium
2核8 GB
432
0.896
polar.app.g8.medium
2核16 GB528
1.100
polar.app.g2.large
4核8 GB
760
1.584
polar.app.g4.large
4核16 GB
1,008
2.096
polar.app.g8.large
4核32 GB1,056
2.200
polar.app.g2.xlarge
8核16 GB
1,600
3.330
polar.app.g4.xlarge
8核32 GB
1,984
4.130
polar.app.g8.xlarge
8核64 GB2,112
4.400
polar.app.g2.2xlarge
16核32 GB
3,200
6.670
polar.app.g4.2xlarge
16核64 GB
3,840
8.000
polar.app.g8.2xlarge
16核128 GB4,224
8.800
polar.app.g2.4xlarge
32核64 GB6,400
13.310
polar.app.g4.4xlarge
32核128 GB6,912
14.340
polar.app.g8.4xlarge
32核256 GB8,448
17.600
马来西亚(吉隆坡)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
17.6
0.032
polar.app.g2.small
1核2 GB
28.8
0.064
polar.app.g2.medium
2核4 GB
400
0.832
polar.app.g4.medium
2核8 GB
432
0.896
polar.app.g8.medium
2核16 GB528
1.100
polar.app.g2.large
4核8 GB
760
1.584
polar.app.g4.large
4核16 GB
1,008
2.096
polar.app.g8.large
4核32 GB1,056
2.200
polar.app.g2.xlarge
8核16 GB
1,600
3.330
polar.app.g4.xlarge
8核32 GB
1,984
4.130
polar.app.g8.xlarge
8核64 GB2,112
4.400
polar.app.g2.2xlarge
16核32 GB
3,200
6.670
polar.app.g4.2xlarge
16核64 GB
3,840
8.000
polar.app.g8.2xlarge
16核128 GB4,224
8.800
印度尼西亚(雅加达)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
15.4
0.028
polar.app.g2.small
1核2 GB
25.2
0.056
polar.app.g2.medium
2核4 GB
350
0.728
polar.app.g4.medium
2核8 GB
378
0.784
polar.app.g8.medium
2核16 GB462
0.9625
polar.app.g2.large
4核8 GB
665
1.386
polar.app.g4.large
4核16 GB
882
1.834
polar.app.g8.large
4核32 GB924
1.925
polar.app.g2.xlarge
8核16 GB
1,400
2.910
polar.app.g4.xlarge
8核32 GB
1,736
3.610
polar.app.g8.xlarge
8核64 GB1,848
3.850
polar.app.g2.2xlarge
16核32 GB
2,800
5.840
polar.app.g4.2xlarge
16核64 GB
3,360
7.000
polar.app.g8.2xlarge
16核128 GB3,696
7.700
polar.app.g2.4xlarge
32核64 GB5,600
11.650
polar.app.g4.4xlarge
32核128 GB6,048
12.540
polar.app.g8.4xlarge
32核256 GB7,392
15.400
菲律宾
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
15.4
0.028
polar.app.g2.small
1核2 GB
25.2
0.056
polar.app.g2.medium
2核4 GB
350
0.728
polar.app.g4.medium
2核8 GB
378
0.784
polar.app.g8.medium
2核16 GB462
0.9625
polar.app.g2.large
4核8 GB
665
1.386
polar.app.g4.large
4核16 GB
882
1.834
polar.app.g8.large
4核32 GB924
1.925
polar.app.g2.xlarge
8核16 GB
1,400
2.910
polar.app.g4.xlarge
8核32 GB
1,736
3.610
polar.app.g8.xlarge
8核64 GB1,848
3.850
polar.app.g2.2xlarge
16核32 GB
2,800
5.840
polar.app.g4.2xlarge
16核64 GB
3,360
7.000
polar.app.g8.2xlarge
16核128 GB3,696
7.700
泰国(曼谷)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
15.4
0.028
polar.app.g2.small
1核2 GB
25.2
0.056
polar.app.g2.medium
2核4 GB
350
0.728
polar.app.g4.medium
2核8 GB
378
0.784
polar.app.g8.medium
2核16 GB462
0.9625
polar.app.g2.large
4核8 GB
665
1.386
polar.app.g4.large
4核16 GB
882
1.834
polar.app.g8.large
4核32 GB924
1.925
polar.app.g2.xlarge
8核16 GB
1,400
2.910
polar.app.g4.xlarge
8核32 GB
1,736
3.610
polar.app.g8.xlarge
8核64 GB1,848
3.850
polar.app.g2.2xlarge
16核32 GB
2,800
5.840
polar.app.g4.2xlarge
16核64 GB
3,360
7.000
polar.app.g8.2xlarge
16核128 GB3,696
7.700
德国(法兰克福)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
15.4
0.028
polar.app.g2.small
1核2 GB
25.2
0.056
polar.app.g2.medium
2核4 GB
350
0.728
polar.app.g4.medium
2核8 GB
378
0.784
polar.app.g8.medium
2核16 GB462
0.9625
polar.app.g2.large
4核8 GB
665
1.386
polar.app.g4.large
4核16 GB
882
1.834
polar.app.g8.large
4核32 GB924
1.925
polar.app.g2.xlarge
8核16 GB
1,400
2.910
polar.app.g4.xlarge
8核32 GB
1,736
3.610
polar.app.g8.xlarge
8核64 GB1,848
3.850
polar.app.g2.2xlarge
16核32 GB
2,800
5.840
polar.app.g4.2xlarge
16核64 GB
3,360
7.000
polar.app.g8.2xlarge
16核128 GB3,696
7.700
英国(伦敦)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
15.4
0.028
polar.app.g2.small
1核2 GB
25.2
0.056
polar.app.g2.medium
2核4 GB
350
0.728
polar.app.g4.medium
2核8 GB
378
0.784
polar.app.g8.medium
2核16 GB462
0.9625
polar.app.g2.large
4核8 GB
665
1.386
polar.app.g4.large
4核16 GB
882
1.834
polar.app.g8.large
4核32 GB924
1.925
polar.app.g2.xlarge
8核16 GB
1,400
2.910
polar.app.g4.xlarge
8核32 GB
1,736
3.610
polar.app.g8.xlarge
8核64 GB1,848
3.850
polar.app.g2.2xlarge
16核32 GB
2,800
5.840
polar.app.g4.2xlarge
16核64 GB
3,360
7.000
polar.app.g8.2xlarge
16核128 GB3,696
7.700
美国(硅谷)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
13.2
0.024
polar.app.g2.small
1核2 GB
21.6
0.048
polar.app.g2.medium
2核4 GB
300
0.624
polar.app.g4.medium
2核8 GB
324
0.672
polar.app.g8.medium
2核16 GB396
0.825
polar.app.g2.large
4核8 GB
570
1.188
polar.app.g4.large
4核16 GB
756
1.572
polar.app.g8.large
4核32 GB792
1.650
polar.app.g2.xlarge
8核16 GB
1,200
2.500
polar.app.g4.xlarge
8核32 GB
1,488
3.100
polar.app.g8.xlarge
8核64 GB1,584
3.300
polar.app.g2.2xlarge
16核32 GB
2,400
5.000
polar.app.g4.2xlarge
16核64 GB
2,880
6.000
polar.app.g8.2xlarge
16核128 GB3,168
6.600
polar.app.g2.4xlarge
32核64 GB4,800
9.980
polar.app.g4.4xlarge
32核128 GB5,184
10.750
polar.app.g8.4xlarge
32核256 GB6,336
13.200
美国(弗吉尼亚)
节点规格码
CPU和内存
包年包月(元/月)
按量付费(元/小时)
polar.app.g1.tiny
1核1 GB
13.2
0.024
polar.app.g2.small
1核2 GB
21.6
0.048
polar.app.g2.medium
2核4 GB
300
0.624
polar.app.g4.medium
2核8 GB
324
0.672
polar.app.g8.medium
2核16 GB396
0.825
polar.app.g2.large
4核8 GB
570
1.188
polar.app.g4.large
4核16 GB
756
1.572
polar.app.g8.large
4核32 GB792
1.650
polar.app.g2.xlarge
8核16 GB
1,200
2.500
polar.app.g4.xlarge
8核32 GB
1,488
3.100
polar.app.g8.xlarge
8核64 GB1,584
3.300
polar.app.g2.2xlarge
16核32 GB
2,400
5.000
polar.app.g4.2xlarge
16核64 GB
2,880
6.000
polar.app.g8.2xlarge
16核128 GB3,168
6.600
存储费用:PolarDB记忆管理所产生的数据和文件等将存储在PolarDB PostgreSQL版集群存储空间。
模型费用:PolarDB记忆管理中所使用的模型(例如qwen3-max、text-embedding-v4或qwen3-rerank等)均为阿里云大模型服务平台百炼中的模型。详细计费规则,请参见模型调用计费。
流量与带宽:不收取费用。
相关文档
创建记忆管理:介绍如何准备集群环境并创建PolarDB记忆管理。
使用记忆管理:介绍如何获取连接地址、配置白名单、自定义提取策略以及调用 API。
记忆管理特性汇总:了解PolarDB记忆管理的完整功能特性。
Agent 接入记忆管理:介绍如何通过 MCP 协议将记忆管理能力接入 AI 应用。