存储项目级别的内存服务器配置(voyage、提取、快照设置)。项目范围由路由 ID 路径参数传递,组织来自该项目。在下一个 memory-config 同步后生效。
body
必需
类型化 JSON 配置
-
容量在此项目中设置 memory-server 的副本数。仅限基础设施层:从未挂载到 memory-服务器 容器本身中。
-
CustomMemoryTypes 声明了内存服务器预配的用户定义内存类型。仅创建:网关拒绝编辑或删除以前接受的声明。计数限制由 ValidateCustomMemoryTypes 强制执行,而不是结构标签,因此该常量保持单一的信息来源。binding:"max" 标签仅限于文档使用;处理程序使用 json.Decoder 进行解码,而不是 gin binding,因此它没有运行时效果;它存在的唯一目的是在生成的 OpenAPI 规范中显示限制。
不超过
5个元素。 -
LogLevel 设置项目的 memory-服务器 根日志级别。下列之一:调试、信息、警告、错误、严重错误。省略该字段以使用服务器默认值(信息);明确的空 string 将被拒绝。
取值为
debug、info、warning、error或critical。 -
MetadataPartitionIndex 根据范围内的内存类型选择哪些搜索索引类型携带分区过滤器字段,即 "向量"、"文本" 或 "两者兼而有之"。地图中省略的类型默认为仅向量腿。可自由修改 — 它只会影响新预配的索引获取哪些节点。
-
MetadataPartitionKey 声明了可过滤的元数据属性,每个在范围内的内存类型(语义、情节、程序、短期)都会将其索引为分区过滤器字段。仅创建:网关拒绝删除或更改已接受的密钥类型(允许添加)。计数限制由 ValidateMetadataPartition 强制执行,而不是结构体标签,因此,该常量保持单一的信息来源。binding:"max" 标签仅用于文档说明—处理程序使用 `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
}