Metadata-Version: 2.4
Name: mnemosyne-openai-agents
Version: 0.1.0
Summary: 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.
Author-email: Mashle Burneded <mashle@geasslabs.xyz>
Maintainer-email: Geass Labs <team@geasslabs.xyz>
License: MIT License
        
        Copyright (c) 2026 Geass Labs
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://mnemosyne.geasslabs.xyz
Project-URL: Documentation, https://docs.geasslabs.xyz/mnemosyne-openai-agents
Project-URL: Repository, https://github.com/synet-systems/mnemosyne/tree/main/packages/mnemosyne-openai-agents
Project-URL: Issues, https://github.com/synet-systems/mnemosyne/issues
Project-URL: Changelog, https://github.com/synet-systems/mnemosyne/blob/main/packages/mnemosyne-openai-agents/CHANGELOG.md
Keywords: mnemosyne,ai,llm,memory,agent,openai-agents,framework-adapter
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: LICENSE-MIT
License-File: NOTICE
Requires-Dist: mnemosyne-sdk>=0.1.0
Requires-Dist: httpx>=0.27.0
Provides-Extra: openai-agents
Requires-Dist: openai-agents>=0.1; extra == "openai-agents"
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: respx>=0.21.0; extra == "dev"
Requires-Dist: ruff>=0.5.0; extra == "dev"
Requires-Dist: mypy>=1.10.0; extra == "dev"
Requires-Dist: openai-agents>=0.1.0; extra == "dev"
Dynamic: license-file

# mnemosyne-openai-agents

[![PyPI version](https://img.shields.io/pypi/v/mnemosyne-openai-agents.svg)](https://pypi.org/project/mnemosyne-openai-agents/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)

> 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

```bash
pip install mnemosyne-openai-agents
```

## Quick start

```python
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](https://geasslabs.xyz)
