Skip to main content

Quicksand Core

This package provides the core implementation for the quicksand VM harness.

It includes the abstractions for running VMs that AI agents can interact with, including command execution, file operations, and state checkpointing. Most users should install quick-sandbox with QEMU and image extras instead.

Installation

For most users, install the main package:

pip install 'quick-sandbox[qemu,ubuntu]'

For core-only (no bundled images):

pip install quicksand-core

Core Exports

This package exports the core building blocks:

from quicksand_core import (
    # Main classes
    Sandbox,
    SandboxUser,
    Mount,
    ExecuteResult,
    # Save support
    SaveManifest,
    # Image resolution
    ResolvedImage,
    # Runtime management
    get_runtime,
    RuntimeInfo,
    is_runtime_available,
    # Accelerator detection
    get_accelerator,
    detect_accelerator,
    AcceleratorStatus,
    Accelerator,
    # Platform configuration
    get_platform_config,
    PlatformConfig,
    # Architecture/OS types
    Architecture,
    MachineType,
    OS,
)

Usage with Custom Image

import asyncio
from quicksand_core import Sandbox

async def main():
    async with Sandbox(image="your-image-name", memory="1G", cpus=2) as sb:
        result = await sb.execute("cat /etc/os-release")
        print(result.stdout)

asyncio.run(main())

Features

  • Real VM isolation: Hypervisor-level isolation (KVM, HVF, WHPX)
  • Cross-platform: Linux, macOS, Windows
  • Streaming commands: Incremental stdin and output, with backpressure, EOF, and cancellation
  • Guest users: Create/delete OS accounts and run commands with user-specific identity and home directories inside one VM
  • Platform abstraction: Automatic detection of accelerators and machine types
  • Save and load: Save VM disk state to a directory and load it on any machine
  • File sharing: CIFS mounts via quicksand-smb (pure-Python SMB3 server — a subprocess via QEMU guestfwd on macOS/Linux, an in-process loopback TCP listener on Windows with no admin rights required)
  • Performance optimizations:
    • io_uring disk AIO (~50% lower latency on Linux)
    • IOThreads for better concurrent disk I/O (all platforms)

Streaming stdin and guest-user APIs require quicksand-ubuntu or quicksand-alpine 0.10.0 or newer, or a custom image rebuilt with the updated guest agent. Updating the host package does not update saved guest images.

For Most Users

Install quick-sandbox with a bundled image for zero-configuration usage:

pip install 'quick-sandbox[qemu,ubuntu]'
import asyncio
from quicksand import UbuntuSandbox

async def main():
    async with UbuntuSandbox() as sb:
        result = await sb.execute("ls -la /")
        print(result.stdout)

asyncio.run(main())

License

MIT

Metadata

Release files for quicksand-core 0.14.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for quicksand-core 0.14.1
File Interpreter ABI Platform Actions
quicksand_core-0.14.1-py3-none-any.whl Python 3 none any Details for quicksand_core-0.14.1-py3-none-any.whl

Release files / quicksand_core-0.14.1-py3-none-any.whl

Download URL quicksand_core-0.14.1-py3-none-any.whl
Size 91.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be397cd560dd607fb67bba034c953a27cd960ed06572b395a9bd87913ce6c3f3
BLAKE2b-256 checksum
How to use checksums
ec2b8b39a144071cfbf575c3bebea51b15d98bbdc21a7ada647f90fca6f336af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for quicksand-core 0.14.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page