chat.agent works well behind it: one session follows the whole meeting, sees every sentence, and only runs the model when it has something to say.
This guide shows the key parts.
What you need
- A Trigger.dev project
- A Recall.ai account: an API key, your region, and a workspace secret for signing webhooks
- An API key for your model (the example uses the Vercel AI Gateway for the model and the voice)
- A public place to host a web page, like Vercel
How it fits together
- Recall.ai puts a meeting agent in the call and sends each finished sentence to a Trigger.dev webhook.
- Every sentence goes into the same agent session, which decides whether to answer.
- The meeting agent’s video feed is a web page. It follows the agent session, speaks the answers and starts a screenshare.
1. Receive the transcript as a webhook
Define a hosted endpoint for Recall.ai. It verifies each request with your workspace secret:src/trigger/endpoints.ts
npx trigger.dev@latest dev, then set the secret from the Recall.ai dashboard’s API keys page:
2. Route every sentence into one session
Thekey decides which agent session a webhook goes to. Same key, same session. Give the transcript a constant key, so every sentence of the meeting lands in one conversation:
src/trigger/agent.ts
3. Decide when to answer
Each sentence runs the agent’sonAction, which is plain code. To reply, return chat.turn(). To stay quiet, return nothing, and the model doesn’t run. Simplified from the example:
src/trigger/agent.ts
maxDuration on the agent to cover a long call.
Pass the transcript to the model on each turn, so it knows what’s being said:
src/trigger/agent.ts
SILENT when a sentence wasn’t meant for it, and the page skips those.
4. Give the agent video and audio (and screen sharing)
Recall.ai can use a web page as the meeting agent’s video feed. Whatever the page shows is the meeting agent’s video, and whatever audio it plays is its voice. The page URL carries a read-only watch token for the session:src/trigger/services.ts
TriggerChatTransport in watch mode, the same way a chat app shows a reply:
web/app/page.tsx
- Turns it into speech in a server route, so your model key stays on the server. The example uses Gemini TTS through the AI Gateway.
- Waits until the meeting audio has been quiet for 1.2 seconds. Recall.ai feeds the meeting audio into the page through
getUserMedia(). - Plays the voice. If the turn has something to show, it also asks Recall.ai’s
output_mediaAPI, from a server route, to screenshare a second view of the same page.
The page has to be public, so Recall.ai can load it, and its routes spend your credits. On Vercel,
turn on Deployment Protection, create a Protection Bypass for Automation secret, and add it to
the URL you give Recall.ai.
5. Send the meeting agent to a call
Create the meeting agent with the transcript going to yourrecall endpoint and the page as its video feed (real code, with a few fields cut):
src/trigger/join-meeting.ts
src/trigger/join-meeting.ts
join-meeting from the Test page with a meeting link, admit the meeting agent, and talk to it by name.
Next steps
- Recall.ai webhooks: verification and real-time events
- Session routing: route webhook events into an agent’s session
- Actions:
onActionandchat.turn() - Watch tokens: follow a session from another page
- To deploy, run
npx trigger.dev@latest deployand set the same variables and secrets with--env prod

