ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
---
|
||||
title: "Remote Browser"
|
||||
description: ""
|
||||
icon: "cloud"
|
||||
mode: "wide"
|
||||
---
|
||||
|
||||
|
||||
### Browser-Use Cloud Browser or CDP URL
|
||||
|
||||
The easiest way to use a cloud browser is with the built-in Browser-Use cloud service:
|
||||
|
||||
```python
|
||||
from browser_use import Agent, Browser, ChatOpenAI
|
||||
|
||||
# Use Browser-Use cloud browser service
|
||||
browser = Browser(
|
||||
use_cloud=True, # Automatically provisions a cloud browser
|
||||
# cdp_url="http://remote-server:9222" # CDP URL from your favorite browser provider like AnchorBrowser, HyperBrowser, BrowserBase, Steel.dev, etc.
|
||||
)
|
||||
|
||||
agent = Agent(
|
||||
task="Your task here",
|
||||
llm=ChatOpenAI(model='gpt-4.1-mini'),
|
||||
browser=browser,
|
||||
)
|
||||
```
|
||||
|
||||
**Prerequisites:**
|
||||
1. Get an API key from [cloud.browser-use.com](https://cloud.browser-use.com)
|
||||
2. Set BROWSER_USE_API_KEY environment variable
|
||||
|
||||
**Benefits:**
|
||||
- ✅ No local browser setup required
|
||||
- ✅ Scalable and fast cloud infrastructure
|
||||
- ✅ Automatic provisioning and teardown
|
||||
- ✅ Built-in authentication handling
|
||||
- ✅ Optimized for browser automation
|
||||
|
||||
### Third-Party Cloud Browsers
|
||||
Get a CDP URL from your favorite browser provider like AnchorBrowser, HyperBrowser, BrowserBase, Steel.dev, etc.
|
||||
|
||||
|
||||
|
||||
|
||||
### Proxy Connection
|
||||
|
||||
```python
|
||||
|
||||
from browser_use import Agent, Browser, ChatOpenAI
|
||||
from browser_use.browser import ProxySettings
|
||||
|
||||
browser = Browser(
|
||||
headless=False,
|
||||
proxy=ProxySettings(
|
||||
server="http://proxy-server:4242",
|
||||
username="proxy-user",
|
||||
password="proxy-pass"
|
||||
)
|
||||
cdp_url="http://remote-server:9222"
|
||||
)
|
||||
|
||||
|
||||
agent = Agent(
|
||||
task="Your task here",
|
||||
llm=ChatOpenAI(model='gpt-4.1-mini'),
|
||||
browser=browser,
|
||||
)
|
||||
```
|
||||
Reference in New Issue
Block a user