Skip to Content
Levain LabsLevain Labs
ApiAgent memories

Create Memory

Save a memory by hand.

Save a memory by hand.

Workspace-scoped memories apply to every agent; agent-scoped memories apply to one; person-scoped memories apply to every agent acting for you, in any workspace, and are kept from the start since you wrote them. Use this to seed memory items directly rather than waiting for agents to accumulate them.

POST
/api/v1/agent-memories

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Header Parameters

X-API-Key?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.levainlabs.com/api/v1/agent-memories" \  -H "Content-Type: application/json" \  -d '{    "content": "string"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "scope": "agent",
  "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
  "kind": "semantic",
  "content": "string",
  "tags": [
    "string"
  ],
  "author": "agent",
  "source_session_id": "312bde73-ab6c-4229-8af2-a9c9ab28d2bf",
  "source_run_id": "51116a97-0041-4601-85fc-eb599c2885fb",
  "pending": false,
  "source_workspace_id": "0bec99f5-fe9f-476a-a47b-d925ed169238",
  "source_workspace_name": "string",
  "source_agent_id": "d9ad10f6-6845-4542-89b9-c3395e83005a",
  "source_agent_name": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}