Sato Kit

v0.1.0
ai.satohub/kit Checked 2 days ago Published 2 months ago

Prepare -> execute for onchain agent actions: policy pre-flight, simulation, receipt log.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

chain_read Read chain state

Reads one value from an EVM chain: a native balance, an ERC-20 balance or allowance, the latest block number, or the result of a view or pure contract function given its ABI fragment and arguments. Read-only: a function that is not view or pure is refused before any call is made. Amounts come back as base-unit decimal strings.

ParameterTypeDescription
chain *stringChain name.
kind *string
abiobjectOne ABI function fragment for contract_read; stateMutability must be view or pure.
addressstringAccount for native_balance.
argsarrayArguments for contract_read; integers as decimal strings.
contractstringContract for contract_read.
ownerstringHolder for erc20_balance and erc20_allowance.
spenderstringSpender for erc20_allowance.
tokenstringERC-20 contract for erc20_balance and erc20_allowance.

swap_quote Quote a swap

Returns swap quotes for selling one token for another on an EVM chain. By default it returns the Sato Swap quote, whose fee is disclosed in the response, together with a quote that carries no Sato fee, side by side and unranked. Set venue to direct or lifi for the no-Sato-fee quote alone (Sato is not contacted), or 0x with an API key. Quotes only: nothing is signed or sent.

ParameterTypeDescription
buy_token *stringToken to buy: a 0x address or a symbol.
chain *stringChain name.
sell_amount *stringAmount to sell, in base units, as a decimal string.
sell_token *stringToken to sell: a 0x address or a symbol.
slippage_bpsintegerSlippage tolerance in basis points. Defaults to 50.
takerstringAddress that would sign the swap.
venuestringsato (the labelled default, returned together with a quote carrying no Sato fee), direct or lifi (LI.FI only; Sato is not called), 0x (0x only; needs zeroex_api_key).
zeroex_api_keystring0x API key, used only when venue is 0x. Never stored or digested.

swap_prepare Prepare a swap

Builds the unsigned transaction for a swap on the venue you choose: sato (the labelled default, fee disclosed in the response), direct or lifi (no Sato fee; Sato is not contacted), or 0x with an API key. If the taker's token allowance to the venue is short, it prepares the exact-amount approval first and says so; prepare again once it lands. It returns an intent to review and runs the policy pre-flight; nothing moves until execute hands it to your signer, which is where limits are enforced.

ParameterTypeDescription
buy_token *stringToken to buy: a 0x address or a symbol.
chain *stringChain name.
sell_amount *stringAmount to sell, in base units, as a decimal string.
sell_token *stringToken to sell: a 0x address or a symbol.
taker *stringAddress that would sign the swap.
slippage_bpsintegerSlippage tolerance in basis points. Defaults to 50.
venuestringsato (the labelled default, returned together with a quote carrying no Sato fee), direct or lifi (LI.FI only; Sato is not called), 0x (0x only; needs zeroex_api_key).
zeroex_api_keystring0x API key, used only when venue is 0x. Never stored or digested.

x402_prepare Prepare an x402 payment

Fetches a resource that answers with HTTP 402, reads its x402 payment requirements (the PAYMENT-REQUIRED header, or the JSON body used by the earlier version), and prepares an unsigned payment for the first requirement that fits your budget and the policy allowlists. If none fits it refuses and names each rule. It returns an intent to review; no payment happens until execute hands it to your signer, which is where limits are enforced.

ParameterTypeDescription
max_amount_base_units *stringThe most you will pay, in the asset's base units.
url *stringThe x402 resource.
assetstringOnly accept requirements in this asset (address or mint).
networkstringOnly accept requirements on this x402 network id, e.g. base or eip155:8453.

execute Execute a prepared intent

Signs and broadcasts one intent that a prepare tool returned, identified by its intent_id and nothing else. Use it after a person has read the intent summary, the simulation and the fee disclosure and approved that exact intent. Do not use it to change an amount, a recipient or a venue: prepare a new intent instead. It fails when the intent expired, was refused by the policy pre-flight, was already executed, or no signer is configured. Effect: moves funds on the chain named in the intent and appends a receipt to the local receipt log.

ParameterTypeDescription
intent_id *stringThe intent_id a prepare tool returned.

status Kit status

Reports how this kit is configured: its version, the network mode (fork, testnet or mainnet), a summary of the policy pre-flight in force, whether a signer is configured, and for each available tool the date it last passed the nightly Sato Status checks when that record can be reached. Use it before a first prepare, or to explain why a call was refused. It reads local configuration and one public status file; it changes nothing.

actions_describe Describe an action

Returns the full sato.action/v1 descriptor for one action, given its id (swap.prepare) or its tool name (swap_prepare): effects, what it can do with a key and with money, the chains it supports, its input and output schemas, the pre-flight rules it runs and the exact upstream versions it wraps. Use it before calling an unfamiliar tool. It changes nothing.

ParameterTypeDescription
action *stringAn ODA id or a tool name.