-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
Description
Hi
I'm looking at implementing session support in agents.
Based on the examples provided, it looks like the same agent instance is used across calls.
First turn
result = await Runner.run(
agent,
"What city is the Golden Gate Bridge in?",
session=session
)
print(result.final_output) # "San Francisco"
Second turn - agent automatically remembers previous context
result = await Runner.run(
agent,
"What state is it in?",
session=session
)
Do we need to ensure that the same agent instance is used everytime?
Would this still work if a different agent instance is created in the second turn (with the same session) ?
Any recommendations / guidance.
Thanks
Jaydeep