Table of Contents

Class LiveKitAgentDBService

Namespace
LiveKit.Services
Assembly
LiveKit.AspNetCore.ServerSdk.dll

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

httpClient HttpClient
logger ILogger<LiveKitAgentDBService>
_tokenService ILiveKitTokenService

Methods

CreateDatabaseAsync(CreateRequest, CancellationToken)

Creates a new agent database.

public Task<AgentDB.Types.CreateResponse> CreateDatabaseAsync(AgentDB.Types.CreateRequest request, CancellationToken cancellationToken = default)

Parameters

request AgentDB.Types.CreateRequest
cancellationToken CancellationToken

Returns

Task<AgentDB.Types.CreateResponse>

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

request AgentDB.Types.DeleteRequest
cancellationToken CancellationToken

Returns

Task<AgentDB.Types.DeleteResponse>

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

request AgentDB.Types.DumpRequest
cancellationToken CancellationToken

Returns

Task<AgentDB.Types.DumpResponse>

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

request AgentDB.Types.GetRequest
cancellationToken CancellationToken

Returns

Task<AgentDB.Types.AgentDatabase>

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

request AgentDB.Types.ListRequest
cancellationToken CancellationToken

Returns

Task<AgentDB.Types.ListResponse>

Exceptions

LiveKitApiException

Thrown when the server returns a non-success HTTP status code.