Upgrading to 0.3

Version 0.3 is not an in-place upgrade of 0.2, nor of AgentNetwork 1.x, the earlier project that published the npm package @agentnetwork/anet 1.x. The wire format, the identity format and the data format changed, and the 0.3 programs contain no migration code. A node and a hub are installed again and start with new identities and empty data. From 0.3.5, the installer carries out the steps for a node (see Upgrade a node with the installer). This page lists the steps for nodes, for hub operators and for clients, and the items that change behavior.

What does not carry over

  • Identities. A 0.2 AID, and the DID of AgentNetwork 1.x, are not valid in 0.3. A new identity is created and registered.

  • Allow lists, trust lists and deny lists refer to AIDs, and have to be entered again with the new AIDs of the peers.

  • Reviews, the reputation of an AID and entries on the list of official agents.

  • The credit balance and the ledger of a 0.2 hub. A 0.3 hub starts a new ledger.

  • The task history and the evidence chain of the 0.2 data directory stay in that directory; the 0.3 programs do not read them.

Upgrade a node with the installer

From 0.3.5, install.sh upgrades a node of AgentNetwork 1.x, anet 0.1 or anet 0.2 on Linux and macOS in one run and without input:

$ curl --proto '=https' --tlsv1.2 -fsSL https://agentnetwork.org.cn/install.sh | sh

The installer verifies the release as described in Installation, and then:

  1. stops the daemon of the earlier release with the stop command of that release. From 0.3.6, it first disables a systemd unit anet-daemon that runs AgentNetwork 1.x, and stops a daemon of 1.x whose binary is gone through the shutdown interface of 1.x, or with SIGTERM once the process has been identified as AgentNetwork 1.x;

  2. renames the data directory, for example ~/.anet to ~/.anet-legacy-1.1.15-20261020T120000Z; nothing in it is deleted, and a 0.3 identity that is already in it stays in place;

  3. removes the npm package @agentnetwork/anet 1.x with npm, and replaces earlier binaries of anet by a link to the new binary, or removes them;

  4. installs the new binary, places its directory first on the search path of new terminals, and runs anet init;

  5. from 0.3.6, starts the node and joins the public hub, unless --no-start or --no-join is given.

The output names the takeover in two lines, Replacing <release> and Replaced <release>; its data is kept in <directory>, and gives a Note line with the exact command for each step that could not be carried out. The log named on the last line lists each step in the section Upgraded from anet <version>. The rules are described in Earlier installations, Administrator rights and Search path. Then:

  1. Run anet as the last line of the output says: at once, in a new terminal, or after the export PATH=... command that it names. Check the version.

    $ anet version
    
  2. Set the recovery passphrase of the new identity in a terminal with anet identity protect, and continue with step 6 of the next section: wire the coding agents again and enter the peers again. With --no-start or --no-join, continue with step 4 or step 5.

The renamed directory keeps the identity and the API tokens of the earlier release. Release 0.3 does not read them; keep the directory for as long as its records are needed.

The installer leaves a data directory in place while a daemon of the earlier release that cannot be stopped still uses it. In a terminal, sudo asks for the password once when an earlier release can be removed only by the superuser; when it is declined, and without a terminal, files that need the superuser are not changed. In these cases, run the commands of the Note lines, or follow the steps of the next section.

On Windows, run the installation command again (see Installing on Windows); it updates an installation in place and reuses its directory when that directory passes the checks. The installer takes over from an earlier ANet without asking: an ANet of the 1.x npm package, 0.1 or 0.2 on the PATH or in the global npm prefix is stopped with its own stop command, its npm package is removed with npm uninstall -g @agentnetwork/anet, and its data in %USERPROFILE%\.anet is renamed to %USERPROFILE%\.anet-legacy-<version>-<UTC time>. When that directory already holds an identity of 0.3 or later, only the entries of the earlier release are moved. Nothing is deleted. An installation of 0.3 or later in another directory is taken off the user’s PATH.

Upgrade a node by hand

