Skip to content

Commit 6a2556f

Browse files
committed
fix:fix errors in README.md and docs
1 parent fb1e271 commit 6a2556f

4 files changed

Lines changed: 25 additions & 27 deletions

File tree

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ AGB Python SDK provides a convenient way to interact with the AGB cloud service.
77
- Create and manage sessions in the AGB cloud environment
88
- Access session information
99
- Work with file system, command execution, code execution, and OSS storage modules
10-
- **Browser automation with AI-powered natural language operations**
10+
- Browser automation with AI-powered natural language operations
1111
- Advanced browser configuration (stealth mode, proxies, fingerprinting)
1212
- Structured data extraction from web pages
1313

@@ -61,18 +61,16 @@ For comprehensive documentation, guides, and examples, visit:
6161

6262
📚 **[Complete Documentation](docs/README.md)**
6363

64-
- [Getting Started Guide](docs/quickstart.md) - Detailed setup and first steps
65-
- [Browser Automation Guide](docs/guides/browser-automation.md) - AI-powered browser automation
66-
- [Session Management](docs/guides/session-management.md) - Managing session lifecycle
67-
- [Code Execution Guide](docs/guides/code-execution.md) - Running Python and JavaScript code
64+
- [Quick Start Guide](docs/quickstart.md) - Get started quickly with basic examples
65+
- [User Guides](docs/guides/README.md) - Comprehensive guides and tutorials
66+
- [API Reference](docs/api-reference/README.md) - Detailed API documentation
6867
- [Examples](docs/examples/README.md) - Practical usage examples
69-
- [Browser Examples](docs/examples/browser/README.md) - Browser automation examples
7068

7169
## Development
7270

7371
### Prerequisites
7472

75-
- Python 3.8 or higher
73+
- Python 3.10 or higher
7674
- pip
7775

7876
### Setup

docs/guides/browser-automation.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ AGB Browser Automation provides a managed platform for running headless/non-head
2727

2828
### Prerequisites
2929

30-
- Python 3.8 or higher
30+
- Python 3.10 or higher
3131
- AGB API key (set as `AGB_API_KEY` environment variable)
3232
- Playwright installed: `pip install playwright && python -m playwright install chromium`
3333

@@ -47,35 +47,35 @@ async def main():
4747
# Initialize AGB client
4848
api_key = os.getenv("AGB_API_KEY")
4949
agb = AGB(api_key=api_key)
50-
50+
5151
# Create a session with browser support
5252
params = CreateSessionParams(image_id="agb-browser-use-1")
5353
result = agb.create(params)
54-
54+
5555
if not result.success:
5656
raise RuntimeError(f"Failed to create session: {result.error_message}")
57-
57+
5858
session = result.session
59-
59+
6060
# Initialize browser
6161
success = await session.browser.initialize_async(BrowserOption())
6262
if not success:
6363
raise RuntimeError("Browser initialization failed")
64-
64+
6565
# Get CDP endpoint and connect Playwright
6666
endpoint_url = session.browser.get_endpoint_url()
67-
67+
6868
async with async_playwright() as p:
6969
browser = await p.chromium.connect_over_cdp(endpoint_url)
7070
page = await browser.new_page()
71-
71+
7272
# Navigate and interact
7373
await page.goto("https://example.com")
7474
title = await page.title()
7575
print(f"Page title: {title}")
76-
76+
7777
await browser.close()
78-
78+
7979
# Clean up
8080
agb.delete(session)
8181

@@ -91,7 +91,7 @@ The `BrowserOption` class provides comprehensive configuration for your browser
9191

9292
```python
9393
from agb.modules.browser import (
94-
BrowserOption, BrowserViewport, BrowserScreen,
94+
BrowserOption, BrowserViewport, BrowserScreen,
9595
BrowserFingerprint, BrowserProxy
9696
)
9797

@@ -303,7 +303,7 @@ stealth_option = BrowserOption(
303303
# Check browser status
304304
if session.browser.is_initialized():
305305
print("Browser is ready")
306-
306+
307307
# Get current configuration
308308
current_option = session.browser.get_option()
309309
if current_option:
@@ -319,14 +319,14 @@ try:
319319
success = await session.browser.initialize_async(option)
320320
if not success:
321321
raise BrowserError("Failed to initialize browser")
322-
322+
323323
act_result = await session.browser.agent.act_async(page, ActOptions(
324324
action="Click the submit button"
325325
))
326-
326+
327327
if not act_result.success:
328328
print(f"Action failed: {act_result.message}")
329-
329+
330330
except BrowserError as e:
331331
print(f"Browser error: {e}")
332332
except Exception as e:
@@ -398,10 +398,10 @@ async def retry_action(agent, page, action_options, max_retries=3):
398398
print(f"Attempt {attempt + 1} failed: {result.message}")
399399
except Exception as e:
400400
print(f"Attempt {attempt + 1} error: {e}")
401-
401+
402402
if attempt < max_retries - 1:
403403
await asyncio.sleep(2) # Wait before retry
404-
404+
405405
raise BrowserError(f"Action failed after {max_retries} attempts")
406406
```
407407

@@ -473,4 +473,4 @@ logging.basicConfig(level=logging.DEBUG)
473473
- Explore the [API Reference](../api-reference/modules/browser.md) for detailed method documentation
474474
- Check out [Browser Examples](../examples/browser/README.md) for practical use cases
475475
- Learn about [Session Management](session-management.md) for advanced session handling
476-
- Review [Best Practices](best-practices.md) for production deployments
476+
- Review [Best Practices](best-practices.md) for production deployments

docs/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ session.oss.upload("bucket", "key", "path") # Cloud storage
106106
-**Type Safety**: Strongly typed sessions and response objects
107107

108108
**vs Other Cloud Services**:
109-
-**Multi-language Support**: Python + JavaScript
109+
-**Multi-language Support**: Python + JavaScript + Java + R
110110
-**Complete File System**: More than just code execution
111111
-**Integrated Cloud Storage**: Built-in OSS support
112112
-**Command Line Access**: Full shell environment

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies = [
2828
"pydantic>=2.0",
2929
"aiohttp>=3.12.5",
3030
]
31-
version = "0.1.1"
31+
version = "0.1.0"
3232

3333
[project.optional-dependencies]
3434
test = [

0 commit comments

Comments
 (0)