Skip to content

PreetRaut/ai-browser-agent

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

89 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI Browser Agent

A privacy-preserving AI assistant that automates tasks like ticket booking, form filling, and web scraping directly in your local browser using LLMs, Browser-Use and Electron.

Overview

The AI Browser Agent is a locally run desktop application designed to help users automate complex web-based tasks through natural language commands. Unlike cloud-based assistants, it executes all actions directly on the user's device, ensuring that sensitive information such as passwords, personal data, and browsing activity never leave the local environment.

By integrating large language models (LLMs) with browser automation frameworks like Browser-use, the agent can understand user intents, analyze the content of multiple open browser tabs, and perform multi-step tasks autonomously. The use of Microsoft’s Semantic Kernel adds an extra layer of controlled, secure execution for each automation steps.

Features

  • Chat interface for conversational task instructions
  • End-to-end local execution; no data sent to cloud servers
  • Automated task execution across browser tabs
  • Browser content analysis using Playwright
  • Workflow planning using large language models (LLMs)
  • Semantic Kernel integration for structured and secure task execution
  • Built with React, Electron, Express, Firebase, Python and Node

πŸŽ₯ Demo Workflow Walkthorugh [AI Browser Agent]

Demo

Example Use Case

✈️ Flight Booking Use Case

This visual demonstrates how an AI agent processes a user's request to book a flight from London to New York on August 30, 2025.

The task flows through a Plan β†’ Act β†’ Observe loop:

  1. Plan: The agent understands the user's intent and extracts relevant parameters such as:

    • Departure location: London
    • Destination: New York
    • Travel date: August 30, 2025
  2. Act: The agent inputs these parameters into the booking system and initiates a search for available flights.

  3. Observe: The system monitors the results and selects or displays a suitable flight.

A mock flight result is shown to illustrate the system’s response and how the loop completes successfully.

This use case highlights the AI agent’s ability to make autonomous decisions in real-world travel scenarios, showcasing end-to-end automation and intelligent reasoning.

Flight Booking Use Case

πŸ›’ Grocery Shopping Use Case

This image illustrates an AI assistant executing a command to add tomatoes to a Tesco grocery cart.

Following the Observe β†’ Plan β†’ Act cycle:

  1. Observe: The assistant analyzes the interface and detects relevant product listings.
  2. Plan: It understands the intent to add tomatoes and identifies the correct action.
  3. Act: The agent clicks the β€œAdd to cart” button associated with the correct item.

The visual demonstrates how the AI assistant interacts autonomously with mobile web interfaces, simulating human-like task execution by:

  • Observing available items
  • Planning next steps
  • Acting based on context

This use case showcases the AI’s capability in e-commerce automation, making routine tasks like grocery shopping seamless and intelligent.

Grocery Shopping Use Case


Project Workflow

Project Workflow


πŸ‘©β€πŸ’» Tech Stack

Component Technology
UI React, Electron, Tailwind CSS
Backend Python, Express (Node.js), Firebase Admin SDK
Browser Automation Browser-Use (playwright)
Planning OpenAI GPT / Claude Anthorpic

πŸ“‚ Project Structure

