Move to a new machine
- On the old machine, run
agentx export. It writessnapshot.jsonto your library,~/.agents/skillsby default. - Copy the file to the new machine, for example to
~/snapshot.json. - On the new machine, run
agentx import ~/snapshot.json, and answery.
Export this machine
snapshot.json. Give a name to keep more than one snapshot:
.json. A name with an extension, a slash, or a leading dot stops export with exit code 1. agentx export --help prints the path of the file export writes.
The file holds:
A snapshot leaves out what only describes this machine: where agentx found each configuration, skill and plugin on disk, whether a skill is modified or has drifted, and the ids
agentx scan uses. Two exports of an unchanged machine are the same file, byte for byte, so you can compare them.
A snapshot keeps each MCP server’s command, arguments and URL as your configuration writes them, and these can hold a token. Treat the file like a secret, and do not commit it to a public repository. A new file is readable by you alone. When you overwrite a file with --force, it keeps its old permissions.
If the file is already there, export stops with exit code 6. Pass --force to replace it:
--force. If you have no library yet, export creates it.
If a skill in your library has a name agentx cannot store as a branch, export leaves it out of the snapshot and prints a warning that names it.
If agentx cannot read your library, or part of it, export prints a warning for each problem, as agentx skill list does, and the snapshot leaves out what it could not read. Fix the problem the warning names and export again.
Import onto another machine
Import takes the path of a snapshot file:y or yes to apply the whole snapshot. Any other answer changes nothing, so answering no is how you check a snapshot first. Import then does this:
Import never deletes a skill. A skill in your library that the snapshot does not list stays as it is.
If you deleted a skill’s folder from your library by hand, import skips that skill and prints the command that brings it back.
Import only moves a skill forward:
- A skill that is newer on this machine than in the snapshot stays at its version.
- A skill you edited and did not publish stays as it is. Import skips it and tells you to run
agentx skill update <name>, which merges your edits with the newer version. - A skill whose history went another way on this machine is skipped too. Run
agentx skill update <name>to merge it.
git@github.com:you/agentx-account.git, while a cloud agent reaches it over HTTPS, as https://github.com/you/agentx-account, with a token that can only read. Import treats both as your account remote, because they have the same host and path. When the snapshot’s account remote is the same repository as this machine’s, import keeps this machine’s URL, so each machine goes on reaching it its own way. When the snapshot names another repository, import switches this machine to that one. A host alias from your SSH configuration, such as github-work, does not count as the host it stands for here, because import reads no SSH configuration.
Each line of the listing says what import did with that skill:
The last column names the configurations the skill is placed in now.
Run the same import again and it changes nothing: every skill reads
kept, or skipped for the same reason as before. Import fetches nothing for a skill the snapshot names at an exact version. It fetches a skill that follows the latest version again, and moves it forward when a newer version exists. It installs a skill it skipped once the reason is gone.
Import adds every source of the settings, whether a skill of the snapshot comes from it or not, so you can install from any of them right away. It keeps each source’s pin. A source that this machine has already added and fetched is not fetched again, so a second import of the same snapshot does not reach the network for it.
If import cannot reach a source, it prints a warning with git’s reason and goes on: the other sources and the skills are still applied, and import still succeeds. It ends with an agentx source add line for each such source:
Keep a snapshot on your account remote
Instead of a file, export can write the snapshot to your account remote, on the branchmachines/<machine id>, and import can read it from there. The branch holds one file, snapshot.json, the same file an export to a file writes. agentx writes to the account remote only when you name a machine with --machine, and never on its own.
The snapshot on the branch keeps each MCP server’s command, arguments and URL, as a snapshot file does, and these can hold a token. Anyone who can read your account remote can read them, a cloud agent’s read-only token included. Keep the account remote private, and give read access only to people and agents you trust with those values.
Back up this machine
Export to this machine’s id.agentx export --help prints it, and so does agentx machine:
Seed another machine
Export to another machine’s branch to give that machine this machine’s skills. To give your cloud agents the skills of this machine, export to the cloud machine:Restore from the account remote
On the machine to restore, add your account remote, then import the branch:--yes, see Confirm without a terminal. To set up a new computer from another machine, import that machine’s branch once. After that, the two machines are independent.
If the account remote has no branch for that machine, import stops with exit code 5. If another machine or the web app changed the branch since agentx read it, an export stops with exit code 6 and pushes nothing: run it again.
Confirm without a terminal
Import changes your settings and your skills, so it asks first. Pass--yes to answer in advance:
--yes in scripts, with --json, and wherever there is no terminal. Without --yes, import exits with code 6 and changes nothing in these cases. It does the same when you answer anything other than y or yes.
When an import is refused
A refused import changes nothing: your settings and your skills stay exactly as they were. A skill import skips does not make it fail: the import goes on with the others and exits with code 0.