nemo_gym.agents.utils.sandbox_network
nemo_gym.agents.utils.sandbox_network
Egress policy for a sandbox that an agent creates for its own session.
Module Contents
Functions
Data
API
Return spec with egress limited to the model server and, for model_and_tools, the tool servers.
inherit leaves the provider’s default network. Each allowed host is opened on every port and path, so
co-hosted services stay reachable. The policy is fixed when the sandbox is created: it applies only to a
sandbox the agent creates, never to a task sandbox borrowed from Resources.
tool_urls are the MCP grants the harness keeps; required_tool_urls are those of them the episode requires.
model_only blocks every tool host, so a required grant would fail only after the sandbox and the runtime
exist; it is refused here instead.
A configuration that cannot be enforced (an explicit provider policy as well, a provider without network
policies, an endpoint the sandbox cannot reach, or a required tool grant under model_only) raises
AgentSeedRejectedError, so the seed fails once with HTTP 422 instead of being retried; it is still a
ValueError.