Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to allow access outside of working directory #1862

Closed
1 task done
Josh-XT opened this issue Apr 16, 2023 · 3 comments · Fixed by #1875
Closed
1 task done

Add option to allow access outside of working directory #1862

Josh-XT opened this issue Apr 16, 2023 · 3 comments · Fixed by #1875

Comments

@Josh-XT
Copy link
Contributor

Josh-XT commented Apr 16, 2023

Duplicates

  • I have searched the existing issues

Summary 💡

Yeah, I know, probably not always ideal, but having this thing limited to a working directory that it can't seem to access half the time is not ideal. It would be good to have an option to bypass this safety with an environment variable that can allow people to give it the option to read and write files anywhere it wants.

I personally run Auto-GPT in an Ubuntu VM that I set up for the sole purpose of letting it break itself if it needs to. It isn't ideal for everyone to have this on, but it would be helpful to have as an option.

Examples 🌈

Executing command 'ls ~/Agent' in working directory '/home/josh/Auto-GPT/autogpt/auto_gpt_workspace'
SYSTEM:  Command execute_shell returned: STDOUT: b'' STDERR: b"ls: cannot access '/home/josh/Agent': No such file or directory\n"

Motivation 🔦

Easier to allow it to work with existing files than making duplicates in its workspace.

@Josh-XT
Copy link
Contributor Author

Josh-XT commented Apr 16, 2023

It made it unusable for my use case, so I put in pull request #1875 to remove the working directory restrictions. I still suggest making them into environment variables for people who care about restricting it to a working directory.

@Josh-XT
Copy link
Contributor Author

Josh-XT commented Apr 16, 2023

Ended up adding the environment variable to my PR to make it easier to get it pushed through.

@Pwuts
Copy link
Member

Pwuts commented Apr 16, 2023

The issue in your example is with determining the path of the auto_gpt_workspace, not with accessing files outside the workspace. Of course it wouldn't be able to directly access ~/Agent, because it is outside of the workspace, but the ls command should succeed once the aforementioned issue in execute_shell is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants