Skip to content

Commit 905047f

Browse files
authored
preliminary instructions
1 parent c32fe8c commit 905047f

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,33 @@
1-
# agent-dev-env
1+
# Goal
22
The goal is to easily start your coding agent within a secure sandbox environment that closely resembles your actual development environment and safely merge the results back.
3+
4+
# Motivation
5+
6+
When running an AI coding agent, it is a great time sync to superwise it closely and approve each command it runs and each edit it performs. That makes you wait for the answer most of the time, trying to multi-task is usually more counterproductive than helping. It is far more productive to spend some time producing a plan, then let the AI agent research, implement, run tests unsuperwised so later you can come back to validate what it came up with.
7+
8+
But allowing a non-deterministic program that reads code and information from the internet and based on this running things locally is also highly insecure.
9+
10+
There are existing attempts to sandbox agent processes, the most serious I find being [sandbox-runtime](https://github.com/anthropic-experimental/sandbox-runtime) but as of the time of writing, it has 2 critical deficiencies for me:
11+
* user's home directory is only proteccted by a list of blacklisted paths which leaves a lot of room for missing to secure your informantion
12+
* network isolation doesn't allow the process inside to connect to databases, the HTTP proxy only allows http connections, and not having access to your development databases makes it impossible to allow the sandboxed agent to test it's ramblings proprly
13+
14+
# Usage
15+
16+
* add the script(s) to your PATH
17+
* `mkdir -p ~/aihome`
18+
* agent-dev bash
19+
* claude init
20+
* exit
21+
22+
Now you can just call the script from within a git working tree and feel the false sense of security you came here for.
23+
24+
# Implementation concerns
25+
26+
* it operates on a selected directory `~/aihome` as the agent's writable home directory
27+
* which is mounted read-write at the same path as the original user's home
28+
* the directory you are calling the script from is mounted read-write inside the sandbox at it's original path
29+
* the operating system important paths are mounted as read-only so you have access to all installed tools and libraries
30+
* also `asdf`, `npm` and other directories from user's real home are monuted read-only inside the sandbox home so that you have access to these installations without ability to install, remove and modify them
31+
* note: *this means you need to install all necessary libraries from the host*
32+
33+
TODO: what is possibly unsafe - e.g. gitignored files, careful when merging (if I implement this)

0 commit comments

Comments
 (0)