Update your agent
Updating means running the newest version of the agent on your machine. The steps below work even if you don't remember how you first set it up — you won't need your original command or token. Everything you need is on this page. It takes about a minute.
Do you need to update?
Open the app → Agents and look at your agent:
- update available — a newer version is out. Worth updating.
- outdated — update required — too old to run tasks safely. Keikaku has stopped giving it work until you update.
- v0.2.0 (a green version) — you're already up to date. Nothing to do.
Seeing no version at all? That agent is running an older build from before version reporting existed — treat it as “update available” and follow the steps below.
Automatic & portal updates
You don't always have to update by hand. From the app → Agents → click an agent, you can:
- Update now — asks the agent to update itself. It finishes any task it's working first, so nothing is lost.
- Auto-update — tick this and the agent updates itself whenever a newer build ships (again, after finishing its current task). The same checkbox is on the agent's own dashboard.
How self-update works (in place). The agent's executable
code is separate from its container image: the container is a stable runtime
shell, and the code runs from a small bundle on a writable volume. When you press
Update now (or auto-update fires), the running agent fetches the newest
bundle from Keikaku, verifies it, and relaunches itself on it —
inside the same container. No docker pull, no Docker
socket, no shell on the host. You watch it happen via the agent's update
status in the app. If the download can't be verified the agent keeps running
the version it has and tells you why — it never bricks itself.
One-time note: an agent only gains in-place updates once it's running the current image. If yours predates it, do the manual steps below once; every update after that is in place.
Update in 3 steps (manual)
This is the reliable way and works no matter how you installed the agent. If you used Docker Compose there's a one-liner shortcut further down, but you can safely use these steps either way.
Step 1 — Open a terminal and remove the old copy
First, open a terminal (command line) on the machine running the agent:
- Windows: press the Start button, type
PowerShell, and press Enter. - Mac: press ⌘ + Space, type
Terminal, and press Enter. - Linux: open your Terminal app.
In that window, run this to print the exact name of your agent's
container (type or paste it, then press Enter). It includes stopped containers — yours may
not be running — and prints just the name, usually something like
keikaku-evangelion:
docker ps -a --filter name=keikaku- --format "{{.Names}}"
Now remove it, replacing keikaku-evangelion with the name you just saw:
docker rm -f keikaku-evangelion
That value is the container's name — the same thing shown in the
NAMES column of docker ps. (You can use the
CONTAINER ID from the first column instead — either works.) Removing the
container does not delete your agent or its history: the agent lives in
Keikaku, not in the container. You're just clearing out the old copy so the new one can
take its place.
Nothing was printed? Your container was probably started with a custom
name. Run this, find the row whose IMAGE is
ghcr.io/keikaku-ai/agent, and use the name from its NAMES
column in the docker rm -f above:
docker ps -a --format "table {{.Names}}\t{{.Image}}\t{{.Status}}"
Leave this terminal window open — you'll come back to it in Step 3.
Step 2 — Copy the new start command from Keikaku
You don't need your old command — Keikaku builds you a fresh, complete one. Follow this exactly:
- Open app.keikaku.ai and click Agents in the menu.
- Find your agent's row. At the far right of the row are three small icons: a calendar (Schedule), two circular arrows ↻, and a trash can (Delete). Click the two circular arrows — hovering over it shows the label “Rotate token”. (This safely rebuilds the agent's connection so you get a fresh, complete command — see the note below.)
- A window titled Connect “your-agent-name” opens. Scroll down to the Run the agent section.
- Click the tab that matches the terminal you opened in Step 1 — Windows (PowerShell), Windows (CMD), or Linux / macOS.
- In the top-right corner of the black command box there's a small copy icon (two overlapping squares). Click it — it turns into a checkmark ✓ to confirm the command is copied. Leave this window open.
Why “rotate”? It rebuilds the whole command for you — including a new security token and the latest image — for the same agent, so you don't have to remember anything from setup. It retires the old token, which is exactly what you want since you're replacing the old copy.
Step 3 — Paste it into the terminal and run it
Go back to the terminal window from Step 1, paste the command, and press Enter:
- Windows (PowerShell): right-click in the window (that pastes), then press Enter.
- Mac (Terminal): press ⌘ + V, then Enter.
- Linux: press Ctrl + Shift + V, then Enter.
The command you're running is a docker run … that downloads the latest image
and starts your agent. It looks roughly like this (yours has your real token — this is
only so you know what you're pasting; don't type this out, paste the one you
copied):
docker run -d --pull=always --name keikaku-evangelion \
--restart unless-stopped \
-e AGENT_TOKEN=kk_agent_•••••• \
ghcr.io/keikaku-ai/agent:latest
After you press Enter it downloads the image (this can take a minute the first time) and starts the agent. Within a few seconds it reconnects and shows as online in the app.
That's it — you're updated. Confirm below.
Shortcut: if you used Docker Compose
Some people set the agent up with a compose file (a
docker-compose.yml, compose.yml, or the “Compose” option in
Docker Desktop). If that's you, updating is a single step — you can skip the 3 steps above:
# Run these in the folder that contains your compose file:
docker compose pull
docker compose up -d
This keeps every setting and just swaps in the new image. If your file has a custom name,
add -f <filename> to both commands (e.g.
docker compose -f agent.compose.yml pull).
Not sure whether you used Compose? If you don't have a compose file anywhere, you didn't — use the 3 steps above. When in doubt, the 3-step way always works.
Check it worked
Two easy ways to confirm:
- In the app → Agents: your agent is online and now shows a green version (like v0.2.0) with no update badge.
- On your machine: open http://localhost:9170 — the agent's own dashboard — and check the Version row shows ✓ up to date.
If something's off
-
“name is already in use” when you run the command — the old container
is still there. Run the
docker rm -f …from Step 1 (using the exact name), then paste and run the command again. -
Agent doesn't come back online — give it ~30 seconds, then reload the
Agents page. Still nothing? Check the container is running with
docker ps, and that Ollama is running on the host if this is a self-hosted (local model) agent. - Can't find the rotate button — it's the circular-arrows icon on the agent's row in Agents. If you don't see your agent at all, make sure you're in the right workspace (top-left switcher).
Prefer not to do this by hand? Configure a self-update command once and use Update now / auto-update from the portal instead. Running several agents from one compose file? The Compose shortcut updates them all at once.