Skip to main content

What is the Runtime API?

The Runtime API is the import you need to run Glues. It provides the glue object that you can use to register triggers and credential fetchers. Importing the runtime is all that is needed to make a Glue usable by the CLI (dev and deploy).
import { glue } from "jsr:@glue/runtime";

glue.gmail.onNewThread((event) => {
  console.log("New thread received:", event);
});
All the services available are in the glue object - for example to register a trigger for a Cron schedule, you’d use glue.cron.onCron.

Reference Docs

The runtime is documented on JSR.