Search Memories
montycat_semantic_searchSearch stored memory by semantic meaning rather than keywords to retrieve relevant facts, documents, or past context for RAG and agent memory, ranked by similarity score.
Instructions
Search stored memory by MEANING (vector / semantic search), not keywords.
Use this to recall relevant facts, documents, or past context for RAG and agent memory. Returns the top matches ranked by similarity, each with its key, a cosine-similarity score, and the stored value.
Hybrid mode: filters, since, and until restrict WHICH memories are
ranked — a hard AND constraint over indexed fields; ranking stays pure
similarity. Combine them freely: "what did we decide about the index"
sinceyesterday +filters={"project": "montycat"}is one call. A filter matching nothing returns []. Requires a Montycat Semantic engine with hybrid support (>= 1.2.3); older engines ignore the filter.
Args:
query: Natural-language description of what to recall. May be empty
when vector supplies a precomputed query embedding.
vector: Optional precomputed query embedding. It must match the
keyspace's enrolled embedding space and dimensions; when set,
the engine does not embed query.
scope: Owner/user id to scope recall to (searches only that owner's memory,
keyspace mem_). Use "shared" for the common keyspace.
keyspace: Explicit keyspace override (advanced; bypasses scope).
limit: Max number of results (default 5).
min_score: Optional similarity floor in [-1, 1]; drops weak matches.
filters: Optional metadata constraints, e.g. {"project": "x"} — only
memories whose indexed fields equal these values are ranked.
since: Only memories created at/after this time (ISO-8601, UTC —
matches the auto-stamped _created_at).
until: Only memories created before this time (ISO-8601, UTC).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | No | ||
| scope | No | ||
| since | No | ||
| until | No | ||
| vector | No | ||
| filters | No | ||
| keyspace | No | ||
| min_score | No |