CLI command reference

Every thirdfy-agent command, the credentials each one needs, and examples for the main flows.

This page lists every thirdfy-agent command in one place. Use it to look up a command, the credentials it needs, or a full example.

Overview

With thirdfy-agent you can set up agents, find actions, check a write with Thirdfy before you send it (preflight), send execute-intent requests, and follow their status.


Command index

Every command in CLI 0.5.1, taken from the CLI's own command manifest.

  • thirdfy-agent --help lists the groups. thirdfy-agent <group> --help lists a group's commands.
  • Top-level commands such as actions, run, preview and login print their flags with --help.
  • In 0.5.x, --help on some nested commands (for example agent key rotate, agent auth verify or managed wallet init) prints the root help instead. Use this page for their flags.

The sections after the index cover the main flows in detail.

Sign-in and profiles

CommandWhat it does
profile initCreate a CLI profile with its default run mode
profile useSwitch the active profile and run mode
profile showShow the saved profile configuration
config setSet a nested config value
loginSign in with your browser (--trade for writes, --no-browser to print the link), or save an auth token, owner session or agent API key
login emailSign in with a one-time email code (Privy)
logoutSign out and clear local credentials
whoamiShow your local identity, with secrets masked
doctor selfDiagnose the wallet for self run mode
doctor authDiagnose sign-in and onboarding
doctor certify executionCheck the CLI version, commands and venue schema matrix. Writes nothing
help onboardingOnboarding help as a JSON envelope
developer bootstrapDeveloper bootstrap flow
bootstrap beginBegin agent bootstrap
bootstrap completeComplete agent bootstrap

Discover and run

CommandWhat it does
agent runRun an agent action on the managed or self path
catalogs listList action catalogs
promptSend a plain-language prompt (experimental)
actionsList the agent's allowed actions (the public catalog without an agent key). Filters: --provider, --chain-id, --catalog, --data-category. Paging: --search <text>, --limit <n>, --offset <n>, --view concise|detailed
signalsList data provider apps and the signals they publish (fields, units, freshness, roles, credits)
chainsChains Thirdfy acts on: chain ids, CAIP-2 ids, execution lanes. --non-evm returns only the Solana contract
readinessCan the agent act on a chain? On agent_wallet: its execution wallet, funding, gas and wallet control. On self / hybrid / thirdfy: the delegation check
preflightRun Thirdfy's checks on a write without sending it
previewPreview a write on agent_wallet: would Thirdfy sign it, the order and risk preview, and the run command. Nothing is sent
runRun an action (send an execute intent)
self-execRun from your own wallet (self-custody) with OWS
intent-statusCheck the status of an intent

Venues

CommandWhat it does
polymarket statusPolymarket funding and setup status
polymarket setupPolymarket onboarding preflight
polymarket dry-runPolymarket dry-run preflight
venue readinessIs the venue ready? One format for polymarket, hyperliquid, lighter and veranta
venue setupPrepare or complete venue onboarding. Thirdfy also runs the one-time setup by itself with the first order (no funds move)
venue fundReturn the venue funding plan. Nothing moves here: each funding step is a write you send with run
hummingbot statusHummingbot instance health summary for an org
hummingbot connectorsList Hummingbot connectors for an org HB instance
hummingbot executor-schemaFetch Hummingbot executor config schema
hummingbot executor-createCreate a Hummingbot executor through Thirdfy, with policy checks
hummingbot executor-stopStop a Hummingbot executor through Thirdfy, with policy checks
hummingbot gateway-networksGateway network discovery via catalog read get_hummingbot_gateway_networks
hummingbot gateway-connectorsGateway connector discovery via catalog read get_hummingbot_gateway_connectors
condor policy-statusCondor Pattern A policy status via catalog read get_condor_policy_status
condor preflightCondor Pattern A preflight reservation via governance/preflight (condor.executor.create)

Wallets

CommandWhat it does
wallet listList wallets saved in the local profile config
wallet profileLive wallet profile from the API: the owner's onboarding profile with owner auth, or the agent's execution wallet with an agent key
managed setupSet up a managed wallet and delegation
managed wallet initCreate a managed (custodial) wallet
managed wallet grantManaged wallet grant
wallet executeRun through the wallet API
wallet signSign through the wallet API
wallet submitSubmit a signed transaction

