Skip to main content

Managed Updates & Rollback

AG Kit installs .agents/ as a managed tree: every kit file is tracked in a manifest with SHA-256 hashes, so updates know exactly what is yours and what is the kit's.

How the managed tree works

manifest.json
Component paths, versions, dependencies
manifest.lock.json
SHA-256 hash per managed file
Backups
Automatic before every change
Reports
Machine-readable update reports

Files you add or modify are not kit-managed, so the default merge strategy preserves them. Only files whose hash matches the manifest are updated in place.

Updating safely

1

Preview the plan

ag-kit update --dry-run

Shows adds, changes, preserved local files, and conflicts — without touching anything.

2

Apply the merge

ag-kit update

A backup is created first. Local changes are preserved; conflicting files are kept and incoming copies are stored under .agents/.ag-kit/conflicts/ for review.

3

Review the report

Each run writes a report with the run ID, strategy, and per-file actions. Use --conflict-report <file> to write it to a custom path.

Want a pristine upstream tree instead? Use ag-kit update --strategy replace. A backup is still created first.

Rolling back

agent-session
? Restore backup 2026-07-26T16-03-21? (y/N) y Restored backup 2026-07-26T16-03-21 Pre-rollback backup: .agents/.ag-kit/backups/...
  • Defaults to the newest backup; pick one with --backup <id>.
  • The current tree is backed up before restoring (disable with --no-keep-current).
  • Preview with --dry-run.

Backups live inside your project under .agents/.ag-kit/. Deleting that folder removes your rollback points.