Blank white background with no objects or features visible.

نقدم لكم وصولاً مجانياً إلى تقرير Gartner Hype Cycle الكامل حول حوكمة الذكاء الاصطناعي لعام 2026. احصل على نسختك →

شرح أحداث الوكيل: عقد وقت التشغيل الكامن وراء وكلاء الذكاء الاصطناعي الموثوقين

By بويو وانغ

Published: October 6, 2026

تخبرك الإجابة النهائية للوكيل بما رآه المستخدم. أما أحداثه فتخبر تطبيقك بما حدث، وما لا يزال يحدث، وما يتطلب تدخلاً بشرياً، وكيفية الاسترداد عند انقطاع الاتصال.

Source Note API Contracts
Source note. This article describes the public TrueForge API and UI event contracts available on September 3, 2026. It separates documented behavior from architectural guidance. Event names and lifecycle semantics are grounded in the linked TrueForge documentation; the production patterns and control boundaries are TrueFoundry editorial analysis.
Key Takeaways

Key takeaways

  • An event is a typed runtime record, not merely a log line or a token fragment.
  • TrueForge exposes lifecycle, model, tool, approval, authentication, sandbox, and subagent events through one stream.
  • Live deltas and persisted events serve different jobs: responsive rendering versus settled recovery and analysis.
  • A completed turn can still contain required actions. Turn completion and workflow completion are different states.
  • Events provide evidence for debugging and evaluation, but do not by themselves guarantee authorization, exactly-once side effects, compliance, or business outcomes.

1. لماذا تعتبر واجهة برمجة تطبيقات الإجابة النهائية غير كافية للوكلاء

يتمتع استدعاء النموذج التقليدي بشكل مطمئن: إرسال مدخلات، وتلقي مخرجات. وحتى عند تدفق الاستجابة، يقوم التطبيق عادةً بإعادة بناء إجابة واحدة. لكن تنفيذ الوكيل يختلف؛ إذ يمكن للتشغيل الواحد إجراء عدة استدعاءات للنموذج، وطلب أدوات، وانتظار الموافقة، والمصادقة على خادم MCP، وإنشاء بيئة معزولة (sandbox)، والتفويض لوكلاء فرعيين، والاستئناف في طلب لاحق.

إذا كان وقت التشغيل يكشف فقط عن آخر استجابة نصية، فإن التطبيق يفقد الهيكل الذي يحتاجه لتشغيل سير العمل هذا. ولا يمكنه الإجابة بشكل موثوق على أسئلة أساسية مثل:

  • هل الوكيل في حالة تفكير، أم يستدعي أداة، أم ينتظر تدخلاً بشرياً، أم أنه انتهى؟
  • أي رسالة من النموذج اقترحت استدعاء هذه الأداة؟
  • أي الأحداث تنتمي إلى وكيل فرعي بدلاً من الوكيل الرئيسي؟
  • أي الأجزاء تم عرضها بالفعل؟
  • بعد انقطاع الاتصال، هل يجب على العميل إعادة الاتصال بالتشغيل المباشر أم إعادة البناء من الحالة المحفوظة؟

لهذا السبب تعتبر الأحداث مهمة؛ فهي الواجهة بين التنفيذ الخفي وكل ما يجب أن يستجيب له: واجهة المستخدم، وخدمة الموافقة، ووحدة تحكم العمليات، ومصحح الأخطاء، والمقيّم.

Useful Unit Callout

The useful unit is not “the agent returned a string.” It is “the runtime emitted a typed sequence of state changes that the application can interpret.”

2. ماذا يعني "الحدث" في TrueForge

تنظم TrueForge التنفيذ كـ وكيل ← جلسة ← دورة ← حدث ← تغير (Delta). يجيب كل مستوى على سؤال مختلف:

Agent Levels Table
Level Question it answers Typical lifetime
Agent Which reusable instructions, tools, model configuration, and runtime behavior define the worker? Many user interactions
Session Which ongoing issue or context does this work belong to? Several turns
Turn What happened in one request/response cycle? One execution cycle
Event What meaningful runtime occurrence happened? One structured record in the stream or history
Delta What incremental content arrived for an event that is still being assembled? Live stream only

الوكيل هو تعريف وليس عملية مستمرة التشغيل. تحافظ الجلسة على السياق عبر الدورات. تمثل الدورة دورة طلب واحدة، ولا تعمل سوى دورة واحدة في كل مرة داخل الجلسة. الأحداث هي سجلات مكتوبة يتم إنتاجها داخل تلك الدورة. يمكن تجميع بعض الأحداث—بشكل أكثر وضوحاً في رسائل النموذج—بشكل تدريجي من خلال التغيرات (deltas).

TrueForge hierarchy from agent to session to turn to events, with a turn stream and the distinction between live deltas and persisted merged events
الشكل 1. يقع الحدث داخل دورة، والتي تقع بدورها داخل جلسة دائمة. يتضمن العرض المباشر التغيرات (deltas) وعلامات دورة حياة التدفق؛ بينما يعيد العرض المحفوظ الأحداث المستقرة مع دمج تغيرات الرسائل مسبقاً.

تمنع هذه الهيكلية الوقوع في خطأين شائعين في التصميم. أولاً، لا ينبغي التعامل مع سجل الجلسة كنص متصل غير محدود، فالمداخلات توفر حدوداً طبيعية للتنفيذ. ثانياً، لا ينبغي تخزين أو تقييم التغيرات المتدفقة (streamed delta) وكأنها الحدث الدلالي النهائي.

3. تصنيف الأحداث هو بمثابة آلة الحالة لوقت التشغيل

يغطي اتحاد الأحداث الموثق في TrueForge عدة فئات. العبرة ليست في عدد أنواع الأحداث، بل في أن كل فئة تستلزم سلوكاً مختلفاً للتطبيق.

‍

‍

Try now.

One gateway for all your models, MCP servers, and agents.
No credit card needed.

Start free
Table of Contents

One Gateway for Every LLM, Agent and MCP Server

Book a 30-min with our AI expert

Book a Demo

The fastest way to build, govern and scale your AI

Book Demo
Summarize with
ChatGPT logo by OpenAI
Perplexity AI logo
Blurry red snowflake on white background, symmetrical frosty design with soft edges and abstract shape.

Discover More

No items found.
October 14, 2026
|
5 min read

How to Use OpenRouter in Claude Code: Setup Guide

No items found.
October 14, 2026
|
5 min read

Claude Code Router vs AI Gateway: When a Local Router Stops Being Enough

No items found.
LLM Gateway Evaluation
October 13, 2026
|
5 min read

كيف ينبغي للمؤسسات تقييم بوابة LLM لتحقيق قابلية التوسع؟

No items found.
Best Fine Tuning Tools for Model Training
October 13, 2026
|
5 min read

أفضل 6 أدوات ضبط دقيق لتدريب النماذج في عام 2026

الهندسة والمنتج
No items found.

Recent Blogs

Black left pointing arrow symbol on white background, directional indicator.
Black left pointing arrow symbol on white background, directional indicator.
Take a quick product tour
Start Product Tour
Product Tour