The Versori Run SDK for building and running integrations on https://ai.versori.com
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:
Make an authenticated request to httpbin.org every minute
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); });
Add Package
deno add jsr:@versori/run
Import symbol
import * as run from "@versori/run";
Import directly with a jsr specifier
import * as run from "jsr:@versori/run";
Add Package
pnpm i jsr:@versori/run
pnpm dlx jsr add @versori/run
Import symbol
import * as run from "@versori/run";
Add Package
yarn add jsr:@versori/run
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";