Class LiveKitAgentDBService
Service for managing agent databases.
Provides methods for creating, inspecting, deleting, and exporting the SQLite databases available to agents. Queries run over a separate WebSocket data plane that this service does not cover.
public sealed class LiveKitAgentDBService : TwirpClient, ILiveKitAgentDBService
- Inheritance
-
LiveKitAgentDBService
- Implements
- Inherited Members
Constructors
LiveKitAgentDBService(HttpClient, ILogger<LiveKitAgentDBService>, ILiveKitTokenService)
Initializes a new instance of the LiveKitAgentDBService class.
public LiveKitAgentDBService(HttpClient httpClient, ILogger<LiveKitAgentDBService> logger, ILiveKitTokenService _tokenService)
Parameters
httpClientHttpClientloggerILogger<LiveKitAgentDBService>_tokenServiceILiveKitTokenService
Methods
CreateDatabaseAsync(CreateRequest, CancellationToken)
Creates a new agent database.
public Task<AgentDB.Types.CreateResponse> CreateDatabaseAsync(AgentDB.Types.CreateRequest request, CancellationToken cancellationToken = default)
Parameters
requestAgentDB.Types.CreateRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
DeleteDatabaseAsync(DeleteRequest, CancellationToken)
Deletes an agent database, including its stored data.
public Task<AgentDB.Types.DeleteResponse> DeleteDatabaseAsync(AgentDB.Types.DeleteRequest request, CancellationToken cancellationToken = default)
Parameters
requestAgentDB.Types.DeleteRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
DumpDatabaseAsync(DumpRequest, CancellationToken)
Exports a consistent SQLite file of an agent database as a time-limited download URL.
public Task<AgentDB.Types.DumpResponse> DumpDatabaseAsync(AgentDB.Types.DumpRequest request, CancellationToken cancellationToken = default)
Parameters
requestAgentDB.Types.DumpRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
GetDatabaseAsync(GetRequest, CancellationToken)
Gets details of an agent database.
public Task<AgentDB.Types.AgentDatabase> GetDatabaseAsync(AgentDB.Types.GetRequest request, CancellationToken cancellationToken = default)
Parameters
requestAgentDB.Types.GetRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
ListDatabasesAsync(ListRequest, CancellationToken)
Lists agent databases.
public Task<AgentDB.Types.ListResponse> ListDatabasesAsync(AgentDB.Types.ListRequest request, CancellationToken cancellationToken = default)
Parameters
requestAgentDB.Types.ListRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.