curl --request POST \
--url http://localhost:8080/v1/recall \
--header 'Content-Type: application/json' \
--header 'x-hyphae-key: <api-key>' \
--data '
{
"text": "<string>",
"k": 10,
"filter": {
"cell_types": [],
"scene_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_agent": "<string>",
"tenant_id": "<string>"
}
}
'import requests
url = "http://localhost:8080/v1/recall"
payload = {
"text": "<string>",
"k": 10,
"filter": {
"cell_types": [],
"scene_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_agent": "<string>",
"tenant_id": "<string>"
}
}
headers = {
"x-hyphae-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-hyphae-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: '<string>',
k: 10,
filter: {
cell_types: [],
scene_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_agent: '<string>',
tenant_id: '<string>'
}
})
};
fetch('http://localhost:8080/v1/recall', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/v1/recall",
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([
'text' => '<string>',
'k' => 10,
'filter' => [
'cell_types' => [
],
'scene_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source_agent' => '<string>',
'tenant_id' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-hyphae-key: <api-key>"
],
]);
$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 := "http://localhost:8080/v1/recall"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"k\": 10,\n \"filter\": {\n \"cell_types\": [],\n \"scene_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_agent\": \"<string>\",\n \"tenant_id\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-hyphae-key", "<api-key>")
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("http://localhost:8080/v1/recall")
.header("x-hyphae-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"k\": 10,\n \"filter\": {\n \"cell_types\": [],\n \"scene_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_agent\": \"<string>\",\n \"tenant_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/v1/recall")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-hyphae-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"k\": 10,\n \"filter\": {\n \"cell_types\": [],\n \"scene_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_agent\": \"<string>\",\n \"tenant_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "<string>",
"embedding": [
123
],
"node_type": "Scene",
"cell_type": "Decision",
"content": "<string>",
"salience": 0.5,
"source_agent": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_accessed": "2023-11-07T05:31:56Z",
"layer": "L0",
"scene_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"superseded_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}Recall similar cells (layer L0)
Layer-L0 similarity recall. Returns a JSON array of fully hydrated knowledge nodes in rank order (nearest-first). No score is on the wire — the array order conveys the rank.
curl --request POST \
--url http://localhost:8080/v1/recall \
--header 'Content-Type: application/json' \
--header 'x-hyphae-key: <api-key>' \
--data '
{
"text": "<string>",
"k": 10,
"filter": {
"cell_types": [],
"scene_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_agent": "<string>",
"tenant_id": "<string>"
}
}
'import requests
url = "http://localhost:8080/v1/recall"
payload = {
"text": "<string>",
"k": 10,
"filter": {
"cell_types": [],
"scene_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_agent": "<string>",
"tenant_id": "<string>"
}
}
headers = {
"x-hyphae-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-hyphae-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: '<string>',
k: 10,
filter: {
cell_types: [],
scene_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_agent: '<string>',
tenant_id: '<string>'
}
})
};
fetch('http://localhost:8080/v1/recall', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/v1/recall",
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([
'text' => '<string>',
'k' => 10,
'filter' => [
'cell_types' => [
],
'scene_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source_agent' => '<string>',
'tenant_id' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-hyphae-key: <api-key>"
],
]);
$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 := "http://localhost:8080/v1/recall"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"k\": 10,\n \"filter\": {\n \"cell_types\": [],\n \"scene_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_agent\": \"<string>\",\n \"tenant_id\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-hyphae-key", "<api-key>")
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("http://localhost:8080/v1/recall")
.header("x-hyphae-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"k\": 10,\n \"filter\": {\n \"cell_types\": [],\n \"scene_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_agent\": \"<string>\",\n \"tenant_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/v1/recall")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-hyphae-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"k\": 10,\n \"filter\": {\n \"cell_types\": [],\n \"scene_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_agent\": \"<string>\",\n \"tenant_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "<string>",
"embedding": [
123
],
"node_type": "Scene",
"cell_type": "Decision",
"content": "<string>",
"salience": 0.5,
"source_agent": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_accessed": "2023-11-07T05:31:56Z",
"layer": "L0",
"scene_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"superseded_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}Authorizations
The API key issued for the calling agent. Required on every endpoint except GET /healthz.
Body
The body for POST /v1/recall.
The query text to embed and recall against.
The maximum number of nodes to return.
x >= 1Structural filter for recall/query. source_agent and tenant_id here are client-convenience filters; the enforced read boundary is applied separately by the server.
Show child attributes
Show child attributes
Response
Hydrated nodes in rank order (nearest-first).
Always set; default in V1.
The cell's embedding vector.
What a graph node represents. Serialized as an externally-tagged enum: the unit variant Scene is the bare string "Scene"; the data-carrying variants are single-key objects (Cell, Agent, Beacon).
Scene The nine cell types the energy and promotion models are calibrated against.
Decision, Constraint, Risk, Pattern, Lesson, Fact, Preference, Context, Task Constrained to [0.0, 1.0].
0 <= x <= 1The agent that produced this cell.
Semantic hierarchy. L0 = raw cells, L1 = scene centroids/patterns, L2 = architectural decisions/constraints.
L0, L1, L2 The owning scene, if any.
Supersession pointer; set once this cell has been abstracted into a higher-layer Pattern. null = live.