I want to build something where I can present my c...
# ask-ai
p
I want to build something where I can present my customers via a dashboard a flow builder for customising their voice agent. E.g. kind of of like vpai which I power using livekit. Can you point me in the right direction for how this dynamic flow constructed on something like react flow will translate to livekit?
t
Thanks for reaching out, Sunny. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks for reaching out! To make sure I can help you in the best way possible, could you share a bit more about what you're aiming to achieve with integrating the flow builder and LiveKit? For example: • Are you creating a visual editor to define how your AI agent behaves, like setting up conversation flow or tool usage, that works with LiveKit voice agents? • Or maybe you're looking to visualize the agent's state and media flow live during a call using a React Flow interface? Getting a clearer picture will really help me guide you more effectively. Looking forward to hearing more! Sources: README.md | Web and mobile frontends | LiveKit Docs
p
1. Yes, my customers have this functionality via my dashboard and under the hood I power it via livekit 2. I also want to be able to show the agent state
t
I'm glad you're interested in building a visual editor for defining AI agent behavior and showing agent state using LiveKit! Here's a friendly guide to help you get started: • Defining Agent Behavior: You can create a form-based interface that lets users easily edit agent parameters like instructions, voice, and temperature. From there, you can dynamically generate deployable code (like Python or TypeScript) based on these settings. The Agents Playground is a wonderful example you can explore to see this in action. • Visualizing Agent State: LiveKit offers components like
BarVisualizer
to show real-time audio output and agent states such as speaking or idle. If you want something unique or branded, you can also build custom visualizers tailored to your workflow. • Custom Visual Editor: Consider building your editor with React and LiveKit's SDK. Including form controls for agent setup, a code preview panel, and real-time state visualizers will create a smooth and interactive experience. • Starting Point: The Agents Playground is a fantastic ready-to-use tool you can either extend or use as a helpful reference for your own implementation. If you'd like to dive deeper, feel free to check out the LiveKit Agents documentation and the playground source code. I'm here to help if you have any questions along the way! Sources: Web Embed & Integration Examples | livekit/livekit_composite | DeepWiki | README.md | web/src/data/presets.ts | web/src/components/chat.tsx | OpenAI and LiveKit partner to turn Advanced Voice into an API
p
I want custom conversation paths and flows
t
I'm glad you're interested in implementing custom conversation paths and flows for AI agents using LiveKit! Here are a few approaches you might find helpful: • Simple Flow: This involves a straightforward, linear progression where each agent moves directly to the next. It's perfect for guided conversations that are easy to follow. • Declarative Flow: Here, you define workflows in a centralized configuration (like a dictionary) that maps states to agents and their transition logic. This makes your conversation structures reusable and easy to update. • Multi-Stage Flow: For more complex needs, you can implement branching with decision points and dynamic transitions based on user input or accumulated state—great for diagnostics or multi-step surveys. When it comes to managing state and sessions,
AgentSession
is your friend for storing conversation state and user data. Also, lifecycle hooks like
on_enter()
are wonderful for triggering actions whenever an agent becomes active. If you'd like to dive deeper, I warmly recommend checking out the Workflows Guide and the LiveKit Python Agents Examples. And please, don’t hesitate to reach out if you have any questions or need a hand with the implementation—I’m here to help! Sources: flows/multi_stage_flow.py | Pipeline nodes and hooks | LiveKit Docs | Workflows | LiveKit Docs