Network API Reference

January 13, 2026 ยท View on GitHub

๐Ÿ’ก Async Version: This documentation covers the synchronous API. For async/await support, see AsyncNetwork which provides the same functionality with async methods.

Overview

The Network module provides network redirection between your local environment and the AgentBay cloud runtime. It allows a cloud session to use your local network egress, which can help reduce risk-control issues in certain websites or mobile apps.

SyncBetaNetworkService

class SyncBetaNetworkService()

Beta network service (trial feature).

init

def __init__(self, agent_bay: "AgentBay")

get_network_bind_token

def get_network_bind_token(network_id: Optional[str] = None) -> NetworkResult

describe

def describe(network_id: str) -> NetworkStatusResult

Best Practices

  1. Keep network tokens secure and never commit them to source control
  2. Ensure the local binding process is running and reachable while the session is active
  3. Check network readiness before creating sessions bound to it
  4. Use a dedicated custom image when required by your environment policy

See Also

Related APIs:


Documentation generated automatically from source code using pydoc-markdown.