Skip to main content
The Uplink AI package enables you to control browsers using natural language instructions powered by large language models (LLMs). Instead of writing selectors and detailed automation scripts, you can describe what you want to do in plain English.

Installation

The AI package is optional and must be installed separately:
You’ll also need an API key from a supported AI provider (Anthropic or OpenAI).

When to Use AI Automation

AI automation is ideal when:
  • Dynamic UIs: The page structure changes frequently or unpredictably
  • Complex interactions: Multi-step workflows that are hard to script manually
  • Data extraction: Extracting structured information from unstructured content
  • Natural workflows: Actions that are easier to describe than to code
Traditional selector-based automation works better when:
  • Performance is critical: AI calls add latency and cost
  • Exact control needed: You need pixel-perfect precision
  • Stable selectors: The page structure is predictable and stable
  • Offline automation: No internet connection or API access

Quick Example

Here’s how AI automation works:

Key Features

Natural Language Actions

The page.act() method interprets your instruction and performs the necessary browser actions automatically:

Type-Safe Data Extraction

The page.extract() method extracts structured data from pages using AI, with optional Zod schema validation for type safety:

Supported Providers

  • Anthropic - Claude models (fully supported)
  • OpenAI - GPT models (coming soon)

How It Works

When you call page.act() or page.extract():
  1. The AI agent captures a snapshot of the current page state
  2. Your instruction is sent to the AI provider along with page context
  3. The AI analyzes the page and determines what actions to take
  4. For act(): Actions are executed automatically on the page
  5. For extract(): Data is extracted and validated against your schema

Next Steps

AI Setup

Configure AI agents with Anthropic or OpenAI

Natural Language Actions

Perform browser actions with natural language

Data Extraction

Extract structured data with type safety

Best Practices

Learn effective patterns for AI automation