Skip to main content
Home

@versori/run@0.4.11
Built and signed on GitHub Actions

latest

The Versori Run SDK for building and running integrations on https://ai.versori.com

This package works with Node.js, Deno
This package works with Node.js
This package works with Deno
JSR Score
52%
Published
a day ago (0.4.11)

The Versori Run SDK is the backbone of the Versori AI integration platform. It provides a set of tools and abstractions for building integrations which can run in the cloud on Versori's infrastructure.

Getting Started

First off, it's worth being familiar with the Versori AI platform, and understanding how Connectors, Connections and Projects fit together to make up an integration. This information is available on our primary documentation site, Versori User Documentation.

Our in-platform AI helps you build and test your integrations, and then deploy them to the cloud, however sometimes AI falls short and you may need to understand the underlying code to debug or extend your integrations; this is where this documentation comes in.

Structure of an integration

An integration is made up of a Trigger and one or more Task, to form a Workflow. There are two main types of triggers, schedule and webhook, and two main types of tasks, fn and http.

A simple integration might look like this:

Examples

Make an authenticated request to httpbin.org every minute

import { fn, http, schedule, MemoryInterpreter } from '@versori/run';

const workflow = schedule('every-minute', '* * * * *')
    .then(
        fn('log', (ctx) => {
            ctx.log.debug('Hello, world!');

            return 42;
        })
    )
    .then(
        http('httpbin', { connection: 'httpbin' }, async ({ fetch, log }) => {
            // The `fetch` implementation passed on the context object is already authenticated and configured to
            // prepend the base URL to the final request based on how the connection is configured from the Versori
            // platform.
            const resp = await fetch('/headers');

            log.debug('response', { resp });

            return resp.json();
        })
    );

async function main(): Promise<void> {
    const interpreter = new MemoryInterpreter();

    interpreter.register(workflow);

    await interpreter.start();
}

main().catch((err) => {
    console.error('Failed to run workflow', err);
});
Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@versori/run

Import symbol

import * as run from "@versori/run";
or

Import directly with a jsr specifier

import * as run from "jsr:@versori/run";

Add Package

pnpm i jsr:@versori/run
or (using pnpm 10.8 or older)
pnpm dlx jsr add @versori/run

Import symbol

import * as run from "@versori/run";

Add Package

yarn add jsr:@versori/run
or (using Yarn 4.8 or older)
yarn dlx jsr add @versori/run

Import symbol

import * as run from "@versori/run";

Add Package

vlt install jsr:@versori/run

Import symbol

import * as run from "@versori/run";

Add Package

npx jsr add @versori/run

Import symbol

import * as run from "@versori/run";