agsekit 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. agsekit-0.0.1/LICENSE +21 -0
  2. agsekit-0.0.1/MANIFEST.in +10 -0
  3. agsekit-0.0.1/PKG-INFO +279 -0
  4. agsekit-0.0.1/README.md +235 -0
  5. agsekit-0.0.1/agsekit.egg-info/PKG-INFO +279 -0
  6. agsekit-0.0.1/agsekit.egg-info/SOURCES.txt +185 -0
  7. agsekit-0.0.1/agsekit.egg-info/dependency_links.txt +1 -0
  8. agsekit-0.0.1/agsekit.egg-info/entry_points.txt +2 -0
  9. agsekit-0.0.1/agsekit.egg-info/requires.txt +20 -0
  10. agsekit-0.0.1/agsekit.egg-info/top_level.txt +1 -0
  11. agsekit-0.0.1/agsekit_cli/__init__.py +1 -0
  12. agsekit-0.0.1/agsekit_cli/agent_scripts/claude-code.sh +12 -0
  13. agsekit-0.0.1/agsekit_cli/agent_scripts/codex-glibc.sh +212 -0
  14. agsekit-0.0.1/agsekit_cli/agent_scripts/codex.sh +99 -0
  15. agsekit-0.0.1/agsekit_cli/agent_scripts/proxychains_common.sh +105 -0
  16. agsekit-0.0.1/agsekit_cli/agent_scripts/qwen.sh +99 -0
  17. agsekit-0.0.1/agsekit_cli/agents.py +370 -0
  18. agsekit-0.0.1/agsekit_cli/agents_modules/__init__.py +47 -0
  19. agsekit-0.0.1/agsekit_cli/agents_modules/aider.py +6 -0
  20. agsekit-0.0.1/agsekit_cli/agents_modules/base.py +72 -0
  21. agsekit-0.0.1/agsekit_cli/agents_modules/claude.py +6 -0
  22. agsekit-0.0.1/agsekit_cli/agents_modules/cline.py +7 -0
  23. agsekit-0.0.1/agsekit_cli/agents_modules/codex.py +7 -0
  24. agsekit-0.0.1/agsekit_cli/agents_modules/codex_glibc.py +6 -0
  25. agsekit-0.0.1/agsekit_cli/agents_modules/codex_glibc_prebuilt.py +6 -0
  26. agsekit-0.0.1/agsekit_cli/agents_modules/forgecode.py +13 -0
  27. agsekit-0.0.1/agsekit_cli/agents_modules/opencode.py +7 -0
  28. agsekit-0.0.1/agsekit_cli/agents_modules/qwen.py +7 -0
  29. agsekit-0.0.1/agsekit_cli/ansible/agents/aider.yml +70 -0
  30. agsekit-0.0.1/agsekit_cli/ansible/agents/claude.yml +120 -0
  31. agsekit-0.0.1/agsekit_cli/ansible/agents/cline.yml +120 -0
  32. agsekit-0.0.1/agsekit_cli/ansible/agents/codex-glibc-prebuilt.yml +141 -0
  33. agsekit-0.0.1/agsekit_cli/ansible/agents/codex-glibc.yml +261 -0
  34. agsekit-0.0.1/agsekit_cli/ansible/agents/codex.yml +125 -0
  35. agsekit-0.0.1/agsekit_cli/ansible/agents/codex_logrotate.yml +24 -0
  36. agsekit-0.0.1/agsekit_cli/ansible/agents/forgecode.yml +70 -0
  37. agsekit-0.0.1/agsekit_cli/ansible/agents/opencode.yml +125 -0
  38. agsekit-0.0.1/agsekit_cli/ansible/agents/proxychains.yml +46 -0
  39. agsekit-0.0.1/agsekit_cli/ansible/agents/qwen.yml +120 -0
  40. agsekit-0.0.1/agsekit_cli/ansible/bundles/docker.yml +88 -0
  41. agsekit-0.0.1/agsekit_cli/ansible/bundles/golang.yml +31 -0
  42. agsekit-0.0.1/agsekit_cli/ansible/bundles/nodejs.yml +62 -0
  43. agsekit-0.0.1/agsekit_cli/ansible/bundles/nvm.yml +40 -0
  44. agsekit-0.0.1/agsekit_cli/ansible/bundles/pyenv.yml +65 -0
  45. agsekit-0.0.1/agsekit_cli/ansible/bundles/python.yml +48 -0
  46. agsekit-0.0.1/agsekit_cli/ansible/bundles/rust.yml +49 -0
  47. agsekit-0.0.1/agsekit_cli/ansible/callback_plugins/agsekit_progress.py +188 -0
  48. agsekit-0.0.1/agsekit_cli/ansible/callback_plugins/agsekit_rich.py +112 -0
  49. agsekit-0.0.1/agsekit_cli/ansible/connection_plugins/agsekit_multipass.py +166 -0
  50. agsekit-0.0.1/agsekit_cli/ansible/vm_packages.yml +68 -0
  51. agsekit-0.0.1/agsekit_cli/ansible/vm_ssh.yml +94 -0
  52. agsekit-0.0.1/agsekit_cli/ansible_runners.py +64 -0
  53. agsekit-0.0.1/agsekit_cli/ansible_utils.py +303 -0
  54. agsekit-0.0.1/agsekit_cli/backup.py +665 -0
  55. agsekit-0.0.1/agsekit_cli/cli.py +224 -0
  56. agsekit-0.0.1/agsekit_cli/cli_entry.py +44 -0
  57. agsekit-0.0.1/agsekit_cli/commands/__init__.py +21 -0
  58. agsekit-0.0.1/agsekit_cli/commands/addmount.py +502 -0
  59. agsekit-0.0.1/agsekit_cli/commands/backup_clean.py +76 -0
  60. agsekit-0.0.1/agsekit_cli/commands/backup_once.py +31 -0
  61. agsekit-0.0.1/agsekit_cli/commands/backup_repeated.py +181 -0
  62. agsekit-0.0.1/agsekit_cli/commands/check_new_version.py +50 -0
  63. agsekit-0.0.1/agsekit_cli/commands/config_example.py +42 -0
  64. agsekit-0.0.1/agsekit_cli/commands/config_gen.py +518 -0
  65. agsekit-0.0.1/agsekit_cli/commands/create_vm.py +209 -0
  66. agsekit-0.0.1/agsekit_cli/commands/daemon.py +137 -0
  67. agsekit-0.0.1/agsekit_cli/commands/destroy_vm.py +119 -0
  68. agsekit-0.0.1/agsekit_cli/commands/doctor.py +542 -0
  69. agsekit-0.0.1/agsekit_cli/commands/down.py +131 -0
  70. agsekit-0.0.1/agsekit_cli/commands/install_agents.py +433 -0
  71. agsekit-0.0.1/agsekit_cli/commands/list_bundles.py +20 -0
  72. agsekit-0.0.1/agsekit_cli/commands/mounts.py +139 -0
  73. agsekit-0.0.1/agsekit_cli/commands/pip_upgrade.py +161 -0
  74. agsekit-0.0.1/agsekit_cli/commands/portforward.py +339 -0
  75. agsekit-0.0.1/agsekit_cli/commands/prepare.py +68 -0
  76. agsekit-0.0.1/agsekit_cli/commands/removemount.py +179 -0
  77. agsekit-0.0.1/agsekit_cli/commands/restart_vm.py +86 -0
  78. agsekit-0.0.1/agsekit_cli/commands/run.py +482 -0
  79. agsekit-0.0.1/agsekit_cli/commands/shell.py +77 -0
  80. agsekit-0.0.1/agsekit_cli/commands/ssh.py +147 -0
  81. agsekit-0.0.1/agsekit_cli/commands/start_vm.py +88 -0
  82. agsekit-0.0.1/agsekit_cli/commands/status.py +611 -0
  83. agsekit-0.0.1/agsekit_cli/commands/stop.py +151 -0
  84. agsekit-0.0.1/agsekit_cli/commands/systemd.py +139 -0
  85. agsekit-0.0.1/agsekit_cli/commands/up.py +109 -0
  86. agsekit-0.0.1/agsekit_cli/commands/version.py +20 -0
  87. agsekit-0.0.1/agsekit_cli/config.py +1024 -0
  88. agsekit-0.0.1/agsekit_cli/daemon_backends.py +371 -0
  89. agsekit-0.0.1/agsekit_cli/debug.py +81 -0
  90. agsekit-0.0.1/agsekit_cli/host_tools.py +182 -0
  91. agsekit-0.0.1/agsekit_cli/i18n.py +67 -0
  92. agsekit-0.0.1/agsekit_cli/interactive.py +644 -0
  93. agsekit-0.0.1/agsekit_cli/locales/en.json +862 -0
  94. agsekit-0.0.1/agsekit_cli/locales/ru.json +862 -0
  95. agsekit-0.0.1/agsekit_cli/mounts.py +232 -0
  96. agsekit-0.0.1/agsekit_cli/prebuilt.py +243 -0
  97. agsekit-0.0.1/agsekit_cli/prepare_strategies.py +455 -0
  98. agsekit-0.0.1/agsekit_cli/progress.py +232 -0
  99. agsekit-0.0.1/agsekit_cli/provision_handlers.py +378 -0
  100. agsekit-0.0.1/agsekit_cli/run_agent.sh +176 -0
  101. agsekit-0.0.1/agsekit_cli/run_with_http_proxy.sh +309 -0
  102. agsekit-0.0.1/agsekit_cli/run_with_proxychains.sh +46 -0
  103. agsekit-0.0.1/agsekit_cli/state.py +197 -0
  104. agsekit-0.0.1/agsekit_cli/systemd/agsekit-portforward.service +13 -0
  105. agsekit-0.0.1/agsekit_cli/systemd_backend.py +312 -0
  106. agsekit-0.0.1/agsekit_cli/tui_prompts.py +154 -0
  107. agsekit-0.0.1/agsekit_cli/versioning.py +133 -0
  108. agsekit-0.0.1/agsekit_cli/vm.py +737 -0
  109. agsekit-0.0.1/agsekit_cli/vm_bundle_definitions.py +58 -0
  110. agsekit-0.0.1/agsekit_cli/vm_bundles.py +92 -0
  111. agsekit-0.0.1/agsekit_cli/vm_installers/docker.sh +38 -0
  112. agsekit-0.0.1/agsekit_cli/vm_installers/golang.sh +13 -0
  113. agsekit-0.0.1/agsekit_cli/vm_installers/nodejs.sh +35 -0
  114. agsekit-0.0.1/agsekit_cli/vm_installers/nvm.sh +33 -0
  115. agsekit-0.0.1/agsekit_cli/vm_installers/pyenv.sh +55 -0
  116. agsekit-0.0.1/agsekit_cli/vm_installers/python.sh +29 -0
  117. agsekit-0.0.1/agsekit_cli/vm_installers/rust.sh +30 -0
  118. agsekit-0.0.1/agsekit_cli/vm_local_control_node.py +247 -0
  119. agsekit-0.0.1/agsekit_cli/vm_prepare.py +375 -0
  120. agsekit-0.0.1/agsekit_cli/vm_ssh_bootstrap.py +145 -0
  121. agsekit-0.0.1/config-example.yaml +63 -0
  122. agsekit-0.0.1/prebuilt-agents/codex-glibc/.dockerignore +1 -0
  123. agsekit-0.0.1/prebuilt-agents/codex-glibc/Dockerfile +33 -0
  124. agsekit-0.0.1/prebuilt-agents/codex-glibc/build-codex-glibc.sh +102 -0
  125. agsekit-0.0.1/prebuilt-agents/codex-glibc/build.sh +81 -0
  126. agsekit-0.0.1/pyproject.toml +53 -0
  127. agsekit-0.0.1/setup.cfg +4 -0
  128. agsekit-0.0.1/tests/test_addmount_command.py +369 -0
  129. agsekit-0.0.1/tests/test_agents.py +242 -0
  130. agsekit-0.0.1/tests/test_agents_modules.py +58 -0
  131. agsekit-0.0.1/tests/test_ansible_agent_proxychains.py +150 -0
  132. agsekit-0.0.1/tests/test_ansible_multipass_connection.py +108 -0
  133. agsekit-0.0.1/tests/test_ansible_utils.py +399 -0
  134. agsekit-0.0.1/tests/test_ansible_vm_bundles.py +51 -0
  135. agsekit-0.0.1/tests/test_backup_clean_command.py +100 -0
  136. agsekit-0.0.1/tests/test_backup_lock.py +180 -0
  137. agsekit-0.0.1/tests/test_backup_progress.py +157 -0
  138. agsekit-0.0.1/tests/test_backup_repeated.py +99 -0
  139. agsekit-0.0.1/tests/test_backup_repeated_commands.py +255 -0
  140. agsekit-0.0.1/tests/test_build_backfill_github_releases.py +105 -0
  141. agsekit-0.0.1/tests/test_build_check_pypi_version.py +80 -0
  142. agsekit-0.0.1/tests/test_build_extract_changelog.py +55 -0
  143. agsekit-0.0.1/tests/test_check_new_version_command.py +45 -0
  144. agsekit-0.0.1/tests/test_codex_logrotate_installers.py +47 -0
  145. agsekit-0.0.1/tests/test_config_agents.py +279 -0
  146. agsekit-0.0.1/tests/test_config_gen_command.py +621 -0
  147. agsekit-0.0.1/tests/test_config_main.py +85 -0
  148. agsekit-0.0.1/tests/test_config_mounts.py +152 -0
  149. agsekit-0.0.1/tests/test_config_vms.py +282 -0
  150. agsekit-0.0.1/tests/test_create_vm_command.py +199 -0
  151. agsekit-0.0.1/tests/test_daemon_command.py +77 -0
  152. agsekit-0.0.1/tests/test_debug.py +41 -0
  153. agsekit-0.0.1/tests/test_doctor_command.py +454 -0
  154. agsekit-0.0.1/tests/test_down_command.py +120 -0
  155. agsekit-0.0.1/tests/test_host_tools.py +74 -0
  156. agsekit-0.0.1/tests/test_i18n.py +43 -0
  157. agsekit-0.0.1/tests/test_install_agents_command.py +739 -0
  158. agsekit-0.0.1/tests/test_install_script.py +14 -0
  159. agsekit-0.0.1/tests/test_interactive_mode.py +329 -0
  160. agsekit-0.0.1/tests/test_launchd_backend.py +66 -0
  161. agsekit-0.0.1/tests/test_make_single_backup.py +400 -0
  162. agsekit-0.0.1/tests/test_mount_commands.py +312 -0
  163. agsekit-0.0.1/tests/test_mounts.py +81 -0
  164. agsekit-0.0.1/tests/test_node_agent_installers.py +56 -0
  165. agsekit-0.0.1/tests/test_pip_upgrade_command.py +121 -0
  166. agsekit-0.0.1/tests/test_portforward.py +261 -0
  167. agsekit-0.0.1/tests/test_portforward_command.py +31 -0
  168. agsekit-0.0.1/tests/test_prebuilt.py +99 -0
  169. agsekit-0.0.1/tests/test_prepare_command.py +696 -0
  170. agsekit-0.0.1/tests/test_progress.py +60 -0
  171. agsekit-0.0.1/tests/test_provision_handlers.py +56 -0
  172. agsekit-0.0.1/tests/test_removemount_command.py +154 -0
  173. agsekit-0.0.1/tests/test_restart_vm_command.py +113 -0
  174. agsekit-0.0.1/tests/test_run_command.py +2117 -0
  175. agsekit-0.0.1/tests/test_shell_command.py +133 -0
  176. agsekit-0.0.1/tests/test_ssh_command.py +36 -0
  177. agsekit-0.0.1/tests/test_start_vm_command.py +139 -0
  178. agsekit-0.0.1/tests/test_state.py +102 -0
  179. agsekit-0.0.1/tests/test_status_command.py +428 -0
  180. agsekit-0.0.1/tests/test_stop_vm_command.py +269 -0
  181. agsekit-0.0.1/tests/test_systemd_command.py +170 -0
  182. agsekit-0.0.1/tests/test_up_command.py +300 -0
  183. agsekit-0.0.1/tests/test_version_command.py +27 -0
  184. agsekit-0.0.1/tests/test_vm_compare.py +121 -0
  185. agsekit-0.0.1/tests/test_vm_launch.py +199 -0
  186. agsekit-0.0.1/tests/test_vm_local_control_node.py +45 -0
  187. agsekit-0.0.1/tests/test_vm_proxychains.py +31 -0
