Skip to main content
Run browser automations on a machine you control. The open-source package is the inference worker: it opens the browser, follows the automation, and writes results back. Recordings, API keys, and run history stay on the Optexity dashboard. The worker signs those requests with the API key you create there. This guide is also published at docs.optexity.com/docs/getting_started/self-hosting. Recording a workflow is covered there and in Recording first automation.

Prerequisites

Create an API key

1

Sign in

Open dashboard.optexity.com and create an account, or sign in.
2

Create a key

Go to API Keys and create a key. Copy it once; you will set it as OPTEXITY_API_KEY on the machine that runs the worker.
The worker reads that value from its environment and sends it as the x-api-key header when it asks the control plane for a task. Keep the key on the worker. The request you send to localhost carries the automation name and inputs.

Choose an install path

Both paths end with the same command: optexity install-browsers, which installs the Chromium and Chrome builds Playwright and Patchright need.

Install from PyPI

Install from a clone or a fork

Clone the upstream repo when you only need the current source:
To keep your own changes, fork Optexity/optexity on GitHub, then clone the fork and point upstream at the original repo:
Install that checkout in editable mode so the optexity command tracks your working tree:
Add the dev tools (pip install -e ".[dev]") when you will edit the package and run the formatters. Pull later updates from upstream with git fetch upstream and merge upstream/main.

Configure the worker

DEPLOYMENT and OPTEXITY_API_KEY are required. The process exits on startup if either is missing. GOOGLE_CLOUD_PROJECT is required for any step that calls a model. Export the variables in the shell you use to start the worker:
Or put the same keys in a file and point ENV_PATH at it:
In that Google Cloud project, enable the Vertex AI API and enable the Claude models in Model Garden (they are the fallbacks). Then sign in:
On a server, set GOOGLE_APPLICATION_CREDENTIALS to a service-account key file instead. Model choice, tiers, and fallbacks are in Model Configuration. The default tier is lite (gemini-3.5-flash-lite, then claude-haiku-5-5).

Record a workflow

You can record the workflow yourself. The Optexity Recorder Chrome extension captures clicks, typing, and form selections, then saves the workflow to the same dashboard workspace as your API key. The same steps are on docs.optexity.com. To run something that already exists, add a public workflow from the Marketplace instead. Either way, the endpoint_name you send later must match the workflow name in the dashboard.
1

Install the recorder

Add Optexity Recorder from the Chrome Web Store, then pin it from the puzzle icon so it stays on the toolbar.
2

Add your API key

Click the extension icon and paste the key from API Keys in the dashboard.
3

Open the site

In Chrome, go to the page you want to automate, for example https://stockanalysis.com/.
4

Start capture

Click the extension icon and choose Start Capture.
5

Do the workflow

Perform the actions you want the worker to repeat. Move slowly, and skip extra scrolling and hovering. On stockanalysis.com that is: click Search, type a symbol, and open the first result.
6

Save it

Click Complete Capture. The workflow is saved to your dashboard. Use that name as endpoint_name when you run inference.

Run the first inference

The worker runs a workflow that already belongs to the workspace for that API key: one you recorded above, or one you added from the Marketplace. Start the local server in the same environment that has the variables above:
Check that it is up:
Allocate a task. Replace endpoint_name and input_parameters with the workflow in your workspace. Values are lists, even when there is a single value.
The worker posts that body to https://api.optexity.com/api/v1/inference with your API key, receives the task for that recording, and runs it locally. A successful call returns 202:
A browser window opens on the machine running the worker. Status, errors, outputs, and downloads show up on dashboard.optexity.com/tasks. Leave the optexity inference process running until the task finishes. unique_parameter_names lists input keys that identify this run. Leave it empty to allocate immediately. See Running first inference for the local endpoints, and the inference API reference for the task lifecycle.

If the first run fails