AI Memory

Create AI memory entry

Create a memory entry. Environment entries require the "manage AI memory" system access right, user entries can be created for the caller's own user ID, object entries require modify access to the object. Title must be unique within scope.

post/v1/ai/memory

Request body

scope'environment' | 'user' | 'object' required

Entry scope

scopeIdinteger

User ID for user scope (defaults to caller), object ID for object scope

titlestring required

Entry title (unique within scope, max 127 bytes)

contentstring required

Entry content (limited by the configured per-scope size)

lockedboolean

Lock the entry against changes by the model

Response

Entry created

idinteger

Unique entry identifier

scope'environment' | 'user' | 'object'

Entry scope

scopeIdinteger

User ID for user scope, object ID for object scope, 0 for environment scope

titlestring

Entry title (unique within scope)

contentstring

Entry content

createdBy'model' | 'human'

Who created the entry

sourceUserIdinteger

ID of the user on whose behalf the entry was created

sourceType'chat' | 'task' | 'operator' | 'human'

Execution context that created the entry

sourceIdinteger

Chat ID, AI task ID, or AI operator instance ID depending on source type (0 for human)

createdAtinteger

Creation time (UNIX timestamp)

updatedAtinteger

Last modification time (UNIX timestamp)

lockedboolean

True if the entry cannot be changed or deleted by the model

Changes

Changed in 1 of the 128 revisions of this API.1