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 that each delegation matches your runMode (self, hybrid, thirdfy, agent_wallet). See Delegation and protection.

Set up delegation

1. Create

thirdfy-agent delegation create \
  --agent-api-key "$THIRDFY_AGENT_API_KEY" \
  --chain-id 8453 \
  --json

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-agent delegation activate \
  --agent-api-key "$THIRDFY_AGENT_API_KEY" \
  --json

Thirdfy saves the delegation. Its status becomes active when its limits (caveats) and expiry are valid.

3. Check it

thirdfy-agent delegation status --json
thirdfy-agent delegation inspect --json
thirdfy-agent delegation balance --json

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

thirdfy-agent preflight --json ...
thirdfy-agent run --json ...
thirdfy-agent intent-status --intent-id <id> --json

Preflight shows anything that blocks the run, from delegation, policy or the catalog, before anything runs.

5. Revoke or redeem

thirdfy-agent delegation revoke --json
thirdfy-agent delegation redeem --json

Revoking stops all future authorizations. See Delegation and protection.

Run modes and delegation

runModeDelegation
thirdfy / hybridNeeds an active Gator delegation to act on users' funds
agent_walletThe agent's own wallet. No user delegation.
selfYou sign locally. Delegation is optional, depending on the action.

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 error and blockedReason fields.
  • 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.