You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the agent memory module (see #2 for the design thread and the permission issue).
A fork-sized first step: the skeleton, switched off by default, so the design can be argued against real files.
Add a compose/agent-memory/ stack, the same way the other apps are added (one folder per app; see compose/). compose/vaultwarden is in the repo and switched off, which is the pattern for an app that ships dark.
Add one modules/agent-memory.nix that wires it in behind a setting the owner switches on from Settings, like the other apps in Settings → Apps.
Pin the image by digest. Nothing is pulled from Docker Hub at runtime; images are baked into the image.
Keep it off the prod build until the permission model (the other issue) is settled.
Say what you tested: nix build .#packages.aarch64-linux.prod --accept-flake-config on an aarch64 machine or under QEMU, and ideally a Pi 5 8 GB boot.
Open a pull request against main. AGPL-3.0, CLA in CLA.md. Agents welcome: say which model you are and how you ran the build.
Try it with no hardware. This boots the Photos SSD image in QEMU on a Linux machine; the dashboard and Immich answer about three minutes after boot. Verified today on Ubuntu with KVM.
#!/usr/bin/env bash# Keephaven in a VM, no box needed. Linux x86-64 host. Boots the Photos SSD image under QEMU.# curl -fsSL <this file> | bash (or: bash keephaven-vm.sh)# Needs: curl, gzip, qemu-system-x86_64, OVMF firmware. ~5.4 GB download, ~8.5 GB disk (sparse), 4 GB RAM.# Tested 2026-10-22 on Ubuntu x86-64 with KVM: dashboard and Immich answer about 3 minutes after boot.# Debian/Ubuntu: apt install qemu-system-x86 ovmf gzip curl# Nix: nix shell nixpkgs#qemu nixpkgs#OVMF -c bash keephaven-vm.sh# Then open http://localhost:8080 (dashboard), http://localhost:8888 (settings), http://localhost:2283 (Immich API/UI).# Ports taken on your host? Set WEB_PORT, SETTINGS_PORT, IMMICH_PORT before running.set -euo pipefail
dir="${KEEPHAVEN_VM_DIR:-$HOME/keephaven-vm}"; mkdir -p "$dir";cd"$dir"# 1. Get a download code. One press of the button mints one; it is yours to keep and reuse.if [ !-s code ];then
curl -fsS -o /dev/null -w '%{redirect_url}' -X POST -A "keephaven-vm.sh" https://updates.keephaven.co/get/ssd \
| sed -E 's#.*/(KH-[0-9A-F]+)/?$#\1#'> code
fi
code=$(cat code); base="https://updates.keephaven.co/get/ssd/$code"echo"download code: $code (page: $base/ )"# 2. Read the file list, fetch the image and its checksum, verify.
curl -fsS "$base/index.json"> index.json
img=$(python3 -c 'import json;print([f["name"] for f in json.load(open("index.json"))["files"] if f["name"].endswith(".img.gz")][0])')
[ -s"$img" ] || curl -fL --retry 5 -C - -o "$img""$base/$img"
curl -fsS -o "$img.sha256""$base/$img.sha256"
sha256sum -c "$img.sha256"# the published checksum; refuse to boot anything else# 3. Unpack sparse: the raw image is ~36 GB on paper, a few GB on disk.if [ !-s keephaven.img ];then
gunzip -c "$img"| dd of=keephaven.img bs=4M conv=sparse status=progress
fi# The image is the first 36 GB of a drive; first boot needs room after it or it drops to# emergency mode (that's why the drive edition asks for 64 GB). Grow the file, sparse, no cost.
truncate -s 64G keephaven.img
# 4. Firmware. OVMF lives in different places per distro.first() { forfin"$@";do [ -e"$f" ] && { echo"$f";return; };done; }
code_fd=$(first ${OVMF_DIR:-/nonexistent}/FV/OVMF_CODE.fd /usr/share/OVMF/OVMF_CODE_4M.fd /usr/share/OVMF/OVMF_CODE.fd \ /usr/share/edk2/x64/OVMF_CODE.4m.fd /usr/share/edk2/x64/OVMF_CODE.fd /usr/share/edk2-ovmf/x64/OVMF_CODE.fd)
vars_fd=$(first ${OVMF_DIR:-/nonexistent}/FV/OVMF_VARS.fd /usr/share/OVMF/OVMF_VARS_4M.fd /usr/share/OVMF/OVMF_VARS.fd \ /usr/share/edk2/x64/OVMF_VARS.4m.fd /usr/share/edk2/x64/OVMF_VARS.fd /usr/share/edk2-ovmf/x64/OVMF_VARS.fd)
[ -n"$code_fd" ] && [ -n"$vars_fd" ] || { echo"no OVMF firmware found; install ovmf (or set OVMF_DIR)";exit 1; }
[ -s vars.fd ] || { cp "$vars_fd" vars.fd; chmod u+w vars.fd; } # the firmware copy must be writable# 5. Boot. KVM if the host allows it, otherwise plain emulation (slow, but it boots).
accel=tcg; [ -w /dev/kvm ] && accel=kvm
WEB_PORT=${WEB_PORT:-8080}; SETTINGS_PORT=${SETTINGS_PORT:-8888}; IMMICH_PORT=${IMMICH_PORT:-2283}echo"booting with $accel; dashboard at http://localhost:$WEB_PORT in a minute or two"exec qemu-system-x86_64 -name Keephaven -machine q35 -accel "$accel" -cpu max -m 4096 -smp 2 \
-drive if=pflash,format=raw,readonly=on,file="$code_fd" -drive if=pflash,format=raw,file=vars.fd \
-drive file=keephaven.img,format=raw,if=none,id=khdrive -device virtio-blk-pci,drive=khdrive,bootindex=0 \
-nic user,model=virtio-net-pci,hostfwd=tcp::$WEB_PORT-:80,hostfwd=tcp::$SETTINGS_PORT-:8888,hostfwd=tcp::$IMMICH_PORT-:2283 \
-display none -serial mon:stdio
Ports taken? Set WEB_PORT, SETTINGS_PORT, IMMICH_PORT. About 14 GB of disk and 4 GB RAM. Each run mints its own download code on first use and keeps it in the working folder.
Activity
dafarusd commentedon Oct 22, 2026
Try it with no hardware. This boots the Photos SSD image in QEMU on a Linux machine; the dashboard and Immich answer about three minutes after boot. Verified today on Ubuntu with KVM.
Script (also at https://gist.github.com/dafarusd/7bcb1e9ac596de7dcd28316b5fddc4a8):
Ports taken? Set WEB_PORT, SETTINGS_PORT, IMMICH_PORT. About 14 GB of disk and 4 GB RAM. Each run mints its own download code on first use and keeps it in the working folder.