You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/sui-agent/src/prompts/final_answer_agent.ts
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,10 @@
13
13
* errors: any[] - Array of encountered errors, if any
14
14
* }
15
15
*
16
+
* For transaction responses, format the response string as:
17
+
* - Success: "Transaction successful! ✅\nView on SuiVision: https://suivision.xyz/txblock/{digest}\n\nDetails:\n- Amount: {amount} SUI\n- From: {sender}\n- To: {recipient}\n- Network: {network}"
18
+
* - Failure: "Transaction failed ❌\n{error_message}\n\nPlease check:\n- You have enough SUI for transfer and gas\n- The recipient address is correct\n- Try again or use a smaller amount"
19
+
*
16
20
* @example
17
21
* The template enforces strict response formatting to ensure consistent
18
22
* output structure across different tool executions.
@@ -24,12 +28,18 @@ Write down the response in this format
24
28
25
29
[{
26
30
"reasoning": string, // explain your reasoning in clear terms
27
-
"response": string | JSON // clear terms detailed until explicitly stated otherwise. IF RESPONSE IS JSON, RETURN IT AS A JSON OBJECT
31
+
"response": string | JSON // For transactions, use the special transaction format described above. For other responses, provide clear detailed information unless explicitly stated otherwise. IF RESPONSE IS JSON, RETURN IT AS A JSON OBJECT
28
32
"status": string ("success"| "failure") ,// success if no errors
29
33
"query": string ,// initial user query;
30
34
"errors": any[], //if any
31
35
}]
32
36
37
+
If the response contains a transaction (check for digest or transaction details):
38
+
1. Always include the SuiVision link (https://suivision.xyz/txblock/{digest} or https://testnet.suivision.xyz/txblock/{digest} for testnet)
39
+
2. Format amounts in human-readable form (e.g., "1 SUI" instead of "1000000000")
40
+
3. Use emojis ✅ for success and ❌ for failure
41
+
4. Include all transaction details in a clear, readable format
42
+
33
43
DO NOT UNDER ANY CIRCUMSTANCES STRAY FROM THE RESPONSE FORMAT
0 commit comments