OpenAI CUA Sample App

Stale
GitHub TypeScript MIT

Description

Official sample application for OpenAI Computer Using Agent (CUA). Learn how to use CUA via the API on multiple computer environments.

Key Features

  • Dual execution modes: native computer-use (clicks, drags, typing) and code mode (Playwright JS REPL)
  • Operator console UI with real-time screenshots, SSE events, and replay artifact review
  • Isolated mutable workspaces per run with managed browser sessions
  • Three official demo scenarios: kanban drag-and-drop, paint drawing, and booking form completion
  • Scenario manifests with deterministic verification against expected outcomes
  • Monorepo architecture with shared packages for runtime, schema, and browser abstraction

Use Cases

πŸ’‘ Browser automation for UI testing and QA workflows
πŸ’‘ Prototyping computer-use agents that interact with web applications via API
πŸ’‘ Building operator dashboards for monitoring and reviewing agent browser sessions
πŸ’‘ Creating custom scenarios for deterministic agent behavior verification
πŸ’‘ Learning how to integrate OpenAI Responses API for computer-use workflows

Quick Start

```bash
git clone https://github.com/openai/openai-cua-sample-app.git
cd openai-cua-sample-app
corepack enable
pnpm install
cp .env.example .env
# Edit .env and set OPENAI_API_KEY
pnpm playwright:install
pnpm dev
```
Open http://127.0.0.1:3000, choose a scenario, keep Headless selected, and start a run.

Related Projects