Skip to main content
POST
/
api
/
v2
/
memories
Add Memories
curl --request POST \
  --url http://localhost:8080/api/v2/memories \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "content": "<string>",
      "producer": "user",
      "produced_for": "",
      "timestamp": "2023-11-07T05:31:56Z",
      "role": "",
      "metadata": {},
      "episode_type": "message"
    }
  ],
  "org_id": "universal",
  "project_id": "universal",
  "types": [
    "semantic"
  ]
}
'
{
  "results": [
    {
      "uid": "<string>"
    }
  ]
}

Body

application/json

Specification model for adding memories.

messages
MemoryMessage · object[]
required
A list of messages to be added (batch input).
Must contain at least one message.
Minimum array length: 1
org_id
string
default:universal
The unique identifier of the organization.

- Must not contain slashes (`/`).
- Must contain only letters, numbers, underscores, hyphens, colon, and Unicode
characters (e.g., Chinese/Japanese/Korean). No slashes or other symbols
are allowed.

This value determines the namespace the project belongs to.
Examples:

"MemVerge"

"AI_Labs"

project_id
string
default:universal
The identifier of the project.

- Must be unique within the organization.
- Must not contain slashes (`/`).
- Must contain only letters, numbers, underscores, hyphens, colon, and Unicode
characters (e.g., Chinese/Japanese/Korean). No slashes or other symbols
are allowed.

This ID is used in API paths and resource locations.
Examples:

"memmachine"

"research123"

"qa_pipeline"

types
enum<string>[]
A list of memory types to include in the search (e.g., episodic, semantic).
If empty, all available types are searched.

Memory type.

Available options:
semantic,
episodic
Example:
["episodic", "semantic"]

Response

Successful Response

Response model for adding memories.

results
AddMemoryResult · object[]
required

The list of results for each added memory message.