Skip to main content

Geniffy

Geniffy for LlamaIndex

Give a LlamaIndex agent a memory of each of your users. Add one memory block, and before the agent answers, LlamaIndex puts what is known about the user into the system message, each line with where it came from. After the run, save the exchange. When nothing is known, the model is told so, and says so instead of guessing.

CI PyPI Docs

pip install llama-index-memory-geniffy

Set GENIFFY_API_KEY from API keys in the Geniffy app. Keep it on your server.

The memory block

from llama_index.core.agent.workflow import FunctionAgent
from llama_index.core.memory import Memory
from llama_index.llms.anthropic import Anthropic
from llama_index.memory.geniffy import GeniffyMemoryBlock

agent = FunctionAgent(llm=Anthropic(model="claude-opus-5-5"), system_prompt="You are a helpful assistant.")


async def chat(user_id: str, message: str) -> str:
    block = GeniffyMemoryBlock(space=f"user_{user_id}")       # the user from your own sign-in
    memory = Memory.from_defaults(session_id=f"user_{user_id}", memory_blocks=[block])
    reply = await agent.run(user_msg=message, memory=memory)
    await block.remember(message, reply)                      # the exchange, saved to that user's space
    return str(reply)
  • Before the agent answers, what is known that bears on the user's latest message goes in the system message, inside LlamaIndex's <memory> section. In a run with tools, Geniffy is asked once, not once per step.
  • remember() saves the exchange. LlamaIndex only hands a block the messages that overflow its short-term history, which most conversations never reach, so each exchange is saved this way instead. To save the overflow too, pass accept_short_term_memory=True and don't call remember(), or an exchange is saved twice.
  • If Geniffy can't be reached, the agent goes on without memory, and on_error hears about it.

Options: instructions to change what the model is told about the memory, and client to share your own geniffy.AsyncGeniffy. Without one, a client is made for each event loop and shared by every block.

Tools

To let the agent decide when to look something up or save it:

from llama_index.memory.geniffy import geniffy_tools

agent = FunctionAgent(llm=llm, tools=geniffy_tools(space=f"user_{user_id}"))   # recall and remember

Make the tools per user (per request), so the model never sees or chooses whose memory it reads.

One space per user

space is required: the user this is for. Each space is a memory of its own, and nothing else can read it. space=None is your own memory, never your users' data, and a blank space is refused, so a user with no id can't end up in it. When a user deletes their account, forget them with AsyncGeniffy().forget_space(...) from the geniffy SDK.

Develop

pip install -e ".[test]" && pytest     # through LlamaIndex's own FunctionAgent and Memory, with a scripted LLM

Security

Report a vulnerability to ops@geniffy.com, not in a public issue. See the security policy.

Metadata

Release files for llama-index-memory-geniffy 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-memory-geniffy 0.1.0
File Size Uploaded
llama_index_memory_geniffy-0.1.0.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-memory-geniffy 0.1.0
File Interpreter ABI Platform
llama_index_memory_geniffy-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.1 kB

Release files / llama_index_memory_geniffy-0.1.0.tar.gz

Download URL llama_index_memory_geniffy-0.1.0.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
838aebb664b5965c78460dd21b85edd1d3e986e9dcecd44598419e0820a0bc06
BLAKE2b-256 checksum
How to use checksums
27849e33e4f780038aff71a0de8e24bfd3936e00999218a06e3d4391ff1e6564
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / llama_index_memory_geniffy-0.1.0-py3-none-any.whl

Download URL llama_index_memory_geniffy-0.1.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9495f3483ebf552f945c4e1f543db8e77c877c34c8a93a4514f73c605b0b3f00
BLAKE2b-256 checksum
How to use checksums
9a1eaa3f1a41546c009d03b330418d49e836506a41ebf2b8e467e64370151ec0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page