Scheduled, verifiable backups of AI agent sessions via Needlecast.
Back up AI agent sessions, restart the agents, and check that the copies arrived.
kuzybackup coordinates Needlecast captures for several agents. For agents managed by kuzywrap, it waits for evidence of idleness and applies the configured stop policy, captures each session, attempts to restart the agent, and uploads the copy. The default on_busy = "stop" can interrupt a busy agent after the wait; "skip" is an explicit alternative. Reports keep interruptions, failures and skipped agents visible.
It is part of kuzys, a suite of tools for long-lived AI agents.
Use it when a session should survive a lost disk, an accidental cleanup or a failed migration. It is not a general machine backup: repositories, mail and other application data need their own backup arrangements.
A local copy, a verified remote copy and a successful test restore are different results. kuzybackup reports them separately instead of treating silence as success.
Choose one method; do not install Python packages into the system Python with pip. Source-build instructions and the Python/native boundary are documented in Distribution packaging.
Use Python 3.11 or newer with virtual-environment support, without sudo:
python3 -m venv ~/.venvs/kuzybackup . ~/.venvs/kuzybackup/bin/activate python -m pip install 'kuzybackup' pip also installs the declared Needlecast dependency and the six backend adapters. Storage clients such as MEGAcmd, rclone or AWS CLI, their credentials and kuzywrap lifecycle integration are external. pip does not schedule backups.
Configure the kuzys APT repository using Get started, then install on Debian 13 (trixie), amd64:
sudo apt install kuzybackup This also installs the required Needlecast package. Storage backend clients, credentials and kuzywrap integration are configured separately.
Configure the kuzys RPM repository using its repository and signing-key instructions. The coordinated release targets Fedora 45 on x86_64, from the kuzys testing repository. Once the repository and the package release are available:
sudo dnf install kuzybackup Needlecast is a native dependency. Backend clients, credentials and runtime lifecycle setup remain separate; package installation does not schedule a backup.
Copy the example configuration and edit it for your own closed test session and storage location. It contains example values, not a working backup of your data:
mkdir -m 700 -p ~/.config/kuzybackup cp /usr/share/doc/kuzybackup/examples/config.toml ~/.config/kuzybackup/config.toml After editing the configuration, inspect it before doing a real run:
kuzybackup check kuzybackup run --dry-run The dry-run checks the planned agents without stopping them. Investigate skipped sessions or errors before proceeding. A real run can interrupt agents; schedule it deliberately, outside active work.
For an assisted run that includes the agent launching it, use the independent service described in Operations. Do not launch that run inside the agent session it needs to stop.
When ready, run kuzybackup run --json from that independent context and retain the reported run ID. Verify that exact generation with kuzybackup verify --run-id RUN_ID; add --restore-test for an isolated sample restore. Replace RUN_ID with the real value. A sampled verification does not check every bundle unless configured to.
For development, use Python 3.11 or newer from this repository:
python3 -m venv .venv .venv/bin/pip install -e '.[dev]' .venv/bin/python -m pytest To build Debian packages from a fresh checkout instead:
git clone https://gitlab.com/kuzys/kuzybackup.git cd kuzybackup sudo apt install kuzybuild sudo apt build-dep ./ kuzybuild-deb --release The packages and build records are written to dist/debian/. After reviewing the build result, install the locally built package with:
sudo apt install ./dist/debian/kuzybackup_*.deb Status and limits Pre-alpha. local-dir and mega have tested implementations. Other included backends (rclone, dropbox, gdrive, s3) are untested sketches, not production-ready alternatives. A folder synchronized in the background does not prove that a remote upload completed.
Restart is attempted even after capture failures, but can fail; a report is not complete when agents are skipped or fail to restart. Check both the run report and independent verification. freshness checks the latest run's age and completion; it does not replace verification or a restore test.
Do not run everything as root for convenience. Cross-user capture requires a reviewed root-owned setup, while storage operations use a dedicated user and verification refuses root. Follow the operations guide for service settings, including KillMode=process, so service cleanup does not kill restarted agents.
Needlecast excludes dedicated runtime authentication files, not arbitrary secrets in history or configuration. Protect the copies accordingly. Automatic retention deletion is not implemented; enabling it is a configuration error.
See Distribution packaging for the common build commands, the Python/native boundary and external dependencies.
kuzys needlecast backup agents continuity claude codex
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




