Inspect

Create memory

Create one durable memory. `personal` always targets the API key user's own scope.

Base URL
POST
/api/v2/memories

Create one durable memory. personal always targets the API key user's own scope.

Authorization

bearerAuth memories:write
headerAuthorizationBearer <token>

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

Scope: memories:write

Request Body

application/json
  1. body
title*Memories.MemoryTitle
Length1 <= length <= 200
content*Memories.MemoryContent

Canonical Markdown body. Directive memories must be at most 2000 characters so they can be injected in full.

Length1 <= length <= 20000
description*Memories.MemoryDescription
Length10 <= length <= 420
memory_type*Memories.MemoryType
Value in"fact""directive"
scope*"personal"
Value in"personal"
scope_id?Memories.MemoryUserId

Not supported for personal memories. Any value is rejected with 400.

Length1 <= length

Response Body

Created memory

application/json
  1. response
data*
Example Request
curl -X POST 'https://app.inspect.com/api/v2/memories' \  -H 'Content-Type: application/json' \  -d '{  "title": "Run oxfmt before committing",  "content": "Format changed files with `bun oxfmt` before every commit. Do not use prettier in this repository.",  "description": "Use oxfmt, not prettier, to format files before committing in acme/web.",  "memory_type": "directive",  "scope": "personal"}'
Example Response
{  "data": {    "memory": {      "id": "Kq8vN2xLm4pR7tYc3hWzA",      "title": "Run oxfmt before committing",      "content": "Format changed files with `bun oxfmt` before every commit. Do not use prettier in this repository.",      "description": "Use oxfmt, not prettier, to format files before committing in acme/web.",      "memory_type": "directive",      "archived_at": null,      "archived_reason": null    },    "scope": {      "type": "personal",      "id": "Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"    }  }}