Skip to main content
POST
/
api
/
v1
/
memory
/
search
Search Memory
curl --request POST \
  --url https://api.example.com/api/v1/memory/search \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "user_id": "<string>",
  "agent_id": "<string>",
  "app_id": "default",
  "project_id": "default",
  "method": "hybrid",
  "top_k": -1,
  "radius": 0.5,
  "include_profile": false,
  "enable_llm_rerank": false,
  "filters": {
    "AND": [
      "<unknown>"
    ],
    "OR": [
      "<unknown>"
    ]
  }
}
'
{
  "request_id": "<string>",
  "data": {
    "episodes": [
      {
        "id": "<string>",
        "user_id": "<string>",
        "session_id": "<string>",
        "timestamp": "2023-11-07T05:31:56Z",
        "summary": "<string>",
        "subject": "<string>",
        "episode": "<string>",
        "type": "<string>",
        "score": 123,
        "app_id": "default",
        "project_id": "default",
        "sender_ids": [
          "<string>"
        ],
        "atomic_facts": [
          {
            "id": "<string>",
            "content": "<string>",
            "score": 123
          }
        ]
      }
    ],
    "profiles": [
      {
        "id": "<string>",
        "user_id": "<string>",
        "profile_data": {},
        "app_id": "default",
        "project_id": "default",
        "score": 123
      }
    ],
    "agent_cases": [
      {
        "id": "<string>",
        "agent_id": "<string>",
        "session_id": "<string>",
        "task_intent": "<string>",
        "approach": "<string>",
        "quality_score": 123,
        "timestamp": "2023-11-07T05:31:56Z",
        "score": 123,
        "app_id": "default",
        "project_id": "default",
        "key_insight": "<string>"
      }
    ],
    "agent_skills": [
      {
        "id": "<string>",
        "agent_id": "<string>",
        "name": "<string>",
        "description": "<string>",
        "content": "<string>",
        "confidence": 123,
        "maturity_score": 123,
        "score": 123,
        "app_id": "default",
        "project_id": "default",
        "source_case_ids": [
          "<string>"
        ]
      }
    ],
    "unprocessed_messages": [
      {
        "id": "<string>",
        "session_id": "<string>",
        "sender_id": "<string>",
        "content": "<string>",
        "timestamp": "2023-11-07T05:31:56Z",
        "app_id": "default",
        "project_id": "default",
        "sender_name": "<string>",
        "tool_calls": [
          {}
        ],
        "tool_call_id": "<string>"
      }
    ]
  }
}

Body

application/json

Request body for POST /api/v1/memory/search. Identify the memory owner via user_id XOR agent_id — exactly one must be set.

query
string
required
Minimum string length: 1
user_id
string | null

Owner of the memories to search.

  • Must match the sender_id used in role: "user" messages when calling /add
  • Mutually exclusive with agent_id — exactly one must be set
Minimum string length: 1
agent_id
string | null

Owner of the agent memories to search (agent_case, agent_skill).

  • Must match the sender_id used in role: "assistant" messages with tool_calls when calling /add
  • Mutually exclusive with user_id — exactly one must be set
Minimum string length: 1
app_id
string
default:default
project_id
string
default:default
method
enum<string>
default:hybrid

Public method enum. RRF / LR / vector_anchored are hidden under HYBRID.

Available options:
keyword,
vector,
hybrid,
agentic
top_k
integer
default:-1
radius
number | null
Required range: 0 <= x <= 1
include_profile
boolean
default:false
enable_llm_rerank
boolean
default:false

Opt-in LLM rerank pass for HYBRID. Applies to agent_case and agent_skill fusion only. Ignored by keyword / vector / agentic.

filters
FilterNode · object

One Filters DSL node. Recursive AND / OR arrays mix with arbitrary scalar fields at the same level.

Response

Successful Response

Top-level response envelope.

request_id
string
required
data
SearchData · object
required

Body of response.data. All five arrays are always present so client code can iterate without branching on owner_type.