Skip to main content

Geniffy

Geniffy for the OpenAI Agents SDK

Give an agent built with the OpenAI Agents SDK a memory of each of your users. Before each model call, the model is told what is known about the user that bears on their latest 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 openai-agents-geniffy

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

The memory

from dataclasses import dataclass

from agents import Agent, Runner
from geniffy_agents import GeniffyMemory


@dataclass
class User:
    id: str


memory = GeniffyMemory(space=lambda user: f"user_{user.id}")      # read from the context you run with
agent = Agent[User](name="Assistant", instructions="You are a helpful assistant.", model="gpt-5.5")


async def chat(user: User, message: str) -> str:
    result = await Runner.run(agent, message, context=user, run_config=memory.run_config())
    await memory.remember(user, message, result)                   # the exchange, saved to that user's space
    return result.final_output
  • Before each model call, what is known that bears on the user's latest message goes in the instructions, after the agent's own. In a run with tools, Geniffy is asked once, not once per step.
  • remember() saves the exchange: the user's words become facts about the user.
  • If Geniffy can't be reached, the run goes on without memory, and on_error hears about it.

run_config() takes your own RunConfig and adds the memory to it; a call_model_input_filter you already have runs after 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.

Tools

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

from geniffy_agents import geniffy_tools

agent = Agent[User](name="Assistant", model="gpt-5.5",
                    tools=geniffy_tools(space=lambda user: f"user_{user.id}"))    # recall and remember

The tools read the user from the run's context, so the model never sees or chooses whose memory it reads.

One space per user

space is required: the user this is for, as a string or a function of the context you run with. 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, or None from your function, is refused, so a user with no id never lands in your own memory. When a user deletes their account, forget them with AsyncGeniffy().forget_space(...) from the geniffy SDK.

Develop

pip install -e ".[test]" && pytest     # through the SDK's own Runner, with its ScriptedModel

Security

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

Metadata

Release files for openai-agents-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 openai-agents-geniffy 0.1.0
File Size Uploaded
openai_agents_geniffy-0.1.0.tar.gz 11.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openai-agents-geniffy 0.1.0
File Interpreter ABI Platform
openai_agents_geniffy-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.0 kB

Release files / openai_agents_geniffy-0.1.0.tar.gz

Download URL openai_agents_geniffy-0.1.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5d4422d61c381777af45ef926b83df9db992cad9403262684ce51e15a50fbe77
BLAKE2b-256 checksum
How to use checksums
7e4cc0e3489d89de8ac3a038c3227417ab10522b0d3eb5a382678a5f1d92422b
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 / openai_agents_geniffy-0.1.0-py3-none-any.whl

Download URL openai_agents_geniffy-0.1.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e4ad7b2ebfc01ee6a899fbc5f86a52db8e4864d1c9d9d4f29484a3895e8f69f
BLAKE2b-256 checksum
How to use checksums
73e7d1c1b464c9c7b7aedb34db958d0c6eeeeffac97d395993b37fd45a966901
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