Delegation and mandates

CommandWhat it does
delegation createCreate delegation
delegation init-custodialCreate a custodial session account
delegation custodial-grantCustodial delegation grant
delegation activateActivate delegation on-chain
delegation statusDelegation status
delegation inspectInspect a delegation
delegation balanceDelegation balance
delegation revokeRevoke delegation
delegation world-id-beginBegin World ID proof for an agent delegation
delegation world-id-completeComplete World ID proof for an agent delegation
delegation world-id-deposit-beginBegin World ID deposit proof for an organization
delegation world-id-deposit-completeComplete World ID deposit proof for an organization
delegation redeemRedeem via delegation
console-mandate statusConsole delegated execution status
console-mandate draftCreate Console mandate draft
console-mandate activateActivate signed Console mandate
console-mandate revokeRevoke Console mandate
credentials upsertAdd or update exchange (CEX) credentials
credentials statusExchange (CEX) credential status

Agent identity and keys

CommandWhat it does
agent registerRegister an agent
agent key rotateRotate the agent API key
agent key revokeRevoke the agent API key
agent auth challengeGet a message to sign with the owner wallet
agent auth verifyVerify the signature and get an owner session
wallet-control stateOwner: read the user-owned agent wallet state
wallet-control requestOwner: get the unsigned request for an owner action (update_policy, stop_agent, resume_agent, change_payout, export)
wallet-control submitOwner: relay the signed owner request

Credits and pricing

CommandWhat it does
credits balanceCredits balance (the agent's own with an agent key, the owner's with owner auth)
credits buyBuy the agent's credits with USDC from its wallet on Base: --usd <whole dollars>
credits transactionsPaginated credit transactions with optional billing metadata
credits usageCredits usage summary by model, provider, and action
models listList model pricing from chat_model_catalog
models estimateEstimate model and action credits before execution
pricing quoteQuote action-tier credits for a catalog action

Console chat and Brain

CommandWhat it does
chat sendSend a Console chat message (streaming)
chat threadsList Console chat threads
chat modelsList Console chat models from catalog
brain sectionsRead Console Brain sections for trading, yield, and prediction
brain suggestReturn a structured Brain strategy draft from current signals
brain preflightRun read-only Brain checks for a strategy
brain graduatePrepare an EarnClaw handoff proposal without deploying

Tracking and analytics

CommandWhat it does
data summaryAgent data summary
track actionsList tracked actions
track eventsList tracked events
track actionRecord an action to track
analytics portfolioPortfolio analytics
analytics leaderboardLeaderboard analytics

Aliases

AliasSame as
delegation grantdelegation create
delegation showdelegation status
onboarding beginbootstrap begin
onboarding completebootstrap complete
onboarding helphelp onboarding
config getprofile show

Install

npm install -g @thirdfy/agent-cli
thirdfy-agent --version --json

Or run it without a global install:

npx @thirdfy/agent-cli --help

Authentication model

The CLI uses three credentials. Each one unlocks a different set of commands.

CredentialPurposeUsed by
THIRDFY_AGENT_API_KEY (--agent-api-key)Agent identity + execution authorizationactions, preflight, preview, run, readiness, the agent's credits balance
THIRDFY_AUTH_TOKEN (--auth-token)Token-based owner auth (or user-scoped account auth)agent register, agent key *, credits balance, delegation/credentials commands
THIRDFY_OWNER_SESSION_TOKEN (--owner-session-token)Owner session from email login or wallet sign (challenge/verify)agent register, agent key *, credits balance, wallet-control *

Set them in your shell:

export THIRDFY_AGENT_API_KEY="..."
export THIRDFY_AUTH_TOKEN="..."
export THIRDFY_OWNER_SESSION_TOKEN="..."

Login once, run commands

Save your credentials and defaults in ~/.thirdfy/config.json:

