diff --git a/apps/docs/integrations/agent-framework.mdx b/apps/docs/integrations/agent-framework.mdx index 3179e8e4..a716408b 100644 --- a/apps/docs/integrations/agent-framework.mdx +++ b/apps/docs/integrations/agent-framework.mdx @@ -16,22 +16,16 @@ Microsoft's [Agent Framework](https://github.com/microsoft/agent-framework) is a ## Setup -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`: +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. diff --git a/packages/agent-framework-python/README.md b/packages/agent-framework-python/README.md index c177ae3a..9d2afe47 100644 --- a/packages/agent-framework-python/README.md +++ b/packages/agent-framework-python/README.md @@ -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], diff --git a/packages/agent-framework-python/pyproject.toml b/packages/agent-framework-python/pyproject.toml index 068e346f..6f4f2197 100644 --- a/packages/agent-framework-python/pyproject.toml +++ b/packages/agent-framework-python/pyproject.toml @@ -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" diff --git a/packages/agent-framework-python/src/supermemory_agent_framework/context_provider.py b/packages/agent-framework-python/src/supermemory_agent_framework/context_provider.py index 45200bac..14150657 100644 --- a/packages/agent-framework-python/src/supermemory_agent_framework/context_provider.py +++ b/packages/agent-framework-python/src/supermemory_agent_framework/context_provider.py @@ -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], diff --git a/packages/agent-framework-python/src/supermemory_agent_framework/middleware.py b/packages/agent-framework-python/src/supermemory_agent_framework/middleware.py index 4d5f1d87..2fed27d5 100644 --- a/packages/agent-framework-python/src/supermemory_agent_framework/middleware.py +++ b/packages/agent-framework-python/src/supermemory_agent_framework/middleware.py @@ -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], diff --git a/packages/agent-framework-python/test_real.py b/packages/agent-framework-python/test_real.py index ebb7a9c3..f39581c0 100644 --- a/packages/agent-framework-python/test_real.py +++ b/packages/agent-framework-python/test_real.py @@ -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.",