Skip to main content
GET
JavaScript
Every entry in one layer, with key and description but never content.
Item keys are metadata, spec, info. Fetch one entry to get its body: get by id returns content at the top level. Listing a large layer therefore stays cheap no matter how big the bodies are.

prefix walks the key path

Keys behave like file paths, and prefix treats them that way. Prefix-only, and case-sensitive.
That makes a namespaced key scheme worth the trouble. policies/us/... and runbooks/... become browsable directories.

query searches keys and descriptions, folding case

Descriptions are searched too, which is the reason to write one. The agent’s search_memory tool scores trigram similarity over the same two fields, key and description, so a good description is how an agent finds an entry whose key it cannot guess. content is searched by neither. A phrase that appears only in the body finds nothing, here or from the agent.
Neither filter survives a space. ?query=desc for returns nothing, and so does ?prefix=policies/ x, even though both match entries. Search on a single token.This is the same defect as the tool search and models filters.
The two filters also disagree on case: prefix is case-sensitive, query is not.

Paging

limit is a page size, and pagination.nextCursor appears only when another page exists. The SDK iterator follows it for you, so limit never caps what you receive.
sortOrder=desc reverses. The default is asc, oldest key first by creation.
pagination is omitted entirely from the response when there is no next page, so read it defensively.

Create a memory entry

Keys, uniqueness, and why description earns its place.

Get a memory entry

The only read that returns content.

Memory layers

The cascade, and which layer wins a key.

Create a memory layer

Where these entries live, and what type means.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required
Example:

"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"

memoryLayerId
string
required

Memory layer ID. Accepts canonical memlyr_… form or external_id: form.

Example:

"memlyr_01HXKD2E5NQM3T9AYWCFFFBMJH"

Query Parameters

limit
integer<int32>

Maximum number of results to return

cursor
string

Pagination cursor from previous response

prefix
string

Filter by key prefix (e.g., "skills/postmortem/" to list all entries under that hierarchy). Matches against the entry's key, not its name.

query
string

Free-form search query

labels
string

Filters by metadata labels. Comma-separated key=value pairs, e.g. "env=prod,team=ai". A resource matches only if every pair matches exactly (AND semantics).

sortOrder
string

Sort order for results (asc or desc by creation time)

includeInfo
boolean

When set to true you may use more of your alloted API rate-limit

Response

OK

items
object[]
pagination
object

Page carries cursor-based pagination state. There is no total: the cursor walks the result set without ever counting it, and a count would cost a second query on every list.