export-import

Sandbox backup and transfer commands for saving a sandbox's files or settings, then creating another sandbox from saved settings. A sandbox is an isolated environment for running code.

In plain words
What is it for?
Use them to export a running sandbox as a tar archive, save its configuration as a TOML text file, or create a new sandbox from that configuration.
Why use it?
They let you preserve a sandbox or reproduce its setup without rebuilding it manually. This also makes it easier to move configurations between environments.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/thrashr888/agentkernel/export-import
Clone the repo
git clone --depth 1 https://github.com/thrashr888/agentkernel
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 557 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00557
Opus 5 $0.00000 $0.00279
Sonnet 5 $0.00000 $0.00111
Haiku 4.5 $0.00000 $0.00056

Measured 2d ago against content hash eec9c091e7d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

export-import scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/export-import.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

agentkernel sandbox export / export-config / import-config

Export sandbox filesystems and configurations, and import configurations to create new sandboxes.

Commands

Command Description
sandbox export <NAME> [-o FILE] Export sandbox filesystem as a tar archive
sandbox export-config <NAME> Export sandbox config as TOML (prints to stdout)
sandbox import-config <FILE> [--as NAME] [-B BACKEND] Create a sandbox from a TOML config

Export Filesystem

Export the full filesystem of a sandbox as a tar archive:

# Default output: <name>.tar
agentkernel sandbox export my-sandbox

# Custom output path
agentkernel sandbox export my-sandbox -o /tmp/backup.tar

Output:

Exporting sandbox 'my-sandbox' to my-sandbox.tar...
Exported 52.7 MB to my-sandbox.tar

The sandbox must be running for export to work (it uses docker export).

Export Configuration

Export a sandbox's settings as TOML for sharing or backup:

$ agentkernel sandbox export-config my-sandbox
[sandbox]
name = "my-sandbox"
base_image = "python:3.12-alpine"

[resources]
vcpus = 1
memory_mb = 512

Redirect to a file:

agentkernel sandbox export-config my-sandbox > my-sandbox.toml

Import Configuration

Create a new sandbox from an exported TOML config:

# Use the name from the config
agentkernel sandbox import-config my-sandbox.toml

# Override the name
agentkernel sandbox import-config my-sandbox.toml --as new-sandbox

# Specify backend
agentkernel sandbox import-config my-sandbox.toml --as imported -B docker

Output:

Importing config as sandbox 'new-sandbox' (image: python:3.12-alpine)...
Sandbox 'new-sandbox' created from config.

Next steps:
  agentkernel sandbox start new-sandbox

Workflow: Share a Sandbox Configuration

# On machine A: export
agentkernel sandbox export-config my-project > my-project.toml

# Transfer the file (git, email, etc.)

# On machine B: import
agentkernel sandbox import-config my-project.toml -B docker
agentkernel sandbox start my-project

Read the full file on GitHub · 96 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 96 lines · 0 tokens per session scan A eec9c091e7d7

Subscribe to this mod's changes

export-import is a command published in the GitHub repository thrashr888/agentkernel (58 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 557 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.