Write an agent as a TypeScript function, deploy it live in seconds. Your keys never enter the runtime.
import { useModel, useTool, useMcpServer } from "@opencomputer/agent";
import { openCleanupPullRequest } from "./tools/github.js";
export default function Agent() {
useModel("anthropic/claude-sonnet-4.6");
useMcpServer(unleashMcp); // read flag state
useTool(openCleanupPullRequest); // one PR per stale flag
return "Find stale flags in code, open a PR to remove each.";
}A real agent: it finds stale feature flags still referenced in code and opens a cleanup PR for each.
How it works
Write an agent as a TypeScript function. Deploy it. We run the loop, the sessions, the streaming, the versions.
Every session runs on a real Linux machine: shell, filesystem, packages, network.
Your tools and MCP servers run on that machine - clone a repo, run ffmpeg, drive a browser, install anything.
Sessions are durable: they stream, can be steered mid-run, hibernate when idle, resume where they left off.
No model keys in your runtime. Bring your own or use ours. Models are a string, change it per request.
Want your own agent loop? The same machines are available as bare sandboxes.
Managed
Keys it uses but never sees
Each secret is bound to one origin and injected after the request leaves the sandbox. The agent can open a PR; it can't read the token, and can't send it anywhere else.
export const githubPat = defineConnection({
origin: https://api.github.com", // only ever here
headers: { Authorization: bearer(useSecret("GITHUB_PAT")) },
});POST /repos/acme/app/pulls (open cleanup PR) Authorization: Bearer ••••••••
Deploy it, then leave it running
Give it a schedule and it runs itself. Sessions, streaming, MCP, and Slack are handled.
export default defineSchedule({
cron: "0 9 * * 1-5", // weekdays, 9am
dispatch: { payload: { dryRun: true } },
});$ opencomputer deploy
✓ live · runs weekdays, opens PRs, never sees the tokenAgents run on OpenComputer sandboxes: full Linux microVMs with checkpoint, fork, and live resize. Bringing your own harness or runtime? Use the sandbox directly. Same compute, you own the loop.
const box = await Sandbox.create(); // a full Linux microVM
await box.exec("your-harness --run"); // your loop, your rules
await box.checkpoint("ready"); // fork or restore anytimePricing
One set of rates for everyone: model calls passed through at API prices, machine time billed per second. A plan is prepaid usage credit with a multiplier — and you can bring your own model subscription.
The rates, paid directly
10× prepaid credit
10× prepaid credit, at scale
On your terms
There is one meter set. Credits draw down at exactly the PAYG rates, and when they run out you keep running at those same rates. Bare sandboxes meter machine time only.
Every turn of your agent's loop is a model call, and tokens are how it's metered — passed straight through at API rates, no markup. Bring your own key, or a Codex subscription, and this meter reads zero: you pay only for machine time.
Every session runs on its own Linux machine, billed only while it runs. Agent sessions default to 2 GB / 1 vCPU and burst automatically to 4 GB / 2 vCPU ($0.00630/min) or 8 GB / 4 vCPU ($0.01260/min) when they need it. A session that runs ten minutes a day costs about $1 a month.
Running sandboxes directly? Pick a baseline machine; it bursts to its peak size automatically under load and drops back when done. Burst time is billed at the peak rate, everything to the nearest second.
I just want compute →| Baseline | Bursts to | Max disk | $/min | $/min at peak |
|---|---|---|---|---|
| 0.5 GB / 0.25 vCPU | 2 GB / 1 vCPU | 8 GB | $0.00079 | $0.00315 |
| 1 GB / 0.5 vCPU | 4 GB / 2 vCPU | 8 GB | $0.00158 | $0.00630 |
| 2 GB / 1 vCPUdefault | 8 GB / 4 vCPU | 8 GB | $0.00315 | $0.01260 |
| 4 GB / 2 vCPU | 16 GB / 8 vCPU | 16 GB | $0.00630 | $0.02520 |
| 8 GB / 4 vCPU | 32 GB / 16 vCPU | 32 GB | $0.01260 | $0.05040 |
Additional disks — bottomless storage that persists across sandboxes — are on the way.