-
Notifications
You must be signed in to change notification settings - Fork 304
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Mem0Client.java: private <T> Mono<String> executePostRaw(String endpoint, T request, String operationName)
after debug i found that the request body is as follow:
{"query":"xxx","version":"v2","filters":{"system":"bifrost-agent","agent_id":"BifrostDiagnosisAgent","agent_name":"BifrostDiagnosisAgent","user_id":"default","type":"diagnosis","version":"1.0.0"},"top_k":5,"user_id":"default"}
but found error:
{"filters":["Top-level key must be a logical operator or an allowed field: ['AND', 'OR', 'NOT', 'user_id', 'agent_id', 'app_id', 'run_id', 'created_at', 'updated_at', 'timestamp', 'text', 'categories', 'metadata', 'keywords_search', 'memory_ids', 'keywords']."]}
the correct syntax is expected as below:
{
"query": "xxx",
"version": "v2",
"filters": {
"OR": [
{ "user_id": "default" },
{ "agent_id": { "in": ["BifrostDiagnosisAgent"] } },
{
"AND": [
{ "metadata": { "system": "bifrost-agent" } },
{ "metadata": { "agent_name": "BifrostDiagnosisAgent" } },
{ "metadata": { "type": "diagnosis" } },
{ "metadata": { "version": "1.0.0" } }
]
}
]
},
"top_k": 5,
"user_id": "default"
}
also,user_id, agent_id in filter is OR not AND logic, because the message in mem0 belongs to only one entity not both:
the follow logic need to fix, i think:

ref: https://docs.mem0.ai/api-reference/memory/search-memories#body-filters-metadata
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Backlog