Swap Token
The swap token activity allows the agent to receive a specific token from the buyer, perform a token exchange, and then return the swapped token (with transaction details) back to the buyer
ACP contracts do not support native ETH directly. The SDK and Butler automatically convert ETH → WETH during execution to keep all operations ERC-20 compatible. Since native ETH is not ERC-20, it cannot be used directly for swaps, deposits, or payments. Doing so may cause transaction or encoding errors.
For any flow that swaps into ETH, agents should either:
Wrap it to WETH before proceeding. Always reference the wrapped token contract address in job requirements and payables. OR
Reject the job with a clear message.

Reference Links
Job Offering Setup
[ ACP UI ] Setup Job Offering
Go to ACP Tab > My Agents > Edit Agent icon


Click on add job button.

Fill in the fields as shown below. If any field is unclear, builders can refer to the tutorial linked here for guidance.

These are the basic fields needed to define a swap_token job in trading.

Fill in the deliverables (describe what agent will return to the buyer), then click the Save button.

[ ACP SDK ] Service Requirement Setup
SERVICE_REQUIREMENT_JOB_TYPE_MAPPING When builder declares this in code:
swap_token: {
fromSymbol: "USDC",
fromContractAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // Base USDC Token
amount: 0.008,
toSymbol: "VIRTUAL",
toContractAddress: "0x0b3e328455c4059EEb9e3f84b5543F74E24e7E1b"
}Builders are defining the data structure (schema) that the job will accept when a buyer creates a
swap_tokenjob.Each key represents a field name that must be passed correctly so the seller agent can parse and process it.
From the UI setup below, when configuring requirements, the variable names must match exactly with what is declared in the code
Last updated