Skip to main content

Add Memory

Store new memories by sending conversation messages. Audaxic automatically extracts meaningful facts and stores them as searchable vector embeddings.

Endpoint​

POST https://api.memory.audaxic.com/add

Request Body​

{
"messages": [
"I went to the vet on May 7, 2023",
"My favorite programming language is Rust"
],
"timestamp": "2023-05-07"
}
FieldTypeRequiredDescription
messagesstring[]YesArray of messages to extract memories from
timestampstring | nullNoSession date for resolving relative time references

Timestamp modes​

ValueBehavior
Omitted / nullDefaults to today's date
ISO 8601 date (e.g. "2023-05-07")Used as anchor for relative references like "last week"
"no_date"Stores memories without any resolved date

When you provide a timestamp, the AI engine uses it to resolve relative time references in your messages. For example, if timestamp is "2023-05-14" and the message says "last week", the memory is dated to the week of 2023-05-07.

If no explicit date is mentioned in the message and no timestamp is provided, the memory is stored without a date.

Response​

{
"results": [
{
"id": "mem_abc123",
"memory": "User went to the vet on May 7, 2023",
"metadata": { "session_timestamp": "2023-05-07" }
},
{
"id": "mem_def456",
"memory": "User's favorite programming language is Rust",
"metadata": { "session_timestamp": "2023-05-07" }
}
]
}
FieldTypeDescription
resultsMemoryItem[]List of extracted and stored memories
results[].idstringUnique memory identifier
results[].memorystringThe extracted memory text
results[].metadataobjectAssociated metadata including session_timestamp

Examples​

With timestamp​

cURL:

curl -X POST https://api.memory.audaxic.com/add \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ak_your_api_key" \
-d '{
"messages": ["I went to the vet on May 7, 2023"],
"timestamp": "2023-05-07"
}'

JavaScript:

const response = await fetch("https://api.memory.audaxic.com/add", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer ak_your_api_key",
},
body: JSON.stringify({
messages: ["I went to the vet on May 7, 2023"],
timestamp: "2023-05-07",
}),
});

const data = await response.json();
console.log(data.results);

Python:

import requests

response = requests.post(
"https://api.memory.audaxic.com/add",
headers={"Authorization": "Bearer ak_your_api_key"},
json={
"messages": ["I went to the vet on May 7, 2023"],
"timestamp": "2023-05-07",
},
)

data = response.json()
print(data["results"])

Without timestamp (defaults to today)​

cURL:

curl -X POST https://api.memory.audaxic.com/add \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ak_your_api_key" \
-d '{
"messages": ["I prefer dark mode and use VS Code"]
}'

Without date resolution​

curl -X POST https://api.memory.audaxic.com/add \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ak_your_api_key" \
-d '{
"messages": ["User enjoys painting landscapes"],
"timestamp": "no_date"
}'

How Extraction Works​

When you send messages, the AI engine:

  1. Analyzes the content for factual information
  2. Extracts distinct facts (each becomes a separate memory)
  3. Generates vector embeddings for semantic search
  4. Stores memories in your isolated user space

For example, sending "I'm a software engineer who loves cats and lives in New York" might produce three separate memories:

  • "User is a software engineer"
  • "User loves cats"
  • "User lives in New York"