memory_entity
Alpha, on the 3.6.x line. The API can still change within 3.x.
Manages the named entities of the workspace: the people, organizations, projects, concepts and places that facts are about.
Actions
action | Needs | What it does |
|---|---|---|
create | name, kind | Creates an entity. This is the default action. |
get | id | Returns one entity. |
list | Lists entities. Filters: kind, q, limit. | |
update | id | Changes name, kind, description, aliases or metadata. |
linked_facts | id | Lists the facts linked to the entity. |
link_user | id, userId | Ties the entity to a platform account. |
unlink_user | id | Removes that tie. |
To relate two entities, or a fact and an entity, use memory_relate.
Arguments
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
action | string | no | create | One of the seven actions above. |
id | string | per action | Entity id. | |
name | string | per action | Canonical name. 1 to 200 characters. | |
kind | string | per action | person, organization, project, concept, place or other. Also a filter in list. | |
description | string | no | Role, context or other relevant detail. | |
aliases | string[] | no | Alternative names. | |
q | string | no | For list: substring to search for. | |
limit | integer | no | For list and linked_facts. 1 to 200. | |
metadata | object | no | For create and update. | |
sensitivity | string | no | internal | For create. |
userId | string | per action | For link_user. The user must be a member of the workspace. | |
idempotencyKey | string | no | For create. Prevents a duplicate entity on a retry. | |
targetWorkspaceId | string | no | For create. UUID of another workspace where you have write access. |
Linking another user, or re-linking an entity that is already linked to
someone else, needs the memory:admin scope and an owner or admin role.
Example
{
"name": "memory_entity",
"arguments": {
"action": "create",
"name": "Larkspur Robotics",
"kind": "organization",
"description": "Builds warehouse robots. Ships firmware every two weeks.",
"aliases": ["Larkspur"]
}
}Returns
create, get and update return the entity record as the server
stores it. list and linked_facts return the matching entities or
facts.
A project entity also gives scopeRef a canonical name: a memory
stored with one of the project’s aliases as scopeRef is stored under
the project’s name.
Related
- Cognitive primitives
- REST:
POST /entities,GET /entities/{id},GET /entities/{id}/facts