الحقول
{
type: "done",
text: "I read the four notes. Two are unfinished: …",
todos: [{ content: "Check the figures", status: "completed" }],
usage: { credits: 31, turns: 6, toolCalls: 9 },
stopReason: "end_turn",
model: "gemini-3.5-flash"
}{
"type": "done",
"todos": [{"content": "Check the figures", "status": "completed"}],
"usage": {"credits": 31, "turns": 6, "toolCalls": 9},
"stopReason": "end_turn",
}textstringالنص الأخير الذي كتبه النموذج. ليس بالضرورة جواباً - انظر: stopReason.
todosarrayالخطة كما تنتهي
usageobject{ credits, turns, toolCalls } -الركض بأكمله، بما في ذلك العناصر الفرعية
stopReasonstringend_turn · stopped · max_steps · budget.
modelstringنموذج الوكيل. لأي نموذج يخدم دور معطى، اقرأ دور أحداث أحداث أحداث أحداث
اقر اقر & توقف أثناء قبل استخدام النص
ينتهي التنفيذ حيث كان، لذلك النص هو ما كتب النموذج في الماضي - ربما في منتصف الخطة. end_turn "وكانت قد أنهت قول ما كان عليها قوله"
"الوكيل تحتي" "لم يصل إليك أبداً"
يُسقط عندما يُعرض الحدث على الحدث الطفل -- الطفل الذي يُكمل ليس هو الركض، وواجهة الاستماع لـ done أرقامه تصل بدلاً من task (المنافِعَة) tool_end.
الشكلان
const result = await agent.run({
inputs: "…",
onEvent: (e) => { if (e.type === "done") render(e); }, // for the interface
});
console.log(result.stopReason); // the same objectresult = agent.run(
inputs="…",
on_event=lambda e: render(e) if e["type"] == "done" else None, # for the interface
)
print(result["stopReason"]) # the same stop reason, with text and model addedعدد مرات كل شيء
دوران ، أدوات مدفوعة الأجر ، ملخصات conclidion ، وكل شيء كل عامل فرعي فعل -- نفس المجموع الذي تم فحص الميزانية مقابله.