agsekit-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Mihanentalpo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,10 @@
1
+ include config-example.yaml
2
+ recursive-include agsekit_cli/agent_scripts *.sh
3
+ recursive-include agsekit_cli/vm_installers *.sh
4
+ include agsekit_cli/run_with_http_proxy.sh
5
+ include agsekit_cli/run_with_proxychains.sh
6
+ include agsekit_cli/run_agent.sh
7
+ recursive-include agsekit_cli/locales *.json
8
+ include prebuilt-agents/codex-glibc/.dockerignore
9
+ recursive-include prebuilt-agents *.sh Dockerfile
10
+ prune prebuilt-agents/codex-glibc/builds
agsekit-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,279 @@
1
+ Metadata-Version: 2.4
2
+ Name: agsekit
3
+ Version: 0.0.1
4
+ Summary: Agent Safety Kit command-line utilities
5
+ Author-email: Mihanentalpo <mihanentalpo@yandex.ru>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Mihanentalpo
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Requires-Python: >=3.9
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Requires-Dist: ansible-core<2.19,>=2.16; python_version >= "3.10"
32
+ Requires-Dist: ansible-core<2.16,>=2.15; python_version < "3.10"
33
+ Requires-Dist: click<9,>=8.1
34
+ Requires-Dist: pexpect<5,>=4.9; os_name != "nt"
35
+ Requires-Dist: pydantic<3,>=2.7
36
+ Requires-Dist: portalocker<3,>=2.8
37
+ Requires-Dist: psutil<8,>=5.9
38
+ Requires-Dist: PyYAML<7,>=6.0
39
+ Requires-Dist: questionary<3,>=2.0
40
+ Requires-Dist: rich<14,>=13.7
41
+ Requires-Dist: ruamel.yaml<0.19,>=0.18
42
+ Requires-Dist: tomli>=2.0.1; python_version < "3.11"
43
+ Dynamic: license-file
44
+
45
+ # Agent Safety Kit
46
+
47
+ Want to run Claude Code, Codex, and other AI agents for development, but do not want them to delete your project, break your system, or hand your secrets to third parties?
48
+
49
+ This project gives you a convenient toolkit for running AI agents in a virtual machine almost the same way as "normally".
50
+
51
+ [README на русском](README-ru.md) | [Documentation index](docs/README.md) | [Русская документация](docs-ru/README.md) | [Project philosophy](docs/philosophy.md)
52
+
53
+ ## Why?
54
+
55
+ ![Agent mistake](docs/assets/agent-mistake.png)
56
+
57
+ The way autonomous AI agents work feels like magic. But then an agent goes "whoosh" and, as if by magic, the project disappears, the local environment is damaged, the database is wiped, private keys are compromised, and in general everything the agent can reach is at risk.
58
+
59
+ On the websites of both giant corporations and small teams building their own AI agents, installation often looks like `curl | bash`, `npm i -g ...`, and then `<agent_name>`.
60
+
61
+ In practice, this is a two-command way to allow arbitrary code execution on your working machine, while trusting security to people who, if something happens, will not be responsible for the consequences.
62
+
63
+ A few stories for illustration:
64
+
65
+ - [Research: AI agents can swallow a prompt injection and start carrying out someone else's will on your PC](https://arxiv.org/abs/2507.20526)
66
+ - [Claude Code bypasses its own protections and escapes the sandbox](https://ona.com/stories/how-claude-code-escapes-its-own-denylist-and-sandbox)
67
+ - [Qwen Coder breaks working builds](https://github.com/QwenLM/qwen-code/issues/354)
68
+ - [Codex keeps deleting files that are not added to git and are unrelated to the task](https://github.com/openai/codex/issues/4969)
69
+ - [Google Antigravity just deleted the contents of my whole drive](https://www.reddit.com/r/google_antigravity/comments/1p82or6/google_antigravity_just_deleted_the_contents_of/)
70
+ - [Claude Code deleted my entire working environment](https://www.reddit.com/r/ClaudeAI/comments/1m299f5/claude_code_deleted_my_entire_workspace_heres_the/)
71
+ - [I asked Claude Code to fix all bugs, and it just deleted my project](https://levelup.gitconnected.com/i-asked-claude-code-to-fix-all-bugs-and-it-deleted-the-whole-repo-e7f24f5390c5)
72
+ - [Claude Code deleted 25,000 documents from a third-party project while I was distracted](https://www.reddit.com/r/ClaudeAI/comments/1rshuz9/an_ai_agent_deleted_25000_documents_from_the/)
73
+
74
+ Other stories can be found in unlimited quantities on Google with the query: [coding agent deleted|removed|compromised|destroyed](https://www.google.com/search?q=coding+agent+deleted%7Cremoved%7Ccompromised%7Cdestroyed)
75
+
76
+ Everywhere people write: "just make backups", "just use git".
77
+
78
+ But that is not enough:
79
+
80
+ - agents destroy unstaged changes, and git will not help here;
81
+ - agents leave the project folder and their own sandbox and can damage files in your OS;
82
+ - agents can read outside the project folder and potentially read and send your private SSH keys or other secrets to an attacker after eating a prompt injection somewhere on a documentation page, in an issue tracker, or in an infected project;
83
+ - agents can use vulnerabilities in the kernel or local environment if you give them too many rights, tools, and trust;
84
+ - even with the best intentions, an agent can hallucinate nonexistent information, delete a "broken" project instead of fixing it, bring down a DB and wipe its backups, simply because it confidently chose the wrong action.
85
+
86
+ Modern coding agents already show a very high level on tasks related to finding and exploiting vulnerabilities. If you give such an agent broad access, the blast radius can easily go far beyond one repository.
87
+
88
+ Another idea is to run agents in docker/podman/lxc. It is quite reasonable, but it also has downsides:
89
+
90
+ - a container is different from a full PC that agents are designed for, which creates a number of limits. The simplest one is that safely running nested Docker inside Docker is difficult, and this matters in modern development.
91
+ - a container provides much weaker isolation from a malicious agent that has eaten prompt injections somewhere. Escaping a container via kernel vulnerabilities is easier than escaping a VM.
92
+
93
+ ## Quick Start
94
+
95
+ Working with an agent through agsekit is not much harder than working with a "bare" agent.
96
+
97
+ Of course, you need to do the initial setup, but it is much simpler than doing everything manually: installing a VM, connecting to it, installing software, and so on.
98
+
99
+ ### 1. Installation
100
+
101
+ You need **Python 3.9+.** The install scripts can offer to install it automatically if it is missing.
102
+
103
+ * Deb/Arch Linux and macOS with Homebrew are fully supported.
104
+ * Native Windows PowerShell is also supported
105
+ * WSL is not supported.
106
+
107
+ If you are lazy and fearless on Linux or macOS:
108
+
109
+ ```shell
110
+ curl -fsSL https://agsekit.org/install.sh | sh
111
+ ```
112
+
113
+ On Windows, run in PowerShell:
114
+
115
+ ```powershell
116
+ irm https://agsekit.org/install.ps1 | iex
117
+ ```
118
+
119
+ If you want to do everything yourself, or the "lazy" way did not work:
120
+
121
+ [Detailed installation guide](./docs/install.md)
122
+
123
+ ### 2. Create a Configuration
124
+
125
+ Through the interactive setup wizard:
126
+
127
+ ```shell
128
+ agsekit config-gen
129
+ ```
130
+
131
+ The wizard starts with the first VM, then offers agents, mounts, and optional global overrides.
132
+
133
+ If you want, you can copy the config template and edit it manually:
134
+
135
+ ```shell
136
+ agsekit config-example
137
+ nano ~/.config/agsekit/config.yaml
138
+ ```
139
+
140
+ [Detailed configuration guide](./docs/configuration.md)
141
+
142
+ ### 3. Initial Setup
143
+
144
+ ```shell
145
+ agsekit up
146
+ ```
147
+
148
+ This command installs Multipass, creates a virtual machine, installs agents, and installs software packages.
149
+
150
+ It may take some time.
151
+
152
+ ### 4. Add a Project Folder
153
+
154
+ ```shell
155
+ agsekit addmount ~/project/my-project
156
+ ```
157
+
158
+ An interactive mode will start and ask a number of questions. You can answer them by simply pressing ENTER.
159
+
160
+ ### 5. Run the Agent in the Project Folder
161
+
162
+ Assume you configured an agent named claude:
163
+
164
+ ```shell
165
+ cd ~/project/my-project
166
+ agsekit run claude
167
+ ```
168
+
169
+ That is it, you can use it.
170
+
171
+ More details: [Getting started](docs/getting-started.md)
172
+
173
+ ## How It Works
174
+
175
+ * agsekit is a CLI tool for simplifying work with agents in virtual machines
176
+ * the simple and convenient Multipass is used as the virtual machine engine
177
+ * the agent runs inside a Multipass VM (with Ubuntu installed in it)
178
+ * to work with the project, its folder is mounted into the VM
179
+ * so the agent cannot cause damage by wiping the mounted project folder, cyclic backup of the project folder on the main machine runs at the same time as the agent
180
+ * if the agent needs internet access through an http-proxy or socks-proxy, there is support for http-proxy through proxify and running through proxychains4
181
+ * ports can be conveniently forwarded into and out of the VM (based on SSH tunnels)
182
+ * you can have several VMs for different purposes, for example one for personal projects and another for work under NDA
183
+ * there is a set of basic supported agents, and also different software bundles installed into the VM with one command
184
+
185
+ **The basic workflow is this:**
186
+
187
+ - The host machine stores the real source code and launches an Ubuntu VM through Multipass.
188
+ - The project folder is mounted from the host into the selected VM.
189
+ - The agent binary runs inside the VM, not on the host.
190
+ - `agsekit` runs repeated incremental backups of the mounted folder while the agent session is running.
191
+ - For restricted networks, `proxychains`, `http_proxy`, and `portforward` are available.
192
+
193
+ Details: [docs/architecture.md](docs/architecture.md)
194
+
195
+ ## Features
196
+
197
+ - Run agents inside a Multipass VM, not directly on the host.
198
+ - Declarative YAML for VMs, mounts, network settings, and agent defaults.
199
+ - Automatic incremental backups with hardlink snapshots.
200
+ - Several virtual machines with binding of specific agents to specific VMs, for example to separate NDA projects, work, and hobbies across different environments and models.
201
+ - Installation of supported agent CLIs into target VMs through `install-agents`.
202
+ - `proxychains` support for installation and runtime.
203
+ - VM-level and agent-level `http_proxy` support.
204
+ - Persistent SSH port forwarding through `agsekit portforward`.
205
+ - Both interactive and non-interactive CLI scenarios.
206
+ - Automatic preparation of Linux and macOS hosts.
207
+
208
+ ## Documentation
209
+
210
+ - [Table of contents](docs/README.md)
211
+ - [Getting started](docs/getting-started.md)
212
+ - [Configuration](docs/configuration.md)
213
+ - [Command reference](docs/commands/README.md)
214
+ - [Supported agents](docs/agents.md)
215
+ - [Architecture](docs/architecture.md)
216
+ - [Networking and proxies](docs/networking.md)
217
+ - [Backups](docs/backups.md)
218
+ - [Troubleshooting](docs/troubleshooting.md)
219
+ - [Practical how-to](docs/how-to.md)
220
+ - [Known issues and limitations](docs/known-issues.md)
221
+
222
+ ## Supported Agents
223
+
224
+ - [aider](https://aider.chat/)
225
+ - [Qwen Code](https://qwenlm.github.io/qwen-code-docs/en/)
226
+ - [ForgeCode](https://forgecode.dev/)
227
+ - [Codex](https://openai.com/codex/)
228
+ - [OpenCode](https://opencode.ai/)
229
+ - [Claude Code](https://docs.claude.com/en/docs/claude-code/overview)
230
+ - [Cline](https://cline.bot/)
231
+ - `codex-glibc` - a [Codex](https://openai.com/codex/) variant built inside the VM
232
+ - `codex-glibc-prebuilt` - a [Codex](https://openai.com/codex/) variant installed from a ready prebuilt release
233
+
234
+ Details: [docs/agents.md](docs/agents.md)
235
+
236
+ ## Security Model and Limitations
237
+
238
+ What the tool does:
239
+
240
+ - isolates agent execution inside a VM;
241
+ - keeps the host project in mounted storage;
242
+ - creates rollback-friendly backups around agent runs.
243
+
244
+ More details: [docs/philosophy.md](docs/philosophy.md)
245
+
246
+ ## Platform Support
247
+
248
+ - Linux host: supported, but WSL is not supported
249
+ - macOS host: supported
250
+ - Windows host: supported
251
+
252
+ ## FAQ
253
+
254
+ ### Who is this for?
255
+
256
+ For developers who want to use coding agents but do not want to break their system.
257
+
258
+ ### Do I need to use git with agsekit?
259
+
260
+ Yes. `agsekit` complements git, it does not replace it.
261
+
262
+ ### Why Multipass, not Docker?
263
+
264
+ 1. Security: a VM gives much better isolation of the agent from your system
265
+ 2. Environment reality: in a VM the agent can install any software, run Docker containers, and do almost everything that can be done on a real machine. In Docker this is impossible or much more complicated
266
+
267
+ ## Contributing and License
268
+
269
+ - If you want to contribute:
270
+ - Fork repo
271
+ - `git clone ...`
272
+ - `pip install -e .`
273
+ - `git checkout -b new-shiny-feature`
274
+ - `vim ...`
275
+ - `git add . && git commit -m "Implemented new feature" && git push`
276
+ - create pull request
277
+ - If there are problems, write Issues
278
+
279
+ - License: [MIT](LICENSE)
@@ -0,0 +1,235 @@
1
+ # Agent Safety Kit
2
+
3
+ Want to run Claude Code, Codex, and other AI agents for development, but do not want them to delete your project, break your system, or hand your secrets to third parties?
4
+
5
+ This project gives you a convenient toolkit for running AI agents in a virtual machine almost the same way as "normally".
6
+
7
+ [README на русском](README-ru.md) | [Documentation index](docs/README.md) | [Русская документация](docs-ru/README.md) | [Project philosophy](docs/philosophy.md)
8
+
9
+ ## Why?
10
+
11
+ ![Agent mistake](docs/assets/agent-mistake.png)
12
+
13
+ The way autonomous AI agents work feels like magic. But then an agent goes "whoosh" and, as if by magic, the project disappears, the local environment is damaged, the database is wiped, private keys are compromised, and in general everything the agent can reach is at risk.
14
+
15
+ On the websites of both giant corporations and small teams building their own AI agents, installation often looks like `curl | bash`, `npm i -g ...`, and then `<agent_name>`.
16
+
17
+ In practice, this is a two-command way to allow arbitrary code execution on your working machine, while trusting security to people who, if something happens, will not be responsible for the consequences.
18
+
19
+ A few stories for illustration:
20
+
21
+ - [Research: AI agents can swallow a prompt injection and start carrying out someone else's will on your PC](https://arxiv.org/abs/2507.20526)
22
+ - [Claude Code bypasses its own protections and escapes the sandbox](https://ona.com/stories/how-claude-code-escapes-its-own-denylist-and-sandbox)
23
+ - [Qwen Coder breaks working builds](https://github.com/QwenLM/qwen-code/issues/354)
24
+ - [Codex keeps deleting files that are not added to git and are unrelated to the task](https://github.com/openai/codex/issues/4969)
25
+ - [Google Antigravity just deleted the contents of my whole drive](https://www.reddit.com/r/google_antigravity/comments/1p82or6/google_antigravity_just_deleted_the_contents_of/)
26
+ - [Claude Code deleted my entire working environment](https://www.reddit.com/r/ClaudeAI/comments/1m299f5/claude_code_deleted_my_entire_workspace_heres_the/)
27
+ - [I asked Claude Code to fix all bugs, and it just deleted my project](https://levelup.gitconnected.com/i-asked-claude-code-to-fix-all-bugs-and-it-deleted-the-whole-repo-e7f24f5390c5)
28
+ - [Claude Code deleted 25,000 documents from a third-party project while I was distracted](https://www.reddit.com/r/ClaudeAI/comments/1rshuz9/an_ai_agent_deleted_25000_documents_from_the/)
29
+
30
+ Other stories can be found in unlimited quantities on Google with the query: [coding agent deleted|removed|compromised|destroyed](https://www.google.com/search?q=coding+agent+deleted%7Cremoved%7Ccompromised%7Cdestroyed)
31
+
32
+ Everywhere people write: "just make backups", "just use git".
33
+
34
+ But that is not enough:
35
+
36
+ - agents destroy unstaged changes, and git will not help here;
37
+ - agents leave the project folder and their own sandbox and can damage files in your OS;
38
+ - agents can read outside the project folder and potentially read and send your private SSH keys or other secrets to an attacker after eating a prompt injection somewhere on a documentation page, in an issue tracker, or in an infected project;
39
+ - agents can use vulnerabilities in the kernel or local environment if you give them too many rights, tools, and trust;
40
+ - even with the best intentions, an agent can hallucinate nonexistent information, delete a "broken" project instead of fixing it, bring down a DB and wipe its backups, simply because it confidently chose the wrong action.
41
+
42
+ Modern coding agents already show a very high level on tasks related to finding and exploiting vulnerabilities. If you give such an agent broad access, the blast radius can easily go far beyond one repository.
43
+
44
+ Another idea is to run agents in docker/podman/lxc. It is quite reasonable, but it also has downsides:
45
+
46
+ - a container is different from a full PC that agents are designed for, which creates a number of limits. The simplest one is that safely running nested Docker inside Docker is difficult, and this matters in modern development.
47
+ - a container provides much weaker isolation from a malicious agent that has eaten prompt injections somewhere. Escaping a container via kernel vulnerabilities is easier than escaping a VM.
48
+
49
+ ## Quick Start
50
+
51
+ Working with an agent through agsekit is not much harder than working with a "bare" agent.
52
+
53
+ Of course, you need to do the initial setup, but it is much simpler than doing everything manually: installing a VM, connecting to it, installing software, and so on.
54
+
55
+ ### 1. Installation
56
+
57
+ You need **Python 3.9+.** The install scripts can offer to install it automatically if it is missing.
58
+
59
+ * Deb/Arch Linux and macOS with Homebrew are fully supported.
60
+ * Native Windows PowerShell is also supported
61
+ * WSL is not supported.
62
+
63
+ If you are lazy and fearless on Linux or macOS:
64
+
65
+ ```shell
66
+ curl -fsSL https://agsekit.org/install.sh | sh
67
+ ```
68
+
69
+ On Windows, run in PowerShell:
70
+
71
+ ```powershell
72
+ irm https://agsekit.org/install.ps1 | iex
73
+ ```
74
+
75
+ If you want to do everything yourself, or the "lazy" way did not work:
76
+
77
+ [Detailed installation guide](./docs/install.md)
78
+
79
+ ### 2. Create a Configuration
80
+
81
+ Through the interactive setup wizard:
82
+
83
+ ```shell
84
+ agsekit config-gen
85
+ ```
86
+
87
+ The wizard starts with the first VM, then offers agents, mounts, and optional global overrides.
88
+
89
+ If you want, you can copy the config template and edit it manually:
90
+
91
+ ```shell
92
+ agsekit config-example
93
+ nano ~/.config/agsekit/config.yaml
94
+ ```
95
+
96
+ [Detailed configuration guide](./docs/configuration.md)
97
+
98
+ ### 3. Initial Setup
99
+
100
+ ```shell
101
+ agsekit up
102
+ ```
103
+
104
+ This command installs Multipass, creates a virtual machine, installs agents, and installs software packages.
105
+
106
+ It may take some time.
107
+
108
+ ### 4. Add a Project Folder
109
+
110
+ ```shell
111
+ agsekit addmount ~/project/my-project
112
+ ```
113
+
114
+ An interactive mode will start and ask a number of questions. You can answer them by simply pressing ENTER.
115
+
116
+ ### 5. Run the Agent in the Project Folder
117
+
118
+ Assume you configured an agent named claude:
119
+
120
+ ```shell
121
+ cd ~/project/my-project
122
+ agsekit run claude
123
+ ```
124
+
125
+ That is it, you can use it.
126
+
127
+ More details: [Getting started](docs/getting-started.md)
128
+
129
+ ## How It Works
130
+
131
+ * agsekit is a CLI tool for simplifying work with agents in virtual machines
132
+ * the simple and convenient Multipass is used as the virtual machine engine
133
+ * the agent runs inside a Multipass VM (with Ubuntu installed in it)
134
+ * to work with the project, its folder is mounted into the VM
135
+ * so the agent cannot cause damage by wiping the mounted project folder, cyclic backup of the project folder on the main machine runs at the same time as the agent
136
+ * if the agent needs internet access through an http-proxy or socks-proxy, there is support for http-proxy through proxify and running through proxychains4
137
+ * ports can be conveniently forwarded into and out of the VM (based on SSH tunnels)
138
+ * you can have several VMs for different purposes, for example one for personal projects and another for work under NDA
139
+ * there is a set of basic supported agents, and also different software bundles installed into the VM with one command
140
+
141
+ **The basic workflow is this:**
142
+
143
+ - The host machine stores the real source code and launches an Ubuntu VM through Multipass.
144
+ - The project folder is mounted from the host into the selected VM.
145
+ - The agent binary runs inside the VM, not on the host.
146
+ - `agsekit` runs repeated incremental backups of the mounted folder while the agent session is running.
147
+ - For restricted networks, `proxychains`, `http_proxy`, and `portforward` are available.
148
+
149
+ Details: [docs/architecture.md](docs/architecture.md)
150
+
151
+ ## Features
152
+
153
+ - Run agents inside a Multipass VM, not directly on the host.
154
+ - Declarative YAML for VMs, mounts, network settings, and agent defaults.
155
+ - Automatic incremental backups with hardlink snapshots.
156
+ - Several virtual machines with binding of specific agents to specific VMs, for example to separate NDA projects, work, and hobbies across different environments and models.
157
+ - Installation of supported agent CLIs into target VMs through `install-agents`.
158
+ - `proxychains` support for installation and runtime.
159
+ - VM-level and agent-level `http_proxy` support.
160
+ - Persistent SSH port forwarding through `agsekit portforward`.
161
+ - Both interactive and non-interactive CLI scenarios.
162
+ - Automatic preparation of Linux and macOS hosts.
163
+
164
+ ## Documentation
165
+
166
+ - [Table of contents](docs/README.md)
167
+ - [Getting started](docs/getting-started.md)
168
+ - [Configuration](docs/configuration.md)
169
+ - [Command reference](docs/commands/README.md)
170
+ - [Supported agents](docs/agents.md)
171
+ - [Architecture](docs/architecture.md)
172
+ - [Networking and proxies](docs/networking.md)
173
+ - [Backups](docs/backups.md)
174
+ - [Troubleshooting](docs/troubleshooting.md)
175
+ - [Practical how-to](docs/how-to.md)
176
+ - [Known issues and limitations](docs/known-issues.md)
177
+
178
+ ## Supported Agents
179
+
180
+ - [aider](https://aider.chat/)
181
+ - [Qwen Code](https://qwenlm.github.io/qwen-code-docs/en/)
182
+ - [ForgeCode](https://forgecode.dev/)
183
+ - [Codex](https://openai.com/codex/)
184
+ - [OpenCode](https://opencode.ai/)
185
+ - [Claude Code](https://docs.claude.com/en/docs/claude-code/overview)
186
+ - [Cline](https://cline.bot/)
187
+ - `codex-glibc` - a [Codex](https://openai.com/codex/) variant built inside the VM
188
+ - `codex-glibc-prebuilt` - a [Codex](https://openai.com/codex/) variant installed from a ready prebuilt release
189
+
190
+ Details: [docs/agents.md](docs/agents.md)
191
+
192
+ ## Security Model and Limitations
193
+
194
+ What the tool does:
195
+
196
+ - isolates agent execution inside a VM;
197
+ - keeps the host project in mounted storage;
198
+ - creates rollback-friendly backups around agent runs.
199
+
200
+ More details: [docs/philosophy.md](docs/philosophy.md)
201
+
202
+ ## Platform Support
203
+
204
+ - Linux host: supported, but WSL is not supported
205
+ - macOS host: supported
206
+ - Windows host: supported
207
+
208
+ ## FAQ
209
+
210
+ ### Who is this for?
211
+
212
+ For developers who want to use coding agents but do not want to break their system.
213
+
214
+ ### Do I need to use git with agsekit?
215
+
216
+ Yes. `agsekit` complements git, it does not replace it.
217
+
218
+ ### Why Multipass, not Docker?
219
+
220
+ 1. Security: a VM gives much better isolation of the agent from your system
221
+ 2. Environment reality: in a VM the agent can install any software, run Docker containers, and do almost everything that can be done on a real machine. In Docker this is impossible or much more complicated
222
+
223
+ ## Contributing and License
224
+
225
+ - If you want to contribute:
226
+ - Fork repo
227
+ - `git clone ...`
228
+ - `pip install -e .`
229
+ - `git checkout -b new-shiny-feature`
230
+ - `vim ...`
231
+ - `git add . && git commit -m "Implemented new feature" && git push`
232
+ - create pull request
233
+ - If there are problems, write Issues
234
+
235
+ - License: [MIT](LICENSE)