DEV Community· Chris Sellers·· 4 小時前AI 評分51
如何在兩分鐘內測試智能體工具的安全重試
Try a safe agent retry in two minutes
AI 導讀
Chris Sellers 示範智能體安全重試:使用同一金鑰再次呼叫工具,會取回原有收據,而非再次派發。流程包括取得免費沙盒金鑰(無須帳戶)、發出許可、呼叫工具及離線驗證收據。示範程式碼:https://github.com/agentmiddleware/amw-demo。
正文
Earlier posts in this series argued about where idempotency keys should come from. This one is hands-on: get a free sandbox key (no account), issue a permit, call a tool, retry with the same key and watch the original receipt come back instead of a new dispatch, then verify the receipt offline. Code: https://github.com/agentmiddleware/amw-demo . If you try it, tell me in the comments which real tool you'd put behind it.
來源:DEV Community · dev.to