important-garden-60239
10/31/2025, 8:22 AMtall-airline-16756
10/31/2025, 8:22 AMtall-airline-16756
10/31/2025, 8:23 AMlivekit-plugins-openai package and set your OpenAI API key in your environment:
pip install livekit-plugins-openaiOPENAI_API_KEY=your_openai_api_key This will get everything ready for your API calls.
2. Set text-only modality: When you initialize the RealtimeModel, use modalities=["text"]. This way, audio is disabled and you can focus solely on text interactions.
3. Use AgentSession for testing: Wrap your testing code in an async with block to manage the connection and lifecycle smoothly:
async with (
openai.realtime.RealtimeModel(modalities=["text"]) as rt_llm,
AgentSession(llm=rt_llm, userdata=userdata) as sess,
):
await sess.start(YourAgent(userdata=userdata))
result = await sess.run(user_input="What is the weather like today?") This keeps things neat and organized.
4. Simulate input and capture responses: You can simulate user input with session.generate_reply(user_input="...") and listen for events like conversation_item_added to capture the agent’s replies programmatically.
This setup is designed to help you test your agent’s instructions easily in a controlled, text-only environment. If you have any questions or need a hand with any step, just let me know—I’m here to help!
Sources: OpenAI Realtime API plugin guide | LiveKit docs | Using the Testing Framework with Realtime Models | examples/voice_agents/realtime_load_chat_history.py | Azure OpenAI Realtime API and LiveKit | LiveKit Docsimportant-garden-60239
10/31/2025, 8:54 AMtall-airline-16756
10/31/2025, 8:54 AM/agent directory.
◦ Copy .env.sample to .env and add your LiveKit and OpenAI credentials there.
◦ Then, install the dependencies and run: python main.py dev.
1. Set Up the Web Frontend:
◦ Go to the /web directory.
◦ Copy .env.sample to .env.local and add your credentials.
◦ Install dependencies using pnpm install and start it up with pnpm dev.
◦ Finally, open http://localhost:3000 in your browser to see it in action.
1. Enable Text-Only Mode:
◦ In the UI, open the configuration panel.
◦ Select “Text Only” under Modalities.
◦ You’re all set to start interacting via text input!
If you want to try things out quickly, you can also use the live demo at realtime-playground.livekit.io and switch to text-only mode instantly. Please don’t hesitate to reach out if you have any questions or need a hand with anything—I’m here to help!
Sources: Realtime model plugins | LiveKit Docs | Text and transcriptions | LiveKit docs | web/src/data/presets.ts | OpenAI Realtime API plugin guide | LiveKit docs | examples/other/text_only.pyimportant-garden-60239
10/31/2025, 9:31 AMtall-airline-16756
10/31/2025, 9:31 AM.env.local file is set up correctly with all the necessary credentials and API keys. This is often a key step.
2. Inspect Browser Console: Try opening your browser’s developer tools and look at the console for any errors or warnings. These messages can give us clues about missing dependencies or configuration hiccups.
3. Debounced Updates: The configuration form updates with a 500ms debounce delay, so after making changes, just give it a moment to register before expecting to see the results.
4. Validation Issues: Make sure all fields in the configuration form are filled out correctly. For instance, temperature values should be between 0.6 and 1.2 to be valid.
5. Reconnect Action: If you’ve adjusted voice settings, sometimes you’ll need to click “Reconnect Now” manually to apply those changes.
6. Mobile Interface: On mobile devices, configuration options might be tucked away in a drawer interface. Be sure you’re accessing the right component to see them.
7. React Context Initialization: If the context didn’t load properly, the UI controls might show up but not work as expected. Restarting the application can help reinitialize everything smoothly.
If you’re still having trouble after trying these steps, please don’t hesitate to reach out—I’m here to help you get this resolved!
Sources: web/src/components/configuration-form-drawer.tsx | Troubleshooting & Common Issues | livekit/livekit_composite | DeepWikiimportant-garden-60239
10/31/2025, 9:33 AMtall-airline-16756
10/31/2025, 9:33 AMdev mode and set up with the right LiveKit credentials.
2. Build a Custom Frontend: If you’d like something tailored, you can use LiveKit’s client SDKs to create your own text-based frontend. Simply send text input via TextStream to the lk.chat topic and listen for agent responses on the lk.transcription topic. You can find helpful details in the frontend documentation.
3. Test in Terminal: For a quick and simple test, try running your agent in console mode:
`python myagent.py console`This way, you can chat with your agent directly through the terminal using text input and output.
If you have any questions or want to dive deeper into any of these options, just let me know—I’m here to help!
Sources: Agents playground | LiveKit Docs | README.md | examples/other/text_only.py | How to Set Up Speech-to-Text Input with Text-Only Output in LiveKit Agents | External data and RAG | LiveKit Docsimportant-garden-60239
10/31/2025, 9:36 AMtall-airline-16756
10/31/2025, 9:37 AMdev mode so it can connect smoothly to your LiveKit server. Make sure you’ve set these environment variables:
Here’s how you can do it:
For Python:
`python your_agent.py dev`For Node.js:
node your_agent.js dev
◦ LIVEKIT_URL (like wss://your-project.livekit.cloud)
◦ LIVEKIT_API_KEY
◦ LIVEKIT_API_SECRET
◦ Any other API keys you need for AI services (for example, OPENAI_API_KEY)
1. Generate a Room Access Token: Use your LiveKit API credentials to create a participant token that lets you join the room. Here’s a handy JavaScript example:
import { AccessToken } from 'livekit-server-sdk';
const API_KEY = process.env.LIVEKIT_API_KEY;
const API_SECRET = process.env.LIVEKIT_API_SECRET;
const roomName = 'your_room_name';
const at = new AccessToken(API_KEY, API_SECRET, {
identity: 'user_identity',
ttl: '15m',
});
at.addGrant({
room: roomName,
roomJoin: true,
canPublish: true,
canPublishData: true,
canSubscribe: true,
});
const token = at.toJwt();
2. Connect to the Agents Playground: Head over to the Agents Playground or run it locally. Just pop in your LIVEKIT_URL and the token you just generated into the fields, then hit "Connect."
This setup will let the playground chat directly with your backend agent. If anything feels unclear or you’d like a hand with any step, just let me know—I’m here to help!
Sources: examples/README.md | Agents playground | LiveKit Docs | Voice AI quickstart | LiveKit docs | README.md | complex-agents/note-taking-assistant/README.md