|
|
|
|
|
by awayto
219 days ago
|
|
You can build your agent into a docker image then easily limit both networking and file system scope. docker run -it --rm \
-e SOME_API_KEY="$(SOME_API_KEY)" \
-v "$(shell pwd):/app" \ <-- restrict file system to whatever folder
--dns=127.0.0.1 \ <-- restrict network calls to localhost
$(shell dig +short llm.provider.com 2>/dev/null | awk '{printf " --add-host=llm-provider.com:%s", $$0}') \ <-- allow outside networking to whatever api your agent calls
my-agent-image
Probably could be a bit cleaner, but it worked for me. |
|
If you want your agent to pull untrusted code from the internet and go wild while you're doing other stuff it might not be a good choice.