Hacker News new | ask | show | jobs
by 6ak74rfy 123 days ago
Can you share the code? Specifically, curious how you did the browser integration. Did you use agent-browser? Something else?
1 comments

The browser is very straightforward, about 300 lines implementing all of the various actions you'd want an agent to have access to in puppeteer:

const puppeteer = require('puppeteer');

const browser = await puppeteer.launch();

const page = await browser.newPage();

await page.goto('https://example.com');

Session persistence is accomplished by storing the WebSocket endpoint between calls.

More:

https://pptr.dev/guides/browser-management