akm docs

Moving from akm 0.9 to 0.10

0.10 is a clean-up and tuning release. It replaces the engines in your config with connections (the endpoints akm sends model requests to) and harnesses (the agent programs you already have), and runs OpenCode 2 inside akm. It adds no state.db migration and does not change the index.db layout (still 26). It does remove CLI spellings, built-in improve strategies and a few workflow features, it changes what a nightly akm improve does on its own, and it changes how releases are numbered. This guide lists what to do, in order, and every change that can break a script, a task or a config.

Checked against build 0.10.261013 with the connections and harnesses rework (#1244). The user-facing summary of the whole series is the 0.10 release note; the per-build detail is in the CHANGELOG.

What the upgrade preserves

What it does not cover

0.10 reads what 0.9.15 and later wrote and converts nothing older. A config still in the old stashDir / sources[] / installed[] layout fails to load with one message that names akm migrate apply under akm 0.9.x. An install older than 0.9.15 must go through 0.9.x first (step 1).

Upgrade procedure

1. Check your starting point

akm --version
akm migrate status
akm workflow list --active

2. Find the callers that need a change

The spellings in the CLI and improve tables are unknown flags or commands in 0.10 (exit 2, UNKNOWN_FLAG / UNKNOWN_COMMAND), with no alias and no hint that points to the new spelling. Search your scripts, hooks, agent instructions, scheduled tasks and crontab for them before you upgrade:

grep -rnE -- '--shape|--target|help agents|task (list|validate)|config path --all|--reset|improve .*(--plan|--auto-accept|--run|--since)|--strategy +(quick|reflect-distill|thorough|catchup|proactive-maintenance)' <your script and task directories>
crontab -l | grep akm

--target is still valid on env run, bundle remove, bundle update and registry remove (it names the thing to act on there). Read each hit.

Also look for akm env and akm secret calls that pass a bare name: they now take a full ref (below).

--engine NAME is not in that list because it still runs, but search for it too (grep -rn -- '--engine' <your script and task directories>): after the migration it reaches only a connection or harness called NAME (step 5).

3. Upgrade the program

akm upgrade --check
akm upgrade
akm --version

akm upgrade installs the newer release, then runs akm-migrate apply (the migrator that shipped with the new install), then updates the harness plugins. It exits 1 when the migration is blocked.

4. Apply the config migration

akm migrate status
akm migrate apply --dry-run
akm migrate apply

akm upgrade already ran apply; run status to confirm. What apply does in 0.10:

Until you run it, a config in the engines form loads as connections and harnesses in memory, with one warning that names akm migrate apply, and any other retired key is harmless: the config loads, names the key once, and ignores it.

5. Fix what the migration cannot

6. Update the plugins and other callers

See Plugins. Do this in the same sitting: a 0.9 plugin passes --shape agent, which 0.10 rejects, and a 0.10 plugin passes --detail agent, which 0.9 rejects.

7. Verify

See Verify the upgrade.

Breaking changes

CLI spellings that are gone

Each is an unknown flag or command (exit 2) from 0.10.

Gone Use
akm help agents akm hints (complete guide); akm hints --detail brief for the short one
--shape agent (any command) --detail agent
--shape summary (only akm show used it) --detail brief
--detail values now brief, normal, full, agent; agent trims search, curate and show, other commands ignore it
--target on import, env create, env remove, secret set, proposal accept, proposal diff, proposal revert --bundle
akm task validate <path> akm lint --type tasks (also runs the two gates akm task sync runs; point --dir at a bundle root, not a file)
akm task list akm search --type task
akm config path --all akm info (reports the bundle, config, data, cache and state directories)
akm improve --plan akm improve --dry-run
akm improve --auto-accept akm improve && akm proposal drain --promote --yes, or a triage block with applyMode: "promote"
akm improve --run, akm improve --since akm improve report --run / --since
akm workflow create --reset --force (alone: replace with a fresh template; with --from <file>: replace from the file)

Also gone, with no replacement needed:

akm env create|run|path|export|remove and akm secret set|run take a full ref (env/prod, team//secrets/token). A bare name such as prod is a usage error (exit 2, INVALID_FLAG_VALUE) that names the full form: akm env create prod is now akm env create env/prod.

akm improve report and akm improve judge are now real subcommands. Both spellings you used before still work; --run and --since belong to report alone, and --strategy is also judge's own flag. akm improve [scope] is unchanged. akm improve canary is now an asset-type scope that matches nothing.

Improve strategies, tasks and config keys

Built-in strategies. Only default and consolidate are built in.

Removed Why / what to do
quick Measured at 0.75 to 0.76 of items solved against default's 0.89 to 0.92. For a reflect-only run, define your own (below).
reflect-distill Same measurement (0.77 to 0.78). Use default.
thorough Added only a judged triage drain, which harmed items. Use default.
catchup Identical to consolidate on the pool. Use consolidate.
proactive-maintenance The lane now lives in default.

A improve.strategies.<name> block with one of these names stays valid as an ordinary user-defined strategy, but it now inherits default and no longer carries the old built-in's settings. A reflect-only replacement for quick:

{
  "improve": {
    "strategies": {
      "reflect-only": {
        "processes": {
          "distill": { "enabled": false },
          "consolidate": { "enabled": false },
          "memoryInference": { "enabled": false },
          "triage": { "enabled": false },
          "validation": { "enabled": false },
          "proactiveMaintenance": { "enabled": false }
        }
      }
    }
  }
}

Shipped task templates. akm-improve-nightly, akm-improve-frequent and akm-improve-catchup are gone. The nightly template for a server install is now core/improve (akm improve, 02:00), and akm setup preselects it. A scheduled command written for 0.9 keeps running: --require-engines is accepted and does nothing (the run stops at planning, exit 78, only when no process has a connection or harness to run on; the check it used to make, that every enabled process has a usable target, is gone, and akm health is the replacement), and --engine NAME on agent, command run, task add, proposal new and proposal extract keeps running (step 5). Each warns once, and neither is listed in --help.

Config keys. These are removed. A config that still sets one loads (the key is named once by the unknown-key warning and ignored), and akm migrate apply drops it. Paths are under improve.strategies.<name>.processes. unless noted.

Removed key Note
consolidate.antiCollapse, consolidate.p90ChunkSecondsDefault, consolidate.minPoolSize, distill.fidelityCheck, reflect.lowValueFilter, improve.salience.outcomeWeightEnabled Measured no effect. The pool_below_min_size skip reason goes with minPoolSize.
improve.salience.salienceThreshold The high-salience lane it tuned is gone.
distill.limit, memoryInference.cls, proactiveMaintenance.limit, triage.policy Nothing read them. distill.cls and the limit of reflect and consolidate are read and stay.
defaults.llm, defaults.agent, defaults.improve, feedbackDistillation, index.<pass>.{endpoint,provider,apiKey,baseUrl,temperature,maxTokens,capabilities}, index.stalenessDetection 0.9 rejected these with a bespoke error. They now load like any unknown key.
execution.allowedTools (top level) Asset tool requests are gone (below), so there is nothing to cap.

Asset tools:. Agents, commands and tasks no longer restrict an agent's tools: an agent or command's tools: (or a Claude command's allowed-tools:) is not read, and a task's tools: is ignored with a warning. akm show no longer reports toolPolicy, a file is no longer recognized as an agent by a tools: key alone, and the EXECUTION_NOT_AUTHORIZED error is gone. To run an agent with restricted tools, define that agent in the harness itself (a Claude or OpenCode agent) and select it with the harness's agent.

Config that is newly refused: a retired source key (stashDir, sources, installed). It was only warned about in 0.9.15 and later; the error says to run akm migrate apply under akm 0.9.x.

Workflows

Workflows are Experimental through 0.10. Removed:

Child workflows stay, in a simpler form: a Markdown step declares unit: { workflow: workflows/<name>, with: { <param>: <literal or { from: <reference> }> } }. See Workflow schema.

One change in the other direction: a param's default: is now applied. A run starts with each declared default for the params it was not given, where it used to leave them absent. Workflows that restated their defaults in prose can stop.

Internal surfaces and packaging

Connections, harnesses and OpenCode

engines become connections and harnesses, akm setup and akm health are rebuilt around them, and OpenCode 2 runs inside akm. Read this section even if you never wrote an engine: akm migrate apply rewrites your config and moves your keys.

An old config still loads. A config.json with engines and defaults is read as the new form in memory, with one warning that names akm migrate apply; the file is not rewritten until you run it. An ordinary akm config set edits the file as it is, and removing a value the old form supplies is refused until the file is migrated. A connection or harness whose own settings akm cannot use (no endpoint, an endpoint that is not a URL, a harness akm cannot run) is ignored with one warning naming it, and the rest of the file loads.

akm migrate apply converts the file. Under a backup of config.json it writes connections and harnesses, renames the default LLM engine to default (references follow), moves what a strategy said about where a process runs to improve.processes and improve.qualityGate, and keeps a connection or harness the loader cannot use in the file, with a note on what to fix. It also:

akm migrate apply --dry-run lists all of it first, and akm upgrade runs it for you.

Dropped, with a note. provider, an extraParams key that shadows a first-class setting (the setting wins), supportsJsonSchema (akm retries without a schema when an endpoint rejects one), workflow.judgeEngine, a strategy's engine, model, llm and timeoutMs, an index pass's engine that names a harness (an index pass can only name a connection; with none named it runs where all model work does, on the default connection, else the default harness, restricted where the harness can be), models.json entries that name nothing configured, and the model, timeout and workspace of an opencode-sdk engine that ran over an llmEngine (akm's own runtime has no entry in config; that connection becomes default). workflow.judgeEngine is dropped because a gate's judge runs on the default connection, else the default harness; its note says whether that moves the judge, and with no workflow.judgeEngine a note says when the judge defaults.engine ran it on is no longer where it runs. A workflow run frozen by an earlier release (plan version 7 or lower) whose plan holds a command target cannot be resumed: akm workflow run abandons it with a message naming akm workflow run <ref> to start afresh. Let such runs finish before you upgrade.

Harnesses run as thin shells. akm writes only the arguments a program needs to run without a person, hands it the prompt, and takes its standard output as the reply, as written. It no longer asks a harness for JSON output or reads a result or a session id out of it. Claude Code and pi take the prompt on stdin. A harness's child gets your environment as it is, with akm's directories set over it (The environment programs run in). akm agent with no --prompt starts the harness for a person.

OpenCode 1 is legacy, not deprecated for removal. The opencode harness runs opencode run for both majors, with no change to the config. Where akm reads its version (akm setup, akm upgrade, and model work) and finds OpenCode 1, it warns once that OpenCode 2 is recommended; OpenCode 1 keeps working, its model work cannot be restricted, and no removal date is set.

Model work runs on any harness, with its tools restricted where the harness can be (Claude Code, Codex, OpenCode 2) and unrestricted, with a notice, where it cannot (How akm runs a harness). A config that names an opencode harness for model work loads.

akm's own runtime is a pinned OpenCode 2 binary that akm fetches and runs. Agent work on a connection, with no harness configured, runs on it: no entry in config, no opencode of yours, driven by your connections only (no user or project OpenCode config loads, though it still loads ~/.agents and OpenCode's system config, /etc/opencode; OpenCode's own free-model provider and model catalog fetch are off). The first run downloads the binary for your platform from the npm registry (about 114 MB, once, into <akm cache dir>/opencode/<version>/) and checks it against the registry's integrity hash; if akm cannot reach the registry for that step, enable the opencode harness with an installed OpenCode 2 instead. On bare Alpine (musl) the binary needs libstdc++ and libgcc, which the Alpine Node image already has. Its sessions are stored in <akm data dir>/opencode-runtime/data/opencode/opencode.db, with the rest of its files under <akm data dir>/opencode-runtime/. A run reports its token usage, and a persona goes in the prompt, not a system channel.

platform: "opencode" is your OpenCode, whichever major is installed, run through its CLI (opencode run, the prompt on stdin). Your OpenCode owns its configuration, logins and sessions: akm reads, copies and embeds nothing of yours to run it, and its runs are in your OpenCode history, which improve reads.

Behaviour changes you will notice

akm improve

Feedback

Other commands

Local semantic search and installs

The environment programs run in

A harness (agent tasks and workflow agent steps included) and an exec unit's command now run with your environment as it is. In 0.9 each got an allowlist (PATH, HOME, locale and a few more, plus the provider keys a harness named, and an exec unit's pass_env: names); a variable outside it, a token in your shell included, did not reach the program. Now every variable does, and pass_env: still loads and selects nothing. What akm scrubs from an agent's reply is under Architecture: Connections and Harnesses; an exec command's output is not scrubbed of what it inherited. Where a program must not see a credential, scope the process that runs akm (a dedicated account, a clean environment). See How akm runs a harness.

Codex agent work no longer gets --sandbox workspace-write and Aider no longer gets --no-auto-commits, so set the sandbox and auto-commit behaviour you want in each program's own configuration.

Workflow output redacts only the values substituted from secrets/ refs, so move any credential typed straight into an env file to secrets/ and reference it there.

Plugins

OpenCode Package Config key Cache folder
1 akm-opencode "plugin" ~/.cache/opencode/packages/akm-opencode@<tag>/
2 akm-opencode-v2 (new) "plugins" ~/.cache/opencode/npm/akm-opencode-v2@<tag>/<build>/

($XDG_CACHE_HOME moves both.) Install only the package for the OpenCode you run. For OpenCode 2, run opencode plugin add akm-opencode-v2.

Version numbers

From 0.10 a release is numbered 0.10.YYMMNN: the UTC year and month, then the release within that month (01 to 99), two digits each. The first release of 2026-10 is 0.10.261001. Every release takes the next number, whatever its stage. A prerelease carries its stage only (0.10.261001-alpha, -beta, -rc), and a build is not promoted through stages under one number. Prereleases go to the npm next tag and stable releases to latest. Versions sort by month and then number, so akm upgrade and semver ranges order them correctly. The patch number no longer says how big a change is: read the CHANGELOG, which still marks breaking changes. The 0.9 line keeps 0.9.N, and 0.11 restarts on the same scheme.

If you installed a 0.10 daily alpha (0.10.26101001-alpha through 0.10.26101202-alpha, an 8-digit patch), akm upgrade will not offer the monthly numbering: semver compares the patch numerically, so 0.10.261001 is below every daily alpha. Install the first monthly release explicitly once, for example npm install -g akm-cli@0.10.261001-beta; akm upgrade works normally from there.

akm help migrate 0.10.261019 (or akm help migrate latest) prints the 0.10 release note. The loader looks a note up by its exact file name, so akm help migrate latest and a release number such as 0.10.261001 print the CHANGELOG section only.

Verify the upgrade

akm --version              # the 0.10.YYMMNN you meant to install
akm migrate status         # status "current", ok true
akm health                 # exit 0 ok; 4 means a warning, read the check names
akm task doctor            # scheduler backend, akm path, connections and harnesses, improve triage and autonomy
akm upgrade --check        # per-plugin outcomes: current, pending, deferred, failed
akm improve --dry-run      # the strategy resolves, plan.triage shows the drain
akm lint --type tasks      # task files parse and pass the gates task sync runs
akm lint --type workflows  # workflows parse; no .yml, route, outputs or isolation
akm search --type task     # your tasks are indexed

Things to look for:

Recovery

0.10 changes neither database schema, so a downgrade needs no data change. To go back, stop AKM and any OpenCode process, install the earlier version (akm-cli@0.9.31), and restore config.json from the backup that akm migrate apply wrote under <cache dir>/config-backups/: 0.9 does not read connections, harnesses or credentials.json, so a migrated config leaves it with no engines (the backup holds your keys as they were, and models.json is in the same directory). The assets whose engine: key apply rewrote are in the backup directory the report names as assetEngineKeys.backupPath, under <akm data dir>/backups/asset-engine-keys/. Finish or abandon workflow runs started under 0.10 first; 0.9 refuses a plan a newer akm froze. Downgrade the plugins with the CLI: a 0.9 CLI rejects --detail agent and a 0.10 CLI rejects --shape agent.

For the CHANGELOG entries behind each item, see the CHANGELOG sections 0.10.26101001 to 0.10.26101202 (the daily alphas) and the monthly releases after them. For the stability tier of each command, see STABILITY.md. The rules each improve process follows in 0.10 are in the improvement loop and the improve workflow reference.