rtrvr.ai logo
rtrvr.ai
PricingBlogDashboard

Core Agent

Getting StartedWeb AgentSheets Workflows

Building Blocks

Recordings & GroundingTool CallingKnowledge Base (RAG)

Platform Access

CLI & SDKAPI OverviewAgent APIScrape APIBrowser as API/MCP

Automation

ShortcutsTriggers & WebhooksSchedules

Account & Security

Cookie SyncPermissions & Privacy
DocsCLI & SDK

rtrvr CLI & SDK

One CLI, three execution modes. Browser automation for AI agents and humans — across cloud, local browser extension, or auto-routed.

npm → @rtrvr-ai/cliGitHub

Cloud Mode

Run agents and scrape via rtrvr's managed cloud browsers.

Extension Mode

Route to your local browser extension for authenticated sessions.

Auto Mode

Smart routing with automatic fallback between cloud and extension.

CLI (global)

bash
npm install -g @rtrvr-ai/cli

SDK (in project)

bash
npm install @rtrvr-ai/sdk

The CLI provides the rtrvr command. The SDK provides createRtrvrClient() for programmatic TypeScript/JavaScript usage.

1Authenticate
bash
rtrvr auth login
2Run your first task
CLI
rtrvr run "Extract the top 10 products and prices" --url https://example.com
3Explore
bash
# Scrape a page
rtrvr scrape --url https://example.com

# Check your capabilities
rtrvr capabilities

# Run diagnostics
rtrvr doctor

Every command supports three execution targets. Use --target or the shortcut flags.

Cloud

--cloud

Managed browsers via api.rtrvr.ai. No local setup needed. Best for scraping, data extraction, and tasks that don't require your login sessions.

Extension

--extension

Route to your local browser via the rtrvr Chrome extension. Use for authenticated sessions (logged-in sites) and tasks that need your cookies/sessions.

Auto (default)

--target auto

Smart routing — checks if extension devices are online, tries extension first, falls back to cloud automatically. This is the default behavior.

Auto mode routing flow

rtrvr run "task"
Check for online extension devices
Found
Extension
Not found
Cloud

The response includes routing metadata showing which mode was selected and whether fallback was applied:

json
{
  "metadata": {
    "selectedMode": "cloud",
    "fallbackApplied": true,
    "fallbackReason": "no extension devices online"
  }
}
bash
# Positional input
rtrvr run "Find the latest pricing for each plan" --url https://example.com

# From file
rtrvr run --input-file ./task.txt --url https://example.com --target cloud

# From stdin
echo "Summarize this page" | rtrvr run --url https://example.com
<input>

Task description (positional argument)

--input <text>

Task description (flag alternative)

--input-file <path>

Read task description from a file

--url <url>

Target URL(s) for the agent

--target <mode>default: auto

Routing mode: auto, cloud, or extension

--cloud

Shortcut for --target cloud

--extension

Shortcut for --target extension

--device-id <id>

Target a specific browser extension device

--schema-file <path>

JSON schema file for structured output

--json

Machine-readable JSON output

--no-stream

Disable real-time progress streaming

The @rtrvr-ai/sdk package provides a typed TypeScript client for programmatic use.

Create a Client

TypeScript
import { createRtrvrClient } from '@rtrvr-ai/sdk';

const client = createRtrvrClient({
  apiKey: process.env.RTRVR_API_KEY!,
  defaultTarget: 'auto',   // 'auto' | 'cloud' | 'extension'
});

Client Options

apiKey

Your rtrvr API key (rtrvr_...)

defaultTargetdefault: auto

Default routing mode

baseUrldefault: https://api.rtrvr.ai

Override the API base URL

mcpUrldefault: https://mcp.rtrvr.ai

Override the MCP base URL

Unified Run

TypeScript
const result = await client.run({
  input: 'Find latest headline and author',
  urls: ['https://example.com'],
  target: 'auto',
});

console.log(result);

Direct Tool Calls

TypeScript
// Extract structured data
const extracted = await client.tools.extract({
  user_input: 'Extract all product names and prices',
  tab_urls: ['https://example.com/products'],
});

// Act on a page
const acted = await client.tools.act({
  user_input: 'Click the "Sign Up" button',
  tab_urls: ['https://example.com'],
});

// Crawl and extract
const crawled = await client.tools.crawl({
  user_input: 'Find all blog post titles',
  tab_urls: ['https://example.com/blog'],
});

Scrape

TypeScript
const scraped = await client.scrape.run({
  urls: ['https://example.com'],
});

Utilities

TypeScript
// List online devices
const devices = await client.devices.list();

// Check credit balance
const credits = await client.credits.get();

// Get profile
const profile = await client.profile.get();

Related Documentation

API Overview

REST API endpoints and authentication

Agent API

Full agent endpoint reference

Scrape API

Page scraping endpoint reference

MCP Docs

Browser as API/MCP protocol

Ready to automate from your terminal?

Install the rtrvr CLI and start running agents in seconds.