openmemory
Docs
Context

Everything an agent needs at the start of a run, in one call

GET
/v1/context

Core profile (bounded), due and open records, pending actions, recent journal days, the latest weekly digest, and selected KV namespaces.

Authorization

headerAuthorizationBearer <token>

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

Query Parameters

budget_chars?integer
Range200 <= value <= 20000
Default4000
journal_days?|
Range0 <= value <= 31
Default7
due_within_days?|
Range0 <= value <= 90
Default7
kv?string

Comma-separated KV namespaces to include, e.g. settings,cursors.

Lengthlength <= 500
collections?string

Comma-separated record collections, limiting due and open_records. Default: all.

Lengthlength <= 500
open_limit?|

Most open_records to return, soonest due first. Default: 20 across all collections, or 50 if you name collections. 0 leaves them out.

Range0 <= value <= 50

Response Body

Context

application/json
  1. response
now*string
timezone*string
today*string
profile*
due*array<>

Open records due within due_within_days.

open_records*array<>

Open records, soonest due first: all collections unless you name some, up to open_limit.

open_records_total*number

How many open records there are, including any past open_limit.

actions*array<>

Pending, approved, and executing actions.

journal*array<>
weekly*|null
kv*
last_dream*|null
Example Request
curl -X GET 'https://api.openmemory.sh/v1/context'
Example Response
{  "now": "string",  "timezone": "string",  "today": "string",  "profile": {    "text": "string",    "facts_included": 0,    "facts_total": 0,    "truncated": true,    "dream_summary": "string"  },  "due": [    {      "id": "string",      "collection": "string",      "key": "string",      "status": "string",      "due_at": "string",      "data": {        "property1": null,        "property2": null      },      "origin": "user",      "version": 0,      "created_at": "string",      "updated_at": "string"    }  ],  "open_records": [    {      "id": "string",      "collection": "string",      "key": "string",      "status": "string",      "due_at": "string",      "data": {        "property1": null,        "property2": null      },      "origin": "user",      "version": 0,      "created_at": "string",      "updated_at": "string"    }  ],  "open_records_total": 0,  "actions": [    {      "id": "string",      "class": "string",      "summary": "string",      "payload": {        "property1": null,        "property2": null      },      "payload_hash": "string",      "preconditions": [        null      ],      "meta": {        "property1": null,        "property2": null      },      "idempotency_key": "string",      "status": "pending",      "receipt": {        "property1": null,        "property2": null      },      "expires_at": "string",      "created_at": "string",      "updated_at": "string"    }  ],  "journal": [    {      "kind": "day",      "date": "string",      "summary": "string",      "decisions": [        "string"      ],      "open_loops": [        "string"      ],      "source_refs": [        "string"      ],      "origin": "user",      "updated_at": "string"    }  ],  "weekly": {    "kind": "day",    "date": "string",    "summary": "string",    "decisions": [      "string"    ],    "open_loops": [      "string"    ],    "source_refs": [      "string"    ],    "origin": "user",    "updated_at": "string"  },  "kv": {    "property1": {      "property1": null,      "property2": null    },    "property2": {      "property1": null,      "property2": null    }  },  "last_dream": {    "id": "string",    "status": "string",    "finished_at": "string",    "report": null  }}