Skip to main content

Overview

Automation Tasks are reusable browser automations you define once and run reliably in production. Anchor generates a versioned task from your input — combining deterministic automation with AI-assisted steps where needed.

Automation Tasks Overview

Visual tour of prompts, demonstrations, the workflow UI, runs, editing, and self-healing.

Ways to create a task

MethodBest for
DemonstrationShow the flow once in a live browser
PromptDescribe what the task should accomplish in natural language
Both paths produce the same result: a task you can test and call from your application.

Create from a demonstration

Demonstrate a task in a live browser. Anchor captures your actions and builds a reusable task.

Create from a prompt

Describe what the task should accomplish. Anchor generates the task from your description.

Create from a demonstration

Demonstrate a task in a live browser — navigate, click, fill forms, download files. As you work, Anchor captures every browser event and compiles them into deterministic, repeatable code.

In the Anchor UI

1

Open the Tasks page

Go to Tasks and click Create Task.
2

Set up identity and describe the task

The creation wizard walks you through four steps:
  1. Identity — enter the application URL (and an identity, if the task requires login).
  2. Task Definition — describe what the task should do in natural language.
  3. Demonstration — choose to demonstrate the task yourself.
  4. Review — confirm the task name, inputs, and outputs before saving.
3

Start the demonstration

On the Demonstration step, select the option to demonstrate the task manually, then click Continue.A live browser opens at your start URL. Perform the task — navigate, click, fill forms, download files. Anchor captures every browser event as you go.
Pro tip: Right-click anywhere to investigate elements or data. Those inspection moments give richer context to your final task.
4

Finish and create the task

Click Finish Demonstration when you’re done. Review the generated inputs and outputs on the Review step, then save the task.

Shareable demonstrations

To collect a demonstration from someone who works outside your Anchor workspace, use the Demonstrations API to issue a secure demonstration link. They complete the task in a hosted browser session; Anchor processes the session and delivers the generated task to your workspace.

Demonstrations API

Create demonstration links, monitor session status, and retrieve the generated task.

Create from a prompt

Describe what the task should do. Anchor generates the automation from your user_task.
SectionInclude
ObjectiveWhat the task should accomplish
Start URLWhere the browser opens
InputsRuntime values as {{parameter_name}}
StepsOrdered actions, one per line
OutputFields to return when the task completes
Example prompt
Objective: Export the monthly invoice report as a PDF.

Start URL: https://app.example.com/reports

Inputs:
- report_name (required): The report to export

Steps:
1. Open Reports
2. Search for {{report_name}}
3. Open the first matching result
4. Click Export → PDF
5. Confirm the download completed

Output: report_title, exported_file_name
Add edge cases when they matter — e.g. “If no exact match is found, use the closest result.”

In the UI

  1. Open Tasks and click Create Task.
  2. Enter a name and describe the task — what site to visit, what to click, what data to return.
  3. Wait for generation to finish, then test with sample inputs.

Via API

Call POST /v2/tasks/generate, then poll GET /v2/tasks/{taskId}/generation-status until status is ready.
import AnchorBrowser from 'anchorbrowser';

const anchorClient = new AnchorBrowser({ apiKey: process.env.ANCHOR_API_KEY });

const { id: taskId } = await anchorClient.post('/v2/tasks/generate', {
  body: {
    name: 'invoice-report-export',
    description: 'Export the monthly invoice report as a PDF',
    user_task: `Objective:
Export the monthly invoice report as a PDF.

Start URL:
https://app.example.com/reports

Inputs:
- report_name (required): The report to export

Steps:
1. Open Reports
2. Search for {{report_name}}
3. Open the first matching result
4. Click Export → PDF
5. Confirm the download completed

Output:
- report_title
- exported_file_name`,
  },
});

let status;
do {
  ({ status } = await anchorClient.get(`/v2/tasks/${taskId}/generation-status`));
  if (status === 'failed') throw new Error('Task generation failed');
  if (status !== 'ready') await new Promise((r) => setTimeout(r, 3000));
} while (status !== 'ready');

console.log('Task ready:', taskId);
import os
import time
from anchorbrowser import Anchorbrowser

anchor_client = Anchorbrowser(api_key=os.getenv('ANCHOR_API_KEY'))

response = anchor_client.post(
    '/v2/tasks/generate',
    body={
        'name': 'invoice-report-export',
        'description': 'Export the monthly invoice report as a PDF',
        'user_task': """Objective:
Export the monthly invoice report as a PDF.

Start URL:
https://app.example.com/reports

Inputs:
- report_name (required): The report to export

Steps:
1. Open Reports
2. Search for {{report_name}}
3. Open the first matching result
4. Click Export → PDF
5. Confirm the download completed

Output:
- report_title
- exported_file_name""",
    },
)
task_id = response['id']

while True:
    status_response = anchor_client.get(f'/v2/tasks/{task_id}/generation-status')
    status = status_response['status']
    if status == 'failed':
        raise RuntimeError('Task generation failed')
    if status == 'ready':
        break
    time.sleep(3)

print('Task ready:', task_id)
Optional fields on POST /v2/tasks/generate:
FieldPurpose
application_idTie the task to a managed application
identity_idPre-authenticate with a saved identity
input_schema / output_schemaDefine typed inputs and outputs up front
human_interventionAllow the task to pause for human input
task_browser_default_configurationDefault browser session settings for runs

Next steps