Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ you pay only your cloud provider for the VMs.
Website and docs: [vmbridge.ordinity.com](https://vmbridge.ordinity.com)

- Use several providers at once: boxd, Instabox, Daytona, Boat, Railway, E2B, Freestyle,
Superserve and Kubi. New VMs go to your default provider, or to the one you pick for a repository.
Superserve, Kubi and Vast.ai. New VMs go to your default provider, or to the one you pick for a repository.
- `vb opencode` opens OpenCode in your terminal while the agent works in its own worktree on a VM,
with the branch, its pull request and the VM in OpenCode's sidebar. See [OpenCode](#opencode).
- A VM sleeps when it sits idle and wakes when you send a message or an OpenCode prompt. Opening a
Expand Down Expand Up @@ -121,6 +121,23 @@ A Kubi VM is a whole desktop, and VM Bridge lets you and its agents use it:

How it works: [docs/PROVIDERS.md](docs/PROVIDERS.md).

## Vast.ai VMs

Vast.ai rents GPU machines from independent hosts. Every VM gets one NVIDIA GPU, on the cheapest
verified on-demand machine that fits the size. Add an API key from
[cloud.vast.ai/manage-keys](https://cloud.vast.ai/manage-keys/), and optionally pick a GPU model.

- **Cost:** about $0.06 to $0.11 an hour awake, billed per second from prepaid credit. A sleeping VM
pays only for its disk, about $0.20 per GB a month. A GPU model you pick costs more. If VM Bridge is
down, a VM stops itself after an hour with no SSH connection.
- **Access:** VM Bridge reaches each VM over SSH, and T3 and OpenCode through SSH tunnels, so no ports
are open to the internet. It needs the `ssh` command, so Vast.ai does not work on Cloudflare Workers.
- **Limits:** a sleeping VM wakes only if its host's GPU is still free. Hosts can go offline, and each
sets an end date on its machines (VM Bridge picks ones with at least 14 days left). There are no
snapshots, systemd or Docker.

How it works: [docs/PROVIDERS.md](docs/PROVIDERS.md).

## Environment variables

Under **Settings**, **Environment**, add variables such as `NPM_TOKEN` or `API_URL`. Every VM gets
Expand Down Expand Up @@ -253,7 +270,7 @@ with other busy Durable Objects needs Workers Paid ($5 a month). It asks for two

Then open the Worker's address and log in. Pair T3 Code with the same address. There is no setup
link, local network, Tailscale or tunnel to set up: the Worker's `workers.dev` address (or a domain
you add to it) is the only one. To change the password, change the secret under the Worker's
you add to it) is the only one. Vast.ai does not work on Workers, because it needs the `ssh` command. To change the password, change the secret under the Worker's
**Settings** in Cloudflare; that also logs everyone out.

There is no machine to read skills or `AGENTS.md` from, so upload skills and paste instructions under
Expand Down
11 changes: 8 additions & 3 deletions apps/landing/app/docs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export default function Docs() {
items={[
"Repositories share VMs. A repository goes on a VM that has room, and VM Bridge makes a new VM only when none does. A busy repository spreads over up to 4 VMs.",
"A VM sleeps after it has been idle for a set time, and wakes when you send a message or an OpenCode prompt.",
"Several providers at once: boxd, Instabox, Daytona, Boat, Railway, E2B, Freestyle, Superserve and Kubi. Pick one per repository, or let new VMs use the default.",
"Several providers at once: boxd, Instabox, Daytona, Boat, Railway, E2B, Freestyle, Superserve, Kubi and Vast.ai. Pick one per repository, or let new VMs use the default.",
"Everything is set up from a web dashboard behind one password: provider keys, GitHub, agent sign-ins and device pairing.",
"T3 Code needs no changes. To the app, VM Bridge looks like a single T3 server.",
"vb opencode opens OpenCode in your terminal while the agent works in its own worktree on a VM.",
Expand Down Expand Up @@ -428,7 +428,7 @@ bun run compile # dist/vmbridge
])}
/>
<p>
Each provider also has its own idle or time limit as a safety net in case VM Bridge is offline. Railway and Kubi have none, so VM
Each provider also has its own idle or time limit as a safety net in case VM Bridge is offline. Railway, Kubi and Vast.ai have none, so VM
Bridge never sets one there.
</p>
</Section>
Expand Down Expand Up @@ -474,6 +474,11 @@ bun run compile # dist/vmbridge
by default. A disposable VM, picked in the Kubi settings, is deleted after 7 days asleep. The API key needs read, exec, power
and network.
</>,
<>
<strong>Vast.ai</strong> rents one NVIDIA GPU per VM from independent hosts, the cheapest verified on-demand machine that fits the size.
Sleep stops the VM and you pay only for its disk. A sleeping VM wakes only if its host&apos;s GPU is still free. VM Bridge reaches
it over SSH, so it needs the <Code>ssh</Code> command and does not run on Cloudflare Workers.
</>,
<>
<strong>Freestyle</strong>, <strong>Superserve</strong> and <strong>Kubi</strong> have one machine size, so small, medium and large are the same VM.
</>,
Expand Down Expand Up @@ -717,7 +722,7 @@ bun run compile # dist/vmbridge
["An agent shows as signed out on a VM", "Add its sign-in under Accounts, or in your provider's dashboard if it supplies them."],
["The pairing link does not work", "Links work once and expire after 15 minutes. Create a new one."],
["The T3 server on a VM did not answer", "The VM may be busy or the provider slow. Check the VM on the dashboard canvas, then retry."],
["Waking takes longer than usual", "Stopped VMs (Daytona, Boat, Kubi) start T3 cold, which adds a few seconds over a paused VM."],
["Waking takes longer than usual", "Stopped VMs (Daytona, Boat, Kubi, Vast.ai) start T3 cold, which adds a few seconds over a paused VM."],
["You forgot the dashboard password", <>Run <Code key="k">vmbridge password</Code> on the machine to set a new one.</>],
]}
/>
Expand Down
2 changes: 1 addition & 1 deletion apps/landing/components/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const spots = providers.map((provider, i) => {
});

