One release, three languages. Python revyl-verify 0.7.0 = TypeScript @revyl/verify 0.9.0 = Go github.com/RevylAI/verify/go v0.8.0: the same release with the same features. Each language keeps its own version line, so "since" notes name the Python version.
Verify is a thin Revyl SDK, not a test runner. Open a web browser, iOS simulator or Android emulator for natural-language instructions and validations, or an early-access Mac computer for commands, files, processes, screenshots and, on a Mac opened with inference, validations and extracts.
Use Python ≥3.10 and the revyl_verify import. The distribution is named revyl-verify ; it is separate from the revyl CLI. Install it from PyPI with pip install revyl-verify or uv add revyl-verify .
Run only explicitly authorized cloud workloads. Keep API keys, signed recording URLs and session links private. Use context managers so errors still trigger cleanup; there is no runner, automatic step replay or creation retry.
Set up your coding agent
The revyl-verify skill teaches a coding agent (Claude Code, Cursor, Codex, Capy and others) when and how to check a web page, an app or a Mac with Verify, in Python as well as TypeScript. With Node.js 22.18 or later, run this at the repository root. It writes the skill to .agents/skills/ and .claude/skills/ , adds a short Verify section to AGENTS.md (or to CLAUDE.md when the repository has that and no AGENTS.md ), and changes nothing when run again:
Without Node.js, copy the skill into the two folders agents read:
Or install the Verify plugin in your agent; see Set up your coding agent .
Pillow and PyYAML are the only runtime dependencies: Pillow for PNG blank-frame inspection and for downscaling screenshots sent to your own model, PyYAML for reading .revyl/config.yaml for session profiles . HTTP, model calls included, uses the standard library.
On the first interactive open() , attach() or current_computer() call without credentials, Verify prints a Revyl approval URL and code, opens your browser, and waits for you to approve. It saves the login to ~/.revyl/credentials.json , which the Revyl CLI and the other Verify SDKs , so later runs start without a prompt. You can also sign in ahead of time with the separately installed Revyl CLI :
Verify never opens a browser when stdin or stderr is not a terminal or CI is set. Supply REVYL_API_KEY through the process's secret store there; without credentials the call raises AUTH_MISSING .
Credential precedence matches the other SDKs: a usable stored CLI login marked local_auth_override , then REVYL_API_KEY , then another usable CLI login. An expired access token can fall back to its stored API key. Never pass keys in argv, source, screenshots or logs.
Inside a revyl-macos GitHub Actions job
current_computer() and async_current_computer() attach to REVYL_COMPUTER_ID with normal credential resolution, non-owning by default. They never create a computer, raise COMPUTER_ID_MISSING when the ID is unset or blank, and reject invalid IDs with INVALID_ARGUMENT . The job's owner releases the computer; closing the attachment only cleans up hosted children.
Use a release containing these helpers and a runner configured to inject REVYL_COMPUTER_ID and a short-lived REVYL_API_KEY . A workflow can supply its own key instead. With Python ≥3.10 and the project dependencies installed, add this step to a job with runs-on: revyl-macos :
Use async with await async_current_computer() as computer in asyncio jobs. Both helpers accept explicit backend_url , app_url , step_timeout , and log options. stop_on_close=True explicitly takes ownership and can end the job's computer when closed. Use computer.open(target) for hosted app sessions: iOS by bundle_id or an exact app/build pair, Web by an exact app/build pair.
Synchronous iOS Settings
open returns a Session , which is also a context manager. instruction and validation wait for completion; a failed validation raises by default even if HTTP succeeded. Pass soft=True to validation to inspect a failed verdict without raising. Screenshots return PNG bytes and optionally save them to path , creating its folder. report() returns a JSON dictionary: for devices it is the session-details/report metadata from /execution/device-sessions/{id} , not a fabricated report endpoint. After close() , report() waits up to 5 seconds for a final status ( completed , failed , cancelled or timeout ) and then returns the status Revyl has. Web, iOS and Android sessions usually reach a final status within that wait: a web session usually settles in 2 seconds, and its recording is saved a few seconds later. If a report still reads running , call report() again.
All timeout values are seconds , including start_timeout (default 600), step timeouts and computer command timeouts. Mobile startup includes a bounded best-effort blank-frame observation, not a guarantee that the app has rendered. Begin with an instruction that reaches the screen you need.
async_open returns an AsyncSession . Its async methods adapt the synchronous implementation through worker threads, rather than introducing another HTTP stack. Cancelling a method schedules best-effort session close; cancelling open interrupts startup and attempts cleanup as soon as an identity is known. Cancellation does not forcibly terminate an in-flight thread or undo a remote operation; do not replay an uncertain mutation. Always close explicitly or use async with await async_open(...) .
Read a value with extract()
Since 0.6.0. extract(text) reads one value off the screen and returns a StepResult whose value is the string it read:
Describe one value that is on the screen now, such as "the order number on the confirmation" . When nothing can be read, it raises STEP_FAILED with the reason and a hint on how to describe the value. It works on every session: on Web, iOS and Android it runs on Revyl's agent like instruction() and validation() , and on a Mac computer opened with inference=True it reads the Mac's own screen with the Mac's own model (see validation() and extract() on a Mac ). A session opened with model or agent raises INVALID_ARGUMENT : read the value from screenshot() with your model instead. AsyncSession.extract() is the same, awaited.
Every StepResult also has engine : "local" when the vision model of the Mac the step ran on or inside answered, "hosted" when Revyl's hosted model did, and None when Revyl doesn't say, as on ordinary Web, iOS and Android sessions. value is set on extract steps only.
Mac computers are available to organizations on a current paid Revyl plan. If yours can't start one, ask support@revyl.ai :
exec(argv, stdin=bytes_or_string, timeout=30, check=True) preserves argument boundaries and raises on command failure by default. File and process operations are computer-only. File paths are workspace-relative, not arbitrary absolute guest paths. To get the screen recording, call recording() after the computer is closed (after its with block or close() ), on the same object and before your script exits: Revyl saves the video a few seconds after release, so it asks every 5 seconds until it is saved and returns ComputerRecording(url, duration_seconds, started_at) , or None if none was saved within timeout seconds ( recording(timeout=900) , 15 minutes by default; 0 asks once). A check already under way when timeout runs out can take up to 30 seconds more. Called on a computer that is still running it raises SESSION_BUSY saying to close it first. attach() can't reopen a closed computer, so a later process can't fetch it. Since 0.5.1; earlier versions returned None at once while the video was still uploading. It doesn't download the video. Signed URLs in that metadata are credentials. Recording is locally unavailable on devices.
Since 0.4.0, a script can click, type and press keys on the computer's screen at points it reads off screenshot() :
On a computer, as everywhere, type with type("description", text) : it clicks the field, selects its text with Command+A unless clear=False , and types. type_focused needs clear=False : it types where the cursor is and clears nothing, so to replace text, select it first. "meta" is Command and "alt" is Option. screen_size() works too. tap("the Help in the bar") clicks a description and returns the Point it clicked. It takes several seconds and can click a look-alike, or something else when the target isn't on the screen, so check the point or take a screenshot afterwards, and use tap(Point(x, y)) from a screenshot for anything that's hard to undo. locate() and the exact actions other than tap , type , type_focused , press_key and screen_size aren't available on computers and raise NOT_AVAILABLE_ON_PLATFORM before anything is sent. When Revyl answers screen_starting , nothing happened, so Verify waits and tries again for up to 30 seconds. A script keeps control of the screen for 120 seconds after its last action, so a teammate can't take control in the Revyl viewer until then; while someone does control it there, actions raise SESSION_BUSY and nothing happens. A 403 raises AUTH_REJECTED : the key's owner needs the Member role or above, and CI runner keys can't control the screen yet. computers.md lists every screen error.
Breaking wire change: computer-operation arguments use argv_b64 (one padded URL-safe base64 UTF-8 string per argument) and file paths use path_b64 , with no raw argv or path . This SDK is incompatible with the backend contract. Deploy the encoded-only backend before publishing or upgrading to this SDK. Public APIs and decoded limits are unchanged; stdin and file data retain their existing standard base64 encoding, and process commands are unchanged. Encoding is not encryption, and Verify does not fall back to plaintext or replay the request.
validation() and extract() on a Mac
Since 0.6.0. On a Mac opened with inference=True , validation() and extract() run on the Mac's own vision model, to the computer, and their StepResult has engine="local" . A typical answer takes 1 to 3 seconds. Local inference comes with paid Revyl plans.
validation(text, soft=False) returns a StepResult with passed . A false statement raises VALIDATION_FAILED , unless you pass soft=True , which returns passed=False .
extract(text) returns a StepResult whose value is the string read off the screen. Describe one value that is visible now. When the model finds nothing, it raises STEP_FAILED with the model's reason, such as local_model_found_no_value .
An answer the model can't confirm is never a pass: it raises STEP_FAILED . Describe one thing that is visible on the screen now.
Run one step at a time on a computer. The Mac's model also answers for the app sessions inside it, so a step that waits too long for it raises SESSION_BUSY , with step_engine_busy in the message; try again in a few seconds. While someone controls the screen in the viewer, a step raises SESSION_BUSY ( screen_control_held ); try again after they release it.
instruction() stays unavailable on computers. It raises NOT_AVAILABLE_ON_PLATFORM and names the calls to use instead: tap("the Save button") to click one thing, and type("the field", text) to type into a field.
Your own model or agent doesn't run steps on computers; passing one raises NOT_AVAILABLE_ON_PLATFORM .
mac.inference says whether the Mac's model answered: "ready" , "unavailable" , or "unknown" when Verify can't tell yet. Verify refreshes it whenever it reads the computer's report: at open() , attach() and open_persistent() , and on each report() . It is None on every other session, including a Mac opened without inference.
examples/mac_inference.py runs these steps, and with IOS_APP_ID and IOS_BUILD_ID set also an iOS app inside the Mac ( cd python && uv run python examples/mac_inference.py ). It starts a billable Mac computer. The Mac model checks guide has more.
Attach and open a hosted browser
Attach to an existing active computer with attach(computer_id) , or create one with open(Target(platform="mac")) . Attaching checks its identity, operating system and unexpired active report without creating or stopping anything on failure. A successful attach takes close ownership by default: exiting its context stops that computer, not merely the local handle.
Use real IDs from the same authorized environment; these are placeholders. stop_on_close=False leaves a computer you don't own running when the context exits; leave it out only for a computer your script owns. To reach on the computer, a service must already be listening there, such as one an earlier step of a revyl-macos job started: Verify has no call that starts one, and a process started through exec() ends when the command returns. The existing Web build must point to a supported HTTPS source. After startup, navigate(url) sends a single deterministic request and accepts HTTP or HTTPS, including localhost, on every Web session. A cold development server may need a warm-up request before succeeds. For hosted browsers localhost means the hosting computer; for ordinary cloud browsers it means that browser's runtime, not your own computer. If times out uncertainly, it may still commit and the session remains usable; re-navigating is your choice. The server runtime owns network policy. The SDK rejects credentials, control characters and backslashes; it never logs the URL. is unavailable on mobile and computer sessions and returns None after a confirmed response.
computer.open(target) for iOS takes bundle_id alone, an app already on the simulator such as "com.apple.Preferences" , or both app_id and build_id UUIDs. A bundle_id that can't be launched raises SESSION_START_FAILED listing the installed apps. Optional device_model and os_version pick the simulator; a pair the Mac can't run raises NOT_AVAILABLE_ON_PLATFORM with Revyl's message saying what to pick. launch_app(bundle_id) works in that session as on any iOS session. Hosted Web requires both app_id and build_id and accepts viewport , sign_in , idle_timeout_seconds and start_timeout ; the server currently accepts external Web builds, not bundled Web artifacts. url , branch and artifact_url are unavailable inside a computer, and so is bundle_id on Android. Mac hosts Web/iOS. Hosted iOS and Web also accept inference ; see Local inference for iOS and Web inside a Mac . All hosting depends on server capability and capacity.
Children reuse their parent's credentials, API/viewer origins, step timeout and log callback. They return normal sessions with instruction, validation, extract, screenshot, report and close methods. The parent's remaining lifetime bounds child startup and worker requests; report and close remain available after expiry. Closing a parent prevents new children, cancels in-flight starts, and gives pending starts and child closes one shared five-second cleanup budget before attempting the computer stop. Child startup failure never closes the parent. Confirmed physical parent release supersedes an earlier child-close uncertainty, which is logged safely. An ambiguous child start is cleaned up using its preallocated ID, without replaying creation. A definitive refusal does not issue a child stop.
When the computer belongs to another caller, such as a CI runner, use attach(computer_id, stop_on_close=False) or await async_attach(computer_id, stop_on_close=False) . These attachments are not registered for automatic cleanup. Explicit close or context-manager exit still cancels pending child starts and closes hosted children within the five-second cleanup phase, but never stops the computer; its owner must release it. Child-cleanup failures remain observable. The default is True , and ownership is never inferred from the environment.
For async code use async with await async_attach(computer_id) as computer , then async with await computer.open(target) as browser and await browser.navigate(url) . Cancelling a child open cleans up only that child and leaves the parent open; cancelling attach before it succeeds does not stop the existing computer.
Local inference for iOS and Web inside a Mac
Since 0.6.0. An iOS or Web session you open with computer.open() inside a Mac opened with inference=True runs its steps on the Mac's own vision model first, with Revyl's hosted model as the fallback. This is the default. To run one session's steps on the hosted model only, pass inference=False on its Target . Macs host iOS and Web sessions only, so leave inference out for Android.
Runs on the Mac's model: validations, and instructions that are a single plain tap on one thing.
Goes to the hosted model: extract() , typing, multi-step instructions such as "scroll down and then tap back", and any local answer that is uncertain or takes longer than 25 seconds.
engine on each StepResult says which model answered.
Local verdicts are final. A validation the Mac's model answers is not checked again by the hosted model.
If the Mac's model isn't answering when the session starts, computer.open() raises NOT_AVAILABLE_ON_PLATFORM with reason="computer_local_inference_unavailable" . The message says to try again shortly, or to pass inference=False to run on the hosted model.
inference on a Target you pass to open() rather than computer.open() raises INVALID_ARGUMENT , except on a Mac target. inference=True on Android raises INVALID_ARGUMENT .
In a small live comparison on one iOS app, 20 validations (10 true, 10 false), the Mac's model and the hosted model each answered all 20 correctly and never disagreed. Local answers typically took 2.7 seconds (one took 20) and hosted ones 10 seconds. The apps inside an inference Mac guide has more.
Steps on a computer have no per-step fee. validation() and extract() on a Mac computer run only on the Mac's own model, so they carry no inference charge; you pay the Mac's minutes, as for any computer.
App sessions inside a computer add no device minutes of their own.
Inside an inference Mac, steps the Mac's model answers carry no inference charge; steps that fall back to Revyl's hosted model are billed as usual.
Local inference comes with paid Revyl plans.
open(target, ...) and async_open(target, ...) take these keyword options:
backend_url : the Revyl API origin. Defaults to .
app_url : the Revyl app origin for session links. Defaults to .
step_timeout : the default timeout of each step, in seconds (1 to 3600, default 180).
log : where progress lines go. Leave it out for stderr, pass a callable to receive each line, or False to turn them off.
model : runs every instruction and validation on your own model instead of Revyl's agent; see Your own model . Browsers and devices only; computers raise NOT_AVAILABLE_ON_PLATFORM .
agent : the same with a custom agent from local_agent() . Pass model or agent , not both.
profile : a session profile from your project's .revyl/config.yaml , such as "signed-in" , that Revyl runs before open() returns, or "none" for no profile. Left out, the project's session.default_profile runs when it sets one. Web, iOS, Android and Mac computers. See Session profiles .
Read a finished session: report()
Since 0.6.2. report(session_id) reads a session's outcome and steps from Revyl, including after the process that ran it exited, so a later script, CI step or agent can read the verdicts without signing in to Revyl's web app. Pass session.id , or the UUID at the end of the session's link. await async_report(session_id) is the asyncio form.
It returns a frozen SessionReport with id , viewer_url , platform ( "web" , "ios" , "android" , "macos" or "linux" ), status , finished ( True once the status is final: completed , failed , cancelled or timeout ), error (why the session failed, or None ), started_at and ended_at ( datetime or None ) and steps . Each SessionReportStep has type , description , status ( "passed" , "failed" , "warning" , "pending" or "running" ), passed (the verdict, or None when Revyl recorded none), reasoning and error , in the order the steps ran. Computers, and sessions with no Revyl report yet, have no steps.
Credentials resolve as for open() . An ID that isn't a UUID raises INVALID_ARGUMENT before any request; a session that isn't in this API key's organization raises NOT_FOUND , naming the API origin it asked. From a terminal with Node.js, npx @revyl/verify report [--json] prints the same.
Persistent computers and snapshots
Since 0.5.0, with paid Revyl plans. A persistent computer is a Mac whose disk outlives every stop: open it by name, close it, and the open boots from the same disk. Without a paid plan, open_persistent() and save_snapshot() raise NOT_AVAILABLE_ON_PLATFORM with reason="persistent_computers_not_enabled" ; upgrade the organization's plan to use them. macOS only.
The example starts billable Mac computers and takes several minutes: save_snapshot() waits 5 minutes after the close.
Open. open_persistent(name) opens the Mac with that name, creating it if needed; mac.created says which. A stopped one boots from its disk, and a running one is connected to. Names are 1 to 64 letters, digits, . , _ or - , start with a letter or digit, and aren't a UUID. The same name opens the same computer from Python, TypeScript and Go. An ID from list_persistent() works too.
Close. close() , or leaving the with block, stops it and keeps the whole disk. The open is a cold boot: memory and running processes don't survive, so start your servers again.
What's kept. Everything on the disk: files, installed tools, repositories, build products, simulators, app data, system settings, the login keychain and browser profiles. A computer created from a snapshot gets the same disk, but things tied to the original Mac's hardware identity (Apple Account, iCloud, Safari's saved passwords) don't carry over, and websites may open signed out.
Each open is a new run with the usual computer lifetime: 2 hours by default, up to 24 hours with timeout (whole seconds). A run starts saving its disk 3 minutes before it ends, so reaching the end keeps the disk. A running persistent computer bills like any computer.
Snapshots. save_snapshot(computer, name) saves a stopped computer's disk; close it first, or it raises SESSION_BUSY . It waits until the save is copied off its Mac, 5 minutes after the close, for up to wait_timeout seconds (900 by default), then raises TIMEOUT ; call it again to keep waiting. Snapshot names follow the computer-name rule and are unique in your organization.
Copies. open_persistent(new_name, from_snapshot="name") creates a new persistent computer whose disk starts as the snapshot's. from_snapshot is used only when the call creates the computer; if one with that name exists, it opens as it is, so check created . Starting on a different Mac than the one holding the save, as most snapshot copies do, restores the disk first and can take several minutes. open_persistent() waits up to start_timeout seconds (900 by default).
Inference. open_persistent(name, inference=True) is used only when the call creates the computer, and the computer keeps it for every later start. A copy doesn't inherit it: pass inference=True with from_snapshot too. without_inference=True applies only when starting a stopped computer created with inference: it starts this one run without the model, for when no Mac with one is up ( inference_unavailable ). It needs a Revyl backend that offers it; otherwise it raises INVALID_ARGUMENT saying so.
How long saves last. Until you delete the computer or the snapshot. Some saves have an end: saved_disk_expires_at on PersistentComputer and ComputerSnapshot is a datetime when Revyl reports one, else None . From then on, that save can't start.
Storage. Saved disks and snapshots bill at $0.04 per GB-month while Revyl stores them, including while the computer is stopped.
Limits. 100 snapshots per organization by default.
Cleanup. delete_persistent(name_or_id) stops a running computer the normal way, which saves its disk, then deletes the computer and its saved disk for good. Its snapshots stay. delete_snapshot(name_or_id) deletes a snapshot; computers made from it keep their disks. Both raise NOT_FOUND when nothing has that name or ID, including one already deleted, so cleanup that may run twice catches it.
Paths. File calls take paths relative to the workspace, /Users/computer/workspace , which is also $ for commands, as the example's $ /notes.txt shows. They don't expand ~ and refuse absolute paths; reach other folders, such as /Users/computer/Desktop , through exec() .
In CI, budget the waits. open_persistent() waits up to 900 seconds, closing up to 600 for the save, save_snapshot() up to 900 and a copy's start another 900. A job killed by its timeout skips the with block's exit, so nothing closes. Pass start_timeout , wait_timeout and timeout (the run's lifetime, enforced by Revyl even when your job dies) so their sum fits the job; the guide has a recipe.
Lists. list_persistent() returns a PersistentComputer for each of your organization's persistent computers, with id , state , saved_at , saved_off_host , created_at and saved_disk_expires_at . Revyl stores no names, so compare id with mac.id . list_snapshots() returns a ComputerSnapshot for each snapshot, with id , name , computer_id , saved_at and saved_disk_expires_at .
Where the table shows no reason , the message names Revyl's code, shown here in parentheses.
The persistent computers guide has more.
A session profile is a script from your Revyl project that prepares a session before your first step: it signs a user in, seeds data, or sets launch values. Revyl runs the script, never Verify: on Revyl's hosted runner for a browser or an iOS or Android device, and on the Mac itself for a Mac computer. open() returns once Revyl reports that the profile succeeded.
Profiles work on web, iOS, Android and Mac computers. On a Linux computer, a profile name raises NOT_AVAILABLE_ON_PLATFORM before anything is sent, and no default runs; "none" is accepted. Hosted sessions ( computer.open() ), attach() and current_computer() never run a profile: they take no profile argument, so passing one raises TypeError . async_open() takes profile the same way.
Where Verify reads the profile
Verify reads .revyl/config.yaml in the current folder ( os.getcwd() ) or the nearest folder above it that has one: the file revyl init writes in your app's checkout. It needs project.id and the profile under session.profiles , and reads nothing else from the file:
With the profile's name, Verify sends:
The project: project.id , and the checkout's Git branch, found the way the Revyl CLI finds it: the branch checked out in the project folder; on GitHub Actions or Buildkite, the branch CI built, including a pull request's own branch ( owner:branch for a fork) when the checkout is that pull request's code, even on a detached HEAD. Verify leaves the branch out when it finds none or Git fails. Revyl reads the files it needs from Git at the head of that branch. When Git doesn't have the branch, Revyl reads the default branch, and Verify logs Git has no branch " ", so session profile reads the repository's default branch instead .
The script from this checkout: the profile's definition and its script file as they are on disk, uncommitted changes included, so you can edit a script and run it without committing. A path script must stay inside the repository (under the nearest folder that holds .git , or the project folder outside Git) and be executable ( chmod +x , with a #! line). A script file must be UTF-8 text of at most 64 KiB. A script name with no file in .revyl/scripts is a Library Script, which Revyl reads from your organization.
On a browser or device, the script runs on Revyl's hosted runner, not on your machine: it doesn't see your localhost, your files or your Revyl login. On a Mac computer, it runs on that Mac. The script's environment variables and the output files it writes are Revyl's contract: see Session profiles in the Revyl docs.
open() returns when the session is ready and Revyl reports the profile's status as succeeded , within the target's start_timeout (600 seconds by default). While it waits, it logs : waiting for session profile . Verify never shows the script's output: Revyl doesn't send it, because setup scripts often print secrets. On a Mac computer, Revyl refuses commands and screen actions with HTTP 409 session_profile_running while the profile runs, without running them. If a call on a computer, such as one you attach() to, still gets that refusal, Verify waits and sends the same call again, for up to the start timeout (600 seconds for attach() and current_computer() ), then raises TIMEOUT naming the profile. It repeats only calls Revyl refused that way.
Session profile errors
Neither errors nor logs contain the script's content or output. A refusal keeps Revyl's code in error.reason , such as project_not_found , and Revyl's sentence in the message.
Since 0.2.0. Early access. Web, iOS and Android sessions take device actions that need no agent. They match the TypeScript SDK's exact actions in snake_case, and AsyncSession has the same methods to await. double_tap , long_press , drag , type_focused , go_home , and Web keys and modifiers in press_key , are new in 0.3.0. tap (by point or description), screen_size , type_focused and press_key on a Mac computer's screen are new in 0.4.0, and type there in 0.5.1; type_focused on iOS and Android is new in 0.6.1; see Mac computer .
Typing: one rule on every platform. To type, call type("Email field", text) : it taps the field you describe and types into it, replacing its text unless you pass clear=False . It works the same on Web, iOS, Android and a Mac computer. type_focused(text) types wherever focus already is, without tapping, for example after tap("Email field") , on every platform (iOS and Android since 0.6.1). When no field has focus it raises ACTION_FAILED with reason="no_focused_input" and types nothing. A device that can't tell which field has focus, such as a real iPhone, raises NOT_AVAILABLE_ON_PLATFORM with reason="focused_input_unavailable" ; use type("description", text) there.
On Web, type into a field, then where the focus moves, and press more keys:
A location is a Point(x, y) in whole, non-negative screenshot pixels from the top-left corner, or a string describing the element, such as "Login button" , which Revyl's grounding model finds on the current screen.
A failed action raises ACTION_FAILED , including when Revyl cannot find a target or nothing at a point can take the action. One whose outcome Revyl can't confirm raises ACTION_UNCERTAIN or TIMEOUT , so check the session before acting again. Actions are never repeated. If Verify can't reach Revyl, the action fails with API_ERROR and isn't resent either, so check the session before trying it again.
Exact actions return when Revyl has accepted them, not when the screen has finished changing. After swipe , drag , go_home , open_url or launch_app , let the screen settle or check it before you locate or tap coordinates. locate returns Revyl's best match on the current screen and can return a point for an element that is off screen, so bring the element on screen first. A point outside screen_size() is off screen, and an action at it is refused.
Fast input: settle=False . On Web, the browser runtime waits after every tap , double_tap , long_press , type , type_focused , swipe , drag and press_key until the page stops changing, for up to 6 seconds. A running game or animation never stops changing, so each call takes the whole wait and the one queues behind it. Pass settle=False to any of those calls for games, animations and rapid input, such as pressing an arrow key every few hundred milliseconds: the call returns as soon as the input is sent, usually within a second. The catch is that it returns before the screen may have changed, so when you need to see the result, take a screenshot() or run a validation() , and don't rely on the screenshot showing it. A described location such as "Play button" is still found before the input; settle=False skips only the wait after it. iOS, Android and Mac computers don't wait for the screen after these calls, so settle=False is accepted there and changes nothing. settle takes True (the default) or False ; anything else raises INVALID_ARGUMENT . AsyncSession takes it too.
Coordinates. Prefer a description, such as tap("Sign in button") : Revyl finds the element on the current screen, and you never handle coordinates. Otherwise a point is Point(x, y) in screenshot pixels on every platform: whole numbers from the top-left corner of the image screenshot() returns. So a position you read off a screenshot goes to tap() , type() , swipe() and every other exact action unchanged. screen_size() returns the screenshot's width and height, and locate() and the points tap() , double_tap() , long_press() and type() return use the same pixels. A point outside the screenshot is refused with INVALID_ARGUMENT before any action is sent, and the message names the valid range. On iOS, Verify converts the pixels to the screen's points for you. On Web they equal CSS pixels at the default device scale factor of 1, and you still pass screenshot pixels at any other. This holds from TypeScript 0.4.1, Python 0.2.1 and Go v0.3.1; earlier versions took iOS points. On a Mac computer a point is in screenshot pixels too, and tap("description") returns the point it clicked in the same pixels. Verify refuses a negative or fractional point before sending it, and Revyl refuses one past the screen's edge without clicking; both raise INVALID_ARGUMENT naming the valid range.
Which call works where
Own model is a Web, iOS or Android session opened with model or agent ; inside a cloud Mac is an iOS or Web session that computer.open(target) starts on a Mac. "Same" means as on that session's platform.
A persistent computer gets the Mac's model only when open_persistent() creates it: inference is fixed then and kept on every later open.
Coordinates follow the rule in Exact actions . A call a platform doesn't support raises NOT_AVAILABLE_ON_PLATFORM , and its message names the alternative.
CDP (Playwright, Puppeteer)
Web only. session.cdp() returns a Chrome DevTools Protocol (CDP) endpoint for the session's cloud browser, so a script can attach Playwright or another CDP client to Verify's steps. instruction() , validation() , screenshot() and the exact actions keep working while the script is attached. AsyncSession.cdp() is the same, awaited.
It returns a CDPEndpoint with url ( str ) and expires_at (a timezone-aware datetime ). examples/cdp_playwright.py runs a full script: DOM, locators, a console message, network requests and a Verify validation while attached ( cd python && uv run python examples/cdp_playwright.py ).
The url is a single-use credential. It accepts one connection and expires at expires_at , 60 seconds after cdp() returns it. Call cdp() again for each new connection. Don't log it, store it or pass it on; repr() of the endpoint leaves it out, but Playwright's connection errors can include it, so remove it before you log one. Any connection attempt uses the url up, even one that fails, so call cdp() again before you retry.
One connection at a time. A second connection to the same session is refused until the first disconnects. Once browser.close() has returned, the url from cdp() connects.
The connection ends with the session. close() , the session's timeout or a failure closes it. After close() , cdp() raises SESSION_ENDED without a request, and an earlier url no longer works.
Use the session's page. In Playwright that is browser.contexts[0].pages[0] . browser.new_context() is refused, because a session has one browser context. A tab you open with context.new_page() becomes the session's active tab: Verify steps, screenshots and the recording follow it until you close it, and then return to the session's tab. While another tab is open, pages[0] may not be the session's tab, so find it by URL. In Puppeteer, connect with defaultViewport: null and use (await browser.pages())[0] while the session has one tab.
browser.close() only disconnects. In Playwright and Puppeteer it disconnects the script, and the session keeps running; call session.close() to end it. In Puppeteer, browser.disconnect() is the explicit form.
is http(s) and :blank only. file:// , chrome:// , data: , javascript: and other schemes are refused with a CDP error.
Downloads are off. Download-behavior commands are accepted, but nothing is downloaded and no download path can be set.
The window size is fixed. Viewport and window-size emulation ( page.set_viewport_size() ) and Browser.close are refused; the browser keeps the size the session opened with. Set the target's viewport to choose it.
Refusals are CDP errors that start with Revyl: , so the script sees why.
A over 24 MB is dropped with the CDP error Revyl: the was larger than 24 MB and was dropped (Playwright reports it from page.evaluate as "Execution context was destroyed"); the connection and the session keep working.
Files come from your machine. Playwright's set_input_files() with files from the script's machine works; file paths on the browser's host are refused.
Everything else works as with a local Chrome: locators, DOM, evaluate , console and network events, request interception and screenshots.
On iOS, Android and Mac computers cdp() raises NOT_AVAILABLE_ON_PLATFORM before any request; use instruction() , validation() , screenshot() and the exact actions there, or exec() and screenshot() on a computer. A session that is no longer running raises SESSION_ENDED , a view-only session AUTH_REJECTED , and a Revyl backend without CDP NOT_AVAILABLE_ON_PLATFORM saying so. HTTP 503 raises API_ERROR , and calling cdp() again is safe.
Since 0.2.0. Early access. Verify normally runs instruction() and validation() on Revyl's agent. Pass a model and the agent loop runs in your process instead, on a model you choose, with your own key. Revyl still provides the browser or device and, by default, finds the elements your model names on screen. Leave model out and nothing changes.
The string is "provider/model" , and the key comes from the provider's usual environment variable. A missing key raises MODEL_KEY_MISSING before any Revyl request. Everything after the first slash is the provider's own model name, so "openrouter/anthropic/claude-sonnet-5-5" works.
Any server that speaks OpenAI's chat completions with tools and image input works through CustomModel . Its key comes only from api_key ; Verify never reads an environment variable for it.
Custom agents. For control beyond a model name, build the agent with local_agent() and pass it as agent , on open() or on one step. The model forms build exactly this agent. Passing both model and agent raises INVALID_ARGUMENT .
anthropic(model, api_key=None, base_url=None, max_tokens=4096, max_retries=2) and openai_compatible(model, base_url=None, api_key=None, headers=None, provider=None, max_tokens=None, max_retries=2) are the built-in adapters. When base_url is left out, anthropic() reads ANTHROPIC_BASE_URL and openai_compatible() reads OPENAI_BASE_URL and OPENAI_API_KEY ; with a base_url , openai_compatible() sends only the api_key you pass.
To use another SDK or runtime, implement ModelAdapter : a name and complete(request, timeout) , which gets a ModelRequest (system prompt, text, screenshot and tools) and the seconds the call may take, and returns a ModelReply with the chosen ModelToolCall , any text, ModelUsage and whether the was cut off at its output cap.
What goes where. Your model sees the system prompt, the step text, a short log of the actions it took so far and whether they worked, and the current screenshot, downscaled so its longest side is at most max_image_side . Revyl receives each device action, the element descriptions your model writes (not with grounding="model" ), and the model's name for the session report, never the step text, the prompts, the model's output or your key. Keys go only to the model's endpoint, are never logged, and are replaced with [redacted] in error messages, as are custom header values.
The step deadline covers every model call and device request. A device action still in flight when it passes raises ACTION_UNCERTAIN and is never repeated. StepResult.model is a ModelRun with each turn's action, whether it ran, model and action seconds, and token counts; input tokens include cached input. Progress lines name each turn's tool and timings and the step's turns and tokens, never typed text, element descriptions or URLs.
Behind a proxy or gateway
Keep the string form and point the provider's base-URL variable at the proxy, the same variables Anthropic's and OpenAI's SDKs read:
Or name the proxy in code when it speaks OpenAI's chat completions: model=CustomModel(id="claude-sonnet-5-5", base_url=" api_key=os.environ["PROXY_KEY"]) .
A base address works with or without a trailing /v1 . For Anthropic, Verify calls /v1/messages , or /messages when the base already ends in a version such as /v1 . For OpenAI-compatible addresses, Verify adds /v1 only to a bare host, so and both call , and a path such as /openai/v1 is used as given. Verify doesn't check a key's prefix or shape. If the proxy rejects the key, the error names the host and the variable the key and address came from, never the key; if it answers 404, the error names the path Verify added to the base address.
examples/byo_model.py runs the string form and exact actions on iOS Settings, and examples/custom_agent.py a custom local agent. From a checkout, with a Revyl sign-in and ANTHROPIC_API_KEY set (or MODEL naming another provider, with its key):
Platforms and cleanup
Construct a frozen Target(platform=...) :
Web: Target(platform="web", url=" opens a public HTTPS site. Without app_id , Verify finds or creates one Revyl web app for the URL's origin, named Verify: , once per process, and logs web: Revyl web app for (… pin it with app_id=" ") before the start line. Creating it needs an API key whose role can create apps; otherwise open() raises AUTH_REJECTED and you pass the app_id of an existing Web app. app_id (Revyl UUID) pins one web app; with it, supply build_id for a specific build, or branch for that app's latest build. build_id and branch need app_id , and build_id cannot be combined with url or branch . Optional Viewport(width, height, device_scale_factor=...) and SignIn(path, secret, persona=...) configure the browser and saved sign-in secret reference, not a raw credential.
iOS / Android: provide exactly one of app_id , build_id , HTTPS artifact_url or installed-app bundle_id . Optional device_model and os_version select the device, written as Revyl names them, such as device_model="iPhone 16", os_version="iOS 18.5" or device_model="Pixel 7", os_version="Android 14" . A value Revyl doesn't offer raises INVALID_ARGUMENT listing the values it accepts, and no session starts. An app_id or build_id Revyl can't find raises INVALID_ARGUMENT naming what wasn't found and how to fix it, and no session starts. A bundle_id that can't be launched raises SESSION_START_FAILED naming the bundle id, with the session link. Do not combine mobile app sources.
Mac: only platform , start_timeout , timeout (the lifetime in seconds) and inference (run on a Mac with its own vision model; see validation() and extract() on a Mac ) are accepted; app/browser/device fields are unavailable.
start_timeout defaults to 600 seconds (allowed range 10–1800). Web/mobile also accept idle_timeout_seconds (60–3600). open , async_open , attach and async_attach accept default step_timeout in seconds.
Verify prints sanitized progress to stderr as [verify] : … lines, like the TypeScript SDK: starting session as soon as the session ID exists, on every platform and before the device is ready, then ready , and each step's outcome and duration. Pass log=callback to receive the lines yourself, or log=False to turn them off. Async callbacks run on a worker thread, so make them thread-safe; callback exceptions do not interrupt resource cleanup. Progress never includes app URLs, command or step content, credentials, recording URLs, or raw server errors. Viewer links and session IDs are still private operational context.
Startup VerifyError instances retain optional typed platform , session_id , workflow_run_id , and viewer_url , plus cleanup_status and cleanup_error . These fields remain available even though opening did not return a session:
Cleanup status is acknowledged for a validated device stop response, confirmed for terminal computer state plus physical release, unconfirmed when cleanup failed or no usable mobile identity was returned, and not_required after a definite create refusal. not_attempted applies before startup ownership exists. An unknown mobile ID is None , never invented. Web/computer caller-generated IDs remain available after an uncertain create; a mismatched web acknowledgment never authorizes stopping the other ID. Startup cleanup uses a fresh bounded deadline, preserves the original failure, and attaches a separate cleanup error. Do not retry creation to recover an uncertain outcome; inspect the known session privately. A device stop acknowledgment does not prove physical release.
Session properties include id , platform , viewer_url , expires_at and closed . Steps return StepResult with passed , reason , duration_seconds , value (extract steps only), engine ( "local" or "hosted" when Revyl says which model answered, else None ) and, for a step run on your own model, model ; commands return ExecResult with exit_code , stdout and stderr . Computer methods also include stat(path) , processes() and terminate(handle_id) , with bounded seconds-based timeouts. Errors raise VerifyError with a stable code . Async session methods have the same arguments/results and are awaited.
EDGE_BLOCKED identifies HTTP 403 with a text/html content type and nonempty cf-ray , unless the body is syntactically valid JSON. HTML branding is not required; cf-ray alone is not enough. Other responses retain their existing mapping, including JSON 401/403 authentication errors. Edge-block errors expose http_status but no body or ray ID. Check network access or support; Verify does not retry blocked requests.
VerifyError.reason is an optional exported RefusalReason literal containing only a known safe server code; http_status is the response status when available. Raw server messages and payloads are not exposed through these fields. Ordinary Web startup 409 web_runtime_unavailable keeps code="API_ERROR" , computer admission keeps COMPUTER_LIMIT for computer_limit and NOT_AVAILABLE_ON_PLATFORM for runtime_unavailable ; inspect reason to distinguish availability from other failures. Hosted errors use NOT_AVAILABLE_ON_PLATFORM for runtime/capability refusals, COMPUTER_LIMIT for capacity, SESSION_ENDED for computer_not_running , NOT_FOUND for computer_not_found , INVALID_ARGUMENT for build selection and SESSION_BUSY for child identity conflicts. Unknown reasons remain None ; no refusal automatically retries creation.
Mac computers are available to organizations on a current paid Revyl plan. When Revyl says Pro would unlock Macs for a Free-plan organization ( computer_not_enabled with unlocks_with_card: true ), open() and open_persistent() raise NOT_AVAILABLE_ON_PLATFORM with reason="upgrade_required" . The message starts Mac computers come with Pro, so Revyl refused this computer (computer_not_enabled, upgrade_required). and ends with Revyl's upgrade offer and its HTTPS billing link, or with Add a card in Revyl's billing settings to unlock them. when Revyl sends no offer. Any other computer_not_enabled keeps the support guidance and no reason. Computer admission may return COMPUTER_LIMIT ; the SDK does not retry creation. Computer sessions have a hard lifetime from creation: 2 hours by default, or up to 24 hours with Target(platform="mac", timeout=...) (seconds, 60 to 86400). session.extend(timeout) keeps a running computer going at least that long from now, up to 24 hours after creation; it never shortens the lifetime, so retrying is safe, and it refreshes expires_at , the authoritative deadline. Lifetimes over 2 hours can be refused with COMPUTER_LIMIT ( computer_long_limit , at most 2 such computers per organization at once) or NOT_AVAILABLE_ON_PLATFORM (no host can run that long, or the host can't extend). Screenshot observation retries structured startup screen-not-ready errors within a bounded window; other errors are not silently replayed.
Context-manager exit calls close() . Device close acknowledges a stop request; computer close requires terminal state and confirmed resource release . Close submits its stop mutation once; repeated calls the first outcome, including an unconfirmed failure. Interpreter-exit cleanup is best effort and cannot replace explicit close, especially with asyncio. A failed close is not proof the resource was released; investigate it rather than starting replacement sessions blindly.
Async startup cancellation interrupts its bounded startup request and cleans up when an identity is known. Context managers preserve an existing body failure if cleanup also fails, chaining the cleanup exception. Main-thread open / async_open installs cleanup-compatible SIGTERM handling only when no custom SIGTERM handler exists; it exits with 128 + signal after unwinding and best-effort cleanup. Abrupt termination, SIGKILL, and existing application signal handlers cannot guarantee cleanup.
Use an empty dist/ before building; the package checker rejects stale or extra distributions. uv build builds the wheel through the sdist. Package checks validate public files, typing marker, metadata and license, then install the wheel into a fresh isolated venv and run a loopback fake-server smoke without pytest. They also extract the sdist, ...
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
