Searches long-term memory by type (semantic, episodic, procedural, or taxonomic). The project scope is carried by the route id path parameter and the org is derived from that project. The type selects the retrieval endpoint; per-type field validation rejects fields the target type does not accept.
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.
-
Search results
-
Invalid type, missing type, disallowed fields, or top_k outside 1-500
-
Missing or invalid credentials
-
Caller lacks read access to the project
-
Internal error
-
Memory service unreachable
curl \
--request POST 'https://agentengine.mongodb.com/api/v1/projects/{id}/memory/search' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: string" \
--data '{
"dedup_threshold": 42.0,
"deduplicate": true,
"domain": "string",
"metadata_filter": {},
"query": "string",
"rank": true,
"session_id": "string",
"similarity_threshold": 42.0,
"tags": [
"string"
],
"top_k": 42,
"type": "string",
"user_id": "string",
"visibility": "string"
}'
# Headers
Idempotency-Key: string
# Payload
{
"dedup_threshold": 42.0,
"deduplicate": true,
"domain": "string",
"metadata_filter": {},
"query": "string",
"rank": true,
"session_id": "string",
"similarity_threshold": 42.0,
"tags": [
"string"
],
"top_k": 42,
"type": "string",
"user_id": "string",
"visibility": "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"
}
{}
{}
{
"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
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}