/**
* The nine providers on a ring around the bridge mark: the ring is the whole demo.
* The ten providers on a ring around the bridge mark: the ring is the whole demo.
* Title and body sit in the left column at xl; the ring fills the right and stays
* visible, centred, at every width. Nodes are sized so neighbours never overlap.
*/
Expand Down
2 changes: 1 addition & 1 deletion apps/landing/components/Stage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const steps: Step[] = [
},
{
title: "Choose a provider",
body: "Paste a key for boxd, Instabox, Daytona, Boat, Railway, E2B, Freestyle, Superserve or Kubi in the dashboard. Pick a VM size and how long a VM may sit idle.",
body: "Paste a key for boxd, Instabox, Daytona, Boat, Railway, E2B, Freestyle, Superserve, Kubi or Vast.ai in the dashboard. Pick a VM size and how long a VM may sit idle.",
links: [false, false],
paired: false,
vm: "pick",
Expand Down
4 changes: 2 additions & 2 deletions apps/landing/lib/copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ export const copy = {
},
},

/** The nine providers on a ring around the bridge mark. */
/** The ten providers on a ring around the bridge mark. */
providers: {
/** 40 */
title: "Nine supported sandbox providers",
title: "Ten supported sandbox providers",
/** 150 */
body: "Use your own accounts and API keys, and add several providers at once.",
},
Expand Down
18 changes: 16 additions & 2 deletions apps/landing/lib/data.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type ProviderId = "boxd" | "instabox" | "daytona" | "boat" | "railway" | "e2b" | "freestyle" | "superserve" | "kubi";
export type ProviderId = "boxd" | "instabox" | "daytona" | "boat" | "railway" | "e2b" | "freestyle" | "superserve" | "kubi" | "vast";

export interface Provider {
id: ProviderId;
Expand Down Expand Up @@ -155,6 +155,20 @@ export const providers: Provider[] = [
reach: "Private port with a token header",
safetyNet: "None",
},
{
id: "vast",
name: "Vast.ai",
logo: "/providers/vast.svg",
tile: "#000",
inset: "22%",
color: "#315fff",
sleep: "Stop, disk kept",
wake: "Start (a reboot)",
sizes: ["1 GPU, 4+ vCPU, 8+ GB", "1 GPU, 8+ vCPU, 16+ GB", "1 GPU, 16+ vCPU, 32+ GB"],
defaultSize: "small",
reach: "SSH tunnel",
safetyNet: "None",
},
];

