๐Ÿš€ AutoMesh Documentation

A professional integration guide for building browser automation, API-driven workflows, AI-assisted agents, plugins and production-ready automation systems with AutoMesh.

About these examples

The snippets below document a recommended AutoMesh integration contract. Replace example package names, endpoints, model identifiers and configuration values with the exact values provided by your AutoMesh dashboard or installed SDK version.

๐ŸŒ Browser Automation

Connect supported browser engines and automation frameworks through one documented workflow.

๐Ÿค– AI Orchestration

Use LLMs for planning, extraction, classification and structured automation decisions.

๐Ÿ”Œ API First

Authenticate purchased accounts with API credentials and integrate from any backend.

๐Ÿงฉ Extensible

Add plugins, browser extensions and custom tools without changing the core workflow.

๐Ÿ“ฆ Installation

Create an isolated Python environment and install the AutoMesh SDK or your selected integrations.

Terminal
python -m venv .venv
.venv\Scripts\activate
python -m pip install --upgrade pip

# Install the AutoMesh SDK when it is available from your official package source
pip install automesh
Verify package names

Do not publish this documentation as proof that a package named automesh is publicly available unless your actual release provides it. Use your official SDK name and installation source in production.

๐Ÿ—๏ธ Platform Architecture

A scalable AutoMesh workflow can be organized into five layers:

Layer Responsibility
Client / SDK Python, JavaScript or another supported application integration.
Browser Layer Selenium, Playwright, DrissionPage or a remote browser session.
AI Layer LLM prompts, structured outputs and approved tool calls.
Platform API Authentication, jobs, sessions, usage and workflow execution.
Extensions Plugins, webhooks, custom tools and browser extensions.

โœ… Quick Start

1

Purchase or activate an AutoMesh plan that includes API access.

2

Create an API key in the AutoMesh dashboard and store it in an environment variable.

3

Create a client, choose a browser or AI integration, and configure the workflow.

4

Submit a job and inspect the structured response or job status.

Python
import os
import requests

api_key = os.environ["AUTOMESH_API_KEY"]

response = requests.post(
    "https://api.example.com/v1/jobs",
    headers={"Authorization": f"Bearer {api_key}"},
    json={"workflow": "example-workflow"}
)

print(response.json())

๐Ÿงช Connect AutoMesh with Selenium

Use Selenium when your project already depends on WebDriver, browser profiles or an existing Selenium test/automation stack. AutoMesh can act as the orchestration layer around the driver rather than replacing Selenium.

Python
from selenium import webdriver
from selenium.webdriver.common.by import By

options = webdriver.ChromeOptions()
driver = webdriver.Chrome(options=options)

driver.get("https://example.com")
title = driver.find_element(By.TAG_NAME, "h1").text

# Pass validated data to your AutoMesh workflow/API
print(title)

driver.quit()

Recommended integration boundary

Keep browser control in Selenium and pass normalized events, extracted content and job results to AutoMesh. This separation makes it easier to replace Selenium without rewriting your business logic.

๐ŸŽญ Connect AutoMesh with Playwright

Playwright is well suited to modern browser automation where isolated contexts, multiple pages and async workflows are useful.

Python
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=False)
    page = browser.new_page()
    page.goto("https://example.com")

    result = {
        "title": page.title(),
        "url": page.url
    }

    # Send `result` to an AutoMesh workflow when required.
    print(result)
    browser.close()

๐Ÿงญ Connect AutoMesh with DrissionPage

DrissionPage can be documented as an optional browser/session adapter for projects that prefer its API. Keep the AutoMesh workflow interface independent of any single browser library.

Python
# Example adapter pattern
from DrissionPage import ChromiumPage

page = ChromiumPage()
page.get("https://example.com")

data = {
    "title": page.title,
    "url": page.url
}

print(data)
Adapter design

For a production platform, expose one internal interface such as BrowserAdapter and implement Selenium, Playwright and DrissionPage adapters behind it. This keeps your public API consistent.

๐ŸฆŠ Firefox Support

Firefox can be used through a supported automation framework such as Selenium or Playwright. Select Firefox explicitly in your browser configuration and keep browser-specific capabilities separate from the core workflow.

