GitHub Codespaces
Give a Codespace agent durable memory on MinIO AIStor — the AIStor Memory devcontainer Feature, published on GHCR, mounts your Memory Bucket into any devcontainer.json host.
Status — Ready
Self-serve today: the AIStor Memory devcontainer Feature is published on GHCR
(ghcr.io/miniohq/aimem) — add it to any devcontainer.json.
A Codespace is disposable — when it is torn down, everything the agent did in it goes too. AIStor Memory gives the agent in that Codespace durable memory: one mount of a MinIO AIStor Memory Bucket that it both works in and remembers through, so the files it edits and the knowledge it accumulates survive teardown and the next Codespace re-mounts the same state. Everything persists to your AIStor — your storage, your keys.
The AIStor Memory devcontainer Feature is how
that memory reaches the Codespace. It injects an install script and an
env-var contract into any devcontainer.json-aware host, so the same
Feature mounts the Memory Bucket in Codespaces, VS Code Dev Containers, JetBrains
Gateway, CodeSandbox, and Daytona's devfile import — write the integration
once and it runs on all of them.
Quick start
The bucket must be a Memory Bucket
AIStor Memory mounts only a Memory Bucket, never a plain S3
bucket. Before you set AIMEM_BUCKET, create the Memory Bucket launcher-side with
aimem bucket create my-project --endpoint-url https://aistor.example.com, or
convert an existing bucket with aimem bucket convert my-project.
At mount time, aimem runs a gate that requires all four:
- the target is a Memory Bucket, verified over the Memory API
- an explicit endpoint URL
- real signing credentials (
AIMEM_ACCESS_KEY/AIMEM_SECRET_KEY) — anonymous mounts are refused - a paid/Enterprise AIStor tier
A plain bucket fails with 'my-project' is not a Memory Bucket. See
Prerequisites.
Set the Codespaces environment once:
gh secret set -f - --user --app codespaces <<'EOF'
AIMEM_BUCKET=my-project
AIMEM_ENDPOINT=https://aistor.example.com
AIMEM_ACCESS_KEY=...
AIMEM_SECRET_KEY=...
EOFThen add the Feature to your project's .devcontainer/devcontainer.json:
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/miniohq/aimem:1": {}
},
"postCreateCommand": "aimem-mount"
}Open the Codespace. The Feature mounts AIStor Memory at /workspaces/aimem
before your first terminal opens.
Options
| Option | Default | Notes |
|---|---|---|
bucket | — | Fallback if AIMEM_BUCKET is not set at runtime |
endpointUrl | — | Fallback if AIMEM_ENDPOINT is not set at runtime |
mountpoint | /workspaces/aimem | Where the bucket appears inside the container |
localDir | /tmp/aimem-local | Local --local disk store for staging and read cache |
agent | auto | claude / codex / cursor / auto |
version | latest | Pin in production |
How the Feature works
The install script:
- Installs
fuse3, theaimembinary, and a setuid-rootaimem-fusermounthelper into the Codespace image (the helper lets the non-rootremoteUsercomplete the mount). - Writes
/usr/local/bin/aimem-mount, a wrapper that idempotently mounts the configured Memory Bucket. The wrapper readsAIMEM_BUCKET,AIMEM_ENDPOINT(orAIMEM_ENDPOINT_URL),AIMEM_ACCESS_KEY, andAIMEM_SECRET_KEYat runtime, and bails if the bucket, endpoint, or either credential is missing. It then launches the long-lived aimem process in the background (nohup aimem <bucket> <mountpoint> --endpoint-url … --local … --agent … --foreground &), so the process stays attached to its FUSE session for the container's life. Before returning, the wrapper waits until the mount is ready: it pollsmountpointfor up to ~30s and fails if the mount never comes up. Re-running it is a no-op if the path is already mounted. The non-secret mount settings come from the Feature options as flags; credentials stay in the environment, never on the command line. - Drops
/etc/profile.d/99-aimem-mount.shso the mount happens on first interactive shell (best-effort).
If your tooling needs the mount before any shell opens, keep the
postCreateCommand: "aimem-mount" line in devcontainer.json.
Portability
Because the same Feature runs on every host that reads the devcontainer.json spec, it mounts AIStor Memory on all of them — not just Codespaces. The Daytona page and E2B page both refer back to this Feature for the install half of their integrations.
Reference
features/aimem/— the Feature source.devcontainer-feature.jsonspec.
OpenAI Codex / Agents SDK
Give a self-hosted Codex or Agents SDK sandbox durable memory — mount an AIStor Memory Bucket at /workspace, the workspace the agent works in and remembers through, so apply_patch edits survive teardown.
Daytona
Give a Daytona Sandbox durable agent memory — one mount of an AIStor Memory Bucket at /workspace, so work survives sandbox teardown.