Chapter 21

Upgrading Pi Agent: v0.13.0 API Key Migration Pitfalls

Pi Agent releases an update almost every month. Most releases fix bugs or add small features, so you can simply install them. v0.13.0, however, made one major change: all API key fields moved from the add-on Configuration tab to the Models panel in pi-web. If this is your first encounter with the change, you may wonder, “Where did the field containing my GLM key go? Was my key deleted?” No—it moved. This chapter explains how to upgrade safely, recover from this breaking change, and decide whether to enable automatic updates.

Why upgrading deserves a chapter of its own

Home Assistant add-ons are updated far more frequently than ordinary apps. Pi Agent went from 0.1.0 to 0.13.1 in about six months, with more than 20 releases along the way. Most contained behind-the-scenes fixes—nginx fixes related to Ingress or clearer log messages—and could be installed without further action. Every so often, however, a release breaks your existing configuration. This is known as a breaking change.

Pi Agent’s most noticeable breaking change so far arrived in v0.13.0. Previously, Home Assistant’s Add-on → Configuration tab displayed seven password fields, including “GLM API Key,” “OpenAI API Key,” and “Anthropic API Key.” After upgrading, the entire group disappears. The uncluttered screen can make it look as though the add-on is broken. The fields have simply moved to the pi-web Models panel described in Chapter 6, and you must enter the keys there manually.

This chapter gives you three practical skills:

  • A consistent pre-upgrade routine—create a Home Assistant backup (as explained in Chapter 20) and copy your current keys to a password manager. Even if an upgrade fails, you can recover in about three minutes.
  • The ability to read the CHANGELOG—if a release contains terms such as Breaking or Migration required, stop and read the entire entry before selecting Update.
  • A downgrade strategy—Pi Agent has no one-click rollback button, so recovery depends on the backup you create before upgrading. This chapter explains how to restore it and what happens to your conversations.
Tip: Make “create a backup, then record the keys” your routine before every update. A future breaking change will then cost you five minutes of re-entering keys, rather than leaving you wondering how to recover a broken system.

Pi Agent version timeline: milestones to watch

If you installed Pi Agent today, you already have the latest version and can skim this section for background. If you have been upgrading from an older release, this timeline highlights the versions that require particular attention.

