Repository navigation
Replies: 2 comments
|
Refer to handoff orchestration pattern MAF supports https://github.com/microsoft/agent-framework/tree/main/dotnet/samples/03-workflows/Orchestration/Handoff seems like a good fit for your use-case |
|
There should be one clear owner of conversation state. Do not both pass the complete parent history and load the same turns again from a persistent sub-agent session. For a stateless/short-lived delegation, pass the selected context explicitly and do not retain a sub-agent session: List<ChatMessage> subMessages = parentMessages
.Where(IsRelevantToSubAgent)
.ToList();
AgentResponse result = await subAgent.RunAsync(
subMessages,
session: null,
cancellationToken: cancellationToken);For a long-lived specialist, create and persist its own AgentResponse result = await subAgent.RunAsync(
newMessages,
subSession,
cancellationToken: cancellationToken);Using the named Responses versus Chat Completions does not decide this ownership question. Choose the provider API for its transport/tool semantics, but make the history boundary explicit, persist parent/sub-session IDs together when stateful, cap delegated context, and test that clarification turns are not duplicated. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm looking for some advice regarding chat history and calling sub-agents from a custom agent.
If I have a custom agent define using the DelegatingAIAgent, that makes a call to a sub-agent ...
... and if there is some back and forth with a user (clarifying questions, etc), what is the best way for the
subAgentto keep track of the conversation?IEnumerable<ChatMessage>) to the subAgent?I know this is probably a case of 'there is no one solution', but I'm just interested to see how others have handled this scenario.
All reactions