Selenium + Firefox
from selenium import webdriver

options = webdriver.FirefoxOptions()
driver = webdriver.Firefox(options=options)

driver.get("https://example.com")
print(driver.title)
driver.quit()

๐Ÿ”„ Dual / Hybrid Browser Workflows

A dual workflow means different components handle different responsibilities. For example, one browser session may perform an interactive task while an API client or second browser context processes independent data.

Component A Component B Shared Layer
Playwright browser context HTTP/API client AutoMesh job state
Firefox via Selenium Chromium via Playwright Normalized task/result schema

Do not rely on undocumented copying of credentials or protected session data between browsers. Use explicit, authorized authentication and documented session handling.

๐Ÿค– AI & LLM Integration

AutoMesh can use an LLM layer for tasks such as classifying page content, extracting structured information, choosing among approved tools and generating workflow decisions. The browser remains responsible for browser actions; the AI layer should receive bounded inputs and return validated outputs.

PromptingTool CallingJSON OutputClassificationExtraction

๐Ÿง  LLM Providers

Design the provider layer so that model vendors are configurable rather than hard-coded. Your implementation may support a hosted provider, a self-hosted model, or an internal inference service.

Provider-neutral example
llm_config = {
    "provider": "your-provider",
    "model": "your-model-id",
    "temperature": 0.2,
    "response_format": "json"
}

# AutoMesh should validate the provider response
# before allowing downstream automation to use it.

๐Ÿ› ๏ธ AI Tool Calling

Expose a small, explicit allowlist of tools. Each tool should define an input schema, output schema, timeout and permission boundary.

Tool definition concept
tool = {
    "name": "get_page_title",
    "description": "Return the title of the current authorized page.",
    "input_schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": False
    }
}

๐Ÿ“ Structured AI Output

Require machine-readable output and validate it before execution. A useful pattern is to separate model output from automation commands so the model cannot directly execute arbitrary code.

JSON example
{
  "action": "extract",
  "fields": ["title", "price"],
  "confidence": 0.94
}

๐Ÿ’ณ Plans & API Access

After a customer purchases a plan that includes API access, the dashboard should allow them to create, rotate and revoke API keys. Keys should be shown once at creation time where possible.

1

Purchase an AutoMesh plan with API access.

2

Open Dashboard โ†’ Developer โ†’ API Keys.

3

Create a key with a descriptive name and allowed scopes.

4

Copy the key to a secret manager or environment variable.

๐Ÿ” Authentication

Use an Authorization header rather than placing API keys in URLs or browser-visible source code.

HTTP
Authorization: Bearer YOUR_AUTOMESH_API_KEY
Content-Type: application/json
Never hard-code production keys

Store keys in environment variables, a secret manager or another access-controlled configuration system. Rotate compromised or unused keys immediately.

๐Ÿ“จ Request Format

The exact endpoint should match your production API. The following structure is a recommended documentation pattern.

POST /v1/jobs
{
  "workflow": "browser-extraction",
  "input": {
    "url": "https://example.com",
    "fields": ["title"]
  },
  "options": {
    "browser": "chromium",
    "timeout_seconds": 60
  }
}

๐Ÿ“ฅ API Responses

Return predictable JSON with a stable status field, job identifier and machine-readable error object.

200 / 202 example
{
  "id": "job_123456",
  "status": "completed",
  "data": {
    "title": "Example Domain"
  },
  "usage": {
    "requests": 1
  }
}
Field Description
id Stable job or request identifier.
status queued, running, completed or failed.
data Validated workflow result.
error Present for failed requests with a stable code/message.

โš ๏ธ Errors, Retries & Limits

Code Meaning Recommended client action
400 Invalid request Correct the request and do not blindly retry.
401 Authentication failed Check the key and authorization header.
403 Permission denied Check plan access or key scopes.
429 Rate limit reached Use backoff and retry after the documented delay.
5xx Temporary server failure Retry with bounded exponential backoff.

๐ŸŒ Proxy Configuration

AutoMesh should support authorized proxy routing through explicit configuration. Use proxies only where you have permission and comply with the destination service's rules and applicable law.

Environment configuration
HTTP_PROXY=http://proxy.example:8080
HTTPS_PROXY=http://proxy.example:8080

