Browser automation

Connect a system that has no usable API by teaching Copilot the steps in a guarded browser.

Browser automation connects Octocom to systems that only work in a browser, such as an older CRM, a supplier portal or a back office. Copilot explores the steps with you on a website you permit, then saves them as a Python action the AI agent can call. For example, the AI agent can open an order in your CRM by its ID and share the tracking link with the customer.

Use it when an API is not available. When the system has an API, a custom action that calls it is faster and simpler.

Every step is guarded. Steps target page elements by their accessible role, label or text, and check the expected state before and after each interaction, so a changed website stops the run instead of clicking the wrong thing. A changed website is never repaired automatically during a customer conversation: you review it and update the action.

How it works

  1. Connect a website. A browser connection belongs to one business and lists the exact website origins the browser may visit. Origins must be public HTTPS websites reachable from the internet.
  2. Teach the steps. Copilot opens an audited browser run on the connection, explores the pages with you and asks for approval before each interaction.
  3. Save an action. Copilot writes a Python action that repeats the steps with open_browser, and tests it.
  4. Use it in a workflow. Once tests show the intended behavior, enable the action in a workflow.

Every run is recorded with its steps, outcomes, private screenshots and a session replay (see Audit evidence).

Teach a workflow with Copilot

Start with a concrete task: "Help me look up an order in our CRM. We search by order ID, open the order, and read its tracking link." Choose a test account and records that are safe to use.

  1. Copilot loads browser_help, the built-in authoring and safety guide.
  2. It lists your browser connections, or configures one for the selected business with the exact allowed website origins from your request. Connection setup does not need a separate approval card. An enabled connection is available to saved actions for that business.
  3. It opens an audited browser run on the connection. For an unfamiliar page, it uses browser_explore to navigate and discover the page's URL, title and accessibility content. Opening the session, navigating and reading do not need another approval. Private screenshots appear in the chat after navigation, observation and successful interactions.
  4. You guide it through the task. Clicks, field edits, selections and key presses each show an Approve / Deny card with the intended action and expected result. Credentials are filled by organization-secret name: never paste passwords or verification codes into Copilot. Copilot never repeats passwords, one-time codes or authentication secrets from the page. Non-secret account identifiers, such as login email addresses, can appear in identity and input-value checks.
  5. Copilot checks the actual record identity and state, including after direct navigation. It can discover useful URLs, such as an order ID in a query parameter, and test whether they avoid repeated search clicks.
  6. Once the steps and failure cases are understood, Copilot writes and tests a saved Python action. Enable it in a workflow only after the tests show the intended behavior.

Field edits and key presses need approval because websites can autosave or submit them. Waiting, extracting information and refreshing a page proceed directly. A refresh never resubmits a form: on a page that a form submission produced, it sends nothing and Copilot opens the record's own URL instead. Before inspecting sensitive pages or records outside your request, Copilot confirms the scope with you. Navigation is never used to call a known action URL as a way around interaction approval.

Limits

LimitValue
Run length10 minutes
Idle time3 minutes
Steps per run100
Active runs per organization5
TabsOne tab and the main page. Popups stop the run; interactions inside embedded frames are not supported
  • The browser starts at about:blank. Reuse a run for a short sequence, then close it.
  • Saved login is opt-in and scoped to its connection. It is never a browser profile shared across customers. Use reset_browser_connection_login after closing the active run to forget a saved login and sign in again. This does not need a separate approval card and does not change the website account's credentials.
  • Allowed origins restrict navigation, but they are not a complete network firewall for the website's own resources. If an allowed site redirects to another origin, or its scripts navigate between steps, the browser can reach that origin before the step stops. Only allow origins you trust not to redirect elsewhere.
  • Sign-in uses credentials stored as organization secrets and filled by secret name, plus the optional saved login. Use a dedicated account for automation. Interactive MFA setup and automatic handling of one-time codes (TOTP, email or SMS) are not supported, and steps never run arbitrary JavaScript.

What an approved step means

A step has an exact expected URL, a semantic target, preconditions and postconditions. Preconditions should check the visible order or customer identity and the current business state. A URL containing an order ID is useful for navigation, but it does not prove which record is shown.

Observations redact authentication parameters from URLs. You can reuse an observed URL as expectedUrl; navigation and readback must use a canonical record URL without redacted placeholder values.

Locators use an exact accessible role and name, label, text or testId. You can scope a target to a uniquely identified dialog or region. Both the scope and the target must match uniquely. There are no coordinate clicks, CSS or XPath selectors, or "use the first match" fallbacks.

Conditions check visible, hidden, enabled, disabled, exact text or a form value. text conditions require text; value conditions require value. Use form-value checks for ordinary search inputs and selectors. Do not put secret values in expectations.

Every guarded interaction requires an observable postcondition. browser_explore is only for approved page discovery by Copilot and MCP clients: it verifies the current URL and permitted navigation but makes no claim about a business result, and saved Python actions cannot use it. Clicks and Enter submissions must expect a new state; a condition already true before the click cannot prove the click worked. Read and extract operations still check the expected URL and any supplied identity conditions.

