Demo Project
A working example app showing authentication, streaming, and client-side tool call handling.
Endpoint
Methods
Agent ID
Everymessage/send and message/stream request must include an agentId. The endpoint is agent-agnostic — the agent is resolved at request time from the value you supply.
Pass it in params.configuration:
agentId on a new request returns: "agentId is required: provide in configuration.agentId or as a DataPart". Once a task exists, subsequent messages that include its taskId do not need to repeat it.
Find the numeric ID in the agent card under skills where each entry is a separate chat agent.
Example: Send a Message
Streaming
Usemessage/stream to get Server-Sent Events back. Each event is a JSON-RPC response wrapping an A2A stream event:
Authentication
Authentication uses SIWE (Sign-In with Ethereum). Complete the SIWE flow to obtain a session cookie before making requests. See Authentication for the full flow with curl examples.Client-side tool calls
The CoinFello chat agent which you can get from its agent card returns tool call requests as part of its A2A responses. Your frontend is responsible for handling these calls — rendering UI, prompting the user for approval, executing wallet transactions, and returning results back to the agent. Tool calls appear in the agent’s response asfunctionCall parts:
message/send with a functionReturn part:
Tool reference
call_smart_contract_function
call_smart_contract_function
Proposes a generic smart contract call for the user to approve or reject. Display the contract address, function name, arguments, and value before submitting the transaction.
send_native_gas_token
send_native_gas_token
Sends native gas token (e.g. ETH) to an address. Show the recipient and amount for user confirmation before broadcasting.
transfer_nft
transfer_nft
Transfers an NFT to another address. Display the NFT details and recipient before the user approves.
show_token_balance_ui
show_token_balance_ui
Requests a visual token balance display. Render balance cards or a portfolio summary using the provided data — no wallet transaction required.
execute_lifi_swap
execute_lifi_swap
Executes a token swap or cross-chain bridge via LI.FI. Fetch a quote from LI.FI using the provided parameters, show the route to the user, then execute on approval.
enter_staking_yield
enter_staking_yield
Prepares a staking transaction for a specific yield opportunity. Show the APY, protocol, pool, and lockup period before requesting approval.
exit_staking_yield
exit_staking_yield
Prepares an unstaking transaction to withdraw from a staking position.
aave_supply / aave_borrow / aave_repay / aave_withdraw
aave_supply / aave_borrow / aave_repay / aave_withdraw
Aave V4 lending market interactions. All four share the same parameter shape and require user approval before executing.
request_auto_rebalance_permission
request_auto_rebalance_permission
Asks the user to grant permission for automatic yield rebalancing. Display the current position, minimum yield increase threshold, and maximum lockup before the user accepts or declines.
React Package
Interested in a drop-in@coinfello/react package? Reach out to us — it’s on the roadmap.