thirdfy-agent login --auth-token "$THIRDFY_AUTH_TOKEN" --agent-api-key "$THIRDFY_AGENT_API_KEY" --json
thirdfy-agent whoami --json
thirdfy-agent config set --key runMode --value self --json

To sign out:

# clear local config only
thirdfy-agent logout --json

# clear local config + revoke owner session token server-side
thirdfy-agent logout --all --json

Execution-only mode (no user auth token at runtime)

With the agent API key and the agent's 0x key, you can run actions without a saved login or THIRDFY_AUTH_TOKEN. The API key alone fails with MISSING_USER_DID.

Use this mode for:

  • workers that run actions for an agent
  • bots that only find actions, preflight, run and check status
  • integrations that handle onboarding and admin steps elsewhere

Set it up like this:

export THIRDFY_AGENT_API_KEY="agent-..."
export THIRDFY_AGENT_KEY="0x..."   # the agent's 0x address (whoami: agent.agentKey)

thirdfy-agent actions --json
thirdfy-agent preflight --action swap --params '{"tokenIn":"0x...","tokenOut":"0x...","amountIn":"1000000"}' --estimated-amount-usd 25 --json
thirdfy-agent run --action swap --params '{"tokenIn":"0x...","tokenOut":"0x...","amountIn":"1000000"}' --estimated-amount-usd 25 --idempotency-key "exec-only-001" --confirm-writes --json

By default, thirdfy-agent uses production (https://api.thirdfy.com). Use --api-base only for staging, dev or custom deployments.

For agent runtimes, see Hermes and OpenClaw.

Account commands such as delegation * and credentials * still need owner auth (THIRDFY_AUTH_TOKEN).

credits balance shows the owner's balance with owner auth (--auth-token or --owner-session-token), or the agent's own balance with the agent key.

For owner onboarding steps (agent register, agent key *), use either:

  • THIRDFY_AUTH_TOKEN (token-auth path), or
  • THIRDFY_OWNER_SESSION_TOKEN (wallet-sign path)

Which token does each command need?

Command groupTHIRDFY_AGENT_API_KEYTHIRDFY_AUTH_TOKENTHIRDFY_OWNER_SESSION_TOKEN
actions (public catalog, no agent key)Not requiredNot requiredNot required
actions (the agent's own list)Required (flag, env or config)Not requiredNot required
preflight / previewRequiredNot requiredNot required
runRequiredNot requiredNot required
self-execRequiredNot requiredNot required
intent-statusNot requiredNot requiredNot required
agent auth challenge / agent auth verifyNot requiredNot requiredNot required
agent registerNot requiredOptional (Path A)Optional (Path B)
agent key rotate / agent key revokeNot requiredOptional (Path A)Optional (Path B)
delegation init-custodial / delegation custodial-grant / delegation statusNot requiredRequiredNot required
delegation create / delegation activate (migration fallback)Not requiredRequiredNot required
credentials status / credentials upsertNot requiredRequiredNot required
credits balanceFor the agent's balanceFor the owner's balance (or owner session)For the owner's balance (or auth token)
wallet-control *Not requiredRequired (or owner session)Required (or auth token)

Quickstart flow

1) Discover catalogs and actions

thirdfy-agent catalogs list --json
thirdfy-agent actions --json

To see only the actions your agent's policy allows, pass the agent key:

thirdfy-agent actions \
  --agent-api-key "$THIRDFY_AGENT_API_KEY" \
  --json

2) Governance preflight

thirdfy-agent preflight \
  --agent-api-key "$THIRDFY_AGENT_API_KEY" \
  --action swap \
  --params '{"tokenIn":"0x...","tokenOut":"0x...","amountIn":"1000000"}' \
  --estimated-amount-usd 25 \
  --json

3) Queue execution intent

thirdfy-agent run \
  --agent-api-key "$THIRDFY_AGENT_API_KEY" \
  --action swap \
  --params '{"tokenIn":"0x...","tokenOut":"0x...","amountIn":"1000000"}' \
  --estimated-amount-usd 25 \
  --idempotency-key "swap-2026-03-26-001" \
  --confirm-writes \
  --json

