---
title: "Memory Session Search"
method: POST
path: "/api/memory/session_search"
---

# Memory Session Search

`POST /api/memory/session_search`

On-demand recall over the CALLER'S OWN past sessions (trajectories) —
the recall half of two-tier memory (Hermes-style): curated memory is
always in context; this searches "what happened in past sessions".

**Plan-gated (Plus/Pro).** community has a 0 monthly quota and is
short-circuited to a self-describing `gated` payload BEFORE any disk scan,
so the free tier can never trigger the per-call summary+raw file scan. Paid
tiers are bounded three ways: the SAME visibility window as trajectories
(you can only recall what you can still see), per-plan scan caps
(max_sessions + raw-fallback budget), and a monthly call quota.

Summary-first with a bounded raw-JSONL fallback for unsummarized sessions
(see app/session_search.py), so recall is complete without a global FTS
index or a forced re-summarize. Reads only the caller's files; the heavy
IO runs in a thread. Degrades to an empty result on error.

Contract v2 body: `{query, scope?, project_ids?, session_ids?,
context_session_id?, limit?, before?, after?}`. `context_session_id` is
supplied by Core from ToolContext and is never a model-facing argument.

## Headers

- `authorization` string, nullable

## Request body

- object

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/omicos/apis/omicos-server.md) · [All operations](https://skmtc.dev/omicos/apis/omicos-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/omicos/omicos-server/revisions/a00b94573ffe/schema)
