Class AgentHub
Real-time hub for agent interactions — streaming responses, tool calls, status updates.
public sealed class AgentHub : Hub, IDisposable
- Inheritance
-
AgentHub
- Implements
- Inherited Members
Constructors
AgentHub(AgentPoolService)
Real-time hub for agent interactions — streaming responses, tool calls, status updates.
public AgentHub(AgentPoolService pool)
Parameters
poolAgentPoolService
Methods
OnConnectedAsync()
Called when a new connection is established with the hub.
public override Task OnConnectedAsync()
Returns
StreamChat(string, string, CancellationToken)
Client sends a message to an agent; response is streamed back as chunks.
public IAsyncEnumerable<AgentStreamChunk> StreamChat(string agentId, string message, CancellationToken ct = default)
Parameters
agentIdstringmessagestringctCancellationToken