3.1) One-command self execution (BYOW)

thirdfy-agent run \
  --agent-api-key "$THIRDFY_AGENT_API_KEY" \
  --run-mode self \
  --broadcast \
  --action swap \
  --params '{"tokenIn":"0x...","tokenOut":"0x...","amountInRaw":"1000000","chainId":8453}' \
  --json

By default, self mode returns an unsigned transaction. Add --broadcast to have the CLI sign and send it in one command.

thirdfy-agent self-exec ... --effect-check strict --json
thirdfy-agent self-exec ... --effect-check relaxed --json
thirdfy-agent self-exec ... --effect-check off --json
thirdfy-agent doctor self --json

Run mode selection (agent_wallet / self / hybrid / thirdfy)

The same commands work in four run modes:

  • --run-mode agent_wallet: the agent's own managed execution wallet. Default for profile=personal and for new email-login profiles. The only mode that runs on Solana
  • --run-mode self: self-custody unsigned transaction flow (requires execution identity today)
  • --run-mode hybrid: self-custody + governance mirror metadata (default for profile=builder)
  • --run-mode thirdfy: Thirdfy-governed execute-intent for fan-out to delegated wallets (default for profile=network)

When more than one is set, the run mode comes from the first of these:

  1. CLI flag (--run-mode)
  2. env (THIRDFY_RUN_MODE)
  3. saved profile config (~/.thirdfy/config.json)
  4. profile defaults
thirdfy-agent profile init --profile personal --json
thirdfy-agent profile use --profile builder --run-mode hybrid --json
thirdfy-agent whoami --json

profile use --profile <name> switches to that profile's default run mode, unless you also pass --run-mode.


Using delegation with external agents

You can bring your own agent runtime and still have Thirdfy check every run:

  1. Register the agent as its owner (agent register, with Privy or wallet-sign owner auth).
  2. Set up delegation (delegation create, delegation activate, delegation status).
  3. Add venue credentials if the venue needs them (credentials upsert, credentials status).
  4. Find allowed actions with actions --agent-api-key.
  5. Run preflight before every trade.
  6. Run with run, using an idempotency key, and follow it with intent-status.

See Delegation and machine output for the guided chapter.

When you run on users' delegated wallets, split the work like this:

  • The chain decides whether a run is valid. The delegation manager checks the signature, delegate, expiry and revocation.
  • Thirdfy stores delegation state for routing, preflight and auditing.

What to store in Thirdfy (recommended):

  • userDid, agentKey, chainId, walletAddress
  • delegationManager, sessionAccountAddress, sessionAccountType
  • permissionsContext (or equivalent hash/context id)
  • permissionsExpiry
  • signed delegation payload (for deterministic replay/verification and audit)
  • status lifecycle (active, revoked, timestamps, revoke reason)

What not to store:

  • private keys, seed phrases, OTP codes, or signer secrets
  • raw long-lived exchange secrets in plaintext

In practice:

  • Store enough metadata that preflight and run always reach the same delegation result.
  • When Thirdfy runs on delegated wallets, check validity against the current chain state again before each run.

This follows the common pattern for delegated permissions: the service tracks and indexes delegation state, while the signed payload and the on-chain check keep it cryptographically enforced.


Onboarding and key lifecycle

Prove you own the agent in one of two ways:

Path A: Privy-native owner auth

thirdfy-agent agent register \
  --auth-token "$THIRDFY_AUTH_TOKEN" \
  --agent-key "0x..." \
  --name "my-agent" \
  --json

Path B: Wallet-sign owner auth

thirdfy-agent agent auth challenge \
  --agent-key "0xYOUR_AGENT_KEY" \
  --json

# Sign challenge.message with your wallet, then verify:
thirdfy-agent agent auth verify \
  --challenge-id "<challengeId>" \
  --signature "0x..." \
  --agent-key "0xYOUR_AGENT_KEY" \
  --json

# Export owner session from verify response
export THIRDFY_OWNER_SESSION_TOKEN="owner-..."

thirdfy-agent agent register \
  --owner-session-token "$THIRDFY_OWNER_SESSION_TOKEN" \
  --agent-key "0xYOUR_AGENT_KEY" \
  --name "my-agent" \
  --json