ai-browser-agent/
β”‚
β”œβ”€β”€ backend-node
β”‚Β Β  β”œβ”€β”€ agentExecutor.js
β”‚Β Β  β”œβ”€β”€ intentParser.js
β”‚Β Β  β”œβ”€β”€ llmActionPlanner.js
β”‚Β Β  β”œβ”€β”€ llmAnswerAgent.js
β”‚Β Β  β”œβ”€β”€ mcp.js
β”‚Β Β  β”œβ”€β”€ package-lock.json
β”‚Β Β  β”œβ”€β”€ package.json
β”‚Β Β  β”œβ”€β”€ parser.js
β”‚Β Β  β”œβ”€β”€ routes
β”‚Β Β  β”‚Β Β  └── commandRoutes.js
β”‚Β Β  β”œβ”€β”€ server.js
β”‚Β Β  └── siteHandlers
β”‚Β Β      β”œβ”€β”€ amazon.js
β”‚Β Β      └── tesco.js
β”‚
β”œβ”€β”€ backend-python/ # Python backend for AI/LLM workflows
β”‚ β”œβ”€β”€ .cursor/rules/ # Cursor IDE rules & configurations
β”‚ β”‚ └── general.mdc
β”‚ β”‚
β”‚ β”œβ”€β”€ bin/ # Shell scripts for setup, linting, and tests
β”‚ β”‚ β”œβ”€β”€ lint.sh
β”‚ β”‚ β”œβ”€β”€ setup.sh
β”‚ β”‚ └── test.sh
β”‚ β”‚
β”‚ β”œβ”€β”€ llm/ # Core LLM-related modules
β”‚ β”‚ β”œβ”€β”€ init.py
β”‚ β”‚ β”œβ”€β”€ llm_automation.py # Automation workflows using LLMs
β”‚ β”‚ └── llm_chat.py # Chat/interaction logic with LLMs
β”‚ β”‚
β”‚ β”œβ”€β”€ schemas/ # (Future) Data validation schemas (e.g., Pydantic)
β”‚ β”‚
β”‚ β”œβ”€β”€ utils/ # Utility/helper functions
β”‚ β”‚ β”œβ”€β”€ init.py
β”‚ β”‚ └── check_api_key.py # API key validation for external services
β”‚ β”‚
β”‚ β”œβ”€β”€ .gitignore # Ignore files from version control
β”‚ β”œβ”€β”€ .python-version # Python version specification
β”‚ β”œβ”€β”€ pyproject.toml # Python dependencies & build configuration
β”‚ β”œβ”€β”€ README.md # Python backend documentation
β”‚ └── server.py # Main backend server entry point
β”‚
β”œβ”€β”€ docs
β”‚Β Β  β”œβ”€β”€ llm-integration-decision.pdf
β”‚Β Β  β”œβ”€β”€ project-workflow.png
β”‚Β Β  β”œβ”€β”€ use-case-flight-booking.jpg
β”‚Β Β  └── use-case-grocery-ordering.jpg
β”œβ”€β”€ examples
β”‚Β Β  β”œβ”€β”€ working-example-0.png
β”‚Β Β  β”œβ”€β”€ working-example-1.png
β”‚Β Β  β”œβ”€β”€ working-example-2.png
β”‚Β Β  β”œβ”€β”€ working-example-3.png
β”‚Β Β  └── working-example-4.png
β”œβ”€β”€ frontend
β”‚Β Β  β”œβ”€β”€ cypress
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ component
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ BackButton.cy.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── Footer.cy.jsx
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e2e
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ auth_login.cy.js
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ auth_signup.cy.js
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ chatpage.cy.js
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ home.cy.js
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ loginpage.cy.js
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── signuppage.cy.js
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ fixtures
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── example.json
β”‚Β Β  β”‚Β Β  └── support
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ commands.js
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ component-index.html
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ component.js
β”‚Β Β  β”‚Β Β      └── e2e.js
β”‚Β Β  β”œβ”€β”€ cypress.config.js
β”‚Β Β  β”œβ”€β”€ electron
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ assets
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ icon-rounded.png
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ icon-transparent.png
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── icon.png
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ main.mjs
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ preload.js
β”‚Β Β  β”‚Β Β  └── splash.html
β”‚Β Β  β”œβ”€β”€ eslint.config.js
β”‚Β Β  β”œβ”€β”€ index.html
β”‚Β Β  β”œβ”€β”€ package-lock.json
β”‚Β Β  β”œβ”€β”€ package.json
β”‚Β Β  β”œβ”€β”€ public
β”‚Β Β  β”‚Β Β  └── favicon-32x32.png
β”‚Β Β  β”œβ”€β”€ src
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ App.jsx
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ assets
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ feature-1.png
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ feature-2.png
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ feature-3.png
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ feature-4.png
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── icon-rounded.png
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ components
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Animation
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  └── LightningCanvas.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Auth
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ AuthContainer.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ LoginForm.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ LogoBlock.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ SignupForm.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ SocialLogin.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  └── SocialSignup.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ BackButton.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Chat
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ MessageBubble.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ MessageInput.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ MessageList.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  └── Sidebar.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Footer.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── Home
β”‚Β Β  β”‚Β Β  β”‚Β Β      β”œβ”€β”€ DemoPreview.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β      β”œβ”€β”€ FeatureCards.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β      β”œβ”€β”€ HeroSection.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β      β”œβ”€β”€ HeroSectionCustomerReview.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β      β”œβ”€β”€ IntegrationGrid.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β      └── Navbar.jsx
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ contexts
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ AuthContext.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── ChatContext.jsx
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ firebase
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── config.js
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ hooks
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── useFirebaseAuth.js
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ index.css
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ main.jsx
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ pages
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Chat.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Home.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Login.jsx
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── Signup.jsx
β”‚Β Β  β”‚Β Β  └── store
β”‚Β Β  β”‚Β Β      └── useUserStore.js
β”‚Β Β  β”œβ”€β”€ tailwind.config.js
β”‚Β Β  β”œβ”€β”€ vite.config.js
β”‚Β Β  └── vitest.setup.js
β”œβ”€β”€ LICENSE
β”œβ”€β”€ minutes_of_meeting
β”‚Β Β  └── minutes_of_meeting.xlsx
β”œβ”€β”€ python_agent
β”‚Β Β  β”œβ”€β”€ __pycache__
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ python_agent.cpython-312.pyc
β”‚Β Β  β”‚Β Β  └── python_agent.cpython-313.pyc
β”‚Β Β  β”œβ”€β”€ python_agent.py
β”‚Β Β  └── requirements.txt
β”œβ”€β”€ README.md
β”œβ”€β”€ SCRUM_LINKS.md
└── sprints
    └── sprints.md

Installation

Clone the Repository

git clone https://github.com/yourname/ai-browser-agent.git
cd ai-browser-agent

Navigate to the Frontend Directory

cd frontend

Install Dependencies

npm install

Install Dependencies

npm install electron
  • NOTE: Configure firebase/config

Steps to run Frontend : AI Browser Agent

npm run electron-dev

npm run electron

Steps to run Backend : AI Browser Agent

node server.js


Additional Resources

Team Members : Coding Thumbs πŸ‘

  • Tarun Kumar
  • Ayush Poojari
  • Deepak Shelke
  • Sudhanshu Ghuge
  • Preet Raut
  • Soham Deo

About

A privacy-preserving AI assistant that automates tasks like ticket booking, form filling, and web scraping directly in your local browser using LLMs, Puppeteer/Selenium, and Electron.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 84.6%
  • CSS 11.0%
  • HTML 2.5%
  • WebAssembly 1.5%
  • Python 0.4%
  • Shell 0.0%