Skip to main content
Build CoinFello into your own frontend by hitting the A2A endpoint directly. The API follows the Agent-to-Agent protocol spec.

Demo Project

A working example app showing authentication, streaming, and client-side tool call handling.

Endpoint

All requests use JSON-RPC 2.0.

Methods

Agent ID

Every message/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:
Omitting 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

Use message/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 as functionCall parts:
After the user approves or the action completes, submit the result back via message/send with a functionReturn part:

Tool reference

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.
Sends native gas token (e.g. ETH) to an address. Show the recipient and amount for user confirmation before broadcasting.
Transfers an NFT to another address. Display the NFT details and recipient before the user approves.
Requests a visual token balance display. Render balance cards or a portfolio summary using the provided data — no wallet transaction required.
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.
Prepares a staking transaction for a specific yield opportunity. Show the APY, protocol, pool, and lockup period before requesting approval.
Prepares an unstaking transaction to withdraw from a staking position.
Aave V4 lending market interactions. All four share the same parameter shape and require user approval before executing.
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.