search_memory
Read-onlyIdempotent
Find stored memories that answer a question.
Use this when the user asks about something that may already be recorded, or
refers back to an earlier conversation, decision, or document. Do not use it
to follow connections out from the memories it returns; use
`query_memory_graph` for that.
Read-only. Scope is decided by the server from the signed-in account and
reported in `searched_scope`.
Args:
query: One self-contained sentence. Resolving referents from the
conversation and keeping exact identifiers intact both help it rank.
top_k: Max hits (1-50, clamped).
mode: `"hybrid"` (default) or `"events"` — both return event hits.
`"entities"` is no longer supported and returns an error; to look
an entity up by name call `find_memories_by_entity`.
principal: Restrict to content attributed to one user or team — a handle
(email or team name) or a principal id, not a name to match. More
than one match returns `principal_candidates` to re-call with.
offset: How many top-ranked results to skip, for reading further down
the same ranking. Defaults to 0, and is clamped to 200. A response
that has more behind it names the continuing offset in
`continuation`.
Returns:
`{query, mode, hits, total, hint, searched_scope}`. `hint` is a
connection map over all results (threads, entities, categories,
clusters, available_channels). Event hits may carry
`connections.sequential {prev, next}`.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | `"hybrid"` (default) or `"events"` — both return event hits. `"entities"` is no longer supported and returns an error; to look an entity up by name call `find_memories_by_entity`. | hybrid |
| query | Yes | One self-contained sentence. Resolving referents from the conversation and keeping exact identifiers intact both help it rank. | |
| top_k | No | Max hits (1-50, clamped). | |
| offset | No | How many top-ranked results to skip, for reading further down the same ranking. Defaults to 0, and is clamped to 200. A response that has more behind it names the continuing offset in `continuation`. | |
| principal | No | Restrict to content attributed to one user or team — a handle (email or team name) or a principal id, not a name to match. More than one match returns `principal_candidates` to re-call with. |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||