OpenAI Session - MAF + service based conversation/response apis/Previous Response ID #7167
-
|
Hi, we are trying to understand nitty -gritty details of session flow between MAF and OpenAI. We currently have the following pattern in place essentially a dedicated agent was established to own session. We see correct agents behavior but ultimately realized that we don't see the full session content (only the initial batch for a single agent in the chain) however subsequent agents were making correct decisions based on facts that could have only come from session. This made us to investigate deeper in order to understand this at low level and hence this questions. What we see is is MAF session containing pointer to previous response id and as we run agent to agent, that id is updated. Ultimately we believe that the session at MAF is a pointer to service based "session"/response api state as maintained by OpenAI/Foundry OpenAI deployments. Is this understanding correct and or completely out of order? in that view, the session between agents is ultimately an exchange of previous response id to new response id and on and on ANy documentation pointers are welcome - one pointer leading to that - apart from OpenAI docos -is e.g. https://learn.microsoft.com/en-us/agent-framework/agents/conversations/session?pivots=programming-language-csharp#service-session-id-scoping we are also trying to conclusively prove by cross matching the full chat client hierarchy to underlying code and session id/response id code vs openai response client . slightly harder due to so many levels and package separation |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Your understanding is essentially correct for a normal Responses The path through the code is: MAF copies the session ID into That also explains the apparently incomplete local session. There are three distinct modes:
The repo has focused tests for both automatic response-ID continuation and mapping a non- For your cross-agent case, mechanically sharing a compatible To inspect a |
Beta Was this translation helpful? Give feedback.
Your understanding is essentially correct for a normal Responses
AsIChatClient(...)with stored output enabled. The precise model is: the MAF session holds the current head of a service-managed response chain; it is not itself the full transcript.The path through the code is:
MAF copies the session ID into
ChatOptionsand later writes the returned ID back. In the OpenAI adapter, aconv_*ID is sent asconversation, while any other non-null ID (includingresp_*) is sent asprevious_response_id. Inresp_*mode, …