OpenAI Agents SDK lifecycle hooks for the Mnemosyne memory substrate. on_turn_start, on_turn_end, search, and store hooks backed by the substrate, container-scoped, with automatic redaction.
Project description
mnemosyne-openai-agents
OpenAI Agents SDK lifecycle hooks for the Mnemosyne memory substrate. on_turn_start, on_turn_end, search, and store hooks backed by the substrate, container-scoped, with automatic redaction.
Install
pip install mnemosyne-openai-agents
Quick start
from mnemosyne_openai_agents import MnemosyneAgentMemory
from mnemosyne_openai_agents.hook import TurnContext, TurnResponse
memory = MnemosyneAgentMemory(agent_id="alice")
# Auto-inject relevant memories at the start of a turn
context = TurnContext(agent_id="alice", input="what's my favorite editor?")
relevant = memory.on_turn_start(context)
for mem in relevant:
print(mem["content"])
# Persist the turn at the end
response = TurnResponse(output="VS Code is your favorite editor.")
memory.on_turn_end(context, response)
License
MIT © Geass Labs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mnemosyne_openai_agents-0.1.0.tar.gz.
File metadata
- Download URL: mnemosyne_openai_agents-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b8dbb22ef1a8419a39a4c65c2748a4346983dd917ecc031957af90d58eb34a6
|
|
| MD5 |
0d4999bb5c740bdb334bf83f39a3b966
|
|
| BLAKE2b-256 |
99eac6818b1f313e0d8febf2434e66d66b038694c2753b3a48ccdeacc44a497e
|
File details
Details for the file mnemosyne_openai_agents-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mnemosyne_openai_agents-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebbb57c8f7fde6b850ea4ab5db2a989d54582706a45557bd7648a9daa675e1d0
|
|
| MD5 |
a9f56fa061f40b53503687fd08bd9173
|
|
| BLAKE2b-256 |
a87d4db291bf2f465f93cb0cb733e75b44f3d07956225ef8d656665a9915d1cf
|