Search API
Query memories semantically using natural language.Search Memories
| Parameter | Type | Required | Description |
|---|---|---|---|
space_id | string | Yes | Which space to search |
query | string | Yes | Natural language query |
limit | integer | No | Max results, 1–100 (default: 10) |
filters | object | No | Optional filters (e.g. memory type) |
| Field | Type | Description |
|---|---|---|
relevance_score | number | 0.0–1.0, higher = more relevant |
client.search() returns the results list directly (empty list if no matches).
How Semantic Search Works
Search understands meaning, not just keywords - “Where does Alice work?”, “Alice’s employer”, and “What company is Alice at?” all surface the same memory. Your query is embedded and compared against stored memory embeddings; results are ranked byrelevance_score.
Error Responses
Same shape as other endpoints - see the error reference.| Status | Code | Cause |
|---|---|---|
| 400 | bad_request | Missing query or space_id |
| 401 | unauthorized | Missing/invalid API key |
| 403 | forbidden | Space not owned by your org |
| 404 | not_found | Space doesn’t exist |
| 429 | rate_limited | Quota or rate limit exceeded |
Next Steps
Insights API
Synthesize learned patterns
Concepts
Learn how semantic search works