Browser Automation
Connect a legacy CRM or commerce site through a managed browser, teach the steps with Copilot, and run guarded Python actions with private execution evidence.
Browser automation connects Octocom to systems that do not provide a useful API. Copilot can explore a permitted website with you, read its rendered content, and help turn the steps into a saved Python action. Examples include order tracking, customer lookup and cancellation in a legacy CRM.
This first version uses Browserbase with proxies disabled. It operates on semantic page elements and verifies expected state before and after each interaction. It does not automatically repair a changed website during a customer conversation.
Workflows use one tab and the main page's DOM. Popups stop the run; interactions inside embedded frames are not supported. Allowed origins restrict navigation, but do not provide a complete network firewall for the website's subresources.
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.
- Copilot loads
browser_help, an embedded guide available in the running application even when the public documentation is unavailable. - It lists your browser connections or proposes a connection for the selected business and exact allowed website origins. You approve this access. An enabled connection is available to saved actions for that business.
- It opens an audited browser run on the authorized connection. For an unfamiliar page, it uses
browser_exploreto navigate and discover its URL, title and accessibility content without inventing expected headings. Opening the session, navigating and reading do not need another approval. Private screenshots appear automatically in chat after navigation, observation and successful interactions. - You guide it through the task. Clicks, field edits, selections and key presses have an Approve / Deny card showing its 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, including public demo passwords. Non-secret account identifiers, such as login email addresses, can appear in identity and input-value checks.
- 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 those avoid repeated search clicks.
- 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 demonstrate 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. Before inspecting sensitive pages or records outside your request, Copilot should confirm the scope with you. Navigation must never be used to invoke a known action URL as a way around interaction approval.
The browser begins at about:blank. Reuse a run for a short sequence, then close it. Runs have a ten-minute absolute limit, a three-minute idle limit and a limit of 100 steps. At most five runs can be active per organization. Saved login state is opt-in and scoped to its connection; it is not a shared browser profile across customers. Use reset_browser_connection_login after closing the active run to forget a saved profile and sign in again; this requires approval and does not change the website account credentials. Interactive MFA enrollment, automatic TOTP/email/SMS handling and arbitrary JavaScript execution are outside this version.
What an approved step means
A step has an exact expected URL, semantic target, preconditions and postconditions. Preconditions should check the visible order/customer identity and current business state. A URL containing an order ID is useful navigation information; it is not sufficient proof of the record shown.
Observations redact authentication parameters from URLs. You can reuse that 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 target must match uniquely. There are no coordinate clicks, CSS/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. The separate browser_explore tool is only for approved page discovery by MCP/Copilot; it verifies the current URL and permitted navigation, but makes no claim about a business result. Saved Python automations cannot use it. Clicks and Enter submissions must expect a new state; a condition already satisfied before the click cannot establish that the click worked. Read/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 insufficient.
Use readback on the final action to reopen the known record URL, verify its identity, then check its resulting state. This can reconcile a cancellation that committed even though the website lost the response. Configure failureConditions for explicit rejection messages. If the record cannot be reconciled, the outcome remains uncertain.
Website text, labels and screenshots are untrusted data. They must never override the customer's instructions, request credentials or grant permission to change unrelated records.
Failures are part of the contract
| Outcome | Meaning | What happens next |
|---|---|---|
succeeded | Required expectations passed. | Continue within the agreed workflow. |
precondition_failed | Identity or required starting state did not match. | Stop before the intended interaction. |
page_changed | The expected page/control structure is unavailable or ambiguous. | Stop and review the site; do not silently weaken selectors. |
session_expired | The browser session is no longer usable. | Stop and re-establish access deliberately. |
action_rejected | The site explicitly rejected the operation. | Report the rejection and follow the workflow's handoff policy. |
outcome_unknown | Dispatch may have occurred, but success was not proven. | Reconcile the record or hand off; never blindly repeat the mutation. |
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; reconcile 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 transport retries. It does not authorize a new attempt at an uncertain mutation.
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 force the normal action-failure/handoff path even if Python catches an 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 ordered steps are persisted with their organization, business, caller, source and execution references. The journal records intended operations, checks, dispatch status and outcomes. Screenshots are private artifacts. Session replay is archived after close; get_browser_run reports the evidence status separately from the business outcome.
A screenshot link in Copilot is a five-minute preview. It is not a live browser view. If the link expires, ask for a fresh snapshot of the current page. The original artifact remains subject to the run's retention policy. Browser evidence is retained for 90 days by default and may contain personal information, so share it only with authorized people.
Replay archival can fail after an action succeeds. That is an evidence problem, not permission to repeat the action. Use retry_browser_recording to requeue evidence collection for a closed run with missing replay; it never repeats browser actions. The audit journal remains available for investigation. A dedicated audit dashboard is not part of this version; agents can inspect runs through MCP.
MCP tools
All organization-scoped calls require organizationId; Copilot pins it automatically. Connection and run ownership are checked server-side. Read-only callers can inspect authorized runs but cannot create sessions or execute browser steps.
| Tool | Purpose |
|---|---|
browser_help | Load the current backend's authoring and safety playbook. |
list_browser_connections | Discover authorized connections and their settings. |
create_browser_connection | Authorize a connection for one business and exact HTTPS origins. |
update_browser_connection | Change its name, enabled state or allowed origins. |
reset_browser_connection_login | Forget saved browser login after approval, with no active run. |
browser_create_session | Start an audited run with a purpose and request ID. |
browser_observe | Read a bounded DOM snapshot with an automatic teaching screenshot. |
browser_explore | Navigate to an unfamiliar permitted page for approved teaching and DOM discovery. |
browser_step | Perform one guarded navigation, interaction, wait or extraction. |
browser_close_session | Release the session and start replay archival. |
get_browser_run | Inspect its journal, outcomes and evidence status. |
retry_browser_recording | Retry archival for a closed run with missing replay. |
External MCP clients act with the connected operator's write permissions and must obtain authorization for consequential steps. They do not inherit the dashboard's approval UI. No browser tool accepts an approved boolean as proof of consent. Copilot's approvals are managed by its server-side tool loop, outside model-generated arguments.
Exercise the failure cases
The Northstar demo CRM is a synthetic frontend-only site with browser-local data. Use its demo credentials, then exercise order search, URL deep links, scrollable order dialogs, transient customer search, separate profiles and delayed tracking results.
| Fixture | Expected behavior |
|---|---|
NS-1041 | Cancellation succeeds and persists after reload. |
NS-1042 | Shipped; cancellation is unavailable. |
NS-1043 | Already cancelled. |
NS-1044 | Cancellation is explicitly rejected. |
NS-1045 | Misleading success notice; the order remains processing. |
NS-1046 | Cancellation commits, but the response is lost; readback reconciles it. |
Use variant=cosmetic to check that appearance alone does not break semantic checks. renamed, missing, duplicate and wrong-record must stop an unchanged action when its expectations no longer hold. delay=slow exercises waits. Reset records on the lab page between scenarios; each browser context has its own data.
Deployment preparation
Administrators must configure Browserbase credentials and provision a private Azure blob container named <BACKEND_AZURE_STORAGE_CONTAINER>-browser-audit before enabling browser connections. The service checks that this container exists and is private; it does not fall back to the ordinary attachment container. Database migrations and the backend jobs process are required for durable run history, session cleanup, replay retries and retention cleanup.
Use an isolated test organization and the synthetic CRM for verification. A working demo is not a production account authorization: configure each customer's allowed origins and permitted account deliberately.