Record and automate browser workflows with AI. Chat-based CLI + API server powered by Gemini and browser-use.
Project description
⚡ 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.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autopattern-0.2.3.tar.gz.
File metadata
- Download URL: autopattern-0.2.3.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10982c6ab009d8feed6f8a169e248b38829cb25509e20675e4c1290bfbd2cba1
|
|
| MD5 |
2ea5c7594aa5e9b5970f23080dc512e0
|
|
| BLAKE2b-256 |
94e2cf718f82a4db308c82c18f45910a8c87ef50a8f82894d7be0acb12be117b
|
Provenance
The following attestation bundles were made for autopattern-0.2.3.tar.gz:
Publisher:
publish.yml on autopattern/autopattern
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autopattern-0.2.3.tar.gz -
Subject digest:
10982c6ab009d8feed6f8a169e248b38829cb25509e20675e4c1290bfbd2cba1 - Sigstore transparency entry: 1191970549
- Sigstore integration time:
-
Permalink:
autopattern/autopattern@6261b322ce8f24921fd064256c36aef6f1e0ba3a -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/autopattern
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6261b322ce8f24921fd064256c36aef6f1e0ba3a -
Trigger Event:
release
-
Statement type:
File details
Details for the file autopattern-0.2.3-py3-none-any.whl.
File metadata
- Download URL: autopattern-0.2.3-py3-none-any.whl
- Upload date:
- Size: 29.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75b17f30427daa910b9f9673307b50a52a441bab81db1fef12953b697f33f6bb
|
|
| MD5 |
49136802ff7c29d8b0d497232ac14174
|
|
| BLAKE2b-256 |
a12937dd1f9d5779a0419051ff88ef79a9503836b8e3e7d03dc7152cffe5fa6e
|
Provenance
The following attestation bundles were made for autopattern-0.2.3-py3-none-any.whl:
Publisher:
publish.yml on autopattern/autopattern
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autopattern-0.2.3-py3-none-any.whl -
Subject digest:
75b17f30427daa910b9f9673307b50a52a441bab81db1fef12953b697f33f6bb - Sigstore transparency entry: 1191970555
- Sigstore integration time:
-
Permalink:
autopattern/autopattern@6261b322ce8f24921fd064256c36aef6f1e0ba3a -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/autopattern
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6261b322ce8f24921fd064256c36aef6f1e0ba3a -
Trigger Event:
release
-
Statement type: