On this page
Quick Start
Give your agent a supervised browser: it drives a real browser, you watch live and take control when it matters, then hand it back. Start with a read-only task: open Example Domain, read its heading, and release the browser.
Prerequisites
- For MCP, install Node.js 20+ and use a client such as Claude Desktop, Cursor or VS Code. Your agent can sign you in by email using
authenticate; no manually configured API key is needed. - For REST or SDKs, sign in and create an API key in API keys, then set
ROVE_API_KEYin your environment. You need credits for live operations; see pricing.
Prompt your agent (recommended)
- Install the MCP server in your client's MCP settings:
{
"mcpServers": {
"rove": {
"command": "npx",
"args": ["-y", "@roveapi/mcp"]
}
}
}
- Restart the client, allow authentication, and ask:
- Expect the agent to call
start_supervised_session,create_viewer_grant,navigate,get_a11y_tree, thenclose_session. A successful live result contains the heading Example Domain. The viewer shows the same page; after closing, its session is ended.
Continue with MCP setup for OAuth and client troubleshooting.
What is a supervised session?
The agent and person share a browser. You can watch live, Take control for logins or judgment calls, and Return to agent. Control is exclusive; after handback, the agent must read the page again before acting. See browser concepts and supervised sessions.
Manual API usage
Install curl, jq and Bash. Run the following with ROVE_API_KEY exported. jq extracts the returned session ID; the exit trap releases the session even if a later request fails.
set -euo pipefail
: "${ROVE_API_KEY:?Set a live Rove API key first}"
api=https://api.roveapi.com
session_id=$(curl --fail-with-body -sS "$api/v1/browser/session" \
-H "Authorization: Bearer $ROVE_API_KEY" -H 'Content-Type: application/json' \
-d '{"supervised":true}' | jq -er '.session_id')
trap 'curl --fail-with-body -sS "$api/v1/browser/action" -H "Authorization: Bearer $ROVE_API_KEY" -H "Content-Type: application/json" -d "{\"session_id\":\"$session_id\",\"action\":\"close_session\"}" >/dev/null' EXIT
curl --fail-with-body -sS "$api/v1/browser/sessions/$session_id/viewer-grants" \
-H "Authorization: Bearer $ROVE_API_KEY" -H 'Content-Type: application/json' \
-d '{"origin":"https://api.roveapi.com"}' | jq '.viewer_url'
curl --fail-with-body -sS "$api/v1/browser/action" \
-H "Authorization: Bearer $ROVE_API_KEY" -H 'Content-Type: application/json' \
-d "{\"session_id\":\"$session_id\",\"action\":\"navigate\",\"params\":{\"url\":\"https://example.com\"}}" | jq '.result'
curl --fail-with-body -sS "$api/v1/browser/action" \
-H "Authorization: Bearer $ROVE_API_KEY" -H 'Content-Type: application/json' \
-d "{\"session_id\":\"$session_id\",\"action\":\"get_a11y_tree\",\"params\":{}}" | jq -r '.result.tree'
Expect a navigation result with title Example Domain, then a tree containing that heading. Open the printed viewer_url promptly to watch. Closing uses the close_session action, rather than DELETE on a session resource. Continue with the API reference.
SDKs
Install Node.js 20+ and npm install @roveapi/browser, or Python 3.9+ and pip install roveapi. Export ROVE_API_KEY. Run the Node example as an ES module (or TypeScript with your normal runner); run Python as a script.
import { BrowserClient } from '@roveapi/browser'
const rove = new BrowserClient({ apiKey: process.env.ROVE_API_KEY!, retries: 0 })
const session = await rove.session({ supervised: true })
try {
const grant = await rove.createViewerGrant(session.id)
console.log('Watch live:', grant.viewerUrl)
const navigation = await session.navigate('https://example.com')
console.log(navigation.result.title)
const observation = await session.getA11yTree()
console.log(observation.result.tree)
} finally {
await session.close()
}
import os
from roveapi import BrowserClient
with BrowserClient(api_key=os.environ['ROVE_API_KEY'], retries=0) as rove:
with rove.session(supervised=True) as session:
grant = rove.create_viewer_grant(session.id)
print('Watch live:', grant['viewer_url'])
navigation = session.navigate('https://example.com')
print(navigation['result']['title'])
print(session.get_a11y_tree()['result']['tree'])
Expect Example Domain and an accessibility tree containing its heading. The Node finally and Python session context close the browser on success or failure. These short examples close as soon as the read finishes; use the handoff recipe for a session that waits for a person.
Next steps
- SDK guide — installation, retry behavior, timeouts and errors
- Browser concepts — sessions, profiles and fresh observations
- Recipes — login, forms and extraction
- Troubleshooting — recover a blocked task
Help improve this page: Report a correction.
Blocked on a task? Contact support. Include the error type and session ID; omit keys and viewer credentials.