v1

latestOpenAPI 3.1.02026-07-26142186376.1 KB
Learnings

Create Learning

Create a new learning record. For the identity-keyed learning types (user_profile, user_memory, session_context, entity_memory) the record id is derived deterministically from the identity fields so it reconciles with what the agent reads/writes — provide those fields (else 422), and if a record already exists the request is rejected with 409 (use PATCH to update it). Other types get a generated id. For a scoped (non-admin) caller, the body's user_id must be omitted/null or match the caller (mismatch → 403); admins and unscoped callers may set any user_id.

post/learnings

Query parameters

db_idstring nullable

Database ID to use

Database ID to use

tablestring nullable

The database table to use (requires db_id)

The database table to use (requires db_id)

Request body

learning_typestring required

Type of learning (e.g. 'user_profile', 'entity_memory')

contentobject required

The learning content payload

namespacestring nullable

Namespace for scoping ('user', 'global', or custom)

user_idstring nullable

Associated user ID. When the request is authenticated, must match the JWT subject or be omitted/null (which creates a global / non-user-scoped record).

agent_idstring nullable

Associated agent ID

team_idstring nullable

Associated team ID

session_idstring nullable

Associated session ID

entity_idstring nullable

Associated entity ID

entity_typestring nullable

Entity type

metadataobject nullable

Optional metadata

Response

Successful Response

learning_idstring required

Unique identifier for the learning record

learning_typestring required

Type of learning (e.g. 'user_profile', 'entity_memory')

namespacestring nullable

Namespace for scoping ('user', 'global', or custom)

user_idstring nullable

Associated user ID

agent_idstring nullable

Associated agent ID

team_idstring nullable

Associated team ID

session_idstring nullable

Associated session ID

entity_idstring nullable

Associated entity ID (for entity-specific learnings)

entity_typestring nullable

Entity type (e.g. 'person', 'company')

contentobject nullable

The learning content payload

metadataobject nullable

Optional metadata

created_atinteger nullable

Creation timestamp (Unix epoch seconds)

updated_atinteger nullable

Last update timestamp (Unix epoch seconds)