Skip to content

The agentswap intent command signs and announces an open intent, while intent list, intent status, and policy read and display intent state.

The V6 bindings for UserProxyFactoryV6, IntentSettlerV3, and IntentLensV3 are listed on the intent addresses page.

Placing an intent can announce commitments that move user funds. Three safety rails govern signing and submission.

Without --allow-trade, intent place is forced to dry-run: it will not relay to a gateway and will not broadcast on-chain. Execution is opt-in per invocation.

--max-amount (AGENTSWAP_TRADE_MAX_AMOUNT) sets an upper bound on raw amountIn. The CLI checks this limit before signing: if --amount exceeds the cap, the CLI refuses to sign or submit.

When --allow-trade is set, you must choose exactly one submission path: --relay or --self-submit. Combining both is rejected by the CLI.

Reading intent history, inspecting live status, and reading agent policies require EVM JSON-RPC queries.

Variable Purpose
AGENTSWAP_RPC_URL_<chainId> Target RPC for a specific chain (e.g. AGENTSWAP_RPC_URL_8453)
AGENTSWAP_RPC_URL Global fallback RPC for all chains

Supported chains and default RPC lookback windows:

Chain ID Built-in public RPC Default lookback
Base 8453 https://mainnet.base.org 200,000 blocks
Arbitrum 42161 https://arb1.arbitrum.io/rpc 200,000 blocks
BNB Smart Chain (BSC) 56 https://bsc-rpc.publicnode.com 9,000 blocks
Robinhood Chain 4663 https://rpc.mainnet.chain.robinhood.com 200,000 blocks

BSC lookback limit. Public BSC RPC nodes restrict log query ranges. On BSC, the CLI defaults to 9,000 blocks with the built-in endpoint. To query the full 200,000 blocks on BSC, configure AGENTSWAP_RPC_URL_56 with a keyed RPC provider, or pass --lookback-blocks <U64> on any read command.

intent place constructs a 12-field Order, verifies the agent’s delegation on-chain against the owner’s proxy, signs an IntentAuthorization, and wraps it in an authorization envelope (kind = 1).

Token symbols (USDC, WETH) are resolved from the local registry. Raw contract addresses (0x...) are also accepted; the CLI confirms a raw token address answers decimals(), and amounts are given as unsigned decimal integers in the token’s smallest unit, never scaled by token decimals.

Run without --allow-trade or with --dry-run to preview the order, verify the proxy state, and generate the signature without broadcasting:

Terminal window
agentswap intent place \
--chainid 8453 \
--proxy-owner 0x1111111111111111111111111111111111111111 \
--from USDC \
--to WETH \
--amount 100000000 \
--start-out 40000000000000000 \
--end-out 35000000000000000 \
--dry-run \
--key-file ./agent-signer.txt

Before signing, the command verifies:

  1. A proxy is deployed for --proxy-owner.
  2. The agent has an active delegation.
  3. The order does not exceed --max-amount.
  4. A fresh nonce is generated and confirmed unused via isAgentNonceUsed.
  5. The local order hash matches configured chain state.
  6. Authorization simulation succeeds.

Relay submits the signed order and envelope to the intent relay endpoint:

Terminal window
agentswap --allow-trade \
--max-amount 200000000 \
intent place \
--chainid 8453 \
--proxy-owner 0x1111111111111111111111111111111111111111 \
--from USDC \
--to WETH \
--amount 100000000 \
--start-out 40000000000000000 \
--end-out 35000000000000000 \
--relay \
--key-file ./agent-signer.txt

The relay client submits to https://app.agentswap.co.

Self-submit uses the local signer to broadcast an on-chain announce transaction:

Terminal window
agentswap --allow-trade \
--max-amount 200000000 \
intent place \
--chainid 8453 \
--proxy-owner 0x1111111111111111111111111111111111111111 \
--from USDC \
--to WETH \
--amount 100000000 \
--start-out 40000000000000000 \
--end-out 35000000000000000 \
--self-submit \
--key-file ./agent-signer.txt

The CLI waits for transaction confirmation and outputs the transaction hash.

Option Default Purpose
--decay-secs Equal to duration Dutch auction decay duration in seconds
--duration-secs 600 Order validity window in seconds
--deadline-secs 120 Agent authorization signature deadline

intent list scans IntentAnnounced event logs across the lookback window and checks live status. Before decoding records, it requires IntentLensV3.PREVIEW_LAYOUT() to equal 3, then reads the lens preview for each order.

You must pass either --owner or --agent (the two options conflict).

Terminal window
# List intents placed for an owner
agentswap intent list --chainid 8453 --owner 0x1111111111111111111111111111111111111111
# List intents placed by a specific agent with custom lookback
agentswap intent list --chainid 42161 \
--agent 0x2222222222222222222222222222222222222222 \
--lookback-blocks 50000

Each record displays:

  • ID: bytes32 intent identifier (the order hash).
  • Placed By: authorized agent address, or owner address if placed directly.
  • Pair: input and output token addresses.
  • Amount: input token amount.
  • Window: start and end UNIX timestamps.
  • Exclusive: exclusive_window, whether the order is in its exclusive window.
  • Floor: floor_now, the current floor in raw token units.
  • Fee: fee_now, the current fee in raw token units.
  • Required: required_now, the current required amount in raw token units.
  • Outsider Floor: floor_for_outsider, the outsider floor in raw token units.
  • Outsider Required: required_for_outsider, the outsider required amount in raw token units.
  • Status: evaluated live against the chain.
Status Reason
open The lens reports the order in-window. Inside the exclusive window (before startTime), the system filler fills at the floor; an outsider pays floor + 25 bps, and the required amounts include the 3 bps fee.
filled Settler marked filled
cancelled Settler cancellation
dead Proxy not deployed, killed by owner, or owner nonce spent
expired The lens reports inWindow = false; the order window is closed.

intent status inspects a single intent by its 32-byte order hash. It searches IntentAnnounced event logs within the lookback window, decodes the order, and queries current settlement state. It requires IntentLensV3.PREVIEW_LAYOUT() == 3 before decoding the lens preview.

Terminal window
agentswap intent status --chainid 8453 \
--id 0x9b54c86dfd54fcf85a86df0cf0e4a7a8cf68079bf970df44dbd3f749e7b2f67a

If the order was announced earlier than the default lookback window, increase the span with --lookback-blocks:

Terminal window
agentswap intent status --chainid 56 \
--id 0x9b54c86dfd54fcf85a86df0cf0e4a7a8cf68079bf970df44dbd3f749e7b2f67a \
--lookback-blocks 100000

policy reads an agent’s permissions and spending caps from the owner’s User Proxy.

Terminal window
agentswap policy --chainid 8453 \
--owner 0x1111111111111111111111111111111111111111 \
--agent 0x2222222222222222222222222222222222222222

The command reports:

  • Proxy address: the owner’s execution proxy.
  • Expiry: UNIX timestamp when agent authorization expires.
  • Epoch length: budget window length in seconds.
  • Action mask: bitmask of permitted proxy actions.
  • Generation: policy revision counter (invalidates prior signatures on increment).
  • Token budgets: token address, spending cap per epoch, amount spent in current epoch, and whether the token is allowed.