This script automatically clicks the "START AGENT LAB" button to keep the research running continuously without manual intervention.
- Install dependencies:
npm installThis will install Puppeteer, which is needed for browser automation.
Start the development servers:
npm run devIn a separate terminal, run the auto-accept bot:
npm run auto-acceptStart dev servers AND auto-accept bot at the same time:
npm run dev:with-auto- The script opens a browser window pointing to
http://localhost:5173 - Every second, it checks for the "START AGENT LAB" button
- When found, it automatically clicks the button
- The research process continues uninterrupted
Edit auto-accept.js to customize:
- Headless mode: Set
headless: trueto run without showing the browser window - Check interval: Change
checkIntervalto adjust how often it checks for the button (in milliseconds) - URL: Update the
urlvariable if your frontend runs on a different port
Press Ctrl+C in the terminal where the bot is running to stop it gracefully.
Browser doesn't open:
- Make sure the frontend is running (
npm run dev:frontend) - Check that port 5173 is the correct SvelteKit dev server port
Button not being clicked:
- Verify the button text is exactly "START AGENT LAB"
- Check browser console for errors
- Ensure JavaScript is enabled
Bot crashes:
- The script will automatically try to reload the page
- Check that your system has enough memory to run Chromium