Privacy-first, Git-like backup, recovery, migration, and sharing for AI agent session history.
Your agent history is not a cache.
Akeep is a privacy-first CLI that discovers coding-agent sessions and saves them as compressed, deduplicated commits. You can inspect history, compare two versions, check archive integrity, restore provider-native files, and clone the repository. Store it locally or back it up to AWS S3, Cloudflare R2, or a Git repository such as a private GitHub Repo. Client-side age encryption is optional.
Coding-agent histories routinely contain hours of decisions, commands, edits, artifacts, and private code. Provider-local files are useful but undocumented, mutable, and not a backup. For example, Claude Code documents a 30-day default cleanup period for local transcripts.
Akeep is designed around five promises:
- Versioned: commits have messages and parent links;
HEAD~N,log, anddiffmake history understandable. - Cloud backup: choose AWS S3, Cloudflare R2, a GitHub Repo, another Git remote, or local storage.
- Exact: raw provider files remain the source of truth and are preserved byte-for-byte.
- Private: no upload or telemetry happens by default. Client-side encryption is available but never forced.
- Non-destructive: commits never edit provider state, and checkout defaults to a separate scratch directory.
Install from crates.io:
cargo install akeepOn Linux or macOS, you can instead download the latest published binary with one command:
curl -fsSL https://raw.githubusercontent.com/eunomia-bpf/akeep/main/scripts/install.sh | shThe installer detects x86_64/ARM64 and writes to ~/.local/bin unless
AKEEP_INSTALL_DIR is set. Run it again whenever you want to install the
newest published release. You can also download and verify an archive directly
from GitHub Releases.
Rerun your chosen installation command to update. Akeep does not update itself silently.
Initialize a repository and exercise the core version-history loop:
akeep init
akeep status
akeep commit -m "before the migration"
# Continue working with your agents, then:
akeep commit -m "after the migration"
akeep log
akeep diff HEAD~1 HEAD
akeep fsck HEAD
akeep checkout HEAD --to /tmp/akeep-recovery
akeep checkout HEAD --provider claude-code --to /tmp/akeep-claude-drill
akeep clone /mnt/backup/akeep-copy
akeep schedule install --weekly
akeep schedule statusakeep init writes ~/.config/akeep/config.toml and creates a private local
repository under ~/.local/share/akeep/vaults/default. Review akeep status
before the first commit. There is deliberately no required add: provider
adapters discover the supported durable files automatically. First-time setup
is init, status, commit; ordinary use can be only commit. Akeep skips
known credential, cache, and temporary paths and never follows symlinks.
clone copies the active repository—filesystem, S3/R2, or Git—into
DIRECTORY/{config.toml,repository/,state/} and checks every transferred
object plus the cloned commit chain. Use the clone directly:
akeep --config /mnt/backup/akeep-copy/config.toml log
akeep --config /mnt/backup/akeep-copy/config.toml fsck HEADFor an encrypted repository, the clone keeps the configured identity path but does not copy the private age identity. Move or back up that key separately.
Run the self-contained trust demo with synthetic five-provider fixtures:
cargo build
AKEEP_BIN=target/debug/akeep ./scripts/demo.shIt proves a byte-identical checkout, then corrupts its temporary archive and proves that a full integrity check rejects it. The demo uses a private temporary directory and removes it on exit.
Encryption remains optional. To create an age-encrypted vault:
akeep init --encryption ageAkeep generates a mode-0600 recovery identity beside the configuration and
prints its path. Back it up separately: if every copy is lost, nobody can
decrypt the repository. akeep status performs an encrypt/decrypt self-test
whenever encryption is enabled.
Use an S3-compatible target by supplying a bucket and an isolated prefix:
akeep init \
--s3-bucket my-backup-bucket \
--s3-prefix akeep/my-machine \
--aws-profile backup \
--encryption ageAkeep invokes AWS CLI v2 without a shell, records its absolute executable path
in the configuration, checks bucket access and versioning, uploads immutable
objects before publishing a manifest, and never issues a remote delete.
--s3-endpoint-url supports S3-compatible services. Remote encryption is
recommended, not mandatory: omitting --encryption age produces a clear
warning and a fully supported plaintext vault.
Cloudflare R2 uses the same S3-compatible path. Configure an AWS CLI profile with R2 credentials and set its account endpoint:
akeep init \
--s3-bucket my-r2-bucket \
--s3-prefix akeep/my-machine \
--aws-profile r2 \
--s3-endpoint-url https://ACCOUNT_ID.r2.cloudflarestorage.com \
--encryption ageFor a private GitHub Repo or another Git remote, create the empty remote first, then dedicate a branch to Akeep:
akeep init \
--git-repository git@github.com:OWNER/agent-history.git \
--git-branch akeep \
--encryption ageAkeep uses the installed Git CLI and your existing SSH agent or credential
helper; it does not store a GitHub token. Each completed Akeep snapshot is
published as one Git commit, with the manifest and refs/latest written last.
If a push fails or another writer advances the branch, Akeep refuses to publish
a partial or stale snapshot. A second machine can run the same init command
to adopt the existing vault ID; for age encryption, pass a separately copied
identity with --age-identity-file.
GitHub recommends repositories remain small and enforces a 2 GB push limit, so use the Git backend for smaller histories, migration, and controlled sharing. Use S3 or R2 for large or fast-growing daily archives. Keep session-history repositories private unless their contents are age-encrypted. See GitHub's repository limits and Git authentication guidance.
The Linux scheduler installs one service and timer per vault under the systemd user-unit directory. It is persistent across downtime, adds a randomized six-hour delay, runs with low CPU/I/O priority, and uses the same per-vault lock as manual commits. Uninstalling it leaves configuration and archives untouched:
akeep schedule uninstallIf upgrading from a build whose generated service invoked the former backup
command, reinstall the timer immediately after replacing the binary:
akeep schedule install --weeklySee configuration and operations and the archive format. Cross-agent handoff is described in the semantic handoff workflow.
- It is not a general computer backup. Keep using Git and a normal system backup.
- It is not a chat-memory or RAG product.
- It does not promise lossless conversion between undocumented provider session formats.
- It does not delete or offload live provider data.
- It is not coupled to any observability or analysis product.
Akeep can be used as the primary backup for supported agent histories. When migrating from another backup, keep both running until Akeep has completed several scheduled commits and you have recovered both a current and an older commit. This avoids creating a coverage gap while changing backup systems.
Our own installation protects more than 50 GB across five agent providers. A full recovery reproduced every archived file and byte, recovered SQLite databases passed integrity checks, and the bounded pipeline reduced observed peak memory from 23.6 GiB to about 243 MiB. The dated evidence and conservative migration checklist are documented separately.
See:
- Configuration and operations
- Provider compatibility matrix
- Recovery and rollback runbook
- Testing and reliability evidence
- Archive format
- Product overview (中文)
- Security policy
- Contributing
Akeep provides the complete local, S3/R2, and Git-remote versioned-backup loop: provider discovery, bounded streaming commits, compression and deduplication, optional age encryption, history and diffs, full integrity checks, exact scratch recovery, repository cloning, and Linux scheduled commits. See the compatibility matrix for the provider data included by each adapter.