Docker Sandbox kit for Prediction Guard. Network-isolated, credential-proxied AI coding agents.
299
sha256:13474b5cd113…
425 Bytes
v2
2 days ago
Run AI coding agents inside Docker Sandbox with Prediction Guard as the model provider — network-isolated, credential-proxied, with prompt injection and PII protection built in
| Name | Service | Required | Description |
|---|---|---|---|
PREDICTIONGUARD_TOKEN | predictionguard | Optional | — |
pg.yourcompany.com
sbx run docker.io/predictionguard/sbx-predictionguard:latestRun the following command to install sbx on your machine.
brew install docker/tap/sbxwinget install Docker.sbxRun AI coding agents (OpenCode) inside a Docker Sandbox with Prediction Guard as the model provider — network-isolated, credential-proxied, with prompt injection and PII protection built in.
Two components. Both required.
┌─────────────────────────────────────────────┐ ┌──────────────────────────────────────┐
│ Developer machine / cloud VM │ │ Your infrastructure (self-hosted) │
│ │ │ │
│ ┌──────────────────────────────────────┐ │ │ ┌────────────────────────────────┐ │
│ │ Docker Sandbox (Gate 1) │ │ │ │ Prediction Guard (Gate 2) │ │
│ │ │ │ │ │ │ │
│ │ ┌────────────────────────────────┐ │ │ │ │ • Prompt injection detection │ │
│ │ │ AI coding agent │ │ │ │ │ • PII detection & redaction │ │
│ │ │ (OpenCode) │──┼───┼────▶│ │ • Toxicity policy │ │
│ │ └────────────────────────────────┘ │ │ │ │ • Model inventory & routing │ │
│ │ │ │ │ │ • Audit log │ │
│ │ • Network: only pg.yourcompany.com │ │ │ └────────────────────────────────┘ │
│ │ • Credential proxy: key never │ │ │ │
│ │ enters the VM │ │ │ ┌──────────────┐ │
│ │ • Filesystem: mounted workspace │ │ │ │ LLM / Model │ │
│ │ only │ │ │ └──────────────┘ │
│ └──────────────────────────────────────┘ │ └──────────────────────────────────────┘
└─────────────────────────────────────────────┘
Gate 1 — Docker Sandbox isolates the agent at runtime: network, filesystem, and credentials are locked down before the agent starts. The API key never enters the VM.
Gate 2 — Prediction Guard governs every model call: prompt injection, PII, and content policy are enforced on live traffic before it reaches the model. Runs entirely inside your own infrastructure.
Register your Prediction Guard API token once:
echo "$PREDICTIONGUARD_TOKEN" | sbx secret set-custom -g \
--host pg.yourcompany.com \
--env PREDICTIONGUARD_TOKEN \
--placeholder sk-pg-placeholder
Then run:
sbx run --kit docker.io/predictionguard/sbx-predictionguard:latest predictionguard
Replace pg.yourcompany.com with your Prediction Guard deployment URL.
Need a Prediction Guard deployment? Get your evaluation license →
Docker Sandbox handles the runtime layer (what the agent can reach on the host and network). Prediction Guard handles the model layer (what content goes in and out of the AI). Neither gate alone is sufficient — together they enforce least-privilege at both layers.
Read the full writeup: Two Gates of Defense — predictionguard.com/blog
We will be at the Docker Pavilion, Sep 23-25, San Jose. Come see a live demo of both gates in action — Docker Sandbox + Prediction Guard running together.
Book time with us at the conference →