Documentation Index
Fetch the complete documentation index at: https://docs.hyreagent.fun/llms.txt
Use this file to discover all available pages before exploring further.
Tool Execution
When the chat agent decides to call a HYRE endpoint, it triggers a relay pattern that deducts the fee from the user’s escrow balance and forwards the request to the API.Execution Flow
Payment Signing (EVM Chains)
On Base and SKALE, the backend uses EIP-3009 TransferWithAuthorization to sign USDC transfers from the custodial wallet:- The backend decrypts the user’s wallet private key.
- It constructs a
TransferWithAuthorizationpayload with:from: user’s custodial walletto: HYRE recipient addressvalue: endpoint price in atomic USDCvalidAfter: current timestampvalidBefore: current timestamp + 300 seconds
- Signs the EIP-712 typed data with the decrypted key.
- The fee payer submits the signed authorization on-chain.
- A real transaction hash is returned and verifiable on the block explorer.
On Solana, the escrow uses an internal balance ledger with periodic on-chain settlement rather than per-query transactions. This reduces gas overhead.
Internal Auth Bypass
The/playground/call endpoint bypasses the x402 payment middleware using a shared secret (MPP_SECRET_KEY):
Error Handling
| Scenario | Behavior |
|---|---|
| Insufficient balance | Error returned before API call. No charge. |
| API call fails (5xx) | Balance refunded. Error shown in chat. |
| LLM cascade fails | HTTP 206 returned with raw data. User still charged (data was delivered). |
| Invalid parameters | Validation error returned. No charge. |
| Network timeout | Automatic retry once. If second attempt fails, balance refunded. |
Transaction Verification
Every paid query returns metadata that can be verified:On SKALE, transaction hashes can be verified on the SKALE Europa explorer.