惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News - Newest:
Hacker News - Newest: "LLM"
Project Zero
Project Zero
The Hacker News
The Hacker News
博客园 - Franky
博客园_首页
云风的 BLOG
云风的 BLOG
T
Tenable Blog
腾讯CDC
量子位
大猫的无限游戏
大猫的无限游戏
Cyberwarzone
Cyberwarzone
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
B
Blog
C
Cybersecurity and Infrastructure Security Agency CISA
宝玉的分享
宝玉的分享
T
The Blog of Author Tim Ferriss
P
Privacy & Cybersecurity Law Blog
小众软件
小众软件
Vercel News
Vercel News
Blog — PlanetScale
Blog — PlanetScale
The Cloudflare Blog
G
Google Developers Blog
Security Latest
Security Latest
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
阮一峰的网络日志
阮一峰的网络日志
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
Arctic Wolf
Microsoft Security Blog
Microsoft Security Blog
O
OpenAI News
AWS News Blog
AWS News Blog
WordPress大学
WordPress大学
MongoDB | Blog
MongoDB | Blog
C
Cisco Blogs
T
Tor Project blog
博客园 - 【当耐特】
有赞技术团队
有赞技术团队
Last Week in AI
Last Week in AI
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
aimingoo的专栏
aimingoo的专栏
J
Java Code Geeks
D
Docker
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
News and Events Feed by Topic
Hacker News: Ask HN
Hacker News: Ask HN
Help Net Security
Help Net Security

OpenAI Developers

API deployment checklist | OpenAI API Sora 2 Prompting Guide Codex Prompting Guide Docs MCP | OpenAI Developers Gpt-image-1.5 Prompting Guide GPT-5.2 Prompting Guide Transcribing User Audio with a Separate Realtime Request Modernizing your Codebase with Codex GitHub - openai/openai-sora-sample-app: Sample app to get started using the Video API with Sora GitHub - openai/openai-apps-sdk-examples: Example apps for the Apps SDK GitHub - openai/openai-chatkit-advanced-samples: Starter app to build with OpenAI ChatKit SDK GitHub - openai/openai-chatkit-starter-app: Starter app to build with OpenAI ChatKit + Agent Builder Rate limits | OpenAI API Web search | OpenAI API Getting started with datasets | OpenAI API Prompt optimizer | OpenAI API Verifying gpt-oss implementations How to run gpt-oss locally with LM Studio Fine-tuning with gpt-oss and Hugging Face Transformers How to run gpt-oss locally with Ollama Function calling | OpenAI API Models | OpenAI API Reasoning best practices | OpenAI API Reasoning models | OpenAI API Background mode | OpenAI API Batch API | OpenAI API Conversation state | OpenAI API File search | OpenAI API Flex processing | OpenAI API MCP and Connectors | OpenAI API Code Interpreter | OpenAI API Quickstart - OpenAI Agents SDK Build Hour: Agentic Tool Calling Build Hour: Built-In Tools Reasoning best practices | OpenAI API Graders | OpenAI API Evaluation best practices | OpenAI API Working with evals | OpenAI API Guardrails - OpenAI Agents SDK Latency optimization | OpenAI API Optimizing LLM Accuracy | OpenAI API Agent orchestration - OpenAI Agents SDK Production best practices | OpenAI API Realtime transcription | OpenAI API Optimizing LLM Accuracy | OpenAI API Realtime and audio | OpenAI API Realtime conversations | OpenAI API Responses guide Migrate to the Responses API | OpenAI API Speech to text | OpenAI API Supervised fine-tuning | OpenAI API Tracing - OpenAI Agents SDK Vision fine-tuning | OpenAI API Audio and speech | OpenAI API GitHub - openai/openai-cs-agents-demo: Demo of a customer service use case implemented with the OpenAI Agents SDK Voice agents | OpenAI API Fine-tuning best practices | OpenAI API GitHub - openai/openai-agents-python: A lightweight, powerful framework for multi-agent workflows GitHub - openai/openai-agents-js: A lightweight, powerful framework for multi-agent workflows and voice agents Agents SDK | OpenAI API Using tools | OpenAI API Computer use | OpenAI API GitHub - openai/openai-testing-agent-demo: Demo of a UI testing agent using the OpenAI CUA model and the Responses API. Model optimization | OpenAI API GitHub - openai/openai-fm: Code for openai.fm, a demo for the OpenAI Speech API Predicted Outputs | OpenAI API GitHub - openai/openai-realtime-console: React app for inspecting, building and debugging with the Realtime API Building Voice Agents GitHub - openai/openai-realtime-solar-system: Demo showing how to use the OpenAI Realtime API to navigate a 3D scene via tool calling GitHub - openai/openai-realtime-twilio-demo Reinforcement fine-tuning | OpenAI API GitHub - openai/openai-responses-starter-app: Starter app to build with the OpenAI Responses API Structured model outputs | OpenAI API GitHub - openai/openai-structured-outputs-samples: Sample apps to help developers get started with Structured Outputs Voice agents | OpenAI API Model optimization | OpenAI API GitHub - openai/openai-realtime-agents: This is a simple demonstration of more advanced, agentic patterns built on top of the Realtime API. GitHub - openai/openai-support-agent-demo: Demo of a customer support agent interface using NextJS and the OpenAI Responses API with File Search Building Voice Agents Generate images with high input fidelity AI app development: Concept to production Model optimization Building agents Eval Driven System Design - From Prototype to Production Multi-Agent Portfolio Collaboration with OpenAI Agents SDK o3/o4-mini Function Calling Guide Exploring Model Graders for Reinforcement Fine-Tuning Guide to Using the Responses API Reinforcement Fine-Tuning for Conversational Reasoning with the OpenAI API Evals API Use-case - Responses Evaluation Comparing Speech-to-Text Methods with the OpenAI API Generate images with GPT Image Multi-Tool Orchestration with RAG approach using OpenAI Multi-Language One-Way Translation with the Realtime API Doing RAG on PDFs using File Search in the Responses API How to use the Usage API and Cost API to monitor your OpenAI usage Leveraging model distillation to fine-tune a model Orchestrating Agents: Routines and Handoffs Prompt Caching 101 Developing Hallucination Guardrails
GitHub - openai/openai-cua-sample-app: Learn how to use CUA (our Computer Using Agent) via the API on multiple computer environments.
2025-07-18 · via OpenAI Developers

