Class LiveKitAgentDispatchService
Service for managing agent dispatches to rooms.
Provides methods for dispatching AI agents to rooms based on room configuration or on-demand. See Agent Dispatch Documentation for more information.
public sealed class LiveKitAgentDispatchService : TwirpClient, ILiveKitAgentDispatchService
- Inheritance
-
LiveKitAgentDispatchService
- Implements
- Inherited Members
Constructors
LiveKitAgentDispatchService(HttpClient, ILogger<LiveKitAgentDispatchService>, ILiveKitTokenService)
Initializes a new instance of the LiveKitAgentDispatchService class.
public LiveKitAgentDispatchService(HttpClient httpClient, ILogger<LiveKitAgentDispatchService> logger, ILiveKitTokenService _tokenService)
Parameters
httpClientHttpClientloggerILogger<LiveKitAgentDispatchService>_tokenServiceILiveKitTokenService
Methods
CreateDispatchAsync(CreateAgentDispatchRequest, CancellationToken)
Creates a new agent dispatch for a room.
public Task<AgentDispatch> CreateDispatchAsync(CreateAgentDispatchRequest request, CancellationToken cancellationToken = default)
Parameters
requestCreateAgentDispatchRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
DeleteDispatchAsync(DeleteAgentDispatchRequest, CancellationToken)
Deletes an agent dispatch.
public Task<AgentDispatch> DeleteDispatchAsync(DeleteAgentDispatchRequest request, CancellationToken cancellationToken = default)
Parameters
requestDeleteAgentDispatchRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
ListDispatchAsync(ListAgentDispatchRequest, CancellationToken)
Lists agent dispatches for a room.
public Task<ListAgentDispatchResponse> ListDispatchAsync(ListAgentDispatchRequest request, CancellationToken cancellationToken = default)
Parameters
requestListAgentDispatchRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.