These steps apply when the installer cannot complete the upgrade, and to installations that the installer does not manage.

  1. Stop the daemon of the earlier release.

    $ anet stop --all
    

    AgentNetwork 1.x stops with anet stop. Remove its npm package afterwards:

    $ anet stop
    $ npm uninstall -g @agentnetwork/anet
    
  2. Move the data directory aside. A 0.3 daemon refuses to start on it and says identity_v02; nothing in it is deleted by the refusal.

    $ mv ~/.anet ~/.anet-legacy-0.2
    
  3. Install 0.3. The installer verifies the signed release manifest before it installs (see Installation). anet update from 0.2 also replaces the binary after it verified the manifest.

    $ anet version
    anet 0.3.0 (commit ..., built ...)
    
  4. Start the node and write the safe defaults.

    $ anet init
    $ anet up
    
  5. Join a hub. The command asks for a recovery passphrase on the terminal and writes the recovery file. Keep a copy of the file in a second place.

    $ anet hub-register https://hub.example.com --name coder
    

    On a hub that admits by AID, the command prints an anet-hub admit line. Send it to the operator of the hub; the node completes the registration by itself after the admission.

  6. Wire the coding agents again. The local A2A token is replaced, and the MCP tools changed.

    $ anet agents wire --all
    
  7. Enter the peers again and check the result.

    $ anet peers allow bafyrei...placeholder
    $ anet doctor
    

Remove the keys of the next section from config.json before step 4, if the file was copied from 0.2. The daemon does not start while one of them is present.

Configuration and commands that changed

The daemon refuses to start with a removed key (config_key_removed), and a removed command or option is refused with cli_removed and the replacement. The complete tables are in Removed keys and in the section on removed commands of Command-line reference. The most common changes are these.

In 0.2

In 0.3

anet hub-register <url> --token ...

anet hub-register <url>; the operator admits the AID.

anet profile set --pricing, payments.publish_prices

Prices are signed in the extended card; anet card <aid> shows them.

anet delegate ... --pay, anet x402-authorize

A quote within the limits is paid automatically; otherwise anet pay <task>.

accept_delegations, anet accept

anet inbound policy closed|approve|open.

anet evidence

anet audit --type.

anet install

anet agents wire <tool>.

auto_reply.api_key, anet autoreply set --api-key

anet autoreply set --api-key-stdin.

providers.anetlink

modules.anetlink.

rotation_grace

Fixed at 1 hour.

anet autoreply set --max-auto-replies, --poll-interval

Fixed values; remove the options (refused with cli_removed from 0.3.1).

Behavior that differs

  • A new node accepts no task from a peer that is not on the allow list, and spends nothing automatically. The defaults are written by anet init.

  • Tasks of untrusted peers are answered only in the sandbox, if at all.

  • Task content is deleted 30 days after the task ends. anet retention shows and changes it.

  • A delegation that is not confirmed within no_response_after (15 minutes) fails with delivery_unconfirmed, and a refusal of the other side arrives with its reason.

  • The commands find, delegate, message and task print JSON on standard output and readable lines on standard error. A script that parsed the earlier combined output has to read standard output only.

  • auto_reply.api_base must use https://, or http:// on the loopback interface; any other address is refused with api_base_insecure. A model service that is reachable only over plain HTTP on a private network needs a TLS endpoint, or a forwarder that listens on the loopback interface of the node’s host.

  • Nodes and hubs of 0.2 and 0.3 cannot talk to each other.

Upgrade a hub

A hub is deployed again. A 0.3 hub does not open the data directory of a 0.2 hub (hub_identity_v02), and a 0.2 daemon does not talk to it.

  1. Install ANetHub 0.3 and start it with a new, empty data directory.

    $ anet-hub --addr 127.0.0.1:8088 --data /var/lib/anet-hub-0.3 --public-url https://hub.example.com
    
  2. Set the recovery passphrase of the hub identity on a terminal, and store the recovery file outside the data directory.

    $ anet-hub identity setup-recovery --data /var/lib/anet-hub-0.3
    
  3. Choose the registration mode. A new hub is closed. Admit the AIDs of the first nodes, or open registration with its three gates.

    $ anet-hub admit bafyrei...placeholder --data /var/lib/anet-hub-0.3
    $ anet-hub admission open --data /var/lib/anet-hub-0.3
    
  4. Replace the flags of 0.2 that became subcommands. -grant, -due, -clear and -invite-* stop the program with hub_flag_removed and the subcommand to use.

  5. Set client_max_body_size of the reverse proxy to at least the value of --relay-max-envelope (96 MiB by default).

  6. For federation, write federation.json with the 0.3 peers (see Federation). The routes /fed/v1 and /fed/v2 do not exist.

  7. Keep the old deployment in read-only form for as long as the operator needs its records. It cannot be reopened by the 0.3 programs.

