In the .NET stack, is it more reasonable to handle Agents using a publish-subscribe pattern? #5210
Sunny-DotNet
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In the .NET stack, is it more reasonable to handle Agents using a publish-subscribe pattern?
For example:
var task = agent.CreateTaskAsync("What files are in the root directory?"); using task.OnReasoning((data)=>{}); using task.OnReasoningChunk((data)=>{}); using task.OnContent((data)=>{}); using task.OnContentChunk((data)=>{}); using task.OnToolCallRequest((data)=>{}); using task.OnToolCallResponse((data)=>{}); using task.OnUsageUpdated((data)=>{}); await task.WaitForEndAsync();Because every Agent is compatible with this pattern, including some CLIs,
and for interactive tasks, long-lived connections are more suitable.
(Hope you understand my meaning; my English is not very good.)
Beta Was this translation helpful? Give feedback.
All reactions