You need to enable JavaScript to run this app.
文档中心
AgentKit

AgentKit

复制全文
下载 pdf
Memory
UpdateMemoryCollection - 修改记忆库信息
复制全文
下载 pdf
UpdateMemoryCollection - 修改记忆库信息
修改记忆库的描述和策略信息。​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:UpdateMemoryCollection​
要执行的操作,取值:UpdateMemoryCollection。​
​
Version string 必选 示例值:2025-10-30​
API的版本,取值:2025-10-30。​
​
Description string 可选 示例值:memory-test​
记忆库描述。最多允许输入200个字符。​
​
LongTermConfiguration.Strategies.N.Name string[] 必选 示例值:s_1​
长期记忆提取策略的名称。​
  • 参数 - N:表示策略的序号,取值范围:1~5。​
  • 多个字段名之间用&分隔。​
命名规则如下:​
  • 只能包含英文字符[A-Za-z]、数字和下划线“_”。​
  • 长度限制在1~48个字符之间。​
说明​
同一个记忆库中,策略名称不可以重复。​
​
LongTermConfiguration.Strategies.N.Type string[] 必选 示例值:Summary​
长期记忆提取策略的类型。​
  • 参数 - N:表示策略的序号,取值范围:1~5。​
  • 多个字段名之间用&分隔。​
  • 取值:​
  • Summary:会话摘要(会话级别)。​
  • Semantic:语义记忆(用户级别)。​
  • UserPreference:用户偏好(用户级别)。​
​
LongTermConfiguration.Strategies.N.CustomExtractionInstructions string[] 可选 示例值:Summarize facts.​
自定义策略的系统提示词(Prompt)。​
  • 参数 - N:表示策略的序号,取值范围:1~5。​
  • 最大长度不超过8000个字符。​
说明​
不含Prompt的策略即为内置策略,每种策略类型的内置策略最多只能有一个。​
​
MemoryId string 必选 示例值:mem-17616225****​
记忆库ID。​
​
VpcConfig.VpcId string 必选 示例值:vpc-257gqcdfvx6n****​
私有网络ID。​
说明​
一旦设定后不支持变更。​
​
VpcConfig.SubnetIds.N string[] 可选 示例值:["subnet-1", "subnet-2"]​
子网ID列表。​
  • 每个子网占用一个IP用于创建网卡。​
  • 传入多个子网来实现VPC连接的高可用。​
  • 每个可用区最多传入一个子网。对于MEM0类型,最多传入一个子网。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
LongTermConfiguration object 示例值:--​
已更新的长期记忆信息。​
Strategies object[] 示例值:--​
长期记忆提取策略信息。​
CustomExtractionInstructions string 示例值:--​
长期记忆提取策略列表。​
​
Name string 示例值:my_collection​
记忆库名称。​
​
Type string 示例值:MEM0​
记忆库类型,取值:​
  • MEM0:Mem0记忆库。​
  • VIKINGDB_MEMORY:Viking长期记忆。​
​
​
​
MemoryId string 示例值:mem-17616225****​
记忆库ID。​
​
ProviderCollectionId string 示例值:mem-294775****​
已导入的记忆库ID。​
​
ProviderType string 示例值:MEM0​
记忆库类型,取值:​
  • MEM0:Mem0记忆库。​
  • VIKINGDB_MEMORY:Viking长期记忆。​
​
​
​
请求示例​
​
POST https://agentkit.cn-beijing.volcengineapi.com?Action=UpdateMemoryCollection&Version=2025-10-30 HTTP/1.1​
Content-Type: application/json​
{​
{​
"MemoryId": "mem-17611386****",​
"Description": "new Description",​
"LongTermConfiguration":{​
"Strategies":[​
{​
"Type": "Summary",​
"CustomExtractionInstructions": "Extract key information from conversation",​
"Name": "agentkit_semantic_v1"​
}​
]​
}​
}​
}​
​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "202106111445100102252431000052****",​
"Action": "UpdateMemoryCollection",​
"Version": "2025-10-10",​
"Service": "agentkit",​
"Region": "cn-beijing"​
},​
"Result": {​
"MemoryId": "mem-17611386****",​
"ProviderCollectionId": "mem-294775****",​
"ProviderType": "MEM0",​
"LongTermConfiguration": {​
"Strategies": [​
{​
"Type": "Summary",​
"CustomExtractionInstructions": "Extract key information from conversation",​
"Name": "agentkit_semantic_v1"​
}​
]​
}​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidDescription.Malformed​
The specified Description is malformed.​
指定的描述格式错误。​
400​
LimitExceeded.MinimumSubnetIds​
The number of specified SubnetIds exceeds the minimum limit.​
指定的SubnetIds超过最小限制。​
400​
MissingParameter.MemoryId​
The required parameter MemoryId is not supplied.​
参数MemoryId不能为空。​
400​
MissingParameter.VpcId​
The required parameter VpcId is not supplied.​
参数VpcId不能为空。​
400​
InvalidParameter.InvalidSubnets​
The specified subnet(s) is invalid.​
指定的子网是无效的,请检查是否正确。​
400​
InvalidParameter.Mem0VpcConfig​
The specified Mem0 VPC configuration is invalid. Only one subnet is allowed. Mem0 VPC does not allow update.​
指定的Mem0 VPC配置无效。只允许一个子网。​
400​
InvalidParameter.UpdateVpcNotAllowed​
Ajust memory or knowledge VPC ID is not allowed.​
不允许调整知识库或记忆库的VPC ID。​
400​
OperationDenied.TooManyVpcUpdates​
Too many VPC updates. Please try later.​
VPC更新过于频繁,请稍后再试。​
404​
InvalidResource.NotFound​
The specified resource does not exist.​
资源不存在​
​
​
最近更新时间:2026.02.14 11:21:12
这个页面对您有帮助吗?
有用
有用
无用
无用