Read memories
This guide shows how to read memories with each of Alvia’s six read operations, and which one to use. Every read answers from what applies now.
For endpoint schemas and status codes, use the API reference.
Choose a read
Section titled “Choose a read”| You need | Operation | Endpoint |
|---|---|---|
| A short answer to put in a prompt or act on | Context | POST /v1/memories/context |
| The one memory that best matches, with its ID and details | Recall | POST /v1/memories/recall |
| Several candidate memories, ranked | Search | POST /v1/memories/search |
| A memory whose ID you already have | Get | GET /v1/memories/{memory_id} |
| A memory’s versions and relationships | Inspect | GET /v1/memories/{memory_id}/inspect |
| Every memory, for example to show or export them | List | GET /v1/memories |
Request fields
Section titled “Request fields”Context, recall and search take the same request body:
| Field | Required | Description |
|---|---|---|
query |
Yes | The question, 1 to 1,000 characters. |
scope |
No | Limit the read to matching memories. See Projects and scope. |
occurred_after |
No | Only memories from this time on. See Point-in-Time Reasoning and change over time. |
occurred_before |
No | Only memories from before this time. |
limit |
No | Search only: how many results, 1 to 50. Defaults to 25. Values outside the range are clamped. |
Write the query as the question your application needs answered, such as “What did Acme decide about the onboarding rollout?”.
Combine read filters
Section titled “Combine read filters”Use scope for the user, agent or application whose memories you need. Scope fields narrow the
result together. Add occurred_after and occurred_before only when the date range is part of
the question; see Filter by date for what they
include.
Get context
Section titled “Get context”Context finds the memory that best matches the query and resolves it with its related and contradicting memories into one to three sentences.
curl https://api.alvia.ai/v1/memories/context \ -H "Authorization: Bearer $ALVIA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "What did Acme decide about the rollout?", "scope": { "organization_id": "acme" } }'import osimport requests
API_KEY = os.environ["ALVIA_API_KEY"]
def get_context(query: str, scope: dict) -> str | None: """Returns the resolved context, or None when Alvia has none.""" response = requests.post( "https://api.alvia.ai/v1/memories/context", headers={"Authorization": f"Bearer {API_KEY}"}, json={"query": query, "scope": scope}, timeout=30, ) if response.status_code == 404: return None response.raise_for_status() return response.json()["context"]
scope = {"organization_id": "acme"}print(get_context("What did Acme decide about the rollout?", scope))/** Returns the resolved context, or null when Alvia has none. */async function getContext(query, scope) { const response = await fetch( "https://api.alvia.ai/v1/memories/context", { method: "POST", headers: { Authorization: `Bearer ${process.env.ALVIA_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ query, scope }), }, ); if (response.status === 404) return null; if (!response.ok) { throw new Error(`${response.status}: ${await response.text()}`); } return (await response.json()).context;}
const scope = { organization_id: "acme" };console.log( await getContext("What did Acme decide about the rollout?", scope),);package main
import ( "bytes" "encoding/json" "fmt" "io" "log" "net/http" "os" "time")
var client = &http.Client{Timeout: 30 * time.Second}
// getContext returns the resolved context. found is false when Alvia// has none.func getContext(query string, scope map[string]string) ( context string, found bool, err error,) { payload, err := json.Marshal(map[string]any{ "query": query, "scope": scope, }) if err != nil { return "", false, err } req, err := http.NewRequest(http.MethodPost, "https://api.alvia.ai/v1/memories/context", bytes.NewReader(payload)) if err != nil { return "", false, err } key := os.Getenv("ALVIA_API_KEY") req.Header.Set("Authorization", "Bearer "+key) req.Header.Set("Content-Type", "application/json") resp, err := client.Do(req) if err != nil { return "", false, err } defer resp.Body.Close() switch resp.StatusCode { case http.StatusNotFound: return "", false, nil case http.StatusOK: var answer struct { Context string `json:"context"` } err := json.NewDecoder(resp.Body).Decode(&answer) return answer.Context, err == nil, err default: body, _ := io.ReadAll(resp.Body) return "", false, fmt.Errorf("%s: %s", resp.Status, body) }}
func main() { query := "What did Acme decide about the rollout?" scope := map[string]string{"organization_id": "acme"} answer, found, err := getContext(query, scope) if err != nil { log.Fatal(err) } if found { fmt.Println(answer) }}using System.Net;using System.Net.Http.Json;using System.Text.Json;
var key = Environment.GetEnvironmentVariable("ALVIA_API_KEY");using var http = new HttpClient();http.Timeout = TimeSpan.FromSeconds(30);http.DefaultRequestHeaders.Authorization = new("Bearer", key);
// Returns the resolved context, or null when Alvia has none.async Task<string?> GetContext(string query, object scope){ var response = await http.PostAsJsonAsync( "https://api.alvia.ai/v1/memories/context", new { query, scope }); if (response.StatusCode == HttpStatusCode.NotFound) return null; response.EnsureSuccessStatusCode(); var body = await response.Content .ReadFromJsonAsync<JsonElement>(); return body.GetProperty("context").GetString();}
var scope = new { organization_id = "acme" };Console.WriteLine(await GetContext( "What did Acme decide about the rollout?", scope));{ "context": "Acme replaced its company-wide launch with a finance-team pilot on September 24, 2026. The wider rollout waits until its security review is complete."}When Alvia has no context for the question right now, the response is 404 with code
not_found: for example, no memory matches the query. Treat it as “no context for now”: answer
without it, or ask the user. Each call looks again, so a later call can return context. If
context returns 404 on every call, check the scope and that memories have formed.
When context cannot finish its answer in time, it returns 503 with code capacity_exceeded.
Answer without context while a user waits, or retry after Retry-After.
Alvia writes the answer from the current text of the best match and of the memories linked to it, with the date each was stated. Use the answer as context for your model or your logic, and keep the decision in your application. A new version or a forget of a memory the answer used shows in the next answer.
Recall the best memory
Section titled “Recall the best memory”Recall returns the single best memory, with its ID, so you can show it, give feedback on it or forget it.
curl https://api.alvia.ai/v1/memories/recall \ -H "Authorization: Bearer $ALVIA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "Where should invoices go?", "scope": { "organization_id": "acme" } }'import osimport requests
API_KEY = os.environ["ALVIA_API_KEY"]
response = requests.post( "https://api.alvia.ai/v1/memories/recall", headers={"Authorization": f"Bearer {API_KEY}"}, json={ "query": "Where should invoices go?", "scope": {"organization_id": "acme"}, }, timeout=30,)response.raise_for_status()memory = response.json()if memory["status"] == "active": print(memory["memory_id"], memory["content"])const response = await fetch( "https://api.alvia.ai/v1/memories/recall", { method: "POST", headers: { Authorization: `Bearer ${process.env.ALVIA_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ query: "Where should invoices go?", scope: { organization_id: "acme" }, }), signal: AbortSignal.timeout(30_000), },);if (!response.ok) { throw new Error(`${response.status}: ${await response.text()}`);}const memory = await response.json();if (memory.status === "active") { console.log(memory.memory_id, memory.content);}package main
import ( "encoding/json" "fmt" "io" "log" "net/http" "os" "strings" "time")
func main() { req, err := http.NewRequest(http.MethodPost, "https://api.alvia.ai/v1/memories/recall", strings.NewReader(`{ "query": "Where should invoices go?", "scope": { "organization_id": "acme" }}`)) if err != nil { log.Fatal(err) } req.Header.Set("Authorization", "Bearer "+os.Getenv("ALVIA_API_KEY")) req.Header.Set("Content-Type", "application/json") client := &http.Client{Timeout: 30 * time.Second} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { body, _ := io.ReadAll(resp.Body) log.Fatalf("%s: %s", resp.Status, body) } var memory struct { Status string `json:"status"` MemoryID string `json:"memory_id"` Content string `json:"content"` } if err := json.NewDecoder(resp.Body).Decode(&memory); err != nil { log.Fatal(err) } if memory.Status == "active" { fmt.Println(memory.MemoryID, memory.Content) }}using System.Net.Http.Headers;using System.Net.Http.Json;using System.Text.Json;
using var http = new HttpClient{ Timeout = TimeSpan.FromSeconds(30),};http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALVIA_API_KEY"));using var response = await http.PostAsJsonAsync( "https://api.alvia.ai/v1/memories/recall", new{ query = "Where should invoices go?", scope = new { organization_id = "acme" },});response.EnsureSuccessStatusCode();var memory = await response.Content .ReadFromJsonAsync<JsonElement>();if (memory.GetProperty("status").GetString() == "active"){ var id = memory.GetProperty("memory_id"); Console.WriteLine($"{id} {memory.GetProperty("content")}");}{ "status": "active", "memory_id": "mem_01K6Z1M4TB7D9E2F5G8H3J6K0P", "content": "Acme's invoices go to ap@acme.example.", "category": "preference", "is_favorited": false, "sentiment": "neutral", "occurred_at": "2026-10-02T11:15:00-07:00", "ranked_score": 0.8731, "scope": { "organization_id": "acme", "user_id": "u_4821", "application_id": null, "agent_id": null, "team_id": null }, "entities": { "organization/Acme": 0.71, "identifier/ap@acme.example": 0.29 }}A recall miss returns 200 with status not_found, so a miss needs no error handling:
{ "status": "not_found" }Check status to tell a match from a miss. On recall, 404 means the project’s deletion started
during the call.
Search memories
Section titled “Search memories”Search returns up to limit memories, best first:
curl https://api.alvia.ai/v1/memories/search \ -H "Authorization: Bearer $ALVIA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "Atlas migration plans", "limit": 5 }'import osimport requests
API_KEY = os.environ["ALVIA_API_KEY"]
response = requests.post( "https://api.alvia.ai/v1/memories/search", headers={"Authorization": f"Bearer {API_KEY}"}, json={"query": "Atlas migration plans", "limit": 5}, timeout=30,)response.raise_for_status()print(response.json())const response = await fetch( "https://api.alvia.ai/v1/memories/search", { method: "POST", headers: { Authorization: `Bearer ${process.env.ALVIA_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ query: "Atlas migration plans", limit: 5, }), signal: AbortSignal.timeout(30_000), },);if (!response.ok) { throw new Error(`${response.status}: ${await response.text()}`);}console.log(await response.json());package main
import ( "fmt" "io" "log" "net/http" "os" "strings" "time")
func main() { req, err := http.NewRequest(http.MethodPost, "https://api.alvia.ai/v1/memories/search", strings.NewReader(`{ "query": "Atlas migration plans", "limit": 5}`)) if err != nil { log.Fatal(err) } req.Header.Set("Authorization", "Bearer "+os.Getenv("ALVIA_API_KEY")) req.Header.Set("Content-Type", "application/json") client := &http.Client{Timeout: 30 * time.Second} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close() data, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } if resp.StatusCode != http.StatusOK { log.Fatalf("%s: %s", resp.Status, data) } fmt.Println(string(data))}using System.Net.Http.Headers;using System.Net.Http.Json;
using var http = new HttpClient{ Timeout = TimeSpan.FromSeconds(30),};http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALVIA_API_KEY"));using var response = await http.PostAsJsonAsync( "https://api.alvia.ai/v1/memories/search", new{ query = "Atlas migration plans", limit = 5,});response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());{ "object": "list", "data": [ { "status": "active", "memory_id": "mem_01K6YB2C8D5E7F9G1H3J4K6M8N", "content": "The team froze Atlas schema changes until the cutover on October 6, 2026.", "category": "decision", "is_favorited": false, "sentiment": "neutral", "occurred_at": "2026-09-28T16:30:00-04:00", "ranked_score": 0.9112, "scope": { "organization_id": "acme", "user_id": null, "application_id": "eng-assistant", "agent_id": null, "team_id": null }, "entities": { "project/Atlas": 0.64, "datetime/October 6, 2026": 0.36 } } ], "has_more": false, "url": "/v1/memories/search"}Search returns its best candidates ranked by ranked_score, with no minimum score, so it returns
results even for a loose match. Compare ranked_score within one response and apply your own
cut-off to keep the matches that fit your use. Search returns its results in one response, so
has_more is false.
Get one memory
Section titled “Get one memory”Get returns one active memory, in the same shape as recall but without ranked_score:
curl https://api.alvia.ai/v1/memories/mem_01K6Z1M4TB7D9E2F5G8H3J6K0P \ -H "Authorization: Bearer $ALVIA_API_KEY"import osimport requests
API_KEY = os.environ["ALVIA_API_KEY"]memory_id = "mem_01K6Z1M4TB7D9E2F5G8H3J6K0P"
response = requests.get( f"https://api.alvia.ai/v1/memories/{memory_id}", headers={"Authorization": f"Bearer {API_KEY}"}, timeout=30,)response.raise_for_status()print(response.json())const memoryId = "mem_01K6Z1M4TB7D9E2F5G8H3J6K0P";const response = await fetch( `https://api.alvia.ai/v1/memories/${memoryId}`, { headers: { Authorization: `Bearer ${process.env.ALVIA_API_KEY}`, }, signal: AbortSignal.timeout(30_000), },);if (!response.ok) { throw new Error(`${response.status}: ${await response.text()}`);}console.log(await response.json());package main
import ( "fmt" "io" "log" "net/http" "os" "time")
func main() { memoryID := "mem_01K6Z1M4TB7D9E2F5G8H3J6K0P" req, err := http.NewRequest(http.MethodGet, "https://api.alvia.ai/v1/memories/"+memoryID, nil) if err != nil { log.Fatal(err) } req.Header.Set("Authorization", "Bearer "+os.Getenv("ALVIA_API_KEY")) client := &http.Client{Timeout: 30 * time.Second} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close() data, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } if resp.StatusCode != http.StatusOK { log.Fatalf("%s: %s", resp.Status, data) } fmt.Println(string(data))}using System.Net.Http.Headers;using System.Net.Http.Json;
using var http = new HttpClient{ Timeout = TimeSpan.FromSeconds(30),};http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALVIA_API_KEY"));using var response = await http.GetAsync( "https://api.alvia.ai" + "/v1/memories/mem_01K6Z1M4TB7D9E2F5G8H3J6K0P");response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());It returns 404 when the memory does not exist, was forgotten, is still forming or belongs to
another project.
Inspect a memory
Section titled “Inspect a memory”Inspect returns one active memory with its versions, how Alvia classified each one and why, and its relationships to other active memories. Use it to show how a memory changed and what it relates to. To read a memory’s current text, use get.
curl \ https://api.alvia.ai/v1/memories/mem_01K6R8QJ2N4P6S8T0V2X4Z6B8D/inspect \ -H "Authorization: Bearer $ALVIA_API_KEY"import osimport requests
API_KEY = os.environ["ALVIA_API_KEY"]memory_id = "mem_01K6R8QJ2N4P6S8T0V2X4Z6B8D"
response = requests.get( f"https://api.alvia.ai/v1/memories/{memory_id}/inspect", headers={"Authorization": f"Bearer {API_KEY}"}, timeout=30,)response.raise_for_status()print(response.json())const memoryId = "mem_01K6R8QJ2N4P6S8T0V2X4Z6B8D";const response = await fetch( `https://api.alvia.ai/v1/memories/${memoryId}/inspect`, { headers: { Authorization: `Bearer ${process.env.ALVIA_API_KEY}`, }, signal: AbortSignal.timeout(30_000), },);if (!response.ok) { throw new Error(`${response.status}: ${await response.text()}`);}console.log(await response.json());package main
import ( "fmt" "io" "log" "net/http" "os" "time")
func main() { memoryID := "mem_01K6R8QJ2N4P6S8T0V2X4Z6B8D" req, err := http.NewRequest(http.MethodGet, "https://api.alvia.ai/v1/memories/"+memoryID+"/inspect", nil) if err != nil { log.Fatal(err) } req.Header.Set("Authorization", "Bearer "+os.Getenv("ALVIA_API_KEY")) client := &http.Client{Timeout: 30 * time.Second} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close() data, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } if resp.StatusCode != http.StatusOK { log.Fatalf("%s: %s", resp.Status, data) } fmt.Println(string(data))}using System.Net.Http.Headers;using System.Net.Http.Json;
using var http = new HttpClient{ Timeout = TimeSpan.FromSeconds(30),};http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALVIA_API_KEY"));using var response = await http.GetAsync( "https://api.alvia.ai/v1/memories" + "/mem_01K6R8QJ2N4P6S8T0V2X4Z6B8D/inspect");response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());This response is for the Atlas memory in Example: a database upgrade in Change over time. In this example, Alvia classifies the September statement as a supersession, so the memory has two versions:
{ "memory_id": "mem_01K6R8QJ2N4P6S8T0V2X4Z6B8D", "scope": { "organization_id": "acme", "user_id": null, "application_id": "eng-assistant", "agent_id": null, "team_id": null }, "occurred_at": "2026-09-29T09:00:00-04:00", "is_favorited": false, "sentiment": "neutral", "head_version": 2, "versions": [ { "version": 2, "content": "Atlas uses PostgreSQL 17 as its primary database (stated September 29, 2026).", "category": "decision", "entities": { "project/Atlas": 0.51, "tool/PostgreSQL 17": 0.49 }, "occurred_at": "2026-09-29T09:00:00-04:00", "created_at": "2026-09-29T13:00:41.218Z", "outcome": "supersession", "explanation": "The new statement replaces PostgreSQL 16 with PostgreSQL 17 as the Atlas primary database." }, { "version": 1, "content": "The Atlas team chose PostgreSQL 16 as its primary database (stated March 10, 2026).", "category": "decision", "entities": { "project/Atlas": 0.52, "tool/PostgreSQL 16": 0.48 }, "occurred_at": "2026-03-10T10:00:00-05:00", "created_at": "2026-03-10T15:00:38.402Z", "outcome": "novel" } ], "relationships": [ { "target_id": "mem_01K6S4H7MC3R5T7V9X1Z3B5D7F", "edge_type": "related", "created_at": "2026-04-02T14:21:07.730Z" } ]}The response holds the memory’s memory_id, scope, occurred_at, is_favorited and
sentiment, as get does, and these fields:
| Field | Description |
|---|---|
head_version |
The number of the current version. |
versions |
The memory’s newest versions, up to 100, newest first. The first is the current one. |
relationships |
The memory’s newest relationships to active memories, up to 20, newest first. |
Each version has these fields:
| Field | Description |
|---|---|
version |
The version number. The first version is 1. |
content |
The text of this version. |
category |
The kind of fact. See Category. |
entities |
The things this version names, as "type/name" keys with a weight from 0 to 1. |
occurred_at |
The memory’s occurred_at as of this version. A new version keeps the previous version’s time when it is later. |
created_at |
When Alvia recorded this version, in UTC. |
outcome |
How Alvia classified the fact that formed this version. See Classification. |
explanation |
Why the classifier chose the outcome. A novel first version has none, so the field is left out. |
Each relationship has these fields:
| Field | Description |
|---|---|
target_id |
The related memory’s ID. Get or inspect that memory by its ID. |
edge_type |
related, or contradiction when the two memories conflict. |
created_at |
When Alvia recorded the relationship, in UTC. |
The dashboard shows the same versions and relationships in a memory’s
History and Relationships. Inspect returns 404 when the memory does not exist, was
forgotten, is still forming or belongs to another project.
List memories
Section titled “List memories”List orders active memories by when each first formed, newest first: a memory imported today
with an older occurred_at lists before memories written earlier, and a new version keeps a
memory’s place. It takes these query parameters:
limit: 1 to 20, default 10starting_after: the ID of the last memory on the previous page, to get the next pageending_before: the ID of the first memory on the current page, to go back a page- the scope fields, such as
organization_id
curl "https://api.alvia.ai/v1/memories?limit=20&organization_id=acme" \ -H "Authorization: Bearer $ALVIA_API_KEY"To get every page, repeat the request with starting_after set to the last ID until has_more
is false. Send the same scope parameters on every page:
import osimport requests
API_KEY = os.environ["ALVIA_API_KEY"]
params = {"limit": 20, "organization_id": "acme"}while True: response = requests.get( "https://api.alvia.ai/v1/memories", headers={"Authorization": f"Bearer {API_KEY}"}, params=params, timeout=30, ) response.raise_for_status() page = response.json() for memory in page["data"]: print(memory["memory_id"], memory["content"]) if not page["has_more"]: break params["starting_after"] = page["data"][-1]["memory_id"]const params = new URLSearchParams({ limit: "20", organization_id: "acme",});while (true) { const response = await fetch( `https://api.alvia.ai/v1/memories?${params}`, { headers: { Authorization: `Bearer ${process.env.ALVIA_API_KEY}`, }, }, ); if (!response.ok) { throw new Error(`${response.status}: ${await response.text()}`); } const page = await response.json(); for (const memory of page.data) { console.log(memory.memory_id, memory.content); } if (!page.has_more) break; params.set("starting_after", page.data.at(-1).memory_id);}package main
import ( "encoding/json" "fmt" "io" "log" "net/http" "net/url" "os" "time")
type page struct { Data []struct { MemoryID string `json:"memory_id"` Content string `json:"content"` } `json:"data"` HasMore bool `json:"has_more"`}
func main() { client := &http.Client{Timeout: 30 * time.Second} key := os.Getenv("ALVIA_API_KEY") params := url.Values{"limit": {"20"}, "organization_id": {"acme"}} for { endpoint := "https://api.alvia.ai/v1/memories?" + params.Encode() req, err := http.NewRequest(http.MethodGet, endpoint, nil) if err != nil { log.Fatal(err) } req.Header.Set("Authorization", "Bearer "+key) resp, err := client.Do(req) if err != nil { log.Fatal(err) } if resp.StatusCode != http.StatusOK { body, _ := io.ReadAll(resp.Body) log.Fatalf("%s: %s", resp.Status, body) } var p page err = json.NewDecoder(resp.Body).Decode(&p) resp.Body.Close() if err != nil { log.Fatal(err) } for _, memory := range p.Data { fmt.Println(memory.MemoryID, memory.Content) } if !p.HasMore { break } params.Set("starting_after", p.Data[len(p.Data)-1].MemoryID) }}using System.Net.Http.Json;using System.Text.Json;
var key = Environment.GetEnvironmentVariable("ALVIA_API_KEY");using var http = new HttpClient();http.Timeout = TimeSpan.FromSeconds(30);http.DefaultRequestHeaders.Authorization = new("Bearer", key);
string? startingAfter = null;while (true){ var url = "https://api.alvia.ai/v1/memories" + "?limit=20&organization_id=acme"; if (startingAfter is not null) { url += $"&starting_after={startingAfter}"; } var page = await http.GetFromJsonAsync<JsonElement>(url); var memories = page.GetProperty("data").EnumerateArray().ToList(); foreach (var memory in memories) { var id = memory.GetProperty("memory_id"); Console.WriteLine($"{id} {memory.GetProperty("content")}"); } if (!page.GetProperty("has_more").GetBoolean()) break; startingAfter = memories[^1].GetProperty("memory_id").GetString();}Response fields
Section titled “Response fields”| Field | Description |
|---|---|
status |
active for a memory, not_found for a recall miss. |
memory_id |
The memory’s ID: mem_ and 26 characters. |
content |
The current text. Alvia can add resolved dates to it, as in “(stated September 23, 2026)”. |
category |
The kind of fact. See Category. |
is_favorited |
Whether you marked the memory as a favorite. |
sentiment |
The feedback you gave: neutral, positive or negative. |
occurred_at |
When the memory’s content was stated or observed, in the offset it was sent with. |
ranked_score |
Search and recall only. Relevance from 0 to 1; compare within one response only. |
scope |
All five scope fields, in lowercase. Fields you did not set are null. |
entities |
The things the memory names, as "type/name" keys with a weight from 0 to 1. |
New fields can appear in responses. Ignore fields you do not use, and handle category values you do not know.
Each completed read uses reads from your monthly allowance, whatever it returns:
- Context uses five reads, a
404included. - Inspect uses three reads, a
404included. - Recall, search and get use one read each, and each page of a list uses one.
Retries
Section titled “Retries”- Retry only reads that failed: network errors,
5xxresponses and429responses, after the wait inRetry-Afteror, without one, a delay. A400or a5xxuses no read. See Production checklist. - A
429withmonthly_read_quota_reachedsucceeds only after the allowance resets. - Do not retry a
400. Fix the request first. - Do not retry a
404from get or inspect: there is no such memory. After a404from context, ask again on a later call, such as the next turn, rather than in a loop.
Errors
Section titled “Errors”| Error | Cause |
|---|---|
400 validation_error |
A field is missing, out of range, too long or unknown, or occurred_before is not after occurred_after. errors names each field. |
400 invalid_argument |
List: a cursor is not a memory ID, or both cursors were sent. |
401 unauthorized |
The API key is missing or not valid. |
404 not_found |
Context: no context for the query right now. Get and inspect: no such active memory. Any read: the project’s deletion started during the call. |
429 rate_limit_exceeded |
Too many requests per second, or context is briefly limited in high demand. Retry after Retry-After. |
429 rate_limit_exceededmonthly_read_quota_reached |
The monthly read allowance is used up. |
503 capacity_exceeded |
Alvia is briefly at capacity, or context could not finish its answer in time. Retry after Retry-After. |
See Errors for every code.