mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-27 06:15:15 +00:00
Prepare Agent Framework v2 release with gpt-5 examples
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
parent
ef55a7f38e
commit
6917c16a85
6 changed files with 18 additions and 30 deletions
|
|
@ -16,22 +16,16 @@ Microsoft's [Agent Framework](https://github.com/microsoft/agent-framework) is a
|
|||
|
||||
## Setup
|
||||
|
||||
<Warning>The v5-compatible adapter is currently in this repository's source. Published adapter `1.0.3` still requires the legacy SDK. Until a v5-compatible adapter release is published, install from a checkout of `supermemoryai/supermemory`:</Warning>
|
||||
Install adapter version `>=2.0.0,<3` with the OpenAI client package:
|
||||
|
||||
```bash
|
||||
pip install -e packages/agent-framework-python agent-framework-openai
|
||||
```
|
||||
|
||||
After a v5-compatible adapter release is published, install the package:
|
||||
|
||||
```bash
|
||||
pip install supermemory-agent-framework agent-framework-openai
|
||||
pip install "supermemory-agent-framework>=2.0.0,<3" agent-framework-openai
|
||||
```
|
||||
|
||||
Or with uv:
|
||||
|
||||
```bash
|
||||
uv add supermemory-agent-framework agent-framework-openai
|
||||
uv add "supermemory-agent-framework>=2.0.0,<3" agent-framework-openai
|
||||
```
|
||||
|
||||
The adapter requires `supermemory>=5.0.0,<6`. The OpenAI examples also require the separate `agent-framework-openai` package and use its current `OpenAIChatClient` Responses API client. Older supported framework cores can have different OpenAI client names and model arguments.
|
||||
|
|
@ -103,7 +97,7 @@ async def main():
|
|||
|
||||
provider = SupermemoryContextProvider(conn, mode="full")
|
||||
|
||||
agent = OpenAIChatClient(model="gpt-4o-mini").as_agent(
|
||||
agent = OpenAIChatClient(model="gpt-5").as_agent(
|
||||
name="MemoryAgent",
|
||||
instructions="You are a helpful assistant with memory.",
|
||||
context_providers=[provider],
|
||||
|
|
@ -149,7 +143,7 @@ async def main():
|
|||
conn = AgentSupermemory(container_tag="user-123")
|
||||
tools = SupermemoryTools(conn)
|
||||
|
||||
agent = OpenAIChatClient(model="gpt-4o-mini").as_agent(
|
||||
agent = OpenAIChatClient(model="gpt-5").as_agent(
|
||||
name="MemoryAgent",
|
||||
instructions="""You are a helpful assistant with memory.
|
||||
When users share preferences, save them. When they ask questions, search memories first.""",
|
||||
|
|
@ -200,7 +194,7 @@ async def main():
|
|||
),
|
||||
)
|
||||
|
||||
agent = OpenAIChatClient(model="gpt-4o-mini").as_agent(
|
||||
agent = OpenAIChatClient(model="gpt-5").as_agent(
|
||||
name="MemoryAgent",
|
||||
instructions="You are a helpful assistant.",
|
||||
middleware=[middleware],
|
||||
|
|
@ -270,7 +264,7 @@ async def main():
|
|||
|
||||
tools = SupermemoryTools(conn)
|
||||
|
||||
agent = OpenAIChatClient(model="gpt-4o-mini").as_agent(
|
||||
agent = OpenAIChatClient(model="gpt-5").as_agent(
|
||||
name="SupportAgent",
|
||||
instructions="""You are a customer support agent.
|
||||
|
||||
|
|
|
|||
|
|
@ -6,26 +6,20 @@ This package provides both **automatic memory injection middleware** and **manua
|
|||
|
||||
## Installation
|
||||
|
||||
This source supports the Supermemory Python SDK `>=5.0.0,<6`. The published adapter `1.0.3` still requires the legacy SDK; until a v5-compatible adapter release is published, install from a checkout of this repository:
|
||||
|
||||
```bash
|
||||
pip install -e packages/agent-framework-python agent-framework-openai
|
||||
```
|
||||
Adapter version `>=2.0.0,<3` supports the Supermemory Python SDK `>=5.0.0,<6`.
|
||||
|
||||
The OpenAI client is a separate Agent Framework package. Include `agent-framework-openai` when using the OpenAI examples below, which target its current `OpenAIChatClient` Responses API client. The adapter also supports older framework cores, but their OpenAI client names and model arguments can differ.
|
||||
|
||||
After a v5-compatible adapter release is published, install using the package index:
|
||||
|
||||
Install using uv (recommended):
|
||||
|
||||
```bash
|
||||
uv add supermemory-agent-framework agent-framework-openai
|
||||
uv add "supermemory-agent-framework>=2.0.0,<3" agent-framework-openai
|
||||
```
|
||||
|
||||
Or with pip:
|
||||
|
||||
```bash
|
||||
pip install supermemory-agent-framework agent-framework-openai
|
||||
pip install "supermemory-agent-framework>=2.0.0,<3" agent-framework-openai
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
|
@ -59,7 +53,7 @@ async def main():
|
|||
)
|
||||
|
||||
# Create agent with middleware
|
||||
agent = OpenAIChatClient(model="gpt-4o-mini").as_agent(
|
||||
agent = OpenAIChatClient(model="gpt-5").as_agent(
|
||||
name="MemoryAgent",
|
||||
instructions="You are a helpful assistant with memory.",
|
||||
middleware=[middleware],
|
||||
|
|
@ -98,7 +92,7 @@ async def main():
|
|||
)
|
||||
|
||||
# Create agent with context provider
|
||||
agent = OpenAIChatClient(model="gpt-4o-mini").as_agent(
|
||||
agent = OpenAIChatClient(model="gpt-5").as_agent(
|
||||
name="MemoryAgent",
|
||||
instructions="You are a helpful assistant with memory.",
|
||||
context_providers=[provider],
|
||||
|
|
@ -132,7 +126,7 @@ async def main():
|
|||
tools = SupermemoryTools(connection)
|
||||
|
||||
# Create agent
|
||||
agent = OpenAIChatClient(model="gpt-4o-mini").as_agent(
|
||||
agent = OpenAIChatClient(model="gpt-5").as_agent(
|
||||
name="MemoryAgent",
|
||||
instructions="You are a helpful assistant with access to user memories.",
|
||||
)
|
||||
|
|
@ -175,7 +169,7 @@ async def main():
|
|||
|
||||
tools = SupermemoryTools(connection)
|
||||
|
||||
agent = OpenAIChatClient(model="gpt-4o-mini").as_agent(
|
||||
agent = OpenAIChatClient(model="gpt-5").as_agent(
|
||||
name="MemoryAgent",
|
||||
instructions="You are a helpful assistant with memory.",
|
||||
middleware=[middleware],
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "supermemory-agent-framework"
|
||||
version = "1.0.3"
|
||||
version = "2.0.0"
|
||||
description = "Memory tools and middleware for Microsoft Agent Framework with supermemory"
|
||||
readme = "README.md"
|
||||
license = "MIT"
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class SupermemoryContextProvider(BaseContextProvider):
|
|||
store_conversations=True,
|
||||
)
|
||||
|
||||
agent = OpenAIChatClient(model="gpt-4o-mini").as_agent(
|
||||
agent = OpenAIChatClient(model="gpt-5").as_agent(
|
||||
name="MemoryAgent",
|
||||
instructions="You are a helpful assistant with memory.",
|
||||
context_providers=[provider],
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ class SupermemoryChatMiddleware(ChatMiddleware):
|
|||
),
|
||||
)
|
||||
|
||||
agent = OpenAIChatClient(model="gpt-4o-mini").as_agent(
|
||||
agent = OpenAIChatClient(model="gpt-5").as_agent(
|
||||
name="MemoryAgent",
|
||||
instructions="You are a helpful assistant with memory.",
|
||||
middleware=[middleware],
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ async def main():
|
|||
tools = SupermemoryTools(conn)
|
||||
|
||||
agent = OpenAIChatClient(
|
||||
api_key=os.environ["OPENAI_API_KEY"], model="gpt-4o-mini"
|
||||
api_key=os.environ["OPENAI_API_KEY"], model="gpt-5"
|
||||
).as_agent(
|
||||
name="MemoryAgent",
|
||||
instructions="You are a helpful assistant with memory.",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue