An agent is a TypeScript function. Deploy it in seconds and it's live, ready to serve your users. 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.
Get started
01Install the CLI
02Sign in
03Paste into your coding agent
Let your coding agent do all three
Copy the prompt for
Either way, your project shows up in the dashboard after its first deploy.
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.
Managed
Keys it uses but never sees
Each secret is bound to one origin and injected after the request leaves the machine. 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 tokenPricing
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.
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.