Inspect

Get memory context

Read the active memory context for a user. Personal memories default to the API key user; pass `user_id` to read another user's context.

Base URL
GET
/api/v2/memories/context

Read the active memory context for a user. Personal memories default to the API key user; pass user_id to read another user's context.

Authorization

bearerAuth memories:read
headerAuthorizationBearer <token>

API key authentication. Use your API key as the bearer token.

Scope: memories:read

Query Parameters

user_id?string

User whose personal memories are included. Defaults to the API key user. Ignored when include_personal is false.

Length1 <= length
include_personal?boolean

Set to false to exclude personal memories from the context.

Defaulttrue
directive_limit?integer

Maximum number of directive memories to return.

Formatint32
Range1 <= value <= 25
Default20
fact_limit?integer

Maximum number of fact memories to return.

Formatint32
Range1 <= value <= 100
Default50

Response Body

Active memory context for the requested scopes

application/json
  1. response
data*
Example Request
curl -X GET 'https://app.inspect.com/api/v2/memories/context'
Example Response
{  "data": {    "scopes": [      {        "type": "personal",        "id": "Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"      }    ],    "directives": [      {        "id": "Kq8vN2xLm4pR7tYc3hWzA",        "title": "Run oxfmt before committing",        "description": "Use oxfmt, not prettier, to format files before committing in acme/web.",        "content": "Format changed files with `bun oxfmt` before every commit. Do not use prettier in this repository.",        "memory_type": "directive",        "updated_at": "2026-10-28T15:42:11.204Z",        "scope": {          "type": "personal",          "id": "Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"        }      }    ],    "facts": [      {        "id": "Kq8vN2xLm4pR7tYc3hWzA",        "title": "Run oxfmt before committing",        "description": "Use oxfmt, not prettier, to format files before committing in acme/web.",        "content": "Format changed files with `bun oxfmt` before every commit. Do not use prettier in this repository.",        "memory_type": "directive",        "updated_at": "2026-10-28T15:42:11.204Z",        "scope": {          "type": "personal",          "id": "Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"        }      }    ]  }}