Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 2.07 KB

File metadata and controls

38 lines (28 loc) · 2.07 KB

AGB SDK Examples

Practical, runnable examples demonstrating the capabilities of the AGB SDK.

Example Catalog

Category Example Description
Start Here Session Management Create, retrieve, and manage session lifecycle.
Code Execution Run Python, JavaScript, Java, and R code.
Command Execution Execute shell commands and system tools.
File Operations Read, write, upload, and manage files in the cloud.
Browser Basic Navigation Open URLs, click buttons, and take screenshots.
Data Extraction Extract structured data from web pages using AI.
Browser Examples Full list of browser automation examples.
Advanced Browser Extensions Load and manage Chrome extensions in your sessions.
Context Sync Sync local context to remote sessions.
Directory Monitoring Watch for file changes in real-time.

Key Concepts Demonstrated

  • Session Lifecycle: All examples show proper create -> use -> delete patterns.
  • Error Handling: Check result.success and handle result.error_message.
  • Resource Management: Use try...finally blocks to ensure sessions are cleaned up.

Troubleshooting

  • Authentication Error: Double-check your AGB_API_KEY.
  • Image ID Error: Ensure you are using a valid image_id (e.g., agb-code-space-1 or agb-browser-use-1).
  • Timeout Error: Some operations might take longer depending on network conditions; try increasing timeout values.

Contributing

Have a useful example? We'd love to include it! Please ensure your example is:

  • Self-contained: Runnable without external dependencies.
  • Well-documented: Clear comments and explanations.
  • Error-handled: Proper error checking and cleanup.