VersionWhat changedWhat to watch for
v0.1.0 ~ v0.7.x Early releases focused on Home Assistant Ingress compatibility: missing sidebar buttons, blank iframes, /_next/* 404 responses, RSC prefetch requests escaping the Ingress prefix, and other issues specific to running a Next.js application behind Home Assistant. Skip these if you are not using them. Releases in this range were frequent, but they were bug fixes; upgrading was the right choice.
v0.8.0 Closed three operational gaps at once: the sidebar button began appearing automatically, eliminating the need to enable Show in sidebar manually; every provider received a startup self-check that wrote 401 errors directly to Logs; and pi-web’s stderr was merged into the s6 log so errors would no longer be hidden. From this release onward, the sidebar should no longer disappear under normal conditions.
v0.9.x Expanded provider support from GLM and MiniMax to four providers: GLM / MiniMax / OpenAI / OpenRouter. This reduced the risk of being blocked when a Chinese provider account ran out of credit. v0.9.1 also fixed 404 responses for resources injected into the DOM after page load, including .woff2 fonts, CSS, and favicon.ico. Upgrading from an older release added two non-Chinese providers, so an “insufficient balance” message no longer had to stop every conversation.
v0.10.0 This release made four changes: (1) added direct Anthropic, direct DeepSeek, and Groq support, bringing the total to 7 providers; (2) added a Supervisor watchdog that probes /api/home and restarts pi-web if it becomes unresponsive; (3) introduced persistent worktrees by pointing HOME to /data/pi-agent/home, so Pi coding agent files survive upgrades; and (4) pinned pi-web to a specific version instead of @latest, preventing an upstream change from silently breaking the shim. Releases v0.10.1~v0.10.4 then fixed PWA and Service Worker 404 responses and console errors introduced by pi-web 0.8.4. This was a milestone for anyone upgrading from v0.9.x or earlier: conversations and worktree data finally persisted across upgrades.
v0.11.0 Introduced the video pipeline, with a Python virtual environment, Playwright, Chromium, ffmpeg, and rclone. The first startup downloads about 720 MB; see Chapter 18. The backup_exclude setting also began excluding the reproducible venv/ and playwright-cache/ directories to keep backups compact. Allow time after the upgrade for video-tools-init to finish. Follow its progress on the Logs tab, and wait for completion before using video features.
v0.12.0 Added full support for the Skills system. The image now includes git and openssh-client, allowing pi-web’s “Add Skill from GitHub” button to perform an actual git clone. You may not notice this release if you do not use Skills. If you do, the Skill installation process became reliable from this version onward.
v0.13.0 Breaking: moved all API keys from the add-on Configuration tab to the pi-web Models panel. It also introduced four container-level options—log_level, timezone, reset_video_tools, and env_vars—fundamentally changing the configuration interface. This chapter’s main focus. See the next section.
v0.13.1 Set nginx’s client_max_body_size. Before this fix, uploading an image larger than 1 MB returned 413 Request Entity Too Large. Although this looked like a Home Assistant Ingress limit, the missing setting was in Pi Agent’s own sidecar. The fix raised the upload limit to 100 MB. Upgrade if you regularly show the AI photographs of appliances, floor plans, screenshots, or other images.
Concept: Under semantic versioning conventions, the three parts of a version such as 0.13.1 represent major, minor, and patch releases. Pi Agent is still at 0.x: it has not reached a stable 1.0 release, and a minor-version increase may contain a breaking change. An update such as 0.13.0, which advances the minor version, is the kind that warrants stopping to read the CHANGELOG.

The story behind the v0.13.0 breaking change

This is the most important section in the chapter: it accounts for the problem encountered by 90% of people upgrading from an older release.

In v0.12.x and earlier: Open Home Assistant → Add-on → Pi Agent → Configuration, and you see a complete set of password fields:

api_key:              <GLM-key>
minimax_api_key:      <MiniMax-key>
openai_api_key:       <OpenAI-key>
openrouter_api_key:   <OpenRouter-key>
anthropic_api_key:    <Anthropic-key>
deepseek_api_key:     <DeepSeek-key>
groq_api_key:         <Groq-key>

You entered the keys there, selected Save, and restarted the add-on. At startup, pi-web wrote them to /data/pi-agent/models.json, enabling the chat page to work.

In v0.13.0 and later: All seven password fields are gone. The Configuration tab instead contains four container-level options:

OptionMeaningDefault
log_levelLog verbosity: error / warn / info / debuginfo
timezoneAn IANA time-zone name, such as Asia/TaipeiEmpty (= UTC)
reset_video_toolsDelete and reinstall venv/ and playwright-cache/ at the next startup, repeating the 720 MB downloadfalse
env_varsA list of advanced environment variables for proxies, mirrors, and similar uses[]

Provider keys now belong in the pi-web Models panel. Select Models in the left-hand tab bar, choose “+ Add Provider,” and enter the base URL and key there.

Why such a large change? The official CHANGELOG gives a straightforward reason: two different interfaces used to write to /data/pi-agent/models.json—Home Assistant’s Configuration tab and the pi-web UI—and they could overwrite one another. If you added a new provider such as xAI Grok in pi-web, restarting the add-on caused the startup script to remove it because it was not on the Configuration tab’s allowlist. This refactor gives one interface sole responsibility for the file.

There is no automatic migration. The CHANGELOG explicitly says “no auto-migration; hard cut.” Upgrading does not copy your old keys into the Models panel. The old models.json file remains, but placeholders such as "$GLM_API_KEY" resolve to empty strings, so all requests return 401 until you re-enter the keys. This is the expected post-upgrade state, not a bug.

Warning: Before upgrading from v0.12.x or earlier to v0.13.x, you must copy every key from the existing Configuration tab to a password manager such as 1Password, Bitwarden, or KeePass. Those fields disappear after the upgrade, so you cannot return to them to copy the values. If you did not retain a key, your only option is to obtain a new one from the provider.

Complete procedure: upgrading from v0.12.x to v0.13.x

Follow these steps in order. Even if you are uncomfortable changing system settings, this procedure provides a safe path through the upgrade.

  1. Create a Home Assistant backup before upgrading

    As explained in Chapter 20, go to Settings → System → Backups → Create backup in the Home Assistant sidebar. Choose a full backup, or at minimum include the Pi Agent add-on. Give it a recognizable name such as pre_pi_agent_0.13.0. Wait for the backup to finish—usually 1–3 minutes. This is your recovery point.

  2. Copy every API key to a password manager

    Open Add-on → Pi Agent → Configuration. Reveal, copy, and save every populated *_api_key field in your password manager. The seven possible providers are GLM, OpenAI, Anthropic, DeepSeek, Groq, OpenRouter, and MiniMax; copy the keys for every provider you configured. This is your only way to recover those key values after the upgrade.

  3. Return to the add-on page and select Update

    Open Add-on → Pi Agent → Info. The new version number and Update button appear at the top. Select Update; Supervisor downloads the new image and restarts the container. This usually takes 2–5 minutes, although downloading the image for the first time may take longer. A stream of messages on the Logs tab is normal during this process.

  4. After the upgrade, check Logs for a successful startup

    A message such as pi-web listening on :30141 confirms that pi-web is running. Because the keys referenced by models.json are now empty, Logs may also contain 401 warnings. At this stage, those warnings are expected.

  5. Open pi-web and re-enter each key in the Models panel

    Select Pi Agent in the Home Assistant sidebar, then open the Models tab on the left. For each provider, the API Key field will be empty or marked “Not set.” Select Edit and paste in the corresponding key from your password manager. Select Test; a green check mark confirms connectivity. Then select Save. Repeat for all seven providers you use. The detailed procedure is the same as in Chapter 6.

  6. Verify the upgrade with a new conversation

    On the main chat screen, create a new session, select a provider, and send “Hello.” A normal response confirms that both the upgrade and key re-entry succeeded. Sessions created before the upgrade should still be present and can be continued normally.

  7. Review the four new container options

    Return to Add-on → Configuration and review log_level, timezone, reset_video_tools, and env_vars. Most people only need to set timezone to their IANA time-zone identifier; for Taiwan, use Asia/Taipei. This aligns log timestamps and schedules with local time. Leave the other three settings at their defaults unless you have a specific need.

Tip: An experienced user can complete the procedure in about 10 minutes; a beginner may need half an hour the first time. Once you have done it, future breaking changes will generally be variations on the same routine.

Standard post-upgrade checklist

Whether you install a major change such as v0.13.0 or a small patch such as v0.13.1, run this checklist immediately afterward. It takes three minutes and catches problems before you discover them in the middle of important work.

  1. Is the Pi Agent button still in the Home Assistant sidebar?

    Refresh the Home Assistant page and confirm that Pi Agent, with its robot icon, still appears in the left sidebar. Since v0.8.0, startup automatically enables this button, so it should not normally disappear. If it is missing, see item 3 in the troubleshooting section below.

  2. Are all providers present and passing tests in Models?

    Open Models from the left-hand tab bar. All 7 providers you previously configured should still be listed. Select Test for each one; the check is complete only when every configured provider shows green. A red cross usually indicates an invalid key or, more rarely, a provider base URL that has changed.

  3. Are all historical conversations in the Sessions list?

    On the main chat screen, inspect the Sessions list in the sidebar. Every pre-upgrade conversation should still be listed and remain readable when opened. If any are missing, restore the backup immediately; see the downgrade section below.

  4. Are all installed Skills present?

    Open Skills from the left-hand tab bar. Every Skill installed before the upgrade should still be listed. Since v0.12.0, the included git and openssh-client packages also make reinstalling a Skill reliable.

  5. Can a new conversation receive a reply?

    Create a new session, choose a provider, and send “hello.” A reply within 3 seconds means everything is working. A 401 means the key is missing or invalid; a timeout suggests provider congestion at peak hours or a disconnected VPN; and a 404 usually means the model name is wrong, perhaps because the default model list changed.

Concept: These 5 checkpoints are the minimum set of externally visible signals that Pi Agent is working. Any failure means the upgrade did not complete cleanly. A systematic check is better than assuming everything is fine, only to discover three months later that a feature broke during the upgrade.

How to downgrade

Pi Agent does not have a one-click rollback button. This is common to Home Assistant add-ons, not a flaw unique to Pi Agent. There are two ways to return to an earlier version: the standard method and an advanced alternative.

  1. Standard method: restore the pre-upgrade backup

    In the Home Assistant sidebar, go to Settings → System → Backups and find the backup you created immediately before upgrading—the one from step 1 of the procedure. Select Restore, choose to restore only the Pi Agent add-on, and wait 3–5 minutes while Supervisor reinstalls the old image and restores the earlier /data/pi-agent/ directory. Pi Agent then returns completely to its pre-upgrade state, including its version, keys, Sessions, and Skills. This is why Chapter 20 emphasizes that a pre-upgrade backup is essential rather than optional.

  2. Advanced method: install a specific version

    Open Add-on → Pi Agent → Info and use the three-dot menu in the upper-right corner. Its location varies slightly between Home Assistant versions, and some versions show it only after you enable Advanced Mode. If available, choose “Install a specific version” and enter an older version such as 0.12.0. Supervisor pulls that tag from GHCR and reinstalls it. However, your /data/pi-agent/ directory remains in the state written by the newer release, which may cause compatibility problems—for example, an older release may be unable to read the newer models.json schema. This method is only for experienced system administrators; everyone else should restore the pre-upgrade backup.

  3. Will conversations created after the upgrade disappear?

    Yes. A backup is a time machine: restoring Pi Agent returns its data to the pre-upgrade moment. Sessions created, keys entered, and Skills installed after the upgrade all disappear. Before restoring, decide whether any new conversations matter. If they do, manually export their .jsonl files first—Chapter 8 explains where to find session files—then copy them back into /data/pi-agent/sessions/ after the restore.

  4. After restoring, make sure automatic updates are off

    Otherwise, you could accidentally select Update again a few days later. Home Assistant has no official switch that pauses update notifications for one add-on, but you can disable Auto update on the add-on page if it was enabled. Make a note to remain on this version until the maintainer releases a version that resolves the breaking-change issue.

Warning: Restoring the Pi Agent add-on is all-or-nothing for that add-on: you cannot restore only selected Sessions, keys, or Skills from the backup. Choose the add-on-only restore scope described above so that Home Assistant Core and other add-ons are not rolled back. An immediately pre-upgrade backup minimizes the amount of Pi Agent data that must be reverted.

Common post-upgrade symptoms

If something seems wrong after an upgrade, compare the symptom with this table first. Most problems match one of these cases. If yours does not, continue to the troubleshooting section below.

SymptomRelevant versionLikely causeRecovery
Every message returns 401 Unauthorized After upgrading to v0.13.0 The API keys were not re-entered in the pi-web Models panel after the fields moved. In models.json, the $XXX_API_KEY placeholders resolve to empty strings. Follow step 5 of this chapter’s procedure and re-enter each key. If they are in your password manager, this takes about 5 minutes.
The video-pipeline button produces an error After upgrading to v0.11.0 or v0.13.0 The video-tools-init one-shot service is still downloading the 720 MB virtual environment and Chromium, or in v0.13.0 you enabled reset_video_tools: true and triggered a reinstall. Open Logs, find the video-tools-init messages, and wait for “install completed.” Do not keep refreshing the page on your phone.
The Skills list is empty After a direct upgrade from a release earlier than v0.7.x The path or schema under /data/pi-agent/skills/ changed, and the old Skill definitions are no longer recognized. This is extremely rare. Either restore the pre-upgrade backup or reinstall each Skill manually; see Chapter 15.
The Pi Agent button is missing from the Home Assistant sidebar Only before v0.8.0 Supervisor’s ingress_panel flag was not enabled. Since v0.8.0, the startup script sends a POST request that keeps it set to true. Open Add-on → Info and enable Show in sidebar manually, or upgrade to v0.8.0 or later for a permanent fix.
Uploading an image larger than 1 MB produces a 413 error v0.11.0 ~ v0.13.0 The nginx sidecar did not set client_max_body_size, leaving the 1 MB default in effect. Upgrade to v0.13.1 or later, which raises the limit to 100 MB.
A Chat SSE stream disconnects midway through a response Only before v0.8.0 Home Assistant Supervisor had a 60-second buffer on Ingress connections, truncating long responses. v0.8.0 added ingress_stream: true; upgrading to that version or later resolves the issue.
Pi coding agent worktree contents are missing After upgrading from v0.9.x or earlier In those releases, HOME was in the container root filesystem and disappeared during an upgrade. Since v0.10.0, it points to persistent storage at /data/pi-agent/home. There is no direct recovery. Restore the pre-upgrade backup to retrieve the files, or accept the loss. Remaining on v0.10.0 or later prevents a recurrence.
Tip: You can also read this table in reverse. If you are still on a very old version such as v0.7.x, many of these symptoms are the problems you may encounter. Upgrading to the latest version is easier than fixing them individually—provided you create a backup first.

How to read the release notes (CHANGELOG)

Every Pi Agent release records what changed, why it changed, and whether anything is breaking in the same CHANGELOG.md file on GitHub:

https://github.com/WOOWTECH/Woow_ha_pi_agent_add_on/blob/main/CHANGELOG.md

You do not need to know GitHub to read it. Open the URL in a browser: the latest release is at the top, with earlier releases listed below. Each version has a bulleted summary of its changes.

Watch for these keywords:

KeywordMeaningWhat to do
BREAKING / BreakingThe release changes your existing settings or behaviorStop and read the entire item. Create a backup before upgrading.
Migration / Migration requiredYou must move something manuallyFollow the documented “Migration:” steps, or use the procedure in this chapter.
Fix / Emergency hotfixThe release fixes a bugCheck whether it fixes a problem that affects you. If so, upgrade promptly.
Add / NewThe release adds a featureDecide whether you need it. If not, wait a week and watch for reports from early adopters.
Deprecated / RemovedA feature is being retired or has been removedIf you use it, read the entry to learn what replaces it.

For example, the first item for v0.13.0 says, “BREAKING: AI provider API keys moved out of the addon Configuration tab into the pi-web UI.” The keyword is capitalized and appears at the start of the entry so that you will not miss it. The same entry says, “Migration: after upgrade, open pi-web and re-enter each key inside the Models panel,” which tells you exactly what to do.

Concept: Reading the CHANGELOG is like reading an appliance manual: most people skip it without incident, but regret not spending three minutes on it when something goes wrong. Pi Agent’s CHANGELOG is unusually informative, explaining why each change was made rather than only what changed. Make a quick review part of every upgrade.

Should you enable automatic updates?

The add-on Info page usually includes an Auto update switch. In newer Home Assistant versions it appears near the top of the page; in older versions, or when Advanced Mode is disabled, you may need to enable Advanced Mode in your user profile before it appears. When Auto update is on, Supervisor downloads and installs new releases without asking. For a rapidly evolving 0.x add-on such as Pi Agent, it is not recommended for three reasons:

ReasonExplanation
1. You lose the chance to create a pre-upgrade backup Automatic update means Supervisor installs a release as soon as it detects one. It does not pause to remind you to create a backup first, and that missed recovery point may later prove essential.
2. Breaking changes require manual work A migration such as v0.13.0 requires you to copy keys and re-enter them in the Models panel. Automatic update cannot do that for you. Instead, you may open Pi Agent one morning, see 401 errors everywhere, and only then discover that it updated several days ago.
3. A newly released version may contain minor bugs Even rigorous testing cannot cover every environment. Waiting a week allows early adopters to find unusual bugs and gives the maintainer time to publish an x.y.1 hotfix. You can then install the corrected release directly. v0.13.0 is a useful example: v0.13.1 fixed the nginx 413 issue.

Recommended cadence: Update manually. Check the add-on page once a week or on a free weekend. If a release is available, read the CHANGELOG before deciding whether to install it. If it is not urgent, wait a week for early reports. Upgrade promptly when the release fixes a bug that is actively blocking you.

Tip: If you manage two or more Home Assistant systems—for example, one in your home and one in your parents’ home—upgrade one first and observe it for a week before upgrading the other. If the new release has a bug, the other system remains usable while you investigate.

Common problems during an upgrade

  1. The add-on will not start after selecting Update, and Logs is full of errors

    Do not reinstall immediately. Open Logs and find the first “Error” or “Fatal” message; later messages are usually cascading failures. Common causes are: (a) Docker failed to pull the image because of a network problem or a temporary GHCR outage—wait 5 minutes, then restart; (b) the Configuration schema changed—for example, before v0.13.0, api_key: "xxx" was a string, and a malformed hand-edited options.json can fail schema validation; or (c) env_vars contains an invalid variable name, which cannot begin with a number or contain a hyphen, causing startup to stop during the set -e stage. The first error usually identifies the root cause.

  2. The add-on page has no Update button

    There are two likely explanations: (a) you already have the latest release, in which case the page shows text such as Current version: 0.13.1 (latest); or (b) Supervisor has not refreshed the add-on repository index. Go to Settings → Add-on Store, open the three-dot menu, select Reload, wait 30 seconds, and check again. If neither applies, restart Home Assistant Supervisor from Settings → System → Restart Supervisor; this usually retrieves the new release.

  3. The update appears stuck halfway through

    Do not restart Home Assistant. Let the operation finish. Because the Pi Agent image contains Chromium and ffmpeg, Docker may need 5–10 minutes for the first download, or as long as 15 minutes on a slower connection. If there is still no progress after 20 minutes, check Logs for an error. Restart Supervisor and begin again only if the process is genuinely stuck; the partial download will be discarded.

  4. The keys have been re-entered, but requests still return 401

    Possible causes include: (a) an extra space or line break was copied with the key—copy it again without leading or trailing whitespace; (b) a key was entered under the wrong provider, such as a GLM key under OpenAI—keys are provider-specific; or (c) the default model name changed, and a variant such as gpt-4o is no longer available to your account. Open the Pi Agent session log; Chapter 8 explains how to find the .jsonl file. The detailed message generally identifies the provider and model returning 401 or 404. You can also consult the complete error-code reference in Chapter 22.

  5. video-tools keeps running after the update, and chat is slow

    On the first startup after v0.11.0 or v0.13.0—if you triggered reset_video_tools during either upgrade—Pi Agent must download the 720 MB Chromium and virtual-environment bundle again. pi-web remains usable during this period, but video-pipeline features must wait for installation to finish. Search Logs for video-tools-init to follow progress. When installation completes, it creates the sentinel file /data/pi-agent/.video-tools-installed. On subsequent startups, finding that sentinel lets the service finish within 100 milliseconds. See Chapter 18 for details.

  6. The watchdog keeps restarting the add-on

    Since v0.10.0, Supervisor’s watchdog has probed /api/home. If pi-web repeatedly returns 5xx responses or fails to respond, Supervisor restarts it on every watchdog cycle. The Logs tab repeatedly shows “Watchdog restart of add-on pi-agent.” This indicates a genuine pi-web startup problem, not an external network problem. As in item 1, find the first error. To stop an endless restart loop, manually stop the add-on from its Info page, then diagnose that first error.

Frequently asked questions

How often should I upgrade Pi Agent?
About once a month is enough. You can consult the CHANGELOG on GitHub at any time. Upgrade promptly if you need a new feature or a particular bug is blocking you. Otherwise, check near the beginning or middle of each month, install the accumulated small releases together, and create a backup at the same time. Linking upgrades and backups turns them into one easy monthly habit.
Must I install every new release if my current version works?
Not necessarily; it depends on the release. Bug-fix releases are worth installing—for example, v0.13.1 fixed 413 errors when uploading images larger than 1 MB, so it matters if you often show images to the AI. Feature releases depend on your needs—if you do not create videos, there is no reason to install an extra 720 MB solely for the v0.11.0 video pipeline. Do not postpone breaking releases indefinitely—later versions are usually built on the new architecture, so a delayed jump becomes harder. Moving from v0.12.x to v0.13.x may involve one migration; waiting until v0.15.x could mean handling three at once. As a rule: install relevant bug fixes promptly, adopt features as needed, and plan breaking migrations early.
I manage two or more Home Assistant systems. Should I upgrade them together?
Upgrade them separately, at least one week apart. Choose one as the test system—usually your own home—upgrade it, and use it for a week to check stability and identify any issue not mentioned in the CHANGELOG. Once it is stable, upgrade the systems at your parents’ home or office. If a new release regresses your particular use case, you then have only one system to restore. This principle applies to every add-on and operating-system upgrade, not only Pi Agent.
After downgrading, can I keep conversations created after the upgrade?
Yes, but you must move the files manually. Restoring the backup replaces the entire /data/pi-agent/ directory with its earlier state, erasing post-upgrade session files from /data/pi-agent/sessions/, where they are stored as .jsonl. Use this sequence: (1) before restoring, use SSH or Home Assistant File Editor to open /data/pi-agent/sessions/ and copy each new .jsonl file to another location such as /config/backup_sessions/; (2) restore the backup; and (3) copy those .jsonl files back to /data/pi-agent/sessions/, then restart the add-on so pi-web scans them again. An older release may not fully support the session format written by a newer one, so a restored file may produce an error. At least you will still have the conversation data rather than losing it entirely.
Will the pi-web URL or port change after an upgrade?
No. Pi Agent always uses Home Assistant Ingress. You enter through the Pi Agent button in the Home Assistant sidebar or a URL such as https://<Your HA>/hassio/ingress/<token>/. The nginx sidecar listens internally on :30142, and pi-web listens on :30141. Neither port is exposed outside the container, so an internal port change would not alter how you enter. If you bookmarked an Ingress URL containing a <token>, remember that Supervisor issues tokens dynamically. Always entering from the sidebar avoids relying on an old token.
Can I upgrade pi-web without upgrading the entire add-on?
No, and you should not try. Since v0.10.0, the Pi Agent add-on Dockerfile has pinned pi-web to a specific version such as 0.8.4 rather than @latest. The add-on’s nginx shim contains more than 40 rewrites tailored to that pi-web version’s /api/* paths and Next.js chunk names. If you run npm update inside the container, those rewrites may no longer match and the UI may become a blank page. Wait for a Pi Agent add-on release that upgrades pi-web and validates every shim, then use the add-on’s Update button. You can follow the pi-web repository to see new releases, but do not apply one until the add-on packages it.
Can I enable Auto update even though Home Assistant offers it?
Technically yes, but it is not advisable for a rapidly iterating 0.x add-on such as Pi Agent. Home Assistant’s Auto update feature is better suited to mature add-ons such as File Editor or Terminal & SSH after they reach 1.x, when releases are largely safe patches. A Pi Agent minor-version jump such as 0.12 → 0.13 may be breaking; an unattended upgrade can leave you discovering a broken setup without knowing when or why it changed. Reconsider Auto update once Pi Agent reaches 1.x and breaking changes become less frequent. Until then, keep Pi Agent under manual control.
Which chapter should I read next?
If the upgrade completed cleanly and daily operation is normal, continue to Chapter 22: Troubleshooting Guide. Its symptom tables cover 401, 402, and 404 errors, Ingress failures, video-pipeline problems, and Skill installation failures. To improve your backup strategy, review Chapter 20 and its explanation of what a Home Assistant backup includes and which files require separate protection.