tell me more about livekit agent's text based comm...
# ask-ai
m
tell me more about livekit agent's text based communication feature
t
Thanks for reaching out, Alfred. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to share how LiveKit Agents support text-based communication through the integration of text streams. This feature allows real-time input and output of text messages, making interactions between users and agents smooth and engaging. Key Features:Text Input: Agents keep an eye on the
lk.chat
text stream for any incoming messages. This is turned on by default, but if you ever need to, you can easily disable it using
text_enabled=False
in
RoomInputOptions
. • Text Output: Agent responses and transcriptions are sent through the
lk.transcription
text stream. You have the flexibility to sync this with audio or not by adjusting
sync_transcription
in
RoomOutputOptions
. • Text-Only Mode: If you prefer text-only interactions, just set
audio_enabled=False
in both input and output options. This way, audio tracks are turned off, but text communication stays fully active. • Frontend Integration: Developers can easily handle text streams using SDK methods like
registerTextStreamHandler
, and send messages with
sendText
or
streamText
. • Advanced Features: The Python SDK offers TTS-aligned transcription forwarding for precise word-level timing, and you can also trigger manual text input using
session.generate_reply
. If you'd like any more details or examples, please feel free to ask—I'm here to help! Sources: Agents 0.x migration guide | LiveKit Docs | examples/other/chat-stream-receiver.py | Docs::Agents | Text and transcriptions | LiveKit Docs | Text and transcriptions | LiveKit Docs