OpenVibe.Run · part of OpenVibe Services · alpha

Run jobs on your own machine, or on a node that can.

Pair a computer once and the jobs you start run there, on your hardware, with their output streamed back to you. Or send a job to one API with your project's token: Run picks a node that offers the runtime it asks for and meters it per second.

Alpha. A job runs on nodes paired with OpenVibe (the OpenVibe Node); with none online for its class it waits, then expires.

Your machine, your jobs

A computer you pair runs only the jobs you start: placement matches its owner before anything else.

  1. Pair itOn openvibe.bot/machines, copy the one-line install command and run it on the computer. It joins as a worker under your account.
  2. Start a jobOpenVibe.Codes' "Run on your machine" sends a coding task there, or your own code submits one through the API.
  3. Watch it runThe job's event stream shows each state change and the machine's output as it is written.
  4. Keep the recordEvery job ends succeeded, failed, cancelled or expired, with its timings, its exit and the seconds it ran.

Part of OpenVibe Services: the building blocks every OpenVibe product runs on, with one console, one account and one SDK.

How a job runs

  1. SubmitPOST the job to /api/v1/jobs with a project token holding run.job.submit: which artifact to run, its input and its limits. Run checks it against the job contract, stores it queued and answers at once.
  2. PlaceRun reads the network's node offers for the job's class and chooses one its requirements allow. With no eligible node it waits, retrying every second, until its time to live runs out.
  3. RunOpenVibe.Bot sends the job to the node over its device link and meters every wall-clock second it runs. The node's output comes back as it is written.
  4. EndSucceeded, failed, cancelled or expired. An end state never changes, and the job, its timings, its exit and its metered seconds stay readable to the project.

Runtime classes

A job names the class of machine it needs. What each one is today:

FeatureWhat runsToday
functionA registered artifact on a paired OpenVibe NodeWorks
codeAn OpenVibe.Codes task on your own machineWorks
browserA page in a managed browserBuilt, not switched on yet
linux, desktop, gpuReserved names for the machines they sayNot yet

What you get

One APISubmit, read, list, cancel and stream jobs over HTTP, with RFC 9457 problems for every refusal.
Your project's jobs onlyA job belongs to a project and is visible only to that project's token: never to another project, never by guessing an id.
Live outputA short-lived ticket opens the job's event stream: state changes and the node's stdout as they happen.
Placed, not guessedEach placement records the node, the provider and the region it chose, from the offers its requirements allow.
Metered per secondThe node link measures each job's wall clock; the reading is what the job is charged against, never an estimate.
Ends cleanlyCancel a job, or let its time to live expire it. A node that disappears mid-run fails the job instead of leaving it running forever.

The API

Jobs are created with a project token from OpenVibe.Services (run.job.submit; reading, listing, cancelling and streaming take run.job.read, run.job.list, run.job.cancel and run.job.stream). A job names its runtime class, an artifact a machine declares (a name and one exact version: the first sample declares the one the other two run), its input and its limits.

Your machine
# On your paired machine (installed with --worker): a function is a command you declare.
# Its args arrive as one line of JSON on stdin, its stdout streams back, and fd 3 is its result.
sudo mkdir -p /opt/fn/hello && sudo tee /opt/fn/hello/run > /dev/null <<'EOF'
#!/bin/sh
read -r args
echo "hello from job $OPENVIBE_JOB_ID: $args"
printf '{"ok":true}' >&3
EOF
sudo chmod 755 /opt/fn/hello/run
# Add it to "worker" → "functions" in /etc/openvibe-node/config.json, then: sudo systemctl restart openvibe-node
#   {"name": "hello", "version": "1.0.0", "command": ["/opt/fn/hello/run"]}
Node (openvibe-sdk)
const { createClient } = require('openvibe-sdk/core');
const { createRunClient } = require('openvibe-sdk/run');

const run = createRunClient(createClient({ tokenProvider: tokens })).forProject('prj_…');
const { job } = await run.jobs.submit({
    class: 'function', artifact: { name: 'hello', version: '1.0.0' }, args: { name: 'world' },
    limits: { wall_ms: 30000, cpu_ms: 30000, mem_bytes: 268435456 }, ttl_ms: 600000,
});
for await (const ev of run.jobs.events(job.id)) console.log(ev.type, ev.data);   // state changes and output, until it ends
curl
curl -X POST https://openvibe.run/api/v1/jobs \
  -H "Authorization: Bearer $PROJECT_TOKEN" -H "Content-Type: application/json" \
  -d '{"class":"function","artifact":{"name":"hello","version":"1.0.0"},"args":{"name":"world"},
       "limits":{"wall_ms":30000,"cpu_ms":30000,"mem_bytes":268435456},"ttl_ms":600000}'

The job routes

GET /api/v1/jobs/:idState, node, timings, exit and metered seconds.
GET /api/v1/jobsThe project's jobs, newest first.
POST /api/v1/jobs/:id/cancelStops it; an ended job stays ended.
POST /api/v1/jobs/:id/stream/ticketThen GET /api/v1/jobs/:id/stream?ticket=…: its events and output as server-sent events (a service may send its own token instead).

Questions

What does OpenVibe.Run do?

It runs jobs: a project submits a job (a registered artifact, its input and its limits), and Run places it on a node whose offer meets its requirements.

Where do jobs run?

On nodes paired with OpenVibe through the OpenVibe Node, including computers of your own.

How is a job charged?

By the wall-clock seconds the node measures for it.

Can I watch a job run?

Yes. Its event stream shows each state change and the node's output as it happens.

Open source

Run is AGPL-3.0, and so is the OpenVibe Node that turns a computer into a worker.