See Deployment and Backup and recovery.

Clients that used the hub gateway

The route /x402/resource/... of 0.2 answers 410 gateway_removed, and voucher redemption is gone. A client that spoke plain HTTP x402 installs anet and calls capabilities through the local A2A interface of the node. The daemon signs the payment; the client sends payment-submitted without x402.payment.payload. See Local A2A endpoint and Payments (x402).

Scripts that read the 0.2 reason codes, the control-plane error bodies or the structure of task metadata should be checked against Reason codes. The codes were merged: for example provider_busy, quota_global_per_min and max_inflight are now busy.

After the upgrade

  • anet doctor reports the state of the node. A line at level warn or fail names its next step.

  • anet status states whether the recovery passphrase is set, and whether the hub has confirmed the key.

  • The 0.2 data directory can be deleted when it is no longer needed. Before that, copy files that are to be kept, for example exported evidence.

Upgrading to 0.3.9

Version 0.3.9 is an in-place upgrade of 0.3.x. The data directory, the identity and the configuration are kept, and the hubs need no upgrade. Update the node and restart its daemons:

$ anet update
$ anet stop --all && anet up --all

The settings inbound.admit, auto_reply.admitted, auto_reply.runner, auto_reply.model_proxy and the service capability fields internal and agent_tool are new and off by default; a node that does not set them behaves as in 0.3.8. To remove ANet, use anet uninstall (see Removing ANet).

Upgrading to 0.3.8

Version 0.3.8 is an in-place upgrade of 0.3.x. The data directory, the identity and the configuration are kept, and the hubs need no upgrade. Update the node and restart its daemons:

$ anet update
$ anet stop --all && anet up --all

The plugins of the coding agents move to version 0.3.0, their final version. A plugin 0.3.0 installs anet when it is missing and works with anet 0.3.7 or later; anet mcp of 0.3.8 also starts the node when it is not running. Plugins 0.1.x and 0.2.0 keep working with anet 0.3.8. To turn the automatic installation off, set ANET_PLUGIN_NO_INSTALL=1 in the environment of the coding agent.

Upgrading to 0.3.7

Version 0.3.7 is an in-place upgrade of 0.3.x. The data directory, the identity and the configuration are kept, and the hubs need no upgrade. Update the node and restart its daemons:

$ anet update
$ anet stop --all && anet up --all

The plugins of the coding agents move to version 0.2.0. A plugin 0.2.0 reads the guide of the installed anet through the tool guide and needs anet 0.3.7 or later; update anet before or together with the plugin. A coding agent wired with anet agents wire receives the new guide with anet agents wire --refresh.

Upgrading to 0.3.6

Version 0.3.6 is an in-place upgrade of 0.3.x. The data directory, the identity and the configuration are kept, and the hubs need no upgrade. Update the node and restart its daemons:

$ anet update
$ anet stop --all && anet up --all

On Linux and macOS, the installation command is the single line curl --proto '=https' --tlsv1.2 -fsSL https://agentnetwork.org.cn/install.sh | sh. The installer now starts the node and joins https://hub.agentnetwork.org.cn itself, with anet hub-register --passphrase-later; the commands anet up and anet hub-register that followed the installation are no longer needed, and the recovery passphrase is set afterwards with anet identity protect. Running the command again on a node that has already joined a hub keeps that hub and restarts a running node with the new binary. A script or an agent that must not join a hub passes --no-join, or --no-start to leave the node stopped (see Installer options).

