Search memories
curl --request GET \
--url https://api.tensorpro.ai/api/v1/retrieval/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tensorpro.ai/api/v1/retrieval/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tensorpro.ai/api/v1/retrieval/search', 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.tensorpro.ai/api/v1/retrieval/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tensorpro.ai/api/v1/retrieval/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tensorpro.ai/api/v1/retrieval/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorpro.ai/api/v1/retrieval/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"records": [
{
"id": "8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
"content_summary": "Sara manages the website project.",
"provenance": "USER_STATED",
"domain": "factual",
"similarity": 0.82,
"created_at": "2026-11-10T04:43:25+00:00"
}
],
"count": 1
}
Retrieve
Search memories
Find the memories closest in meaning to q, closest first. Searches current USER_STATED, USER_CONFIRMED, DOCUMENT_VERIFIED and ROUND memories; replaced, deleted and unconfirmed AI memories are never returned. Without project_id it searches your general memory only. Returns 404 when project_id is not one of your projects.
GET
/
api
/
v1
/
retrieval
/
search
Search memories
curl --request GET \
--url https://api.tensorpro.ai/api/v1/retrieval/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tensorpro.ai/api/v1/retrieval/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tensorpro.ai/api/v1/retrieval/search', 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.tensorpro.ai/api/v1/retrieval/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tensorpro.ai/api/v1/retrieval/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tensorpro.ai/api/v1/retrieval/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorpro.ai/api/v1/retrieval/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"records": [
{
"id": "8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
"content_summary": "Sara manages the website project.",
"provenance": "USER_STATED",
"domain": "factual",
"similarity": 0.82,
"created_at": "2026-11-10T04:43:25+00:00"
}
],
"count": 1
}
Use this endpoint to find memories by meaning, for example to build your own memory search. To give your model context, use Build a SIP instead.
See Error handling.
What EDN does
- Finds the memories closest in meaning to
q, closest first. - Searches only current
USER_STATED,USER_CONFIRMED,DOCUMENT_VERIFIEDandROUNDmemories. - Searches your general memory, unless you send
project_id.
Required headers
| Header | Value | Description |
|---|---|---|
Authorization | Bearer YOUR_API_KEY | Your EDN API key. Create keys in the Console. See Authentication |
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | What to search for, in plain language |
limit | integer | No | How many memories to return. Default 10; values above 50 return 50 |
project_id | string | No | Search this project’s memory instead of your general memory |
include_global | boolean | No | With project_id, also search your general memory. Default: false |
curl "https://api.tensorpro.ai/api/v1/retrieval/search?q=website%20project%20owner&limit=5" \
-H "Authorization: Bearer $EDN_API_KEY"
import os
import requests
resp = requests.get(
"https://api.tensorpro.ai/api/v1/retrieval/search",
headers={"Authorization": f"Bearer {os.environ['EDN_API_KEY']}"},
params={
"q": "website project owner",
"limit": 5
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.tensorpro.ai/api/v1/retrieval/search?q=website%20project%20owner&limit=5", {
headers: {
Authorization: `Bearer ${process.env.EDN_API_KEY}`,
},
});
console.log(await resp.json());
Response
200 OK
{
"records": [
{
"id": "8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
"content_summary": "Sara manages the website project.",
"provenance": "USER_STATED",
"domain": "factual",
"similarity": 0.82,
"created_at": "2026-11-10T04:43:25+00:00"
}
],
"count": 1
}
| Field | Type | Description |
|---|---|---|
records | array | Matching memories, closest match first |
records[].id | string | Identifier for the memory |
records[].content_summary | string | What the memory says |
records[].provenance | string | Where the memory came from |
records[].domain | string | The memory’s category |
records[].similarity | number | How closely the memory matches q, from 0 to 1. Higher is closer |
records[].created_at | string (date-time) | When the memory was saved |
count | integer | How many memories this response contains |
Important behavior
- Unconfirmed AI memories, replaced memories and deleted memories are never returned.
Errors
| Status | Code | When |
|---|---|---|
401 | UNAUTHORIZED | The API key is missing, invalid or revoked |
404 | NOT_FOUND | project_id isn’t one of your projects |
422 | VALIDATION_ERROR | q is missing or empty, or limit is invalid |
429 | RATE_LIMITED | Per-minute limit reached. Retry after Retry-After seconds |
500 | INTERNAL_ERROR | Something failed on EDN’s side. Retry later |
{
"records": [
{
"id": "8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
"content_summary": "Sara manages the website project.",
"provenance": "USER_STATED",
"domain": "factual",
"similarity": 0.82,
"created_at": "2026-11-10T04:43:25+00:00"
}
],
"count": 1
}
