top of page

Links

YouTube

Related Tools

Wix Studio

Website Builders

Bettermode

Community Tools

Bright Data

Scrapers

Rantir

AI Tools

Jotform Apps

App Builders

Kinsta

Cloud Hosting Platform

Trigger.dev Realtime AI

Trigger.dev Realtime AI

Keep your users updated with real-time task progress. Now with LLM streaming support and increased limits.

AI Tools

UPVOTE 15

Overview

Today Trigger.dev Realtime goes GA with better reliability, increased limits, and a brand new feature that allows you to stream LLM responses directly to your frontend.

As a quick overview, Realtime allows you to subscribe to runs and receive updates in real-time, from your backend or your frontend. This allows you to bridge the gap between your long-running background tasks in Trigger.dev and your application to give your users a real-time experience about the status of their tasks:

  • Show progress bars & toasts

  • AI/LLM Streaming Responses

  • Multi-step task progress

  • AI Agent Observability

How it works

The Realtime API is built on top of Electric SQL, an open-source PostgreSQL syncing engine that works over HTTP. The Trigger.dev server wraps Electric SQL and provides a simple API to subscribe to runs and get real-time updates.

Features and how to use them

After you trigger a task, you can subscribe to the run using the runs.subscribeToRun function. This function returns an async iterator that you can use to get updates on the run status.


Realtime streams

If you are working with streams in your tasks, for example when using the OpenAI SDK, you can forward the stream through the Realtime API to provide real-time updates to your users.


AI SDK + Streams + Tool Tasks

We've tailored Realtime streams to work seamlessly with the AI SDK, allowing you to provide real-time updates to your users as they interact with your AI models.

This demo is built with Realtime streams, the AI SDK, and Tool Tasks, which allow you to build Trigger.dev tasks that double as tools for the AI SDK.


Type-safety all the way down

When developing any new API, we always strive to provide the best developer experience. The Realtime API is no exception. We've made sure that the API is fully type-safe, from the backend to the frontend.


Granular access control

You can create Public Access Tokens with limited scopes that can be used to restrict access when using the Realtime API, especially from your frontend:

  • It's unsafe to share your Trigger.dev secret keys publicly.

  • Public Access Tokens can have limited scopes, such as read access to specific runs.

Going GA

The Realtime API is now generally available and ready for production use. We've been working with a number of customers to ensure that the API is stable and reliable, and we're excited to see what you build with it. We've increased the number of concurrent connections for our Hobby and Pro plans:

  • Hobby plan now supports up to 50 concurrent connections.

  • Pro plan now supports 500 concurrent connections, with the ability to increase this limit if needed.

And if you are self-hosting, Electric SQL is open-source with an Apache 2.0 license, so you can use the Realtime API when self-hosting.

Related Videos

Templates

bottom of page