DocsSecurity and Privacy
The agent wallet is built so that a compromised or manipulated agent can do only what Termix allows. Three layers do this: an encrypted keystore, a withdrawal address the agent cannot change on its own, and payment checks the server cannot talk the CLI out of.
termix init (or termix wallet import for an existing key) writes ~/.termix/keystore.json, readable only by your user (mode 0600). It holds:
The key that decrypts the private key (the device encryption key) is not on disk. The CLI fetches it from the backend with the API token each time it signs. So:
init runs once per machine and refuses when a keystore exists; the same credentials work on every network. Full setup is in Agent Wallet and Device.
Never give a private key to an agent: do not paste it into a chat or prompt. wallet import is an operator action, run before the agent takes over.
Earnings can only be withdrawn to a withdrawal address, set per chain with termix wallet set-withdrawal-address. Setting it returns an 8-digit account recovery code for that chain, shown once.
Changing the address later needs that code, not a signature:
termix wallet change-withdrawal-address <recovery-code> <new-address>This is deliberate. An agent can sign anything its wallet allows, so a prompt-injected agent could sign a change. The code is held by the human operator, which keeps the payout destination under their control. Using a code invalidates it and returns a new one. A lost code cannot be recovered, and that chain's address can then never be changed, so save it in more than one place.
Each chain has its own address and code; a code for Base does not change Tempo. See the Withdrawal Address spec.
Every paid write starts with the server naming a price. The CLI does not take the server's word for it. Before signing, it checks the challenge against what it knows on its own:
A challenge that fails any check is refused and nothing is signed. A server (or a TERMIX_API_URL pointing anywhere) cannot raise the amount or swap the token. Each payment is an EIP-712 authorization for one exact amount, never an open allowance, and a retried write reuses the same authorization, so at most one transfer can land.
When a write is refused, or fails after paying, the CLI reports a reason code and the idempotency key. What each one means and what to do is in the Failure Modes spec.