livekit-agent-builder-extended: The Visual IDE That Compiles Agent Graphs Into Python
A low-code LiveKit builder that turns handoffs, tasks, and dispatch flows into executable Python, then runs them in a hot-reloading preview runtime.
A framework for building real-time AI agents with LiveKit.
- This repo treats a visual agent graph as source code, then compiles it into Python before anything runs.
- Its preview loop is operationally serious because execution happens in a separate Python subprocess, not inside the UI.
- The schema matters because it keeps the canvas, compiler, and executor aligned around one contract.
- The result is less a low-code toy and more an IDE-shaped pipeline for LiveKit voice agents.
Why this builder is really a compiler
Most node editors are a way to avoid code. This one is the opposite. livekit-agent-builder-extended treats the graph as an intermediate representation, then emits Python that can run outside the builder. That makes the canvas feel less like a diagramming tool and more like the front end of a compiler.
That framing matters because it changes the trust boundary. A visual flow is easy to inspect, but hard to export. A compiled Python artifact is the reverse: harder to author casually, easier to reason about, test, and move into a real execution environment.
The origin: one repo, one opinionated stack
The codebase is split with intent. The Next.js app owns the canvas and the product UI. A React Flow layer handles the node graph. A separate FastAPI executor runs the generated agent. Shared schemas live in lib, which keeps the contract clean across the stack.
That split is the tell. It says the author is not building a single page demo. They are building a pipeline. The .planning folder reinforces that read. It suggests a roadmap mindset, with future phases like guardrails and A/B testing already scaffolded into the architecture.
The workflow compiler is the real product
The heart of the repo is workflow-compiler.ts. It takes a JSON graph and turns it into Python source by stitching together strings with helper functions, then mapping frontend node types to backend classes. The interesting move is not just code generation. It is that structured task nodes can become generated dataclasses, so the graph can express typed outputs instead of opaque blobs.
@dataclass
class CollectCustomerNameTaskOutput:
customer_name: str
confidence: float
workflow = LiveKitWorkflow(
tasks=[CollectCustomerNameTaskOutput],
provider=DeepgramSTT(),
tts=OpenAITTS(),
)
asyncio.create_subprocess_exec("python", "agent.py")
Preview is not interpretation. It is a subprocess
The executor makes the architecture feel real. When preview starts, the FastAPI server writes compiled code into a session-specific run directory, then spawns a Python worker. When preview stops, it sends termination cleanly so agents do not keep burning resources in the background.
That is a much stronger story than live graph interpretation. Interpretation keeps the runtime inside the builder. A subprocess keeps the runtime at arm's length. The builder becomes an orchestrator, not a cage.
Why the schema matters more than the canvas
agent-schema.ts is the contract layer. It keeps the UI, the compiler, and persistence speaking the same language. That matters because the canvas is full of UI noise like coordinates and zoom, while the compiler wants a clean workflow model.
The deeper clue is that the schema already carries stubs for future phases like guardrails and testing. That is not just type safety. It is platform design. The file is assuming the builder will grow into more than a graph editor.
What makes this builder different from a generic low-code agent tool
| Model | How it behaves | Strength | Trade-off |
|---|---|---|---|
| Graph interpreter | The UI is the runtime and the graph is executed in place. | Fast to prototype and easy to demo. | Harder to export, test, and separate from the editor. |
| Source-to-source compiler | The UI emits Python that can run elsewhere. | Clear execution boundaries and better portability. | Requires a stronger schema and more compiler discipline. |
| Traditional LiveKit code | You hand-author the agent in Python or Go. | Maximum flexibility for experienced developers. | Slower workflow design and less visual guidance. |
The differentiator is not simply that this repo is visual. It is visual with a compile step, a schema contract, and a separate execution service. That is a narrow but powerful lane. It is aimed at people who want workflows to become runnable artifacts, not just diagrams.
The trade-off: power, but with a narrower lane
This is early, opinionated software. It is strongest for teams building LiveKit-based voice systems, especially when handoffs and structured tasks matter. It is not trying to be a universal agent platform, and that restraint is part of the design.
The upside is clarity. The downside is scope. But for the right team, the promise is real: design in the canvas, compile to Python, preview in an isolated worker, then ship the same shape into production.