Agent Memory

Categories

Categories API: 3 endpoints under /v1.

List semantic categories

GET /v1/categories/{workspaceId}

Returns the workspace's semantic categories, which decide which memory types consolidation promotes and which extraction instruction it uses. Requires the read permission.

See also: Consolidation, episodes and procedures.

Parameters

NameInTypeDescription
workspaceId (required)pathstring (uuid)Workspace to act in. A workspace the credential cannot access returns 404.

Responses

StatusDescription
200A list of categories with name, description, promotable types, extraction prompt and enabled flag.

Example

curl -X GET "$API/v1/categories/$WS" \
  -H "Authorization: Bearer $KEY"

Create or update a semantic category

POST /v1/categories/{workspaceId}

Creates a category, or updates the existing one when id is given. A category's extraction prompt only takes effect when an LLM is configured, and a per-call extractionInstructions on consolidation takes precedence over it. Requires the write permission.

See also: Consolidation, episodes and procedures.

Parameters

NameInTypeDescription
workspaceId (required)pathstring (uuid)Workspace to act in. A workspace the credential cannot access returns 404.

Request body (SemanticCategoryRequest)

FieldTypeDescription
descriptionstringWhat the category covers.
extractionPromptstringExtraction instruction for this category; only takes effect when an LLM is configured.
idstring (uuid)ID of the category to update; omit to create a new one.
isEnabledbooleanWhether the category is active; defaults to true.
namestringCategory name.
promotableTypesarray of stringMemory types this category promotes during consolidation.

Responses

StatusDescription
200The stored category.

Response fields

FieldDescription
idCategory ID; generated when the request did not include one.
nameCategory name.
promotableTypesMemory types this category promotes during consolidation.
extractionPromptExtraction instruction used for this category, if any.
isEnabledWhether the category is active.

Example

curl -X POST "$API/v1/categories/$WS" \
  -H "Authorization: Bearer $KEY" \
  -H 'Content-Type: application/json' \
  -d '{"isEnabled":true}'

Delete a semantic category

DELETE /v1/categories/{workspaceId}/{categoryId}

Deletes one semantic category from the workspace. The server answers 204 No Content on success. Requires the write permission.

See also: Consolidation, episodes and procedures.

Parameters

NameInTypeDescription
workspaceId (required)pathstring (uuid)Workspace to act in. A workspace the credential cannot access returns 404.
categoryId (required)pathstring (uuid)ID of the semantic category.

Responses

StatusDescription
204No content

Example

curl -X DELETE "$API/v1/categories/$WS/<categoryId>" \
  -H "Authorization: Bearer $KEY"

On this page