GeniffyDocs
Changelog Log In Get a key

Conversations

Pass the messages as your framework already holds them. Who said what is kept, so "I prefer mornings" from the user becomes a fact about the user, not about your assistant.

mem.memories.add(messages=history)
  • Messages from OpenAI, Anthropic, Gemini, LangChain and the Vercel AI SDK go in as they are: content as a string or as a list of blocks or parts, or parts on its own.
  • System and developer messages are skipped: they are instructions to the model, not something anyone said.
  • Up to 500 messages in one call. A conversation is listed as Conversation unless you give it a title.

Whole sessions, tool calls included

An agent's session is more than what was said. Save it as it goes: the tools your assistant called and what came back go in too, in whichever shape your framework holds them (OpenAI's tool_calls and tool messages, Anthropic's tool_use and tool_result blocks, the Vercel AI SDK's tool parts, Gemini's functionCall and functionResponse, LangChain's tool messages).

run = mem.session(session_id, labels={"project": "checkout"})
run.save(agent_history)          # after every turn: only the new turns are sent
  • Each call adds its turns to one memory for the whole session, however long it gets. Over the API, send only the turns that are new since your last call; save() in the SDKs works that out, 500 messages a call.
  • Facts come only from what people and assistants said. A tool's output is never taken for a fact about anyone; it tells Geniffy what happened, so it can keep where the project stands, the lessons learned and the promises made.
  • Keys, tokens, passwords and private keys are removed before anything is kept, and a tool's long output is kept as its start and its end.
  • Label each session with its project (a repository, a customer account, a ticket queue): where things stand is kept per project, and the briefing reads it back by that name.
  • A short conversation you keep in your own records can go whole instead, under an external_id: sent again as it grows, only the new turns are learned.

Conversations from the past

When you bring in a conversation that happened before today, say when with said_at: an ISO 8601 date or time. What it teaches is dated by it, so "we moved the launch to May", said last March, is not taken for something said this morning, and a newer conversation replaces what an older one said.

from datetime import datetime, timezone

mem.memories.add(messages=history, said_at=datetime(2025, 3, 4, 9, 30, tzinfo=timezone.utc))
  • Left out, it was said now. A date alone (2025-03-04) is taken as the middle of that day, in UTC; a time with a zone is kept as the moment it names.
  • It works the same for a note, and for each item of a batch. A date in the future is refused, and so is said_at with a web page, which is read as it is today.
Last updated October 9, 2026