存储项目级内存服务器配置(航程、提取、快照设置)。项目范围由路由 ID 路径参数承载,而组织则派生自该项目。在下一次内存配置同步后生效。
body
必需
类型化JSON配置
-
容量为此项目设置内存服务器的副本数。仅限基础设施:从不安装到内存服务器容器本身。
-
CustomMemoryTypes 声明内存服务器提供的用户定义的内存类型。仅限创建:网关拒绝对先前已接受的声明进行编辑或删除。计数限制由 ValidateCustomMemoryTypes 而不是 struct 标签强制执行,因此该常量仍然是单一事实来源。绑定:“max”标签仅为 doc — 处理程序使用 json.Decoder 进行解码,而不是 gin 绑定,因此它没有运行时效果;它的存在只是为了在生成的 OpenAPI 规范中显示限制。
不超过
5个元素。 -
LogLevel 设置项目的内存服务器根日志级别。以下之一:debug、info、警告、错误、严重。省略该字段以保留服务器默认(info);显式空字符串会被拒绝。
取值为
debug、info、warning、error或critical。 -
MetadataPartitionIndex 根据范围内的内存类型选择哪些搜索索引承载分区过滤器字段:“向量”、“文本”或“两者”。地图中省略的类型默认为仅向量支线。自由可变 — 它只影响新配置的索引获得的分支。
-
MetadataPartitionKey 声明可筛选的元数据属性,每个作用域内的内存类型(语义、情景、程序、短术语)都将这些属性索引为分区过滤字段。仅限创建:网关拒绝删除或重新键入以前接受的密钥(允许添加)。计数限制由 ValidateMetadataPartition 而不是结构体标签强制执行,因此该常量仍然是单一事实来源。绑定:“max”标签仅为 doc — 处理程序使用 json.Decoder 进行解码,而不是 gin 绑定,因此它没有运行时效果;它的存在只是为了揭示 OpenAPI 规范中的限制。
不超过
10个元素。 -
任务可调整内存服务器的背景任务处理。
curl \
--request PUT 'https://agentengine.mongodb.com/api/v1/projects/{id}/memory/config' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"background_extraction": {
"snapshot": {
"delete_promoted": true,
"embed_stm_before_promotion": true,
"max_messages": 42,
"stale_minutes": 42,
"topic_shift_enabled": true,
"topic_shift_threshold": 42.0,
"ttl_days": 42
}
},
"capacity": {
"max_replicas": 42,
"min_replicas": 42
},
"custom_memory_types": [
{
"collection": "string",
"name": "string",
"tags": [
{
"name": "string"
}
]
}
],
"extraction": {
"enabled": [
"string"
],
"episodic": {
"prompt": "string"
},
"preferences": {
"prompt": "string"
},
"procedural": {
"prompt": "string"
},
"semantic": {
"prompt": "string"
},
"taxonomic": {
"prompt": "string"
}
},
"extraction_llm": {
"api_key_secret": "LLM_API_KEY",
"auth_header": "authorization",
"base_url": "string",
"model": "string",
"provider": "openai"
},
"log_level": "debug",
"metadata_partition_index": {
"additionalProperty1": [
"string"
],
"additionalProperty2": [
"string"
]
},
"metadata_partition_key": [
{
"name": "string",
"type": "string"
}
],
"short_term": {
"embed_on_write": true
},
"tasks": {
"legacy_retry": true
},
"voyage": {
"dimension": 42,
"model": "string"
}
}'
{
"background_extraction": {
"snapshot": {
"delete_promoted": true,
"embed_stm_before_promotion": true,
"max_messages": 42,
"stale_minutes": 42,
"topic_shift_enabled": true,
"topic_shift_threshold": 42.0,
"ttl_days": 42
}
},
"capacity": {
"max_replicas": 42,
"min_replicas": 42
},
"custom_memory_types": [
{
"collection": "string",
"name": "string",
"tags": [
{
"name": "string"
}
]
}
],
"extraction": {
"enabled": [
"string"
],
"episodic": {
"prompt": "string"
},
"preferences": {
"prompt": "string"
},
"procedural": {
"prompt": "string"
},
"semantic": {
"prompt": "string"
},
"taxonomic": {
"prompt": "string"
}
},
"extraction_llm": {
"api_key_secret": "LLM_API_KEY",
"auth_header": "authorization",
"base_url": "string",
"model": "string",
"provider": "openai"
},
"log_level": "debug",
"metadata_partition_index": {
"additionalProperty1": [
"string"
],
"additionalProperty2": [
"string"
]
},
"metadata_partition_key": [
{
"name": "string",
"type": "string"
}
],
"short_term": {
"embed_on_write": true
},
"tasks": {
"legacy_retry": true
},
"voyage": {
"dimension": 42,
"model": "string"
}
}
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation supports text/event-stream, which the Accept header excludes. Remove unsupported media-type parameters or accept this type with a positive q value.",
"error": 406,
"errorCode": "UNACCEPTABLE_MEDIA_TYPE",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "The requested API version is not supported. Supported versions: 2026-09-20-preview.",
"error": 406,
"errorCode": "UNSUPPORTED_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"config": {
"background_extraction": {
"snapshot": {
"delete_promoted": true,
"embed_stm_before_promotion": true,
"max_messages": 42,
"stale_minutes": 42,
"topic_shift_enabled": true,
"topic_shift_threshold": 42.0,
"ttl_days": 42
}
},
"capacity": {
"max_replicas": 42,
"min_replicas": 42
},
"custom_memory_types": [
{
"collection": "string",
"name": "string",
"tags": [
{
"name": "string"
}
]
}
],
"extraction": {
"enabled": [
"string"
],
"episodic": {
"prompt": "string"
},
"preferences": {
"prompt": "string"
},
"procedural": {
"prompt": "string"
},
"semantic": {
"prompt": "string"
},
"taxonomic": {
"prompt": "string"
}
},
"extraction_llm": {
"api_key_secret": "LLM_API_KEY",
"auth_header": "authorization",
"base_url": "string",
"model": "string",
"provider": "openai"
},
"log_level": "debug",
"metadata_partition_index": {
"additionalProperty1": [
"string"
],
"additionalProperty2": [
"string"
]
},
"metadata_partition_key": [
{
"name": "string",
"type": "string"
}
],
"short_term": {
"embed_on_write": true
},
"tasks": {
"legacy_retry": true
},
"voyage": {
"dimension": 42,
"model": "string"
}
},
"generation": 42,
"updated_at": "string"
}
{
"config": {
"background_extraction": {
"snapshot": {
"delete_promoted": true,
"embed_stm_before_promotion": true,
"max_messages": 42,
"stale_minutes": 42,
"topic_shift_enabled": true,
"topic_shift_threshold": 42.0,
"ttl_days": 42
}
},
"capacity": {
"max_replicas": 42,
"min_replicas": 42
},
"custom_memory_types": [
{
"collection": "string",
"name": "string",
"tags": [
{
"name": "string"
}
]
}
],
"extraction": {
"enabled": [
"string"
],
"episodic": {
"prompt": "string"
},
"preferences": {
"prompt": "string"
},
"procedural": {
"prompt": "string"
},
"semantic": {
"prompt": "string"
},
"taxonomic": {
"prompt": "string"
}
},
"extraction_llm": {
"api_key_secret": "LLM_API_KEY",
"auth_header": "authorization",
"base_url": "string",
"model": "string",
"provider": "openai"
},
"log_level": "debug",
"metadata_partition_index": {
"additionalProperty1": [
"string"
],
"additionalProperty2": [
"string"
]
},
"metadata_partition_key": [
{
"name": "string",
"type": "string"
}
],
"short_term": {
"embed_on_write": true
},
"tasks": {
"legacy_retry": true
},
"voyage": {
"dimension": 42,
"model": "string"
}
},
"generation": 42,
"updated_at": "string"
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}