Skip to main content
Get up and running with OpenSteer in three different ways: SDK, CUA Agent, or CLI.
1

Install OpenSteer

Install the SDK package in your project:
npm install opensteer
2

Create your first script

Create a new file quickstart.ts with this complete working example:
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();
}
3

Run your script

Execute the script:
node quickstart.ts
The script will:
  1. Launch a browser
  2. Navigate to example.com
  3. Take an action snapshot and click an element
  4. Take an extraction snapshot and extract structured data
  5. Close the browser
4

Understand the key concepts

Namespace (name): Selectors are persisted in .opensteer/selectors/quickstart/ for deterministic replay.Snapshots: mode: "action" optimizes HTML for interactions, mode: "extraction" optimizes for data extraction.Descriptions: Natural language element targeting like "main call to action" uses AI to find elements and persists selectors.Schema extraction: Define the structure you want with { title: "string", href: "string" } and OpenSteer extracts it.
5

Next steps

Explore more capabilities:

Actions

Click, input, hover, select, scroll, and more

Extraction

Extract structured data with typed schemas

Browser automation

Complete guide to browser operations

Cloud mode

Run in the cloud instead of locally

Best practices for AI agents

If you’re building AI agents that generate browser automation scripts:
  1. Use OpenSteer APIs instead of raw Playwright calls for persistent, replayable scripts
  2. Keep namespace consistent: SDK name must match CLI --name
  3. Take snapshots before actions: snapshot({ mode: "action" }) before interactions, snapshot({ mode: "extraction" }) before data extraction
  4. Prefer description targeting: More maintainable than CSS selectors
  5. Always cleanup: Wrap in try/finally and call close()
See AI Agents guide for complete integration patterns and Skills for installing the OpenSteer skill.

Additional examples

Basic usage

Navigate, snapshot, and interact with pages

Data extraction

Extract structured data from websites

Form filling

Automate form submissions

AI integration

Build AI agents with OpenSteer

Next steps

API Reference

Explore the complete API documentation

CLI Reference

Learn all CLI commands and options

Selectors

Understand selector persistence and replay

Cloud integration

Run browser automation in the cloud