@kuralle-agents/livekit-plugin-transport-http
v0.6.1
Published
HTTP/SSE transport adapter for LiveKit Agents. Run text chatbots and voice agents over standard HTTP with Server-Sent Events.
Downloads
269
Readme
@kuralle-agents/livekit-plugin-transport-http
HTTP/SSE transport adapter that connects Kuralle voice sessions to browser or server clients over HTTP.
Install
npm install @kuralle-agents/livekit-plugin-transport-httpPeer dependency:
npm install @kuralle-agents/livekit-pluginWhat it does
Provides an HTTP-based transport layer for Kuralle voice sessions — an alternative to WebSocket when clients can only reach the agent over HTTP.
createAgentHandler— builds an HTTP request handler that upgrades to anHTTPTransportAdapterand starts a voice session.HTTPTransportAdapter— implements the transport contract expected by@kuralle-agents/livekit-pluginsessions, backed by HTTP/SSE.HTTPAudioInput/HTTPAudioOutput/HTTPTextOutput— audio and text I/O streams for the HTTP path.createSSEWriter— creates a server-sent-events writer that emits typed events (AgentTextEvent,AgentAudioEvent,UserTranscriptionEvent, etc.) to the client.
Usage
import { createAgentHandler } from '@kuralle-agents/livekit-plugin-transport-http';
import { createKuralleSession } from '@kuralle-agents/livekit-plugin';
import { GeminiLiveSTT, GeminiLiveTTS } from '@kuralle-agents/livekit-plugin/gemini';
const handler = createAgentHandler({
createSession: () =>
createKuralleSession({
runtime: myRuntime,
stt: new GeminiLiveSTT(),
tts: new GeminiLiveTTS(),
}),
});
// Mount as a route handler in your HTTP framework.
// handler(req, res) — adapts to Node/Bun/Hono/Express depending on your server.Related
@kuralle-agents/livekit-plugin— voice session orchestrator@kuralle-agents/livekit-plugin-transport-ws— WebSocket transport
