Skip to main content
A Guava WebRTC integration has two parts:
  1. A hosted agent that handles the conversation.
  2. Frontend code that dials the agent from the browser using the WebRTC SDK.
Guava agents currently run as long-running worker processes, which Lovable doesn’t support. We recommend writing your agent in TypeScript and deploying it with Guava’s managed deployments, then having Lovable build the frontend.
Guava is planning support for Function-as-a-Service platforms, which will let you host agents directly in Lovable.
Just want a voice button on your site? The drop-in widget is a single <script> tag that you can ask Lovable to add to index.html. You’ll still need a deployed agent.

Create a TypeScript agent

Install the CLI and log in by following the Quickstart. Then scaffold an inbound TypeScript project.
TypeScript isn’t required, but it keeps your agent in the same language as your Lovable app.

Attach the agent to a WebRTC code

Create a WebRTC code. This is the address your Lovable frontend will dial.
In main.ts, attach your agent to the code with listenWebrtc.
main.ts
See the Agent reference to customize what your agent says and does.

Test locally

Run your agent, then dial it from the browser at app.goguava.ai/debug-webrtc.

Deploy the agent

Deploy your agent so it stays online for your Lovable app.
See the Deployment guide for logs, scaling, and instance tiers.

Build the frontend in Lovable

Paste a prompt like this into Lovable’s chat, replacing grtc-... with your WebRTC code.
Lovable will install the SDK and wire up the call. From there, you can keep iterating in Lovable on the UI, for example passing the signed-in user to your agent with customPayload.