agensai disconnect
Stop the running daemon. Optionally wipe local AGENSAI state.
Usage
agensai disconnect
agensai disconnect --purgeFlags
| Flag | Default | Behavior |
|---|---|---|
--home <path> | ~/.agensai | Override the home directory. |
--purge | false | After stopping the daemon, wipe ~/.agensai/ (orchestrator key, agent keys, configs). |
--json | false | Emit JSON result. |
--quiet | false | Suppress progress text. |
What it does
- Reads the lockfile at
~/.agensai/serve.lockto find the active pid. - Sends
SIGTERMto the pid. Waits up to ~5 seconds for clean shutdown. - If
--purge, deletes:~/.agensai/orchestrator.key~/.agensai/orchestrator.json~/.agensai/agents/*.json~/.agensai/config.json~/.agensai/serve.lock
- Prints result.
What --purge does not do
- Does not touch on-chain state. Your orchestrator's smart account, ENS subname, and any granted permissions remain on-chain.
- Does not revoke active agent permissions. If you want to revoke before purging, run
revokefrom your IDE (or use the dashboard's "Delete orchestrator" flow which signs the kill-switch sweep first). - Does not touch your main account. Your passkey and main account are independent of
~/.agensai/.
If your goal is to fully retire an orchestrator and reclaim all funds, do this instead:
- From the dashboard, click Delete orchestrator. This is one biometric tap that uses the pre-signed kill-switch grant to sweep all funds back to your main account, archive the orchestrator's ENS records, and mark its children as revoked.
- Then
agensai disconnect --purgeto clean local state.
--purge alone is "I'm getting rid of this device's local install"; the dashboard delete is "I'm retiring this orchestrator entirely."
Exit codes
| Code | Meaning |
|---|---|
0 | Daemon stopped (and state purged if requested). |
0 | No daemon was running; --purge may still apply. |
1 | Daemon refused to stop within the timeout. |
Re-installing on the same device
agensai disconnect --purge
agensai install <fresh-token>Get the fresh token from a fresh dashboard ceremony.