Find memory items by exact metadata match.
Returns a list of items whose metadata.<metadata_key> equals
metadata_value. Empty result is HTTP 200 with {items: [], count: 0} —
"no match" is not an error.
Storage flattens metadata into top-level node properties (separator __),
so metadata_key="bot_topic" matches the flat prop n.bot_topic. Nested
keys can be passed as nested.key and are translated to nested__key.
Previously this route hardcoded top_k=1 and 404'd on empty; both have
been corrected here. The core search_by_metadata was also rewritten
(was returning [] for every call due to a missing method on SmartGraph).
Query Parameters
Metadata key to search
Metadata value to match
Type of memory to filter
Max results to return
Response Body
application/json
application/json
curl -X GET "https://example.com/memory/by-metadata?metadata_key=string&metadata_value=string"null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Get Maintenance Status
Get maintenance status for user's memories (read-only). Returns counts and previews of items that may need attention: - Orphaned memories (no connections) - Stale memories (older than threshold) - Low confidence items (below threshold) This is a read-only endpoint - no data is modified. Use the admin prune endpoint to take action on these items.
Get Memory Health
Get user-scoped memory health summary. Returns overall health metrics including item counts by type, a health score, and any issues detected (orphaned or stale items). This is a user-facing endpoint - data is scoped to the authenticated user's tenant.