To rotate or revoke the API key, use either kind of owner auth:

thirdfy-agent agent key rotate --agent-key "0x..." --auth-token "$THIRDFY_AUTH_TOKEN" --json
thirdfy-agent agent key revoke --agent-key "0x..." --owner-session-token "$THIRDFY_OWNER_SESSION_TOKEN" --json

Create an OpenClaw agent with the CLI

Use this path to set up an OpenClaw agent from the command line only.

Prerequisites

  • Owner auth: either THIRDFY_AUTH_TOKEN (Privy path) or THIRDFY_OWNER_SESSION_TOKEN (wallet-sign path).
  • A wallet address for --agent-key. This is the agent's identity.
  • An API environment with onboarding turned on. This depends on the local, staging or production policy.

Step 1) Prove owner identity (choose one mode)

Privy-native:

export THIRDFY_AUTH_TOKEN="..."

Wallet-sign:

thirdfy-agent agent auth challenge --agent-key "0xYOUR_AGENT_KEY" --json
# Sign challenge.message and verify signature:
thirdfy-agent agent auth verify --challenge-id "<challengeId>" --signature "0x..." --agent-key "0xYOUR_AGENT_KEY" --json
export THIRDFY_OWNER_SESSION_TOKEN="owner-..."

Step 2) Register the agent

thirdfy-agent agent register \
  --auth-token "$THIRDFY_AUTH_TOKEN" \
  --agent-key "0xYOUR_AGENT_KEY" \
  --name "openclaw-my-agent" \
  --json

Or wallet-sign:

thirdfy-agent agent register \
  --owner-session-token "$THIRDFY_OWNER_SESSION_TOKEN" \
  --agent-key "0xYOUR_AGENT_KEY" \
  --name "openclaw-my-agent" \
  --json

Step 3) Get and verify the agent API key

After registration, copy agentApiKey from the response and export it:

export THIRDFY_AGENT_API_KEY="..."
thirdfy-agent actions \
  --agent-api-key "$THIRDFY_AGENT_API_KEY" \
  --json

If this works, the agent key is active and lists the actions the agent's policy allows.

Step 4) Check delegation readiness

thirdfy-agent delegation status \
  --auth-token "$THIRDFY_AUTH_TOKEN" \
  --agent-key "0xYOUR_AGENT_KEY" \
  --json

If your setup needs delegation, configure it:

thirdfy-agent delegation create \
  --auth-token "$THIRDFY_AUTH_TOKEN" \
  --agent-key "0xYOUR_AGENT_KEY" \
  --owner-address "0xOWNER_WALLET" \
  --token-address "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" \
  --max-usd-per-day 250 \
  --json

# Sign the returned data.delegation payload in the owner wallet, then:
thirdfy-agent delegation activate \
  --auth-token "$THIRDFY_AUTH_TOKEN" \
  --agent-key "0xYOUR_AGENT_KEY" \
  --wallet-address "0xOWNER_WALLET" \
  --session-account-address "0xSESSION_ACCOUNT" \
  --delegation-manager "0xDELEGATION_MANAGER" \
  --delegation '{"delegator":"0x...","delegate":"0x...","authority":"0x...","caveats":[],"salt":"0x...","signature":"0x"}' \
  --signature "0xSIGNED_DELEGATION" \
  --json

Or use the managed wallet commands (the same APIs as the custodial delegation commands), then agent run on the managed path:

thirdfy-agent managed wallet init --auth-token "$THIRDFY_AUTH_TOKEN" --json
thirdfy-agent managed wallet grant --auth-token "$THIRDFY_AUTH_TOKEN" --agent-key "0xYOUR_AGENT_KEY" --token-address "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" --max-usd-per-day 250 --json
thirdfy-agent agent run --agent-api-key "$THIRDFY_AGENT_API_KEY" --run-mode thirdfy --action swap --params '{"tokenIn":"0x...","tokenOut":"0x...","amountInRaw":"1000000"}' --json

Step 5) Check venue credential readiness (if action requires it)

