MCPcopy Create free account
hub / github.com/HKUDS/AutoAgent / create_environment

Function create_environment

autoagent/cli.py:143–155  ·  view source on GitHub ↗

1. create the code environment 2. create the web environment 3. create the file environment

(docker_config: DockerConfig)

Source from the content-addressed store, hash-verified

141 )
142 return docker_config
143def create_environment(docker_config: DockerConfig):
144 """
145 1. create the code environment
146 2. create the web environment
147 3. create the file environment
148 """
149 code_env = DockerEnv(docker_config)
150 code_env.init_container()
151
152 web_env = BrowserEnv(browsergym_eval_env = None, local_root=docker_config.local_root, workplace_name=docker_config.workplace_name)
153 file_env = RequestsMarkdownBrowser(viewport_size=1024 * 5, local_root=docker_config.local_root, workplace_name=docker_config.workplace_name, downloads_folder=os.path.join(docker_config.local_root, docker_config.workplace_name, "downloads"))
154
155 return code_env, web_env, file_env
156
157def create_environment_local(docker_config: DockerConfig):
158 """

Callers 2

mainFunction · 0.70
deep_researchFunction · 0.70

Calls 4

init_containerMethod · 0.95
DockerEnvClass · 0.90
BrowserEnvClass · 0.90

Tested by

no test coverage detected