opensteer
v0.5.4
Published
Open-source browser automation SDK with robust selectors and deterministic replay.
Maintainers
Readme
Opensteer
Browser automation framework for developers and AI agents with deterministic replay.
Opensteer gives you one API for local and cloud runs, description-based actions, structured extraction, and CUA agent workflows.
Install
Main setup (recommended):
npm i -g opensteer
opensteer skills installSDK package (when importing Opensteer in app code):
# npm
npm install opensteer
# pnpm
pnpm add opensteer
# bun
bun add opensteerRequirements
- Node.js
>=20 - Playwright-supported browser runtime
- Model provider API key for LLM-powered resolution/extraction/CUA
If browser binaries are missing:
npx playwright install chromiumWhat It Does
- Unified local/cloud execution with the same API surface
- Descriptor-aware actions with selector persistence for replay
- Structured extraction with typed schemas
- CUA agent support (
openai,anthropic,google)
Quick Start: SDK
import { Opensteer } from "opensteer";
const opensteer = new Opensteer({ name: "quickstart" });
try {
await opensteer.launch();
await opensteer.goto("https://example.com");
await opensteer.snapshot({ mode: "action" });
await opensteer.click({ description: "main call to action" });
await opensteer.snapshot({ mode: "extraction" });
const data = await opensteer.extract({
description: "hero section",
schema: { title: "string", href: "string" },
});
console.log(data);
} finally {
await opensteer.close();
}Quick Start: CUA Agent
import { Opensteer } from "opensteer";
const opensteer = new Opensteer({ model: "openai/computer-use-preview" });
try {
await opensteer.launch();
const agent = opensteer.agent({ mode: "cua" });
const result = await agent.execute({
instruction: "Go to Hacker News and open the top story.",
maxSteps: 20,
});
console.log(result.message);
} finally {
await opensteer.close();
}Quick Start: CLI
# Open a browser session and bind a selector namespace
opensteer open https://example.com --session demo --name quickstart
# Action snapshot + interaction
opensteer snapshot action --session demo
opensteer click --description "main call to action" --session demo
# Extraction snapshot + structured extract
opensteer snapshot extraction --session demo
opensteer extract '{"title":"string","href":"string"}' --description "hero section" --session demo
# Close session
opensteer close --session demoFor non-interactive runs, set OPENSTEER_SESSION or OPENSTEER_CLIENT_ID.
For AI Agents
Use this workflow to keep scripts replayable and maintainable:
- Use Opensteer APIs (
goto,snapshot,click,input,extract) instead of raw Playwright calls. - Keep namespace consistent: SDK
namemust match CLI--name. - Take
snapshot({ mode: "action" })before actions andsnapshot({ mode: "extraction" })before extraction. - Prefer
descriptiontargeting for persistence and deterministic reruns. - Always wrap runs in
try/finallyand callclose().
First-party skills:
Install the Opensteer skill pack:
opensteer skills installClaude Code marketplace plugin:
/plugin marketplace add steerlabs/opensteer
/plugin install opensteer@opensteer-marketplaceCloud Mode
Opensteer defaults to local mode. Enable cloud mode with env or constructor options:
OPENSTEER_MODE=cloud
OPENSTEER_API_KEY=<your_api_key>OPENSTEER_BASE_URLoverrides the default cloud hostOPENSTEER_AUTH_SCHEMEsupportsapi-key(default) orbearercloud: trueor acloudoptions object overridesOPENSTEER_MODE- Cloud mode is fail-fast (no automatic fallback to local)
Opensteer.from(page),uploadFile,exportCookies, andimportCookiesare local-only
Resolution and Replay
For descriptor-aware actions (click, input, hover, select, scroll):
- Reuse persisted selector path from
description - Try snapshot counter (
element) - Try explicit CSS selector (
selector) - Use LLM resolution (
descriptionrequired) - Return actionable error
When step 2-4 succeeds and description is present, selector paths are cached
in .opensteer/selectors/<namespace> for deterministic replay.
Docs
- Getting Started
- API Reference
- CLI Reference
- Cloud Integration
- Selectors and Storage
- HTML Cleaning and Snapshot Modes
- Live Web Validation Suite
- Skills
Development
pnpm install
pnpm typecheck
pnpm test
pnpm build