thirdfy-agent credentials status \
  --auth-token "$THIRDFY_AUTH_TOKEN" \
  --venue lighter \
  --json

Step 6) Run first OpenClaw flow (preflight -> run -> intent-status)

thirdfy-agent preflight \
  --agent-api-key "$THIRDFY_AGENT_API_KEY" \
  --action swap \
  --params '{"tokenIn":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","tokenOut":"0x4200000000000000000000000000000000000006","amountIn":"1000000"}' \
  --estimated-amount-usd 25 \
  --json

thirdfy-agent run \
  --agent-api-key "$THIRDFY_AGENT_API_KEY" \
  --action swap \
  --params '{"tokenIn":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","tokenOut":"0x4200000000000000000000000000000000000006","amountIn":"1000000"}' \
  --estimated-amount-usd 25 \
  --idempotency-key "openclaw-first-run-001" \
  --confirm-writes \
  --json

Then check the status of the returned intentId:

thirdfy-agent intent-status \
  --intent-id "<intentId>" \
  --json

Console chat and Brain

Brain commands call read-first Console routes on the Thirdfy API. They never rank signals on your machine.

CommandAPI routeAuth
brain sectionsGET /api/v1/console/brain-sectionsOptional Privy
brain suggestGET /api/v1/console/brain/suggestOptional Privy
brain preflightGET /api/v1/console/brain/preflightPrivy required
brain graduateGET /api/v1/console/brain/graduatePrivy required
thirdfy-agent brain sections --auth-token "$THIRDFY_AUTH_TOKEN" --chain-id 8453 --json
thirdfy-agent brain suggest --strategy base-usdc-yield --capital-usd 1000 --risk low --json
thirdfy-agent brain preflight --strategy base-usdc-yield --auth-token "$THIRDFY_AUTH_TOKEN" --json
thirdfy-agent brain graduate --strategy base-usdc-yield --target earnclaw --auth-token "$THIRDFY_AUTH_TOKEN" --json

Console chat uses POST /api/v1/chat/stream, the same route as the web Console:

thirdfy-agent chat models --auth-token "$THIRDFY_AUTH_TOKEN" --json
thirdfy-agent chat threads --auth-token "$THIRDFY_AUTH_TOKEN" --json
thirdfy-agent chat send "Compare top Base USDC yields" \
  --auth-token "$THIRDFY_AUTH_TOKEN" \
  --network base-mainnet \
  --model gpt-4o-mini \
  --json

For how Brain looks in the Console, see Brain suggestions. Works with @thirdfy/agent-cli 0.2.20 or later (current release: 0.5.1).

Delegation and credentials checks

thirdfy-agent delegation status \
  --auth-token "$THIRDFY_AUTH_TOKEN" \
  --agent-key "0x..." \
  --json

thirdfy-agent credentials status \
  --auth-token "$THIRDFY_AUTH_TOKEN" \
  --venue lighter \
  --json

Troubleshooting

ErrorWhat to do
Invalid agent API keyCheck THIRDFY_AGENT_API_KEY, the agent's approval state and its action allowlist
Authentication required or Invalid Privy tokenRefresh THIRDFY_AUTH_TOKEN
Missing required onboarding schema (...)The backend is missing a migration. Apply the latest onboarding DB migration before you use wallet-sign owner auth
SELF_MODE_NO_FANOUTself run mode cannot fan out to delegated wallets. Use the self build-tx (unsigned transaction) flow
DELEGATION_MISSINGThe Thirdfy-managed path (thirdfy, or the hybrid mirror) has no active delegation or subscriber context
POLICY_BLOCKEDThirdfy's checks refused one or more subscribers. Inspect blockedByReason and results
PROVIDER_UNAVAILABLEThis action or provider does not support execute-intent on this path
PREFLIGHT_BLOCKEDCheck the preflight fields blocked, blockedByReason and results
INTENT_NOT_FOUNDConfirm the intentId, and that you are on the same environment (production or a staging/dev API base)
capabilitiesVersion: null in metaThe target API may not expose /api/v1/agent/cli/capabilities yet