Skip to content
OpenComputer
Getting started

Serverless Agents

Define reactive agents in TypeScript and run them in the OpenComputer cloud

OpenComputer is a managed runtime for agents defined as code. A project can contain several agents. You write the behavior; OpenComputer manages development deployments, model execution, tools, durable sessions, streaming, and production versions.

import { useInput, useModel } from "@opencomputer/agent";

export default function Agent() {
  const input = useInput();
  useModel("anthropic/claude-sonnet-4.6");

  return input.text
    ? `Help the user with this request: ${input.text}`
    : "You are a helpful assistant.";
}

The exported function is a reactive description of the agent. OpenComputer renders it for the current input and uses its return value as instructions for the managed agent loop. Hooks attach the model, tools, and MCP servers needed for that render. Memory gives an agent notes that outlive a session: project-scoped documents read at render, saved by the model through memory tools, and owned by you.

Start a project

npx @opencomputer/cli init my-agent
cd my-agent
npm install
npx --package @opencomputer/cli opencomputer login
npx --package @opencomputer/cli opencomputer link --create-project "my-agent"
npm run deploy -- --watch

The initializer creates one hello-world agent. link connects the directory to a cloud project; link by ID or slug to use an existing one. The watcher prints the dashboard URL and syncs every configured agent to development.

There is no local agent server. Agent code runs in OpenComputer’s managed development cloud.

What is available today

  • TypeScript projects containing one or more agents
  • reactive instructions, model selection, tools, MCP servers, input metadata, session data reads, and document memory
  • cloud development with file watching and automatic synchronization
  • dashboard and CLI playground sessions
  • immutable deployments promoted through aliases such as production
  • project-level secrets with optional agent overrides and constrained outbound requests
  • indexed runtime and egress logs available from the CLI

Agent behavior belongs in the repository under opencomputer/. The dashboard is primarily for selecting environments, testing agents, and inspecting what was deployed.