Python
from everos_cloud import EverOS
client = EverOS()
memories = client.v1.memories
response = memories.add(
user_id="<string>",
messages=[
{
"role": "<string>",
"timestamp": "<integer>",
"content": "<string>"
}
]
)
print(response)curl --request POST \
--url 'https://api.evermind.ai/api/v1/memories' \
--header 'Authorization: Bearer <api_key>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_id: '<string>',
messages: [{timestamp: 123, content: '<string>', sender_id: '<string>'}],
session_id: '<string>',
async_mode: true
})
};
fetch('https://api.evermind.ai/api/v1/memories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v1/memories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user_id' => '<string>',
'messages' => [
[
'timestamp' => 123,
'content' => '<string>',
'sender_id' => '<string>'
]
],
'session_id' => '<string>',
'async_mode' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v1/memories"
payload := strings.NewReader("{\n \"user_id\": \"<string>\",\n \"messages\": [\n {\n \"timestamp\": 123,\n \"content\": \"<string>\",\n \"sender_id\": \"<string>\"\n }\n ],\n \"session_id\": \"<string>\",\n \"async_mode\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evermind.ai/api/v1/memories")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"<string>\",\n \"messages\": [\n {\n \"timestamp\": 123,\n \"content\": \"<string>\",\n \"sender_id\": \"<string>\"\n }\n ],\n \"session_id\": \"<string>\",\n \"async_mode\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v1/memories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"<string>\",\n \"messages\": [\n {\n \"timestamp\": 123,\n \"content\": \"<string>\",\n \"sender_id\": \"<string>\"\n }\n ],\n \"session_id\": \"<string>\",\n \"async_mode\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"task_id": "",
"message_count": 0,
"status": "accumulated",
"message": "Messages accepted"
}
}Memories
Add personal memories
Add messages and extract memory into memory space.
POST
/
api
/
v1
/
memories
Python
from everos_cloud import EverOS
client = EverOS()
memories = client.v1.memories
response = memories.add(
user_id="<string>",
messages=[
{
"role": "<string>",
"timestamp": "<integer>",
"content": "<string>"
}
]
)
print(response)curl --request POST \
--url 'https://api.evermind.ai/api/v1/memories' \
--header 'Authorization: Bearer <api_key>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_id: '<string>',
messages: [{timestamp: 123, content: '<string>', sender_id: '<string>'}],
session_id: '<string>',
async_mode: true
})
};
fetch('https://api.evermind.ai/api/v1/memories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v1/memories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user_id' => '<string>',
'messages' => [
[
'timestamp' => 123,
'content' => '<string>',
'sender_id' => '<string>'
]
],
'session_id' => '<string>',
'async_mode' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v1/memories"
payload := strings.NewReader("{\n \"user_id\": \"<string>\",\n \"messages\": [\n {\n \"timestamp\": 123,\n \"content\": \"<string>\",\n \"sender_id\": \"<string>\"\n }\n ],\n \"session_id\": \"<string>\",\n \"async_mode\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evermind.ai/api/v1/memories")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"<string>\",\n \"messages\": [\n {\n \"timestamp\": 123,\n \"content\": \"<string>\",\n \"sender_id\": \"<string>\"\n }\n ],\n \"session_id\": \"<string>\",\n \"async_mode\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v1/memories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"<string>\",\n \"messages\": [\n {\n \"timestamp\": 123,\n \"content\": \"<string>\",\n \"sender_id\": \"<string>\"\n }\n ],\n \"session_id\": \"<string>\",\n \"async_mode\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"task_id": "",
"message_count": 0,
"status": "accumulated",
"message": "Messages accepted"
}
}Authorizations
Bearer authentication header of the form Bearer 'api_key', obtain your API key from everos.evermind.ai.
Body
application/json
Owner user ID
Batch message array (1-500 items)
Required array length:
1 - 500 elementsShow child attributes
Show child attributes
Session identifier
Enable async processing. When true, returns 202 with task_id; when false, processes synchronously and returns 200.
Response
Messages accepted successfully (sync mode: async_mode=false)
Show child attributes
Show child attributes
Was this page helpful?
⌘I