GPT-5.4 CUA Sample App

TypeScript sample app for browser-focused computer-use workflows with GPT-5.4. The repo includes:

  • apps/demo-web: a Next.js operator console for starting runs and reviewing screenshots, events, and replay artifacts
  • apps/runner: a Fastify runner that manages mutable workspaces, browser sessions, SSE, and replay bundles
  • packages/*: shared scenario, runtime, and contract packages that make it easy to add new labs later

The legacy Python sample does not ship in this release branch. Keep that history on a separate v1 or legacy branch.

What This Repo Demonstrates

  • how to integrate the Responses API from one canonical place: packages/runner-core/src/responses-loop.ts
  • how to switch between code mode and native computer mode against the same browser lab
  • how to define scenario manifests, launch isolated run workspaces, and verify outcomes
  • how to build an operator-facing console that is understandable even when the runner is offline or a run fails

Prerequisites

  • Node.js 22.20.0
  • pnpm 10.26.0
  • Playwright Chromium browser install

First Run

git clone <repo-url>
cd openai-cua-sample-app
corepack enable
pnpm install
cp .env.example .env

Edit .env and set at least this environment variable:

OPENAI_API_KEY=your_key_here

The runner reads the repo-root .env automatically when you start it through the provided scripts. The web app uses its built-in defaults; if you need to override NEXT_PUBLIC_* settings, add them in apps/demo-web/.env.local.

If pnpm install prints an Ignored build scripts warning for optional packages such as sharp or esbuild, you can ignore it for local development in this repo. A clean clone still installs, builds, and starts successfully without approving those scripts.

Install the Playwright browser:

On Linux, install Playwright OS dependencies as well:

pnpm playwright:install:with-deps

If Playwright later reports missing system libraries, rerun the with-deps command above and follow any OS package prompts it prints.

Start both apps together:

Open http://127.0.0.1:3000, choose a scenario, keep Headless selected, and start a run.

Local Development

Run the services separately if you want independent logs:

pnpm dev:runner
RUNNER_BASE_URL=http://127.0.0.1:4001 pnpm dev:web

Common checks:

pnpm lint
pnpm typecheck
pnpm test
pnpm build
pnpm check

Live smoke tests stay opt-in and secret-gated:

OPENAI_API_KEY=your_key_here pnpm test:live

Execution Modes

  • native: exposes the Responses API computer tool directly. The model requests clicks, drags, typing, waits, and screenshots against the live browser session.
  • code: exposes a persistent Playwright JavaScript REPL through exec_js. The model scripts the browser rather than emitting raw computer actions.

Both modes use the same scenario manifests and replay pipeline. native is the closest sample of the computer tool itself. code is the clearest sample of a browser REPL harness.

Official Scenarios

  • kanban-reprioritize-sprint (kanban): teaches stateful drag-and-drop verification against a target board state derived from the operator prompt
  • paint-draw-poster (paint): teaches cursor control, drawing, and verifying saved canvas state against the live canvas
  • booking-complete-reservation (booking): teaches multi-step browsing and form completion with verification against a local confirmation record

More detail lives in docs/scenarios.md.

Repo Map

  • apps/demo-web The operator console UI
  • apps/runner The HTTP runner, SSE endpoints, and artifact serving layer
  • packages/replay-schema Shared request, response, replay, and error contracts
  • packages/scenario-kit Public scenario manifests and prompt defaults
  • packages/browser-runtime Playwright session abstraction
  • packages/runner-core Orchestration, Responses loop, scenario executors, and verification
  • labs Static lab templates copied into run-scoped workspaces
  • docs Architecture, scenarios, and contribution guidance

Environment Variables

Runner:

  • OPENAI_API_KEY
  • HOST (default 127.0.0.1)
  • PORT (default 4001)
  • CUA_DEFAULT_MODEL (default gpt-5.4)
  • CUA_RESPONSES_MODE (auto, fallback, or live)

Web:

  • RUNNER_BASE_URL (default http://127.0.0.1:4001)
  • NEXT_PUBLIC_CUA_DEFAULT_MODEL (default gpt-5.4)
  • NEXT_PUBLIC_CUA_DEFAULT_MAX_RESPONSE_TURNS (default 24)

See .env.example for a minimal local template.

Safety And Limitations

  • Computer use remains high risk. Do not point this sample at authenticated, financial, medical, or otherwise high-stakes environments.
  • This repo is intentionally browser-focused. Workspace patching and file-editing scenarios are out of scope for the OSS release branch.
  • Pending computer-use safety acknowledgements are not implemented in this sample yet. Runs fail with the stable code unsupported_safety_acknowledgement when the API asks for one.
  • The public scenarios are local labs designed for deterministic verification. They are not intended as proofs of general web autonomy.

Release Validation Checklist

  • clean clone on a fresh machine
  • setup succeeds from this README alone
  • pnpm dev
  • one successful headless run
  • one successful headful run
  • one intentional failure that shows the new runner guidance cleanly