Skip to main content

Harnest Docker Extension

The official Docker sandbox provider for Harnest, built and maintained by Fused. It lets a Harnest application run framework-neutral Python sandbox workloads in Docker while keeping the Docker implementation outside Harnest core.

This is a Harnest Extension, loaded into an agent process from its extensions/ directory. It is not an Agent Plugin: Agent Plugins contribute client-facing MCP tools, skills, and UI metadata, while this package extends Harnest's same-process runtime and declares the privileged sandbox.provider capability.

Install

Install the published package by short slug or full PyPI project name, then refresh the agent's locked environment:

harnest extensions install docker --project ./my-agent
# Equivalent: harnest extensions install harnest-extension-docker --project ./my-agent
harnest env sync ./my-agent

To review and install a local checkout instead:

harnest extensions install ./official-extensions/docker --project ./my-agent
harnest env sync ./my-agent

Harnest validates and copies the package without importing its code. Create sandbox/python.py and import the installed extension through its application namespace. The exported variable must match the filename:

from harnest.extensions.docker import docker
from harnest.sandbox import SandboxNetworkPolicy


python = docker.sandbox(
    image="python:3.12-slim@sha256:<approved-digest>",
    network_policy=SandboxNetworkPolicy.none(),
)

Add "python" to the consuming agent's sandboxes=[...] grant, then invoke it from an authored tool through context.sandboxes["python"]. Exactly one of image or docker_path is required. A pinned image digest is recommended for reproducible deployments.

Compatibility and capabilities

Version 0.2.0 requires Python 3.10 or newer, Harnest >=0.14,<0.15, and the Docker Python SDK >=7.1,<8. The host must provide a reachable Docker daemon; installing this wheel does not install or start Docker.

The extension provides lazy container startup, fresh execution-scoped containers, identity-bound invocation or session reuse, resource budgets, deadlines, bounded output, cleanup, and supported ADK parsing/retry options. It supports no-network and unrestricted Docker network modes. SDK transport timeouts for image and container startup are constrained by the remaining deadline. A host watchdog and control checks enforce the execution deadline. Cleanup receives a separate bounded five-second window. Daemon errors and startup timeouts identify the failed phase without exposing Docker SDK details, image-defined health checks are disabled, and managed containers carry dev.harnest.* labels for operator inventory.

Security and limitations

Docker daemon access is highly privileged. Protect its socket or remote API, restrict who can configure the extension, and use trusted, digest-pinned images. The extension rejects network-policy substitution and fails closed for exact host/port allowlists and unrestricted mode with private-network blocking because those controls are not yet enforced by this provider. It is a Python execution sandbox, not a browser tool, model provider, or general container orchestrator.

See the Harnest documentation for agent configuration and operational guidance. Source and issue tracking live in the Harnest repository.

Release files for harnest-extension-docker 0.2.0

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 harnest-extension-docker 0.2.0
File Interpreter ABI Platform
harnest_extension_docker-0.2.0-py3-none-any.whl Python 3 none any Details

Release files / harnest_extension_docker-0.2.0-py3-none-any.whl

Download URL harnest_extension_docker-0.2.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66298be9db835a432442bf491bf7933e9c943d4c4cf86f5dc01937c6e27b45f0
BLAKE2b-256 checksum
How to use checksums
78b2f973770a60f36ce52e4f6d89c6f5677a18ce8d13a04ffa2da4a894387bc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

This release

0.2.0 This release

1 release file

0.1.0

1 release file

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