Skip to content
Docs menu

Documentation

Upgrade & backup

How to move to a new version with each install method, and how to back up and restore your memory.

Before any upgrade: back up

Your memory is one directory, ~/.tam/ (older installs: ~/.claude-memory/). The important file is ~/.tam/memory.db.

Simple copy (safest): close your AI clients and stop the background services so nothing writes, then copy the directory.

npx -y total-agent-memory dashboard stop     # npx installs; other installs: stop the services your installer added
cp -a ~/.tam ~/tam-backup-$(date +%Y%m%d)

Live copy of the database without stopping anything, with the SQLite command-line tool:

sqlite3 ~/.tam/memory.db ".backup '$HOME/tam-memory-$(date +%Y%m%d).db'"

Portable export: ask the agent to run memory_export. It writes knowledge, sessions and relations as JSON, optionally per project. Use it to move records between machines or keep a human-readable archive; the database copy above is the complete backup.

The clone installer’s ./update.sh also snapshots the database before it changes anything and keeps the last seven snapshots in ~/.tam/backups/.

Upgrade

Installed withUpgrade command
npxnpx -y total-agent-memory upgrade
Claude Code pluginupdate the plugin from Claude Code’s /plugin menu
pipxpipx upgrade total-agent-memory
pip / uvpip install -U total-agent-memory
Homebrewbrew upgrade total-memory
Dockerpull the new tag, e.g. docker pull ghcr.io/vbcherepanov/total-agent-memory:15.0.0, and restart with it
Clone + install.shcd ~/total-agent-memory && ./update.sh

update.sh checks disk space, snapshots the database, pulls the source, reinstalls dependencies only if they changed, runs the test suite (and stops if it fails), applies migrations and reloads the background services.

After upgrading, restart your client or reconnect the server (Claude Code: /mcp → Reconnect). Database migrations run automatically when the server starts.

To pin a version instead of taking the latest: npx -y total-agent-memory install --server-version 15.0.0, or pip install total-agent-memory==15.0.0.

Restore

  1. Close your clients and stop the background services.
  2. Move the current directory aside: mv ~/.tam ~/.tam.broken.
  3. Copy the backup back: cp -a ~/tam-backup-20260925 ~/.tam (or copy a .db backup to ~/.tam/memory.db).
  4. Start your client again.

Restoring an older database into a newer TAM is fine; migrations bring it forward on start. Going back to an older TAM with a database a newer version has migrated is not supported; restore the backup you took before upgrading instead.

Upgrading from 14.10.x to 15.0.0

Back up first (see above), then read the first five points. Migrations run on the first start: SQLite 047 to 059, PostgreSQL workspace 0011 to 0022 and PostgreSQL compat 0002 to 0003. There is no downgrade path: to roll back, reinstall the previous version and restore the backup. The full guide is docs/UPGRADE_15.md. The catalogue stays at 79 tools; some inputs and responses gain fields.

  • Representations are tracked by their model. Each stored representation records the model, provider, pooling and library that produced it. Those with an unknown or incompatible identity are left out of search and queued for regeneration, so one search layer can return fewer results until the queue drains. memory_stats shows the coverage.
  • PostgreSQL: provision HNSW indexes yourself. Searches no longer create them. Run scripts/prepare_vector_index.py with an administrative connection; until a valid index exists, searches score exactly.
  • Reflection embedders need an identity. An injected embedder must supply an embed_identity callback with the concrete model and provider; an unknown or changing identity fails the job instead of publishing incompatible vectors.
  • Explicit indexing turns on background refresh. After ingest_codebase indexes a folder, the personal server keeps it fresh. Pass watch=false to opt out for a root.
  • State history starts at the upgrade, with an approximate past. A record retired before the upgrade is recorded as active from its created_at and retired at the best time the old schema holds (the successor’s creation time, otherwise last_confirmed). as_of answers for deleted or archived records are therefore a lower bound; a retired record with neither timestamp stays invisible at every as_of.
  • Auto-consolidated rules are repaired. Migrations 053 and 057 give rules that learn_error created the scope global or project:<name>, so self_rules_context returns them.
  • Reranker default. MEMORY_CROSS_RERANK_MODEL now defaults to a multilingual cross-encoder (cross-encoder/mmarco-mMiniLMv2-L12-H384-v1); it downloads on first use.
  • Homebrew no longer bundles the PostgreSQL driver. For the PostgreSQL team backend run pip install "total-agent-memory[postgres]".
  • Optional extras. [media] adds image and scanned-PDF OCR, audio and video transcription, RTF and XLS; Tesseract and its language data are system prerequisites.

Upgrading from 14.9.x to 14.10.0

Read the first five points before you upgrade. Migrations 043 to 046 (PostgreSQL workspace 0007 to 0010, control 0005 and 0006) are additive and run on the first start. The catalogue stays at 79 tools and no input schema changed; some responses gain fields. The directory plugin (total-agent-memory-plugin) is not updated in this release.

  • Docker needs a token and binds to loopback. The container’s MCP and dashboard servers require a bearer token whenever they listen beyond loopback: TAM_HTTP_TOKEN (at least 32 characters) or the generated <memory dir>/state/http-token. Websocket requests without it are closed, and the documented port mappings publish on 127.0.0.1 only. Clients on another host send Authorization: Bearer <token>.
  • Team server: token sessions cannot administer. A dashboard session opened with an access token can no longer create tokens or invites, change roles, users, teams or membership, revoke other users’ tokens, edit settings or change the password (403). Sign in with the password for those.
  • Team server: new tokens expire after 180 days. TAM_TEAM_TOKEN_TTL_DAYS=0 restores never-expiring tokens. Tokens issued before this release do not expire.
  • Team server behind a proxy on a public address must list it in TAM_TEAM_TRUSTED_PROXIES. By default only loopback and private ranges are trusted for X-Forwarded-For.
  • Local dashboard: sign in again. Old tam_dashboard_token cookies stop working. Move bookmarks and scripts from /login?token= to /login#token=; the query form still works in this release. Team server login counters restart, so active lockouts lift.
  • Re-run the installer once (update.sh, tam setup --reconfigure or install-docker.sh) to turn on the provenance hook. It stays off until the installer has recorded the TAM server registration. Then restart running memory servers; migration 043 closes learn_error rows that were filed as open.
  • Optional: re-embed. Vectors that a fallback backend wrote under the configured model name are recognised and re-embedded in the background. memory_rebuild_embeddings does it at once.
  • Path arguments are limited. ingest_codebase, benchmark and the eval tools read only under the working directory, the memory directory, the install directory or TAM_ALLOWED_PATH_ROOTS.
  • Windows. TAM reads and writes its own files as UTF-8 without PYTHONUTF8=1, and every .ps1 runs on Windows PowerShell 5.1.
  • New environment variables are listed in Configuration, among them TAM_HTTP_TOKEN, TAM_TEAM_TOKEN_TTL_DAYS, TAM_TEAM_TRUSTED_PROXIES, TAM_ALLOWED_PATH_ROOTS and the MEMORY_DB_* SQLite settings.

Upgrading from 14.8.x to 14.9.0

Nothing to do. Migrations 038–042 run automatically on the first start; the catalogue grows from 77 to 79 tools (memory_exploration_record, memory_exploration_recall). The directory plugin (total-agent-memory-plugin) is not updated in this release and still pins 14.8.0; the new hooks and settings come with an install from the package or the repository.

  • Behaviour you will see. The hooks now add matching rules and a short block of relevant records to each prompt, remind of a rule before a Bash call or an edit it applies to, log every tool call, and save turns that edited files or ran commands as short summaries; tam forget-auto removes those. A rule is now suspended only on explicit ratings (at least 5, 95% Wilson upper bound of the success rate below 0.4); loading rules no longer counts as firing them. Decisions, conventions and lessons no longer decay out of recall.
  • New, on by default: TAM_AMBIENT_RECALL (with TAM_AMBIENT_TOKEN_BUDGET, 400, and TAM_AMBIENT_LATENCY_MS, 1500), TAM_TURN_AUTOSAVE and TAM_CORRECTION_CAPTURE (a prompt that corrects the agent becomes a draft insight). Set any of them to false to switch it off.
  • New, opt-in: TAM_TOOL_PROFILE=lean|minimal lists 28 or 12 tools instead of all 79 (hidden tools still answer when called; an unknown value stops the server at startup). tam daemon / tam proxy run one warm server per memory directory; tam setup register --shared-daemon writes the proxy entry into client configs, and TAM_DAEMON_PORT, TAM_DAEMON_IDLE_EXIT_MIN, TAM_DAEMON_START_TIMEOUT_SEC, TAM_DAEMON_STOP_TIMEOUT_SEC tune it.
  • macOS image OCR needs the new [ocr] extra (pip install "total-agent-memory[ocr]").

Upgrading from 14.7.x to 14.8.0

Nothing to do. There is no migration and no configuration change; the plugin, the hooks, the skill and every tool schema are the same as in 14.7.0.

  • Recall changes you will see. The graph tier now fires on stores with a knowledge graph (before, it read only the relations table, which memory_relate alone writes), the multi-representation tier scores every representation row instead of the first 100, and advice-shaped questions (“how should I…”, “recommend…”) also search the project’s convention records and favour the user’s own turns. To compare with the old behaviour, MEMORY_RECALL_TIER_WEIGHTS=graph=0,multi_repr=0,directives=0 MEMORY_RECALL_USER_TURN_BOOST=1.0.
  • New, opt-in: MEMORY_LLM_FALLBACK_PROVIDERS (a chain of LLM providers for the enrichment phases), MEMORY_RECALL_TIER_WEIGHTS (the fusion weights; multi_query=0.8 switches on the new multi-query tier, measured neutral and off by default), MEMORY_CROSS_RERANK_WINDOW=100 (1.8 more points of R@10 on LoCoMo at twice the latency on a CPU).
  • New, on by default: session_end also saves its summary, next steps and pitfalls as a note record (MEMORY_SESSION_NOTES=off disables it), and the hourly reflection job consolidates idle projects within MEMORY_CONSOLIDATION_BUDGET_SEC (120 s; 0 switches it off).

Upgrading from 14.6.x to 14.7.0

Nothing to do. There is no migration and no configuration change.

  • New, opt-in: memory_recall(mode="context", fill_budget=true) fills context_max_chars with whole records instead of excerpts of the top limit hits. It is off by default; other modes are unchanged. See memory_recall.
  • Code records saved without the code model. When the code embedding model could not load (offline, or after macOS purged the model cache), earlier versions labelled the record with the code model and semantic search skipped it. 14.7.0 stores such a record in the text space.
  • Team server: credential redaction no longer changes UUIDs whose first groups are all digits, so memory_save no longer fails with “request_id: Input should be a valid UUID”.

Upgrading from 14.5.x to 14.6.0

Most installs need nothing. Check these points:

  • Existing installs stay personal. On the first start of 14.6.0, an existing install (a memory.db, or a registered memory MCP entry) is recorded as personal mode without a prompt. No behaviour or data changes. A company server is opt-in with tam setup --mode company; see Setup wizard.
  • Docker and LAN access. The local dashboard and the MCP HTTP transport now answer only to localhost, 127.0.0.1, [::1] and their configured bind address. Clients that reach them by another name or IP get 421. List those names, comma-separated, in DASHBOARD_ALLOWED_HOSTS and MCP_HTTP_ALLOWED_HOSTS (both are passed through docker-compose.team.yml). See Configuration.
  • /healthz on the MCP HTTP port is trimmed to status and version. Monitors that read the memory directory, process ID or session ID from it must stop doing so.
  • Scripts moved from bin/ to scripts/ in a clone. Update cron jobs, aliases or CI steps that call bin/memory-bench, bin/memory-perf-gate, bin/cm-import or bin/consolidation-daemon.
  • Re-render the consolidation LaunchAgent if you use it. A plist rendered from scripts/com.claude-memory.consolidation.plist before 14.6.0 points at bin/consolidation-daemon, which no longer exists. Render it and load it again.
  • Clients registered in the wrong files. Earlier installers wrote some clients’ MCP entry where the client never reads it (Claude Code without the claude CLI or on Windows, Cline, OpenCode, Continue). If the first start logs misplaced config files, run tam setup --reconfigure to register those clients in the right place. Nothing is rewritten silently.
  • The npm wrapper 1.9.0 needs server 14.6.0 or later for connect, because it registers clients with tam setup register.
  • Move API keys out of client configs. If the first start logs clients that keep an API key in plain text, run tam setup --reconfigure and press Enter at the key prompt. The key moves into the encrypted settings file. Then run tam redact-existing, and add --apply if it finds credentials stored by earlier versions. Keep <memory dir>/master.key with your backups. See Settings page and Privacy.
  • Long records are cut in search answers at 6000 characters. Agents that need the whole record call memory_get. Change the limit with MEMORY_RECALL_MAX_RESULT_CHARS or on the Settings page.
  • Team server: the dashboard encrypts provider keys with TAM_TEAM_MASTER_KEY or <data dir>/master.key. Back up that key separately; tam-team backup copies the encrypted values but not the key. See The master key.

The full list of changes is in the changelog.

Upgrading from 11.x or older

Every channel moves ~/.claude-memory/ to ~/.tam/ on first run and leaves a symlink, so old scripts keep working. The old command names (claude-total-memory, ctm-lookup) still work as aliases. No manual data move is needed.

Moving to another computer

Copy ~/.tam/memory.db to the same place on the new machine before first use, then install TAM there. If the new machine uses a different embedding model setting, rebuild vectors with memory_rebuild_embeddings.

Found a mistake? Open an issue on GitHub.

Search