export const github = "https://github.com/vkpdeveloper/vmbridge";
Expand Down Expand Up @@ -291,7 +305,7 @@ export const faq = [
{
question: "Which cloud providers does VM Bridge support?",
answer:
"VM Bridge supports boxd, Instabox, Daytona, Boat, Railway, E2B, Freestyle, Superserve and Kubi. You can add several at once, pick a default for new VMs, and send a repository to a given provider.",
"VM Bridge supports boxd, Instabox, Daytona, Boat, Railway, E2B, Freestyle, Superserve, Kubi and Vast.ai. You can add several at once, pick a default for new VMs, and send a repository to a given provider.",
},
{
question: "Which coding agents can I use?",
Expand Down
1 change: 1 addition & 0 deletions apps/landing/public/providers/vast.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion apps/server/dev/workerd/checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const fakeValues: Record<ProviderId, Record<string, string>> = {
kubi: { apiKey: "kubi_fake" },
railway: { token: "00000000-0000-0000-0000-000000000000", environmentId: "00000000-0000-0000-0000-000000000000" },
superserve: { apiKey: "ss_live_fake" },
vast: { apiKey: "vast_fake" },
};

export interface Result {
Expand All @@ -25,7 +26,8 @@ export interface Result {

function checks() {
const open = (id: ProviderId) => providers[id].open({ values: fakeValues[id] });
const verify = Object.keys(providers).map((id) => ({ name: id, call: () => open(id as ProviderId).verify() }));
// Vast.ai reaches VMs with the `ssh` command, which Workers do not have, so it is not checked here.
const verify = Object.keys(providers).filter((id) => id !== "vast").map((id) => ({ name: id, call: () => open(id as ProviderId).verify() }));
return [
...verify,
// Railway's verify uses the SDK adapter's own fetch. These two go through the `railway` package.
Expand Down
22 changes: 20 additions & 2 deletions apps/server/src/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const hoursPerMonth = 730;
// Daytona's built-in snapshots VM Bridge creates from (see providers/daytona.ts) fix the reserved disk.
const daytonaDisk = { small: 3, medium: 8, large: 10 };

// Disk sizes of the Vast.ai sizes (see providers/vast.ts).
const vastDisk = { small: 40, medium: 60, large: 100 };

const published: Record<ProviderId, Published> = {
boat: {
currency: "USD",
Expand Down Expand Up @@ -140,11 +143,26 @@ const published: Record<ProviderId, Published> = {
snapshots: "No separate price; saved changes bill as storage.",
plans: "Developer: $20 a month, all of it usage. Pro: $250.",
},
vast: {
currency: "USD",
source: "https://vast.ai/pricing",
asOf: "2026-11-30",
running: { perSize: { small: 0.058, medium: 0.07, large: 0.109 } },
asleep: { diskGibHour: 0.2 / hoursPerMonth, diskGib: vastDisk },
storageGibMonth: 0.2,
sleeping: "A stopped VM pays only for its disk, about $0.20 per GB a month (some hosts charge $0.40).",
snapshots: "Not available.",
plans: "Prepaid credit, billed per second. At zero credit Vast.ai stops your VMs.",
caveat: "Prices are the cheapest offers for any GPU and change by host. Picking a GPU model costs more.",
},
};

/** "2 vCPU, 4 GB" from a provider's size labels. Memory is taken as GiB, as the pricing pages bill it. */
/**
* "2 vCPU, 4 GB" from a provider's size labels, or the least a size gets from labels such as Vast.ai's
* "1 GPU, 4+ vCPU, 8+ GB, 40 GB disk". Memory is taken as GiB, as the pricing pages bill it.
*/
export function machine(provider: ProviderId, size: VmSize) {
const match = /^(\d+) vCPU, (\d+) GB$/.exec(providers[provider].sizes[size]);
const match = /(?:^|, )(\d+)\+? vCPU, (\d+)\+? GB(?:,|$)/.exec(providers[provider].sizes[size]);
if (!match) throw new Error(`Unreadable size label for ${provider} ${size}.`);
return { vcpu: Number(match[1]), gib: Number(match[2]) };
}
Expand Down
2 changes: 2 additions & 0 deletions apps/server/src/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { boxdWeb, useBoxdWeb } from "./boxd-web.ts";
import { daytonaProvider } from "./daytona.ts";
import { e2bProvider } from "./e2b.ts";
import { kubiProvider } from "./kubi.ts";
import { vastProvider } from "./vast.ts";
import { sleep } from "../runtime.ts";
import { notFound, retryNotFound, sdkDriver } from "./sdk.ts";
import { required, type Box, type ProviderDefinition } from "./types.ts";
Expand Down Expand Up @@ -313,6 +314,7 @@ export const providers: Record<ProviderId, ProviderDefinition> = {
kubi: kubiProvider,
railway: railwayProvider,
superserve: superserveProvider,
vast: vastProvider,
};

/** Whether VMs on this provider have a screen to watch (see watch/). */
Expand Down
Loading