Getting started
Give each of your users a memory: write what they tell you, and put what is known about them in front of your model. Four steps, and every snippet runs as printed.
Prerequisites
Give your app a memory
From a key to a prompt that knows your user. Every call is plain HTTPS with a bearer key, so the curl tab works from any language.
Get a key
Make one under API keys in the Geniffy app. It is shown once, so put it straight into an environment variable. A key reaches your own memory and every space your code opens beneath it.
export GENIFFY_API_KEY="gnf_live_..."Install the SDK
pip install geniffyuv add geniffynpm install geniffypnpm add geniffybun add geniffyRemember something
Bind the client to one of your users with space(). Whatever you write through it is theirs alone: no
other space can read it, and neither can your own memory.
from geniffy import Geniffy
client = Geniffy() # reads GENIFFY_API_KEY
mem = client.space("customer_1042") # one of your users
source = mem.memories.add("Priya Nair signs the Lumen renewal, and it comes up in March.")
mem.sources.wait(source.id) # learning usually takes a few secondsimport { Geniffy } from "geniffy";
const client = new Geniffy(); // reads GENIFFY_API_KEY
const mem = client.space("customer_1042"); // one of your users
const source = await mem.memories.add("Priya Nair signs the Lumen renewal, and it comes up in March.");
await mem.sources.wait(source.id); // learning usually takes a few secondscurl https://api.geniffy.com/v1/memories \
-H "Authorization: Bearer $GENIFFY_API_KEY" \
-H "X-Geniffy-Space: customer_1042" \
-H "Content-Type: application/json" \
-d '{"text": "Priya Nair signs the Lumen renewal, and it comes up in March."}'Geniffy reads what you add and keeps each fact in it as its own memory, with what you added as its source.
Put what it knows in your prompt
context() returns the memories that bear on a question, already written out for a prompt, each line
saying where it came from.
context = mem.context("Who signs the Lumen renewal?")
prompt = f"{context}\n\nUser: Who signs the Lumen renewal?"const context = await mem.context("Who signs the Lumen renewal?");
const prompt = `${context}\n\nUser: Who signs the Lumen renewal?`;curl https://api.geniffy.com/v1/context \
-H "Authorization: Bearer $GENIFFY_API_KEY" \
-H "X-Geniffy-Space: customer_1042" \
-H "Content-Type: application/json" \
-d '{"question": "Who signs the Lumen renewal?"}'What comes back:
- Priya Nair signs the Lumen renewal. [note, 2026-10-05]
- The Lumen renewal comes up in March 2027. [note, 2026-10-05]Each line says where it came from and when. Dates are kept as dates: "comes up in March", written in October, is held as March 2027. The wording of each memory is Geniffy's own, so yours may read a little differently.
See the Python and TypeScript SDKs for every call.
When nothing is known, it says so
Ask about something that was never stored and context() returns one sentence instead of an empty
string:
There is nothing stored about this yet. Say so rather than guessing.A model reads silence as permission to invent. This keeps it honest, and it is the same judgement ask()
makes. See When nothing is known.
Next steps
- Keys and spaces: one memory per user, and the one mistake to avoid
- Add memories: conversations, files, web pages and batches
- Recall: when to use context, ask or search
- Production checklist: what to set before your app goes live
- Errors and limits: what can go wrong, and how to find any call again