Automate any website using plain English. No need to know about locators, XPath, CSS selectors, or any browser internals.
simple-automation/
│
├── config.py ← Reads your API key from the .env file
├── agent.py ← The core logic: connects AI to browser
├── main.py ← Where YOU write your task and run it
├── examples.py ← Ready-made example tasks to try
├── requirements.txt ← Python packages this project needs
└── .env.example ← Template for your API key file
Step 1 — Install packages
pip install -r requirements.txtStep 2 — Install the Chrome browser that Playwright uses
playwright install chromiumStep 3 — Create your .env file
# On Mac/Linux:
cp .env.example .env
# On Windows:
copy .env.example .envThen open .env in any text editor and paste your OpenRouter API key.
Get a free key at: https://openrouter.ai/keys
Open main.py, change the TASK variable to what you want to do,
then run:
python main.pyExample — change TASK to:
TASK = """
Go to https://www.cleartrip.com/
Search Flights from Pune to Bangalore, departing on 30th June 2024, for 1 adult.
After the search results load, apply the "Non-Stop" filter.
Then, tell me the name and price of the cheapest flight departing before 8:00 AM.
Book The flight, for Vinay Patel, email: vinay@patel.com, phone: 1234567890.
Also, do not opt for anything which may charge money, like travel insurance or seat selection.
but do NOT enter any payment details. Just get to the final confirmation page and stop there.
"""A Chrome browser will open and you will see it do the work.
python examples.pyOpen examples.py and change which task is assigned to task_to_run.
- You write your task in plain English inside
main.py agent.pyopens a Chrome browser and connects it to the AI- The AI takes a screenshot of the page and reads the page structure
- The AI decides what to do next (click, type, scroll, etc.)
- The browser does it
- Repeat steps 3-5 until the task is done
- The AI tells you the result
You never need to provide a locator. The AI can see the page visually and through the HTML — just like a human reads a website.
Required fields are handled automatically. Before submitting any form, the AI checks which fields are required and makes sure they are filled.
Q: The browser opens but nothing happens?
A: Check that your .env file exists and has a valid API key.
Q: Can I run without seeing the browser window?
A: Yes — in main.py set HEADLESS = True.
Q: How do I use a different AI model?
A: In your .env file, change OPENROUTER_MODEL to any model from
https://openrouter.ai/models For example: openai/gpt-4o
Q: The task fails halfway through?
A: Try making the task description more specific, or increase
max_steps=25 to a higher number in agent.py.