5.1 KiB
Browse Functionality in big-AGI 🌐
Allows users to load web pages across various components of big-AGI. This feature is supported by Puppeteer-based
browsing services, which are the most common way to render web pages in a headless environment.
Once configured, the Browsing service provides this functionality:
- Paste a URL: Simply paste/drag a URL into the chat, and
big-AGIwill load and attach the page (very effective) - Use /browse: Type
/browse [URL]in the chat to commandbig-AGIto load the specified web page - ReAct: ReAct will automatically use the
loadURL()function whenever a URL is encountered
First of all, you need to procure a Puppteer web browsing service endpoint. big-AGI supports services like:
| Service | Working | Type | Location | Special Features |
|---|---|---|---|---|
| BrightData Scraping Browser | Yes | Proprietary | Cloud | Advanced scraping tools, global IP pool |
| Cloudflare Browser Rendering | ? | Proprietary | Cloud | Integrated CDN, optimized browser rendering |
| ⬇️ Browserless 2.0 | Okay | OpenSource | Local (Docker) | Parallelism, debug viewer, advanced APIs |
| ⬇️ Your Chrome Browser (ALPHA) | Alpha | Proprietary | Local (Chrome) | Personal, experimental use (ALPHA!) |
| other Puppeteer-based WSS Services | ? | Varied | Cloud/Local | Service-specific features |
Configuration
-
Procure an Endpoint
- Ensure that your browsing service is running (remote or local) and has a WebSocket endpoint available
- Write down the address:
wss://${auth}@{some host}:{port}, or ws:// for local services on your machine
-
Configure
big-AGI- navigate to Preferences > Tools > Browse
- Enter the 'wss://...' connection string provided by your browsing service
-
Enable Features: Choose which browse-related features you want to enable:
- Attach URLs: Automatically load and attach a page when pasting a URL into the composer
- /browse Command: Use the
/browsecommand in the chat to load a web page - ReAct: Enable the
loadURL()function in ReAct for advanced interactions
🌐 Browserless 2.0
Browserless 2.0 is a Docker-based service that provides a headless
browsing experience compatible with big-AGI. An open-source solution that simplifies web automation tasks,
in a scalable manner.
Launch Browserless with:
docker run -p 9222:3000 browserless/chrome:latest
Now you can use the following connection string in big-AGI: ws://127.0.0.1:9222.
You can also browse to http://127.0.0.1:9222 to see the Browserless debug viewer
and configure some options.
Note: if you are using docker-compose, please see the
docker/docker-compose-browserless.yaml file for an example
on how to run big-AGI and Browserless simultaneously in a single application.
🌐 Your own Chrome browser
EXPERIMENTAL - UNTESTED - You can use your own Chrome browser as a browsing service, by configuring it to expose a WebSocket endpoint.
- close all the Chrome instances (on Windows, check the Task Manager if still running)
- start Chrome with the following command line options (on Windows, you can edit the shortcut properties):
--remote-debugging-port=9222
- go to http://localhost:9222/json/version and copy the
webSocketDebuggerUrlvalue- it should be something like:
ws://localhost:9222/...
- it should be something like:
- paste the value into the Endpoint configuration (see point 2 in the configuration)
Server-Side Configuration
You can set the Puppeteer WebSocket endpoint (PUPPETEER_WSS_ENDPOINT) in the deployment before running it.
This is useful for self-hosted instances or when you want to pre-configure the endpoint for all users, and will
allow your to skip points 2 and 3 above.
Always deploy your own user authentication, authorization and security solution. For this feature, the tRPC route that provides browsing service, shall be secured with a user authentication and authorization solution, to prevent unauthorized access to the browsing service.
Support
If you encounter any issues or have questions about configuring the browse functionality, join our community on Discord for support and discussions.
Enjoy the enhanced browsing experience within big-AGI and explore the web without ever leaving your chat!
