Skip to content
PluginStats

ai-sdk-sandbox-docker weekly downloads statistics

By BrianHung (2 listings) · npm · AI SDKs

HarnessV1SandboxProvider implementation backed by a Docker container.

View on npm Fresh · Dec 6, 2026

ai-sdk-sandbox-docker has 2,841 recorded weekly downloads on npm, an increase of 238% over the past 30 days, ranking #1762 of 3,247 tracked listings.

Weekly downloads
2,841
Official API · Dec 5, 2026
7-day growth
+7.6%
+201 weekly downloads
30-day growth
+238%
+2K weekly downloads
90-day growth
+15683%
+2.8K weekly downloads
Rank
#1762
▼ 69 in 7 days

About ai-sdk-sandbox-docker

AI SDK - Docker Sandbox

This package is experimental.

A HarnessV1SandboxProvider backed by a Docker container. Each session runs its file I/O, run, and spawn through docker exec, so the container is the trust boundary.

Requirements

A running Docker daemon and the docker CLI on the host.

Install

npm i ai-sdk-sandbox-docker @ai-sdk/harness

Usage

The factory is synchronous. createSession() creates the container and publishes its ports to 127.0.0.1.

import { createDockerSandbox } from 'ai-sdk-sandbox-docker';

const dockerSandbox = createDockerSandbox({
  image: 'node:22',
  ports: [3000],
});

const networkSession = await dockerSandbox.createSession();
const session = networkSession.restricted();

await session.writeTextFile({ path: 'hello.txt', content: 'hi' });

const { stdout } = await session.run({ command: 'cat hello.txt' });
console.log(stdout); // "hi"

await networkSession.stop(); // removes the created container

networkSession.restricted() is typed as Experimental_SandboxSession, the reduced surface (file I/O, run, spawn) safe to pass to AI SDK tools via experimental_sandbox. The network session keeps the infra surface (ports, getPortUrl, setPorts, setNetworkPolicy, stop) that only the harness reaches for.

Configuration

const dockerSandbox = createDockerSandbox({
  image: 'node:22',
  workdir: '/workspace',
  ports: [3000],
  createArgs: ['-v', `${process.cwd()}:/workspace`],
  keep: false,
});
  • image Image for a created container. Ignored when container is set. Defaults to node:22.
  • container Attach to an existing container by name or id. The caller owns its lifecycle and port publishing; the provider never creates or removes it.
  • workdir Working directory inside the container. Defaults to /workspace. Relative paths in file operations resolve against it.
  • docker Path to the docker binary. Defaults to docker.
  • createArgs Extra arguments passed to docker run. Use it for volume mounts (-v), container env (-e), and networking (--network).
  • ports Ports to publish from container to host. The first port serves as the bridge; when omitted the provider leases one.
  • keep Keep a created container after the session stops. Defaults to false.

Mount a host directory to run the agent against a real repository:

createDockerSandbox({
  image: 'node:22',
  workdir: '/repo',
  createArgs: ['-v', `${process.cwd()}:/repo`],
});

Authentication

The provider uses the host's Docker configuration. To pull a private image, run docker login first. To target a remote daemon, set DOCKER_HOST or select a Docker context; the provider shells out to the same docker CLI and inherits that configuration.

Lifecycle

A created container is named ai-sdk-sandbox-<sessionId>. resumeSession({ sessionId }) rebinds to it by name without checking that it is still running; if the container is gone the first exec fails rather than the resume. stop() removes a container the provider created, unless keep is set. For an attached container (container set), stop() leaves it running.

Ports and network policy

Ports are published container to host 1:1 at creation, so getPortUrl resolves to http://127.0.0.1:<port> and throws HarnessCapabilityUnsupportedError for a port that was not published. Docker cannot publish new ports to a running container, so a port requested after creation must already be in ports, and resumeSession and attach mode expose only the ports declared in ports. setNetworkPolicy is a no-op; fix the container network at boot with createArgs (for example --network).

Cancellation

spawn records the in-container PID and terminates it on kill() or stop(). Use those to cancel a spawned process. docker exec does not forward signals, so aborting through abortSignal only kills the local docker exec client: an aborted run, or an aborted spawn whose kill() you never call, leaves its command running in the container until the container stops.

License

Apache-2.0

Description from the npm listing.

  • ai
  • ai-sdk
  • harness
  • sandbox
  • docker

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

ai-sdk-sandbox-docker weekly downloads on npm, last 90 days: 2,841 weekly downloads as of Dec 5, 2026, +15683% over 90 days.ai-sdk-sandbox-dockerWeekly downloads on npm · Last 90 days2,841downloads / week+15683% over 90 days05001K1.5K2K2.5K3K3.5KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
ai-sdk-sandbox-docker weekly downloads on npm, last 90 days: 2,841 weekly downloads as of Dec 5, 2026, +15683% over 90 days.

7/30/90-day growth

ai-sdk-sandbox-docker weekly downloads growth on npm: +7.6% over 7 days, +238% over 30 days, +15683% over 90 days.ai-sdk-sandbox-dockerWeekly downloads growth on npm2,841downloads / week now7-day growth+201 weekly downloads+7.6%30-day growth+2,000 weekly downloads+238%90-day growth+2,823 weekly downloads+15683%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
ai-sdk-sandbox-docker weekly downloads growth on npm: +7.6% over 7 days, +238% over 30 days, +15683% over 90 days.

Ranking history

ai-sdk-sandbox-docker npm ranking history: currently #1762 (by weekly downloads).ai-sdk-sandbox-dockernpm ranking · by weekly downloads · Last 90 days#1762current rank#1400#1500#1600#1700#1800Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
ai-sdk-sandbox-docker npm ranking history: currently #1762 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 89, #2 (overall #1,762)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 8, #17 (overall #157)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for ai-sdk-sandbox-docker
Date (UTC)Weekly downloadsChange vs. previous
2,841+98
2,743+361
2,382+59
2,323+250
2,073-198
2,271-343
2,614-26
2,640-339
2,979-176
3,155+7
3,148+186
2,962+99
2,863+271
2,592—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/ai-sdk-sandbox-docker. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.