Skip to main content
Start with the OpenHands Helm chart’s sandbox NetworkPolicy. Allow the routes agents need to clone repositories, install dependencies, and run tests. Use a firewall or forward proxy for approved internet destinations, and give agents a search tool for looking up documentation across approved sources.

Configure Sandbox NetworkPolicy

Use a Kubernetes network plugin that enforces NetworkPolicy. To enable the chart’s policy and disable its broad IPv4 and IPv6 internet rules, add these settings to your Helm values:
Keep cluster DNS, OpenHands app callbacks, and any runtime URLs your sandboxes use reachable. If sandboxes connect through a load balancer, allow its addresses and ports explicitly. See the chart’s sandbox network isolation guidance for examples for your cluster. Use sandboxNetworkPolicy.extraEgress to allow other required destinations, such as a Git host, model gateway, or package mirror. Use IP ranges or pod and namespace selectors. Review all policies that select sandbox pods. Kubernetes combines their allow rules. See Kubernetes NetworkPolicy.

Control Internet Access with a Firewall or Proxy

If a workflow needs access to approved public sites, route its traffic through an outbound firewall or an enforced forward proxy. Set the destination allowlist there and configure your network rules to permit the required traffic along that path. With a forward proxy, allow the proxy’s address and port, configure compatible clients to use it, and block direct internet access from the sandbox.

Provide Search Across Approved Sources

Give agents a search tool through an approved remote MCP service and allow sandboxes to reach it. Configure the service to keep the upstream provider’s API key and apply an administrator-managed list of domains to every query. For example, allow the documentation sites for your language and framework. See Organization MCP Servers to connect the tool. For the Exa Search API, set includeDomains. For the Tavily Search API, set include_domains and include_domains_mode: restrict. Start with results and snippets. If you add a tool that fetches full pages, enforce an approved destination list for fetches, including redirects. Use an internal search index when queries may contain private code or internal details. If your organization approves the built-in Tavily integration, OpenHands can route search through the app using TAVILY_API_KEY. Use a customer-managed search service when you need a fixed domain list across requests.

Choose Tools and Secrets with Agent Profiles

Use an Agent Profile to select the tools and saved conversation secrets a workflow needs. A documentation research profile can include the approved search tool and omit the terminal. A coding profile can include the terminal and the secrets needed to build and test. Profiles apply to conversations launched with them. Members can choose a different profile, so enforce egress restrictions through your network controls. Review Git authorization separately. The sandbox’s Git credential helper can authenticate independently of Agent Profile secret selection.