# Optional application-level configuration
AUTOMESH_PROXY_URL=http://proxy.example:8080

For authenticated proxy credentials, use secure secret storage instead of committing credentials to source control.

๐Ÿ—‚๏ธ Sessions & Browser Profiles

Use separate profiles or isolated browser contexts for independent jobs. Treat session data as sensitive and define explicit retention and cleanup rules.

โ˜๏ธ Remote Browser Connection

A production deployment may run browsers in separate workers or containers. The API can create a job, assign it to a browser worker, stream status events and return the final structured result.

๐Ÿงฉ Plugin System

Plugins should have a manifest, version, declared permissions and lifecycle hooks. Keep plugins isolated from core secrets unless access is explicitly required.

plugin.json
{
  "name": "example-plugin",
  "version": "1.0.0",
  "entrypoint": "plugin:run",
  "permissions": ["workflow.read"]
}

๐Ÿงฉ Browser Extensions

Document extension loading separately for each framework and browser. Validate extension source, version and permissions before allowing it in shared or production environments.

๐Ÿ”ง Custom Tools

Custom tools are best implemented as small, testable functions with strict schemas. The AI layer should request a tool; the application validates and executes it.

๐ŸŒฑ Environment Variables

.env example
AUTOMESH_API_KEY=replace_with_real_key
AUTOMESH_BASE_URL=https://api.your-domain.example
AUTOMESH_TIMEOUT=60
AUTOMESH_BROWSER=chromium
AUTOMESH_LOG_LEVEL=INFO

โš™๏ธ Project Settings

Keep non-secret defaults in version-controlled configuration and keep credentials outside the repository.

๐Ÿ›ก๏ธ Security

  • Use HTTPS for API traffic.
  • Never expose API keys in frontend bundles.
  • Use least-privilege scopes for keys and plugins.
  • Validate all AI-generated structured data before execution.
  • Log request identifiers without logging secrets.
  • Define data retention and session cleanup policies.

๐Ÿง‘โ€๐Ÿ’ป Developer SDK Architecture

AutoMesh should expose a stable developer interface while keeping browser platforms and AI vendors behind adapters. This allows new providers to be added without changing customer workflows.

Python interface concept
class BrowserProvider:
    def create_profile(self, config): ...
    def start_profile(self, profile_id): ...
    def connect(self, session): ...
    def stop_profile(self, profile_id): ...

โŒจ๏ธ AutoMesh CLI

Add a command-line interface for local development, CI/CD and operations.

CLI contract
automesh login
automesh profiles list
automesh profiles start PROFILE_ID
automesh jobs run workflow.json
automesh jobs status JOB_ID
automesh providers doctor

๐Ÿณ Docker & Browser Workers

Separate the API service from browser workers. Workers can receive jobs, launch authorized sessions, execute workflows and return normalized results.

Deployment concept
services:
  api:
    image: automesh-api
  worker:
    image: automesh-browser-worker
  queue:
    image: redis:latest

๐Ÿงช Testing & Debugging

Unit Tests

Test adapters and schemas without launching browsers.

Integration Tests

Run controlled sessions against dedicated test pages.

Fixtures

Use sanitized responses for repeatable tests.

Artifacts

Store authorized screenshots, logs and request IDs.

๐Ÿ“Š Observability

Give every AutoMesh job a correlation ID across API, queue, AI and browser events.

Metric Purpose
job_duration_ms Workflow execution performance.
browser_start_ms Provider startup performance.
ai_latency_ms Model response latency.
job_failure_total Failure tracking.

๐ŸŒ Browser Profile Provider Architecture

AutoMesh can integrate with multiple profile-oriented browser platforms through a common adapter layer. The goal is authorized interoperability and automation, not claiming to bypass website security or guarantee that automation cannot be detected.

Adapter Capability Responsibility
Profile Management Create, list and configure profiles where the provider supports it.
Session Launch Start a profile and obtain supported connection details.
Automation Bridge Connect Selenium, Playwright or Puppeteer using supported mechanisms.
Lifecycle Track, stop and clean up sessions.

๐Ÿงฉ AdsPower Connector

Create a dedicated AutoMesh connector around the provider's supported Local API. The connector can check connectivity, start an authorized profile and normalize returned connection details before passing control to the selected automation framework.

Adapter concept
provider = AutoMeshProvider(
    name="adspower",
    base_url="http://local-provider-endpoint"
)

session = provider.start_profile(profile_id="PROFILE_ID")

# Normalize:
# session.debug_endpoint
# session.webdriver_path
# session.profile_id

๐Ÿงฉ Multilogin Connector

The AutoMesh adapter should separate provider profile lifecycle operations from Selenium, Playwright or Puppeteer automation. Provider credentials belong in secure configuration, while workflows receive a normalized session object.

Workflow concept
session = automesh.providers.multilogin.start(
    profile_id="PROFILE_ID"
)

browser = automesh.browser.connect(session)
browser.open("https://example.com")

๐Ÿงฉ MoreLogin Connector

Support local and remote provider modes through configuration. AutoMesh should expose only capabilities actually enabled by the provider API and connected account.

Configuration
AUTOMESH_PROVIDER=morelogin
AUTOMESH_PROVIDER_MODE=local
AUTOMESH_PROVIDER_URL=http://127.0.0.1:40000

๐Ÿ”Œ Adding More Providers

Use a provider registry instead of hard-coding product names across the platform.

Registry
PROVIDERS = {
    "selenium": SeleniumProvider,
    "playwright": PlaywrightProvider,
    "drissionpage": DrissionPageProvider,
    "adspower": AdsPowerProvider,
    "multilogin": MultiloginProvider,
    "morelogin": MoreLoginProvider,
}

๐Ÿค– AI Automation Agents

AI agents should orchestrate approved tools rather than execute unrestricted code. Define exactly what an agent may observe and which browser, API and plugin actions it may request.

Agent state
{
  "goal": "Extract approved page data",
  "state": "planning",
  "allowed_tools": [
    "browser.navigate",
    "browser.read",
    "browser.click",
    "browser.type"
  ]
}

๐Ÿง  Planner โ†’ Executor โ†’ Validator

1

Planner: creates a bounded action plan.

2

Executor: calls approved browser, API or plugin tools.

3

Validator: checks schemas and success conditions.

4

Reporter: returns structured results and audit metadata.

๐Ÿ‘๏ธ Vision-Based Automation

Use vision models for visual reasoning when deterministic page selectors are insufficient. Keep screenshots and visual frames as explicit, permission-controlled inputs.

Privacy

Do not send sensitive page content to an external AI provider unless processing is permitted by the user, account policy and provider terms.

๐Ÿ”— MCP & AI Tool Ecosystems

AutoMesh can expose approved browser and workflow capabilities as structured tools for compatible AI-agent ecosystems.

Tool schema
{
  "name": "automesh.browser.status",
  "description": "Return status for an authorized AutoMesh browser session",
  "inputSchema": {
    "type": "object",
    "properties": {
      "session_id": {"type": "string"}
    },
    "required": ["session_id"]
  }
}

๐Ÿ‘ค Human Approval Gates

Add explicit confirmation for actions with significant external impact. The AI can prepare a proposed action, while AutoMesh requires approval before execution.

Approval state
{
  "status": "awaiting_approval",
  "proposed_action": "submit_workflow",
  "approval_token": "approval_example"
}

๐Ÿ”€ Workflow Orchestration

For long-running tasks, separate submission from execution. Return a job ID immediately, process work asynchronously, and expose status retrieval or webhook notifications.

๐Ÿ“ก Webhooks

Webhooks allow AutoMesh to notify your application when a job changes state. Sign outgoing webhook requests and verify signatures before processing them.

Event example
{
  "event": "job.completed",
  "data": {
    "id": "job_123456",
    "status": "completed"
  }
}

๐Ÿš€ Production Checklist

Observability

Track request IDs, job durations, failure rates and browser worker health.

Reliability

Use bounded retries, timeouts and idempotency where supported.

Security

Protect keys, validate inputs and review plugin permissions.

Versioning

Version APIs and document breaking changes before release.

Documentation status

This page is structured as a professional foundation for AutoMesh. Before public release, replace placeholder endpoints, package names, dashboard paths and API schemas with the exact behavior implemented by your backend.