GeniffyDocs
Changelog Log In Get a key

Any framework

Geniffy works with any model and any framework, because it doesn't wrap your model. You add two calls around the model call you already make: one before it answers, and one after.

The two calls

1

Before the model answers, recall

context() returns what is known about this user that bears on their message, written out for a prompt, each line with where it came from. Put it in your system prompt or instructions.

2

After it answers, remember

Add the exchange with memories.add(). Geniffy learns from what the user said, so their next conversation starts knowing it.

Both calls go through a client bound to one of your users with space(), so what one user said never reaches another.

memory.py
from geniffy import Geniffy

geniffy = Geniffy()                      # reads GENIFFY_API_KEY


def answer(user_id: str, message: str, generate) -> str:
    """generate(system, message) is your own model call, with any provider."""
    mem = geniffy.space(f"user_{user_id}")
    context = mem.context(message)       # what is known that bears on the message
    system = f"You are a helpful assistant.\n\n<memory>\n{context}\n</memory>"
    reply = generate(system, message)
    mem.memories.add(messages=[{"role": "user", "content": message},
                               {"role": "assistant", "content": reply}])
    return reply

When nothing is known yet, context() says so in one sentence instead of coming back empty, so the model says it doesn't know rather than guessing. See When nothing is known.

With your stack

Each page has the same two calls in the shape that framework expects, tested against the framework itself.

Model providers

With Claude, Geniffy can also be where Claude's memory tool keeps its files: the notes Claude writes for itself go in each user's memory, exactly as written, and recall reads them too.

Python agents

Also for Python: Strands Agents, AutoGen and Haystack.

TypeScript agents

Voice and no-code

Phone agents on Vapi, Retell and Bolna are covered too, from your own server: see Vapi, Retell and Bolna. So are assistants on WhatsApp, Telegram, Slack, and SMS or WhatsApp through Twilio.

Five of them have a package that makes both calls for you, open source and tested against the framework:

Framework Package
Vercel AI SDK npm install geniffy-ai-sdk
LangChain pip install langchain-geniffy
LlamaIndex pip install llama-index-memory-geniffy
OpenAI Agents SDK pip install openai-agents-geniffy
Pipecat pip install "geniffy[pipecat]"

Using a framework that isn't listed? Put context() wherever it builds the system prompt or instructions, and memories.add() wherever it hands you the finished reply.

Data sources

Each sync learns only what changed and deletes what is gone. Gmail, Google Calendar, Google Drive, Notion and OneDrive work with each user's own sign-in and forget everything from it when they disconnect; GitHub, Linear, Confluence, Amazon S3 and any website go in a memory of their own, and Zendesk gives each of your customers a memory of their support history. For a source not listed, see Sync a data source.

Recall first, or as a tool

There are two ways to put memory in front of a model, and most apps want the first.

Recall first Recall as a tool
How it works briefing() or context() runs before every reply The model calls recall when it decides to
Model calls per reply One Two or more when it looks something up
The model always sees what is known Yes Only when it asks
Best for Assistants, support and companions Agents that plan and look things up as they go

Recall first reads one of two ways. briefing() is read without a model call, fast enough for every turn and every call, which is why the voice pages use it. context() has a model judge what bears on the message, for when nothing may be invented, and it is what the framework pages show. See Recall.

They also work together: recall first for what bears on the message, and the tool for when the model needs to look further. Every model provider and agent framework page shows both.

A recall tool

Give the model one tool, named recall, and answer each call with mem.context(query):

recall.json
{
  "name": "recall",
  "description": "Look up what is known about the user, with where it came from.",
  "parameters": {
    "type": "object",
    "properties": { "query": { "type": "string", "description": "What to look up" } },
    "required": ["query"]
  }
}

Anthropic calls the schema input_schema, OpenAI calls it parameters, and the Vercel AI SDK takes it as inputSchema. Tell the model when to use it in your instructions, for example: Use recall before answering anything that depends on what the user said before.

Saving what was said

  • Save each exchange once, after the reply. memories.add() returns as soon as the conversation is stored, and learning happens after, so saving never holds up the reply.
  • Send messages as your framework holds them. Anthropic content blocks, OpenAI parts and Vercel AI SDK parts all go in as they are. Only text is read: images, tool calls and tool results are skipped, and so are system and developer messages.
  • Who said what is kept. What your user says becomes a fact about them, and what your assistant says stays the assistant's.

See Conversations for everything memories.add() accepts.

Last updated October 16, 2026