Untch docs

The bounded object every agent payment is evaluated against.

SpendIntent

A SpendIntent is the unit of proposed spend. It is a fixed-shape record the agent (or Guard) builds before preflight. Untch hashes it with a shared canonicalization path so off-chain code and on-chain contracts agree.

Why it exists

Agents do not freestyle payments from chat. They commit to:

  • Who pays (owner wallet)
  • Who spends (buyer / worker agent ids)
  • Token and max amount
  • Task and acceptance criteria hashes
  • Policy hash
  • Deadline and nonce

That bound object is what policy evaluates and what receipts refer to.

Struct fields (§8.1)

FieldMeaning
ownerOperator wallet that owns the policy
buyerAgentIdBuyer agent id (uint256)
workerAgentIdWorker agent id; 0 for plain A2MCP endpoint calls
tokenERC-20 address (mainnet USDT0 for the hosted ASP)
maxAmountCap in token base units
taskHashHash of the task description
acceptanceHashHash of acceptance criteria (0x0 if none: hygiene event)
schemaHashSchema for delivery verification
policyHashMust match the stored policy ruleset hash
deadlineUnix seconds after which the intent expires
nonceUnique per intent

Operational fields (preflight)

Along with the struct, preflight reads:

FieldMeaning
endpointAbsolute URL of the service being paid
paramsHashHash of request parameters
recipientAddressPayout address
categoryCategory slug checked against allow/deny lists
amountDisplay units for budget and escalate rules

Creating an intent

POST https://asp.untch.xyz/create_spend_intent
Content-Type: application/json

Body includes policyId and the full intent. Response includes:

  • intentHash
  • canonicalIntent
  • onchain: registration status when SpendIntentRegistry is wired and amount meets anchorIntentsAbove

Larger intents can be registered on chain. Micro A2MCP calls often stay off-chain with the hash carried in receipts.

Related