Retrieve Memory
curl --request POST \
--url https://api.example.com/open/v1/memory/retrieve \
--header 'Content-Type: application/json' \
--data '
{
"userId": "<string>",
"agentId": "<string>",
"query": "<string>",
"trace": true
}
'import requests
url = "https://api.example.com/open/v1/memory/retrieve"
payload = {
"userId": "<string>",
"agentId": "<string>",
"query": "<string>",
"trace": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>', agentId: '<string>', query: '<string>', trace: true})
};
fetch('https://api.example.com/open/v1/memory/retrieve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/open/v1/memory/retrieve"
payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"query\": \"<string>\",\n \"trace\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"data": {
"status": "<string>",
"items": [
{
"id": "<string>",
"text": "<string>",
"vectorScore": 123,
"finalScore": 123,
"occurredAt": "2023-11-07T05:31:56Z"
}
],
"insights": [
{
"id": "<string>",
"text": "<string>",
"tier": "<string>"
}
],
"rawData": [
{
"rawDataId": "<string>",
"caption": "<string>",
"maxScore": 123,
"itemIds": [
"<string>"
]
}
],
"evidences": [
"<string>"
],
"strategy": "<string>",
"query": "<string>",
"trace": {
"traceId": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"truncated": true,
"stages": [
{
"stage": "<string>",
"tier": "<string>",
"method": "<string>",
"status": "<string>",
"inputCount": 123,
"candidateCount": 123,
"resultCount": 123,
"degraded": true,
"skipped": true,
"startedAt": "2023-11-07T05:31:56Z",
"durationMillis": 123,
"attributes": {},
"candidates": [
{
"sourceType": "<string>",
"rank": 123,
"finalScore": 123,
"vectorScore": 123,
"textPreview": "<string>"
}
]
}
],
"merge": {
"inputCount": 123,
"outputCount": 123,
"deduplicatedCount": 123,
"sourceCount": 123,
"status": "<string>"
},
"finalResults": {
"strategy": "<string>",
"status": "<string>",
"itemCount": 123,
"insightCount": 123,
"rawDataCount": 123,
"evidenceCount": 123
}
}
}
}Memory
Retrieve Memory
POST
/
open
/
v1
/
memory
/
retrieve
Retrieve Memory
curl --request POST \
--url https://api.example.com/open/v1/memory/retrieve \
--header 'Content-Type: application/json' \
--data '
{
"userId": "<string>",
"agentId": "<string>",
"query": "<string>",
"trace": true
}
'import requests
url = "https://api.example.com/open/v1/memory/retrieve"
payload = {
"userId": "<string>",
"agentId": "<string>",
"query": "<string>",
"trace": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>', agentId: '<string>', query: '<string>', trace: true})
};
fetch('https://api.example.com/open/v1/memory/retrieve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/open/v1/memory/retrieve"
payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"query\": \"<string>\",\n \"trace\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"data": {
"status": "<string>",
"items": [
{
"id": "<string>",
"text": "<string>",
"vectorScore": 123,
"finalScore": 123,
"occurredAt": "2023-11-07T05:31:56Z"
}
],
"insights": [
{
"id": "<string>",
"text": "<string>",
"tier": "<string>"
}
],
"rawData": [
{
"rawDataId": "<string>",
"caption": "<string>",
"maxScore": 123,
"itemIds": [
"<string>"
]
}
],
"evidences": [
"<string>"
],
"strategy": "<string>",
"query": "<string>",
"trace": {
"traceId": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"truncated": true,
"stages": [
{
"stage": "<string>",
"tier": "<string>",
"method": "<string>",
"status": "<string>",
"inputCount": 123,
"candidateCount": 123,
"resultCount": 123,
"degraded": true,
"skipped": true,
"startedAt": "2023-11-07T05:31:56Z",
"durationMillis": 123,
"attributes": {},
"candidates": [
{
"sourceType": "<string>",
"rank": 123,
"finalScore": 123,
"vectorScore": 123,
"textPreview": "<string>"
}
]
}
],
"merge": {
"inputCount": 123,
"outputCount": 123,
"deduplicatedCount": 123,
"sourceCount": 123,
"status": "<string>"
},
"finalResults": {
"strategy": "<string>",
"status": "<string>",
"itemCount": 123,
"insightCount": 123,
"rawDataCount": 123,
"evidenceCount": 123
}
}
}
}The API Reference is under active development. Request and response schemas may change before a stable release.

