Skip to content

vinaybond/CodelessAutomation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Codeless Automation

Automate any website using plain English. No need to know about locators, XPath, CSS selectors, or any browser internals.


Files in this project

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

Setup (do this once)

Step 1 — Install packages

pip install -r requirements.txt

Step 2 — Install the Chrome browser that Playwright uses

playwright install chromium

Step 3 — Create your .env file

# On Mac/Linux:
cp .env.example .env

# On Windows:
copy .env.example .env

Then open .env in any text editor and paste your OpenRouter API key. Get a free key at: https://openrouter.ai/keys


Running your first task

Open main.py, change the TASK variable to what you want to do, then run:

python main.py

Example — 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.


Try the examples

python examples.py

Open examples.py and change which task is assigned to task_to_run.


How it works (plain English)

  1. You write your task in plain English inside main.py
  2. agent.py opens a Chrome browser and connects it to the AI
  3. The AI takes a screenshot of the page and reads the page structure
  4. The AI decides what to do next (click, type, scroll, etc.)
  5. The browser does it
  6. Repeat steps 3-5 until the task is done
  7. 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.


Common questions

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.

About

Sample Proejct To Domonstrae nocode automation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages