ctx_search
Search saved knowledge and memories using hybrid full-text and semantic ranking to answer 'what do I know about X' or 'did I already save this'.
Instructions
Search / recall saved knowledge and memories using hybrid full-text + semantic search ranked by relevance — the default tool for 'what do I know about X' or 'did I already save this'. Use this when you need to find, remember, or look up existing knowledge by keyword or phrase. Set chunk_search=false to disable per-chunk passage matching, lifecycle_boost=false for legacy ranking, or include_archived=true to surface retired notes. Results may include lifecycle, quality_score, and matched_chunk per hit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Filter by tags (all must match) | |
| type | No | Filter by context type | |
| level | No | Layered representation level. 'full' (default) keeps the stored description; 'paragraph' replaces it with a ~120-word distill; 'sentence' replaces it with a ~25-word claim. Use 'sentence' for cheap high-density agent prompts where every token matters. Falls back to the stored description when the distill is not yet populated for a row. | |
| limit | No | Max results to return (default 20) | |
| query | Yes | Search query (full-text + semantic) | |
| scope | No | Filter by visibility scope | |
| offset | No | Offset for pagination | |
| project | No | Filter by project identifier | |
| subjectId | No | Filter to memories scoped to a single end-user (Mem0-parity user_id axis). Matches the subjectId used when the memory was created via ctx_remember / POST /api/memory. Omit to search across all subjects. | |
| workspace | No | Filter by workspace identifier | |
| memoryKind | No | Filter to a single taxonomy kind: 'episodic' (events/interactions), 'semantic' (durable reference knowledge), or 'procedural' (how-to / lessons). Omit to search across all kinds. | |
| chunk_search | No | When true (default), search at the chunk level so individual passages can match. When false, only whole-context fields are scored. | |
| epistemicMin | No | Epistemic floor (T358): only return contexts at or above this confidence tier (weakest->strongest: assumed < inferred < told < observed). E.g. 'told' excludes 'assumed'/'inferred' rows. Omit to search across all tiers. | |
| lifecycle_boost | No | When true (default), apply the evergreen/fleeting lifecycle multipliers to the ranking. Set false for legacy ts_rank * tagBoost * recencyBoost only. | |
| include_archived | No | When true, include lifecycle='archived' rows. Default false — archived notes are excluded from regular searches. | |
| trace_session_id | No | Scope trace-event fusion to one agent session (omit to search across the tenant's trace events). Ignored unless include_trace_events is true. | |
| include_trace_events | No | T375: when true, ALSO search episodic tool-call trace summaries ('what did I try before this worked?') and return them in a separate `traceEvents` field. Default false — this is fully additive and never changes `results` or its ranking. Combine with trace_session_id to scope to one session. |