Agent Memory

User profiles

User profiles API: 3 endpoints under /v1.

Get a user profile

GET /v1/memory/users/{workspaceId}/{userId}/profile

Returns the free-text profile of one end user, the same text added to the context as userProfile when a search passes that userId. Requires the read permission and permission to act for the user.

See also: Blocks and user profiles.

Parameters

NameInTypeDescription
workspaceId (required)pathstring (uuid)Workspace to act in. A workspace the credential cannot access returns 404.
userId (required)pathstringEnd user to act for. Requires permission to act for users.
applicationIdquerystring (uuid)Application scope. Omit to use the workspace's shared pool; a credential bound to an application cannot request another one.

Responses

StatusDescription
200The user profile.

Response fields

FieldDescription
userIdThe end user the profile belongs to.
contentProfile text.
createdAtWhen the profile was created.
updatedAtWhen the profile was last changed.

Example

curl -X GET "$API/v1/memory/users/$WS/<userId>/profile" \
  -H "Authorization: Bearer $KEY"

Write a user profile

PUT /v1/memory/users/{workspaceId}/{userId}/profile

Creates or replaces the end user's profile text. Profiles are plain text, at most 2000 characters by default, and are not embedded or consolidated. Requires the write permission and permission to act for the user.

See also: Blocks and user profiles.

Parameters

NameInTypeDescription
workspaceId (required)pathstring (uuid)Workspace to act in. A workspace the credential cannot access returns 404.
userId (required)pathstringEnd user to act for. Requires permission to act for users.

Request body (UpsertUserProfileRequest)

FieldTypeDescription
applicationIdstring (uuid)Application scope of the profile.
contentstringThe full profile text; at most 2000 characters by default.

Responses

StatusDescription
200Confirmation with status updated.

Response fields

FieldDescription
statusAlways updated on success.

Example

curl -X PUT "$API/v1/memory/users/$WS/<userId>/profile" \
  -H "Authorization: Bearer $KEY" \
  -H 'Content-Type: application/json' \
  -d '{}'

Delete a user profile

DELETE /v1/memory/users/{workspaceId}/{userId}/profile

Deletes the end user's profile in the workspace (or application). The server answers 204 No Content on success. Requires the write permission and permission to act for the user.

See also: Blocks and user profiles.

Parameters

NameInTypeDescription
workspaceId (required)pathstring (uuid)Workspace to act in. A workspace the credential cannot access returns 404.
userId (required)pathstringEnd user to act for. Requires permission to act for users.
applicationIdquerystring (uuid)Application scope. Omit to use the workspace's shared pool; a credential bound to an application cannot request another one.

Responses

StatusDescription
204No content

Example

curl -X DELETE "$API/v1/memory/users/$WS/<userId>/profile" \
  -H "Authorization: Bearer $KEY"

On this page