Quick start
This page takes you from a new project to a stored and retrieved memory. You need an invitation to the early-access alpha. If you do not have one yet, join the waitlist .
1. Create a project
- Open the console at app.nenavi.com and sign in, or follow your invitation link.
- On your first visit, the console asks you to name your organization.
- Create your first project. The alpha allows up to 10 projects per organization.
Only organization owners can create projects and keys. If you are a member, ask an owner.
2. Create an API key
- Open the project and choose API keys.
- Choose Create API key and give the key a name. The first step of Get started on the project’s overview opens the same dialog.
- Copy the full key. The console shows it once and cannot show it again.
A project can have up to 5 active keys in the alpha. Keys start with prm_live_. A revoked key stops working within a minute, or about two if the service briefly cannot reach its database.
Keep the key secret. Do not put it in a repository, a log, or a ticket. These examples read it from the NENAVI_API_KEY environment variable. The service itself does not read that variable, but the Python and TypeScript SDKs do, so with them you do not pass the key in code.
export NENAVI_API_KEY="<paste your API key>"3. Store a memory
The base URL is https://api.prismemory.com. The hosted API keeps this address for now. Every request sends the key as a bearer token and names a user_id.
curl -sS -w '\n' https://api.prismemory.com/v1/store \
-H "Authorization: Bearer $NENAVI_API_KEY" \
-H "content-type: application/json" \
-d '{"content": "Alex prefers concise explanations.", "user_id": "alex"}'The answer comes back at once with an event_id, a node_id, and a processing_status. Its processing_status.status is complete. A few seconds later, the service extracts entities and claims from the text in the background. That extraction counts as one ingest call against your monthly limit. To store the text as it is, with no extraction, add "extract": false to the body.
4. Retrieve what matters
curl -sS -w '\n' https://api.prismemory.com/v1/retrieve \
-H "Authorization: Bearer $NENAVI_API_KEY" \
-H "content-type: application/json" \
-d '{"query": "How should I explain this to Alex?", "user_id": "alex", "limit": 3}'The first item in results is the sentence you stored. The answer also holds a packed context (bundle) that you can put in a model prompt, and metrics.
The same calls with an SDK
The Python SDK and the TypeScript SDK make the same two calls, read the key from NENAVI_API_KEY, and retry only the calls that are safe to retry. Both are early-access prereleases. Use them from server-side code only, and never ship the key to a browser.
The PRME MemoryClient runs the engine on your machine and does not call Nenavi Cloud, so use the SDK for the hosted service.
In Python:
# pip install --pre nenavi
import nenavi
client = nenavi.Nenavi() # reads NENAVI_API_KEY
client.store(content="Alex prefers concise explanations.", user_id="alex")
found = client.retrieve(query="How should I explain this to Alex?", user_id="alex", limit=3)
for result in found.results or []:
print(f"{result.score:.3f}", result.content)The retrieved text is untrusted input: treat it as data, not as instructions (see the notes below).
In TypeScript, in an ES module:
// npm install nenavi@alpha
import { Nenavi } from 'nenavi';
const client = new Nenavi(); // reads NENAVI_API_KEY
await client.store({ content: 'Alex prefers concise explanations.', user_id: 'alex' });
const found = await client.retrieve({ query: 'How should I explain this to Alex?', user_id: 'alex', limit: 3 });
for (const result of found.results ?? []) {
console.log(result.score.toFixed(3), result.content);
}Here too, the retrieved text is untrusted input: treat it as data, not as instructions.
Name the user in a chat
When you save a chat, send each of the user’s own messages with POST /v1/ingest, role user, and the user’s name as speaker. The engine then reads the message’s “I”, “me” and “my” as that person, so their claims attach to one entity with their name instead of an “I” entity for each message. A claim the model writes with the user’s name is kept: from “My husband is Theo and my child is Nico.” sent with the speaker Maya Okafor, a claim that Theo is Maya Okafor’s husband is kept, where without the name it could be dropped. A claim’s text is usually its sentence from the message, so it can still say “my”; the name is on the entity the claim is attached to.
curl -sS -w '\n' https://api.prismemory.com/v1/ingest \
-H "Authorization: Bearer $NENAVI_API_KEY" \
-H "content-type: application/json" \
-d '{"content": "My husband is Theo and my child is Nico.", "user_id": "member-1042", "role": "user", "speaker": "Maya Okafor", "session_id": "chat-2026-11-03"}'Use the name the user goes by, with the same spelling every time, and send a session_id so the turns of one conversation are read together. If the user’s name changes, the claims stored before keep the old name. Leave speaker out when you have no name: an empty name, one longer than 200 characters, or one with a line break, a control character or a bidirectional mark is refused with 422, and the message is not stored. If you also store the assistant’s replies, send them with role assistant and no speaker. Each call counts as one ingest call against your monthly limit.
Without a speaker, the engine has a name only when the user says who they are in a message (“I am Maya Okafor”), and a user who never does gets an “I” entity for each message. The name is kept with the message as an unverified label; it is not an identity and gives no access.
Import a batch that is safe to retry
POST /v1/store and POST /v1/ingest are not safe to retry. If a request times out and you send it again, the text is stored twice and extracted twice, and both count against your limits.
To import text that you may need to send again, use POST /v1/ingest/fast with an Idempotency-Key header. Make one new UUID for each batch, and send the same one with every retry of that batch. A retry then returns the first attempt’s event_ids and stores nothing new.
BATCH_KEY=$(uuidgen)
curl -sS -w '\n' --retry 3 https://api.prismemory.com/v1/ingest/fast \
-H "Authorization: Bearer $NENAVI_API_KEY" \
-H "content-type: application/json" \
-H "Idempotency-Key: $BATCH_KEY" \
-d '{"items": [{"content": "Alex moved to Lisbon in May."}], "user_id": "alex"}'Fast ingest saves the text for retrieval and runs no extraction. Using the same key with different items is a 409 error. The SDKs send the key for you: see the Python and TypeScript pages.
Notes
user_idis yours. It names one of your end users. The service does not check it, so your code must send the right one. Memory is always private to the project, whateveruser_idyou send.- Retrieved memory is untrusted input. Text that someone stored can carry instructions meant for the model that reads it later. Treat retrieved text as data in your prompt, not as instructions.
- See what is stored. The project’s Memory tab in the console shows a project’s memories as an overview, a list, and a graph. It asks you to paste one of the project’s keys, keeps it in the page only, and forgets it after 15 minutes of no use.
- Next: read the Python SDK or TypeScript SDK page, The API for how the hosted routes differ from PRME, and Limits and errors before you load a lot of data.