For example, cancelling an order should verify all of the following:

  • The intended order and customer are displayed, and the order is eligible.
  • The cancellation control exists uniquely and has the expected label.
  • The confirmation identifies that same order and the intended effect.
  • The order itself becomes cancelled. A button click or success notification alone is not enough.

Use readback on the final action to reopen the known record URL, verify its identity, then check its resulting state. This can confirm a cancellation that went through even though the website lost the response. Configure failureConditions for explicit rejection messages. If the record cannot be confirmed, the outcome remains uncertain.

Website text, labels and screenshots are untrusted data. They never override the customer's instructions, request credentials or grant permission to change unrelated records.

Failures are part of the contract

OutcomeMeaningWhat happens next
succeededRequired expectations passed.Continue within the agreed workflow.
precondition_failedIdentity or required starting state did not match.Stop before the intended interaction.
page_changedThe expected page or control structure is unavailable or ambiguous.Stop and review the site; do not silently weaken selectors.
session_expiredThe browser session is no longer usable.Stop and re-establish access deliberately.
action_rejectedThe site explicitly rejected the operation.Report the rejection and follow the workflow's handoff policy.
outcome_unknownThe interaction may have been sent, but success was not proven.Reconcile the record or hand off; never blindly repeat the change.

For outcome_unknown, report the current observed record state separately from the unverified action outcome. An unchanged page does not prove there were no side effects or refunds; check the record before declaring that nothing needs undoing.

Each session creation and step has a caller-generated UUID requestId. Repeating the same ID with the same inputs returns the original result; changing the inputs is rejected. This protects against network retries. It does not authorize a new attempt at an uncertain change.

After a failed step, the run accepts browser_observe for diagnosis but stops further steps. Inspect its journal and close it before deliberately re-establishing access.

Saved Python actions receive a structured browser failure. Unsafe or uncertain runs always take the normal action-failure and handoff path, even if Python catches the exception. A missing cancellation button is not automatically proof that the order is ineligible: distinguish a known business state from a changed or incomplete page.

Audit evidence

Runs and their ordered steps are recorded with their organization, business, caller, source and execution references. The journal records intended operations, checks, dispatch status and outcomes. Screenshots are private. A session replay is archived after the run closes; get_browser_run reports the evidence status separately from the business outcome.

Screenshots mask typed values, but the session replay video does not: anything typed into the page, including values filled from organization secrets, is visible in it. get_browser_run therefore returns a replay's download link only to callers with the secrets:write permission (organization admins and developers). Other callers see that the replay exists and its archive status, with a downloadUnavailable note instead of a link.

A run started for a conversation can hold that customer's data, such as details read from your back office. Callers who cannot read the conversation (without the conversations:read permission, or outside the teams of a restricted inbox) see the run and each step's outcome, but not step inputs, extracted data, page observations or evidence downloads.

A screenshot link in Copilot is a five-minute preview, not a live browser view. If the link expires, ask for a fresh snapshot of the current page. Browser evidence is kept for 90 days by default and may contain personal information, so share it only with authorized people.

If archiving the replay fails after an action succeeded, that is an evidence problem, not permission to repeat the action. Use retry_browser_recording to collect the evidence again for a closed run with a missing replay; it never repeats browser actions. The audit journal remains available, and runs can be inspected through MCP with get_browser_run.

MCP tools

All calls require organizationId; Copilot sets it automatically. Connection and run ownership are checked on the server. Read-only callers can inspect authorized runs but cannot create sessions or run browser steps.

ToolPurpose
browser_helpLoad the authoring and safety guide.
list_browser_connectionsDiscover authorized connections and their settings.
create_browser_connectionAuthorize a connection for one business and exact HTTPS origins.
update_browser_connectionChange its name, enabled state or allowed origins.
reset_browser_connection_loginForget a saved browser login, with no active run.
browser_create_sessionStart an audited run with a purpose and request ID.
browser_observeRead a bounded page snapshot with an automatic screenshot.
browser_exploreNavigate to an unfamiliar permitted page for approved teaching and discovery.
browser_stepPerform one guarded navigation, interaction, wait or extraction.
browser_close_sessionRelease the session and start archiving the replay.
get_browser_runInspect a run's journal, outcomes and evidence status.
retry_browser_recordingRetry archiving for a closed run with a missing replay.

External MCP clients act with the connected user's write permissions and must get the user's authorization for consequential steps themselves: they do not have Copilot's approval cards. No browser tool accepts an approved flag as proof of consent. Copilot's approvals are managed on the server, outside the model's tool arguments.

Test the failure cases

Before enabling a browser action in a live workflow, test it against records that exercise each outcome, using a test account:

  • A record where the change succeeds and still shows after a reload.
  • A record where the change is not allowed (for example, already shipped or already cancelled).
  • A record where the site explicitly rejects the change.
  • A site response that shows a success message while the record is unchanged.
  • A change that goes through while the response is lost, which readback should confirm.
  • A renamed, missing or duplicated control, or the wrong record shown, which must stop the action.
  • A slow page, which exercises waits.

A working test is not authorization for production: configure each business's allowed origins and the website account it may use deliberately.

On this page