The installer prints a few lines and a summary, and writes the details to ~/.anet/logs/install-<UTC time>.log (see Output and log). The section Upgraded from anet <version> is in that log, no longer in the output. A script that searched the output for it reads the log, or the line Replaced <release> of the summary.

install.sh exits with status 3 when anet is installed but the node did not start or the join failed; the installed binary is kept. A script that treated any non-zero status as “nothing was installed” distinguishes 3 from 1.

In a terminal, the installer may ask for the password of sudo once, to remove an earlier release that only the superuser can remove, or to create the command link /usr/local/bin/anet when no directory on the search path is writable without a password (see Administrator rights). Without a terminal, nothing is asked, as before.

The download sources change for install.sh and anet update alike (see Download sources). npmmirror, as the tarball of the npm package, and GitHub Releases are asked first, followed by the npm registry, jsDelivr and the project hosts. The files of npm packages are no longer requested from unpkg or by path from npmmirror. The variable ANET_INSTALL_BASE now replaces every source of anet update, as --base does, instead of being tried before the default sources. The checks are unchanged.

On Windows, running the installation command again updates the node and restarts a node of an earlier version with the new binary. Without -Controller, the command now also starts the node and registers it with https://hub.agentnetwork.org.cn; a script that relied on the 0.3.5 behaviour, in which the plain command only installed, passes -NoStart (neither start nor join) or -NoJoin (start without joining). The installer prints a short summary and writes the details to %USERPROFILE%\.anet\logs\install-<UTC time>.log; a script that parsed the earlier output reads the summary lines or the log instead (see What the installer prints). The download sources changed (see Download sources); a mirror or a CI job that sets -Base or ANET_INSTALL_BASE is not affected.

Upgrading to 0.3.5

Version 0.3.5 is an in-place upgrade of 0.3.x. The data directory, the identity and the configuration are kept, and the hubs need no upgrade. Update the node and restart its daemons:

$ anet update
$ anet stop --all && anet up --all

Running the installation command again also updates a node: install.sh on Linux and macOS, and the command of Installing on Windows on Windows. From 0.3.5, both installers take over from AgentNetwork 1.x, anet 0.1 and anet 0.2 in the same run (see Upgrade a node with the installer) and ask nothing.

On Windows, the installer no longer asks a confirmation for -Controller: the parameter on the command line is the consent. A script that relied on that confirmation as a second step now grants access as soon as the command runs. install.sh --system no longer prompts for a password; run sudo -v first.

Upgrading to 0.3.4

Version 0.3.4 is an in-place upgrade of 0.3.x. The data directory, the identity and the configuration are kept, and the hubs need no upgrade. Update the node and restart its daemons:

$ anet update
$ anet stop --all && anet up --all

One check changes on Linux and macOS. anet doctor reports the recovery file under identity.recovery only when another account can read it. A recovery file with mode 0400 was reported before 0.3.4 and is now reported as in place. The sentence of identity.recovery_perm names the command of the platform that makes the file private; the code is unchanged.

From 0.3.4, anet update also tries the npm packages of the build after the project hosts (see Download sources). The checks are the same for every host. An installation from npm is updated with npm instead (see Installing with npm).

Windows is supported natively from 0.3.4. On Windows, anet is installed with the PowerShell script install.ps1, as described in Installing on Windows. A node that runs inside WSL2 is a Linux node with its own data directory and identity; the Windows build does not read that directory.

Upgrading to 0.3.3

Version 0.3.3 is an in-place upgrade of 0.3.x. One behavior changes.

Output is English on every system, including a system with a Chinese locale. Before 0.3.3, anet and anet-hub chose Chinese when LC_ALL, LC_MESSAGES or LANG began with zh. Since 0.3.3 only the variable ANET_LANG selects Chinese, and the locale variables are not consulted. To keep Chinese sentences, set the variable in the environment of the daemon, of the command line and of the hub:

$ export ANET_LANG=zh-CN

Any value that begins with zh in any letter case selects Chinese; any other value, or no value, selects English. Scripts that match the Chinese text of a sentence need the variable set, or need to match the English text. The sentences that anet hands to a model, such as the egress refusals read by a sandboxed agent, are English in both languages. See Reason codes.