الأحداث

تنفيذ

{ type: "done", text, todos, usage, stopReason, model }

انتهى الـ تنفيذ الإيطالية الإيطالية الإيطالية تنفيذي أداء هو نفس كائن إلى نداء إلى نداء إلى نداء ليس إلى.

last eventsame as the returnchildren's done is dropped
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

الحقول

{
  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 } -الركض بأكمله، بما في ذلك العناصر الفرعية

stopReasonstring

end_turn · stopped · max_steps · budget.

modelstring

نموذج الوكيل. لأي نموذج يخدم دور معطى، اقرأ دور أحداث أحداث أحداث أحداث

اقر اقر & توقف أثناء قبل استخدام النص

max_steps تقرير غير مُنجز

ينتهي التنفيذ حيث كان، لذلك النص هو ما كتب النموذج في الماضي - ربما في منتصف الخطة. 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 object
result = 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 ، وكل شيء كل عامل فرعي فعل -- نفس المجموع الذي تم فحص الميزانية مقابله.