openmemory
Docs
Memories

Recall facts by words, meaning, subject, tier, or tag

GET
/v1/memories

With q, finds facts that share its words (accent- and case-insensitive, prefix matching) or its meaning, best first. Meaning search falls back to words only when it is off or over its daily budget; search says what ran. A new or changed fact takes a few minutes to become findable by meaning, and search.indexing counts the ones that may not be yet. A q with no letters or digits finds nothing. Without q, lists every stored fact, pinned and core first, with total and next_cursor for the next page. Listing everything does not count as a recall.

Authorization

headerAuthorizationBearer <token>

Your space key (om_...). Create one with POST /v1/spaces.

Query Parameters

q?string

What to look for, in words or as a question. Finds facts sharing its words or its meaning.

Lengthlength <= 500
mode?string

hybrid (default) = words and meaning together; keyword = words only (best for names, ids, exact terms); semantic = meaning only.

Value in"hybrid""keyword""semantic"
tier?string

core = always in context; long = recalled on demand; scratch = short-lived.

Default"long"
Value in"core""long""scratch"
subject?string
Lengthlength <= 200
tag?string
Lengthlength <= 50
limit?integer
Range1 <= value <= 100
Default20
cursor?string

Without q: the next_cursor from the previous page.

touch?|

Count this as a recall (feeds dreaming's promotion step).

Defaulttrue

Response Body

Matching facts

application/json
  1. response
memories*array<>
search*
total?integer

Without q: how many facts match.

next_cursor?|

Without q: pass as cursor for the next page.

Example Request
curl -X GET 'https://api.openmemory.sh/v1/memories'
Example Response
{  "memories": [    {      "id": "string",      "subject": "string",      "text": "string",      "tier": "core",      "tags": [        "string"      ],      "source_ref": "string",      "pinned": true,      "origin": "user",      "expires_at": "string",      "recall_count": 0,      "last_recalled_at": "string",      "created_at": "string",      "updated_at": "string",      "match": "keyword"    }  ],  "search": {    "mode": "hybrid",    "meaning": "used",    "entities": [      "string"    ],    "indexing": 0  },  "total": 0,  "next_cursor": "string"}