Quickstart
Create an agent project and sync it to Development (Cloud)
Prerequisites
- Node.js 22 or newer
- an OpenComputer account
1. Create the agent
npx @opencomputer/cli init my-agent
cd my-agent
npm installUse . instead of my-agent to initialize an empty current directory. The
initializer creates one hello-world agent.
2. Log in
npx --package @opencomputer/cli opencomputer loginThe CLI opens the OpenComputer device-login flow and stores the login locally.
The production API at https://app.opencomputer.dev is used by default.
3. Watch development deployments
Link the directory to a new cloud project:
npx --package @opencomputer/cli opencomputer link --create-project "my-agent"To use an existing project, link by its ID or slug instead. Start the deployment watcher:
npm run deploy -- --watchThe process prints the project dashboard URL, watches opencomputer/, and
deploys changes to development. Open the dashboard playground or use the CLI
to send a message.
The watcher stays open like a live-reload development process:
OpenComputer Development
✓ Deployment ready
Project my-agent (prj_...)
Agents hello-world@development
Dashboard https://app.opencomputer.dev/projects/prj_...
Watching /path/to/my-agent/opencomputer for changes.
Changes deploy automatically. Press Ctrl+C to stop.This command does not start a local agent server or a browser application.
4. Change the agent
Edit opencomputer/agents/hello-world/agent.ts:
import { useInput, useModel } from "@opencomputer/agent";
export default function Agent() {
const input = useInput();
useModel("anthropic/claude-sonnet-4.6");
return `Be concise and practical. Current request: ${input.text ?? "none"}`;
}Saving the file publishes a new development deployment. Start a new playground or client session to test it; an existing session keeps the deployment it started with.
See Projects for project selection and Secrets and runtime variables for automatic development secret synchronization.
5. Deploy to production
npm run deploy -- --alias productionThe command builds an immutable deployment and advances the production
alias. Development remains available for subsequent edits.
See Deployments and environments for aliases and version history.