AGB Python SDK provides a convenient way to interact with the AGB cloud service.
- Create and manage sessions in the AGB cloud environment
- Access session information
- Work with file system, command execution, and code execution modules
- Browser automation with AI-powered natural language operations
- Advanced browser configuration (stealth mode, proxies, fingerprinting)
- Structured data extraction from web pages
pip install agbcloud-sdkfrom agb import AGB
from agb.session_params import CreateSessionParams
# Initialize AGB with your API key
agb = AGB(api_key="your-api-key")
# Create a session
params = CreateSessionParams(
image_id="agb-code-space-1",
)
result = agb.create(params)
if result.success:
session = result.session
# Execute Python code
code_result = session.code.run_code("print('Hello AGB!')", "python")
print(code_result.result)
# Execute shell command
cmd_result = session.command.execute_command("ls -la")
print(cmd_result.output)
# Work with files
session.file_system.write_file("/tmp/test.txt", "Hello World!")
file_result = session.file_system.read_file("/tmp/test.txt")
print(file_result.content)
# Clean up
agb.delete(session)
else:
print(f"Failed to create session: {result.error_message}")For comprehensive documentation, guides, and examples, visit:
- Quick Start Guide - Get started quickly with basic examples
- User Guides - Comprehensive guides and tutorials
- API Reference - Detailed API documentation
- Examples - Practical usage examples
- Python 3.10 or higher
- pip
-
Clone the repository:
git clone https://github.com/agbcloud/agbcloud-sdk.git cd agbcloud-sdk -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -e ."[dev,test]"
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.