Skip to main content
POST /v1/memory/search

Request body

FieldTypeRequiredDescription
user_idstringUser to search memories for
querystringSearch query
app_idstringFilter to a specific application
workspace_idstringFilter to a specific workspace or team
agent_idstringFilter to a specific agent
categorystringFilter by memory category (e.g. preference, fact, instruction)
top_kintegerNumber of results to return (default: 10)

Example

curl -X POST http://localhost:8000/v1/memory/search \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "alice",
    "app_id": "app_a",
    "workspace_id": "team_1",
    "query": "dark mode",
    "top_k": 10
  }'

Response

{
  "results": [
    {
      "memory_id": "mem_3f7a1c2d9e4b",
      "content": "I prefer dark mode and short answers.",
      "category": "preference",
      "score": 0.94
    }
  ]
}