from marinabox import MarinaboxSDK# Initialize the SDKsdk = MarinaboxSDK()# Set your Anthropic API key (required for computer use commands)sdk.set_anthropic_key("your-anthropic-api-key")# Create a new sessionsession = sdk.create_session(env_type="browser", tag="my-session")# Execute a computer use command (can use session ID or tag)sdk.computer_use_command("my-session", "Navigate to https://x.ai")
# Using session IDsdk.computer_use_command("abc123xyz", "Click the login button")# Using session tagsdk.computer_use_command("my-session", "Fill out the contact form")# Complex interactionssdk.computer_use_command("my-session", "Search for 'Python tutorials' on Google")
try: sdk.computer_use_command("my-session", "Navigate to website")except ValueError as e: print(f"Error: {e}") # Handles missing API key or session not foundexcept Exception as e: print(f"Failed to execute command: {e}")