Delegation & machine output
Let your agent act from users' wallets with delegation, and read thirdfy-agent JSON output in scripts and CI.
Delegation lets a user give your agent limited permission to act from their wallet. The user signs once and can revoke it later. Use thirdfy-agent delegation to set it up and manage it.
Under the hood, delegation uses the ERC-7710 standard and is Gator-compatible. Thirdfy's server checks each delegation before a run that uses it. See Delegation and protection.
Set up delegation
1. Create
This returns a payload for the owner's wallet to sign (an EIP-712 typed message). You can also call it as delegation grant.
2. Activate
After the user signs in MetaMask or another supported wallet, activate the delegation:
Thirdfy saves the delegation. Its status becomes active when its limits (caveats) and expiry are valid.
3. Check it
Run these before live writes. They confirm the expiry, who can execute, and how much allowance is left for the period.
4. Preflight and run
Preflight shows anything that blocks the run, from delegation, policy or the catalog, before anything runs.
5. Revoke or redeem
Revoking stops all future authorizations. delegation redeem runs on agent_wallet for the delegating user, so it needs --user-did (or THIRDFY_USER_DID, or a saved login userDid). See Delegation and protection.
Run mode and delegation
Since CLI 0.6.7 there is one run mode, agent_wallet, and it is the default. Delegation is not a run mode:
| How you run | Delegation |
|---|---|
Default (agent_wallet) | The agent's own wallet. No user delegation. |
agent run --signer-method fanout_intent | Fan-out to many users' wallets. Needs an active Gator delegation from each user |
--signer user | Your own wallet signs. Delegation is optional, depending on the action. |
Old values still parse: --run-mode thirdfy and --run-mode hybrid run as agent_wallet with a warning, and --run-mode self means --signer user.
Machine output (--json)
In scripts and CI, always pass --json. Its output is the stable format to build on.
- Expect new keys. The CLI may add fields over time, so ignore keys you do not know.
- Base your automation on exit codes and the structured
errorandblockedReasonfields. - For agents that do not run shell commands, use the REST Delegation API or MCP.
World ID
World ID proof of personhood has its own commands: delegation world-id-begin, delegation world-id-complete, and the deposit begin and complete pair. See World ID delegation.