Creates an internal network for a specific agent container. The network is created with the `internal` flag, meaning it has no external route to the internet. The agent can only reach the proxy. # Returns The network name on success
(&self, task_id: &str)
| 736 | /// # Returns |
| 737 | /// The network name on success |
| 738 | pub(crate) async fn create_agent_network(&self, task_id: &str) -> Result<String> { |
| 739 | let network_name = Self::agent_network_name(task_id); |
| 740 | |
| 741 | self.docker_client |
| 742 | .create_internal_network(&network_name) |
| 743 | .await |
| 744 | .map_err(|e| anyhow::anyhow!("Failed to create agent network: {e}"))?; |
| 745 | |
| 746 | Ok(network_name) |
| 747 | } |
| 748 | |
| 749 | /// Connects the specified proxy container to an agent's isolated network. |
| 750 | /// |