Computer Use SDK

The Computer Use SDK (@allternit/computer-use) is a thin, type-safe HTTP client for the Allternit Computer Use Engine. It covers browser automation, desktop control, vision proposals, parallel runs, sessions, approvals, and real-time event streaming over SSE.

Overview

Use this SDK when you want to:
  • Drive browsers and desktop environments from TypeScript or Node.js.
  • Run tasks in intent, direct, or assist execution modes.
  • Stream execution events and handle approval gates programmatically.
  • Manage sessions, runs, and canonical environments through a single client.

Installation

For Node.js environments, also install the eventsource peer dependency for SSE support:

Quick start

Client configuration

Execution modes

Intent mode

Direct mode

Assist mode

Core methods

Session management

Run control

Event streaming

Subscribe to real-time events during execution:
Common event types:

Approval handling

Interactive approval

Auto-approval with predicates

Built-in predicates

Request and response example

Execute request

Execute response

Error handling

Types

All engine types are exported for TypeScript users: