Stores the project-level memory server configuration (voyage, extraction, snapshot settings). The project scope is carried by the route id path parameter and the org is derived from that project. Takes effect after the next memory-config sync.
Body
Required
Typed JSON config
-
Capacity sets memory-server's replica count for this project. Infra-only: never mounted into the memory-server container itself.
-
CustomMemoryTypes declares user-defined memory types the memory server provisions. Create-only: the gateway rejects edits or removals of previously accepted declarations. The count limit is enforced by ValidateCustomMemoryTypes, not a struct tag, so the constant stays the single source of truth. The binding:"max" tag is doc-only — the handler decodes with json.Decoder, not gin binding, so it has no runtime effect; it exists solely to surface the limit in the generated OpenAPI spec.
Not more than
5elements. -
LogLevel sets the memory-server root log level for the project. One of: debug, info, warning, error, critical. Omit the field to leave the server default (info); an explicit empty string is rejected.
Values are
debug,info,warning,error, orcritical. -
MetadataPartitionIndex selects, per in-scope memory type, which search index legs carry the partition filter fields: "vector", "text", or "both". A type omitted from the map defaults to the vector leg only. Freely mutable — it only affects which legs newly-provisioned indexes get.
-
MetadataPartitionKey declares filterable metadata attributes that every in-scope memory type (semantic, episodic, procedural, short_term) indexes as a partition filter field. Create-only: the gateway rejects removing or retyping a previously accepted key (adds are allowed). The count limit is enforced by ValidateMetadataPartition, not a struct tag, so the constant stays the single source of truth. The binding:"max" tag is doc-only — the handler decodes with json.Decoder, not gin binding, so it has no runtime effect; it exists solely to surface the limit in the OpenAPI spec.
Not more than
10elements. -
Tasks tunes the memory server's background task processing.
Responses
-
Unsupported or malformed API version, an operation unavailable in the selected published contract, or an unacceptable representation (including unsupported media-type parameters or excluded SSE). Existing authentication, authorization, and rate-limit failures take precedence.
-
OK
-
Invalid config: unknown field, wrong type, or invalid enum value
-
Missing or invalid credentials
-
Caller lacks deployment-management permission
-
Config exceeds 64 KB
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
}