You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(at the moment we are handling null, so a new thread is created always when invoking the agent as function...)
IMHO having this would be very convenient, so it can participate, and read the conversation thread… otherwise we have to manually pass all the context to it in order to function properly.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
.NET Agents New Feature: I want the "Agents as plugins" to be able to access the main agent thread - if I want
.Net Agents New Feature: I want the "Agents as plugins" to be able to access the main agent thread - if I want
Apr 8, 2025
The null parameter for the AgentThread effectivly exposes the agent-as-a-tool as equivelent to KernelFunctionFromPrompt.
There's a couple way of looking at how to manage the context of the agent-as-a-tool:
Provide access to the outer conversation or thread. While injects the full context of the outer conversation, it introduces the following considerations:
How is this managed across different agent modalities. That is, it is entirely possible that outer agent AzureAIAgent and the agent-as-a-tool is ChatCompletionAgent. There two different agent modalities require different AgentThread instances.
Is the agent-as-a-tool allowed to update the outer thread? If both the outer agent and agent-as-a-tool are AzureAIAgent types, and the same thread-id is utilized by the tool, then (in the absence of any special handling) the tool response will be added to the thread. I believe this is undesired when using agent-as-a-tool.
The inner agent-as-a-tool maintains its own inner (of forked) thread that retains context when the agent-as-a-tool is invoked multiple times for the same conversation. This retains context for the inner agent-as-a-tool without mutating the outer conversation / thread.
Finally, there could feasibly be a mode where the developer desires the agent to not retain an context other than the input queryString.
Note: We should also take care to align both Python and .NET with whatever decision point is made for this feature.
name: Feature request
about: Suggest an idea for this project
I want the "Agents as plugins" to be able to access the main agent thread - if I want
I do not see the agent wrapped in the plugin function being invoked with the main agent/chat thread…
see
semantic-kernel/dotnet/src/Agents/Core/Functions/AgentKernelFunctionFactory.cs
Line 55 in 0ff97c7
(at the moment we are handling null, so a new thread is created always when invoking the agent as function...)
IMHO having this would be very convenient, so it can participate, and read the conversation thread… otherwise we have to manually pass all the context to it in order to function properly.
The text was updated successfully, but these errors were encountered: