Skip to main content

⚡ AutoPattern

Record browser workflows, replay them with AI.

AutoPattern records your clicks, inputs and navigation in Chrome, then uses Google Gemini + browser-use to replay them autonomously. It ships as a single CLI command with a built-in API server for the companion Chrome extension.

PyPI Python License: MIT


Installation

pip install autopattern

Then install the browser driver (one-time):

playwright install chromium

Configuration

Set your Google Gemini API key (get one free):

export GOOGLE_API_KEY="your-key-here"

Or create a .env file in your working directory:

GOOGLE_API_KEY=your-key-here

Quick Start

Just run:

autopattern

This starts:

  • An interactive chat where you type browser tasks in plain English
  • A background API server on port 5001 for the Chrome extension
╭────────────────────────────────────────────╮
│          ⚡ AutoPattern v0.2.2              │
│   AI-powered browser automation from CLI   │
╰────────────────────────────────────────────╯

  📡 API server  : http://localhost:5001
  🤖 LLM model   : gemini-flash-latest

you > Go to github.com and star the autopattern repo
  🚀 Starting automation...
  ✅ Task completed successfully!

you > /quit

Chat Commands

Command Description
(any text) Run as a browser automation task
/load <file.csv> Load a recorded workflow CSV
/model [name] Show or change the Gemini model
/headless [on|off] Toggle headless browser mode
/history Show tasks run this session
/help Show all commands
/quit Exit
Ctrl+C Stop a running task

CLI Modes

# Interactive chat + API server (default)
autopattern

# Run a single task
autopattern --task "Search Google for 'Python tutorials'"

# Replay a recorded workflow CSV
autopattern --workflow recording.csv

# API server only (no chat)
autopattern --server

# Custom port
autopattern --port 8000

As a Library

from automation import AutomationRunner

runner = AutomationRunner(headless=False)
result = runner.run_task_sync("Go to google.com and search for Python")
print(result["success"])

Chrome Extension

The companion Chrome extension records your browser interactions and sends them to AutoPattern's API for replay. Install it from the extension/ directory in the source repo.


API Endpoints

When AutoPattern is running (via autopattern or autopattern --server):

Endpoint Method Description
/api/health GET Health check
/api/settings GET/PUT View or update settings
/api/describe POST Analyze workflow events → structured steps
/api/automate POST Run automation from recorded events
/api/automate/task POST Run automation from a task description

Development

git clone https://github.com/autopattern/autopattern.git
cd autopattern/backend
pip install -e ".[dev]"
playwright install chromium

License

MIT — see LICENSE.

Metadata

Release files for autopattern 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autopattern 0.2.3
File Size Uploaded
autopattern-0.2.3.tar.gz 25.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autopattern 0.2.3
File Interpreter ABI Platform
autopattern-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 54.9 kB

Release files / autopattern-0.2.3.tar.gz

Download URL autopattern-0.2.3.tar.gz
Size 25.0 kB
Tags Source
SHA-256 checksum
How to use checksums
10982c6ab009d8feed6f8a169e248b38829cb25509e20675e4c1290bfbd2cba1
BLAKE2b-256 checksum
How to use checksums
94e2cf718f82a4db308c82c18f45910a8c87ef50a8f82894d7be0acb12be117b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.

Transparency log

Release files / autopattern-0.2.3-py3-none-any.whl

Download URL autopattern-0.2.3-py3-none-any.whl
Size 29.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75b17f30427daa910b9f9673307b50a52a441bab81db1fef12953b697f33f6bb
BLAKE2b-256 checksum
How to use checksums
a12937dd1f9d5779a0419051ff88ef79a9503836b8e3e7d03dc7152cffe5fa6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page