quicksand-agent 0.4.2__py3-none-any.whl

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.
@@ -0,0 +1,46 @@
1
+ """quicksand-agent: pre-built overlay on quicksand-ubuntu."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from pathlib import Path
6
+
7
+ from .sandbox import AgentSandbox
8
+
9
+ __version__ = "0.2.5"
10
+
11
+ PACKAGE_DIR = Path(__file__).parent
12
+ IMAGES_DIR = PACKAGE_DIR / "images"
13
+
14
+
15
+ class _AgentSandboxImageProvider:
16
+ """ImageProvider for the bundled agent sandbox overlay."""
17
+
18
+ name = "quicksand-agent"
19
+ type = "overlay"
20
+ images_dir = IMAGES_DIR
21
+
22
+ def resolve(self, arch: str | None = None):
23
+ from quicksand_core.qemu.image_resolver import ImageResolver
24
+
25
+ if not (IMAGES_DIR / "manifest.json").exists():
26
+ from quicksand_core._auto_install import auto_install_images
27
+
28
+ if not auto_install_images("quicksand-agent", IMAGES_DIR):
29
+ raise FileNotFoundError(
30
+ "No bundled save found. If you installed from PyPI, download images with:\n"
31
+ " quicksand install quicksand-agent"
32
+ )
33
+ return ImageResolver()._resolve_save(IMAGES_DIR)
34
+
35
+
36
+ # Module-level instance — registered as quicksand.images entry point
37
+ image = _AgentSandboxImageProvider()
38
+
39
+
40
+ __all__ = [
41
+ "IMAGES_DIR",
42
+ "PACKAGE_DIR",
43
+ "AgentSandbox",
44
+ "__version__",
45
+ "image",
46
+ ]
@@ -0,0 +1,38 @@
1
+ """Pre-configured Sandbox using the bundled agent sandbox overlay."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from collections.abc import Callable
6
+ from pathlib import Path
7
+ from typing import Unpack
8
+
9
+ from quicksand_core import Sandbox
10
+ from quicksand_core._types import SandboxConfigParams
11
+
12
+
13
+ class AgentSandbox(Sandbox):
14
+ """Pre-configured Sandbox that boots from the bundled agent sandbox overlay.
15
+
16
+ Requires quicksand-ubuntu to be installed (the overlay is built on top of it).
17
+
18
+ Usage::
19
+
20
+ async with AgentSandbox() as sb:
21
+ result = await sb.execute("python3 --version")
22
+ """
23
+
24
+ def __init__(
25
+ self,
26
+ *,
27
+ progress_callback: Callable[[str, int, int], None] | None = None,
28
+ save: str | None = None,
29
+ workspace: str | Path | None = None,
30
+ **kwargs: Unpack[SandboxConfigParams],
31
+ ) -> None:
32
+ kwargs.setdefault("image", "quicksand-agent")
33
+ super().__init__(
34
+ progress_callback=progress_callback,
35
+ save=save,
36
+ workspace=workspace,
37
+ **kwargs,
38
+ )
@@ -0,0 +1,60 @@
1
+ Metadata-Version: 2.4
2
+ Name: quicksand-agent
3
+ Version: 0.4.2
4
+ Summary: Overlay image package for quicksand
5
+ License-Expression: MIT
6
+ Requires-Python: >=3.11
7
+ Requires-Dist: quicksand-core<0.12.0,>=0.11.7
8
+ Requires-Dist: quicksand-ubuntu<0.10.0,>=0.9.4
9
+ Description-Content-Type: text/markdown
10
+
11
+ # Quicksand Agent Sandbox
12
+
13
+ An overlay image package for [quicksand](https://github.com/microsoft/quicksand) that provides a Python 3.12 environment with common AI agent tools pre-installed. Built on top of `quicksand-ubuntu`.
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ quicksand install quicksand-agent
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ### Simple (recommended)
24
+
25
+ ```python
26
+ import asyncio
27
+ from quicksand_agent import AgentSandbox
28
+
29
+ async def main():
30
+ async with AgentSandbox() as sb:
31
+ result = await sb.execute("python3 --version")
32
+ print(result.stdout)
33
+
34
+ asyncio.run(main())
35
+ ```
36
+
37
+ ### With custom config
38
+
39
+ ```python
40
+ from quicksand_core import Sandbox
41
+
42
+ async with Sandbox(image="quicksand-agent", memory="4G", cpus=4) as sb:
43
+ result = await sb.execute("pip list")
44
+ ```
45
+
46
+ ## What's Included
47
+
48
+ Built on Ubuntu 24.04, this overlay adds:
49
+
50
+ - **Python 3.12** virtual environment at `/opt/python` (with `pip`)
51
+ - **uv** fast Python package manager
52
+ - **build-essential** (gcc, make, etc.)
53
+ - **requests** HTTP library
54
+ - **pyyaml** YAML parsing
55
+ - **ddgs** DuckDuckGo Search API
56
+ - **markitdown** Markdown conversion tool
57
+
58
+ ## License
59
+
60
+ MIT
@@ -0,0 +1,6 @@
1
+ quicksand_agent/__init__.py,sha256=AI5C308_GDCApoq6Ty1CGS1AEDQJH7TcqT9pE-IYoLE,1239
2
+ quicksand_agent/sandbox.py,sha256=oX4gFmaRj1VjXGWr9p2b8WRAv5yP1x8APlv4E2CGHt0,1078
3
+ quicksand_agent-0.4.2.dist-info/METADATA,sha256=8N_0jpOFubGgta7o3RmJZ85ZX0j8xGr3YmzR5xNr75Y,1388
4
+ quicksand_agent-0.4.2.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
5
+ quicksand_agent-0.4.2.dist-info/entry_points.txt,sha256=XUEGIQdCc7ZROmfZ8wrBrpEdcbODsMAM5mlt2hO_A7I,59
6
+ quicksand_agent-0.4.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [quicksand.images]
2
+ quicksand-agent = quicksand_agent:image