docs/current_docs/partials/cookbook/agents/_env-use-directories.mdx
The following Dagger Function creates an environment with a directory input and a directory output. The input is a directory containing various files, and the output is a different directory containing translations of the original files. The environment is given to an LLM with a prompt describing how it should complete its work.
<Tabs groupId="language" queryString="sdk"> <TabItem value="go" label="Go">Have the agent create the translations and export the directory of translated files to the host:
<Tabs groupId="shell"> <TabItem value="System shell"> ```shell dagger -c 'agent | export /tmp/out' ``` </TabItem> <TabItem value="Dagger Shell"> ```shell title="First type 'dagger' for interactive mode." agent | export /tmp/out ``` </TabItem> <TabItem value="Dagger CLI"> ```shell dagger call agent export --path=/tmp/out ``` </TabItem> </Tabs>