-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
pythonsamplesIssue relates to the samplesIssue relates to the samplesv1.0Features being tracked for the version 1.0 GAFeatures being tracked for the version 1.0 GA
Description
Hi all,
I tried to reproduce this example
As I understand, in the second turn my agent should remember that I'm Alice but it's not the case.
The agent said that he has no memory. I've tried with Azure Foundry (gpt-5-mini) and GitHub Models (gpt-4-mini). Both give me the same result.
import asyncio
from agent_framework.openai import OpenAIChatClient
from agent_framework import Agent
from agent_framework.azure import AzureOpenAIChatClient
from dotenv import load_dotenv
import os
load_dotenv()
async def main():
# client = OpenAIChatClient(
# base_url="https://models.github.ai/inference",
# model_id="openai/gpt-4.1-mini",
# api_key=os.getenv("APIKEY"),
# )
client = AzureOpenAIChatClient(
api_version="2024-12-01-preview",
endpoint=os.getenv("AZURE_AI_PROJECT_ENDPOINT"),
deployment_name=os.getenv("AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME"),
api_key=os.getenv("FOUNDRY_APIKEY")
)
agent = client.as_agent(
instructions="You are a friendly assistant. Keep your answers concise and helpful.", name="ConversationAgent"
)
session = agent.create_session()
async for chunk in agent.run("My name is Alice and I love hiking.", session=session, stream=True):
if chunk.text:
print(chunk.text, end="", flush=True)
print("\n\n")
async for chunk in agent.run("What do you remember about me?", session=session, stream=True):
if chunk.text:
print(chunk.text, end="", flush=True)
if __name__ == "__main__":
asyncio.run(main())Do you have any idea why? I hope it's not because of the model.
Thank you.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
pythonsamplesIssue relates to the samplesIssue relates to the samplesv1.0Features being tracked for the version 1.0 GAFeatures being tracked for the version 1.0 GA
Type
Projects
Status
In Review