idstring|nullدال- وسيلة تحديد الدورة، التي تحدد عند الإنشاء عندما memory على null (ب) أو
modelstringنموذج الوكيل. في أي نموذج خدم منعطفاً، اقرأ turn أحداث أحداث أحداث أحداث
modestringالـ نمط نمط هو ساري المفعول مع setMode().
titlestringمن الرسالة الأولى للدورة.
usageobject{ credits, turns, toolCalls } - إعادة في بداية كل عملية، بما في ذلك العناصر الفرعية.
contextobject{ tokens, limit, window, cachedTokens, cleared, parts }.
todosarrayالخطة الحالية
toolNamesstring[]الأدوات التي أعطيها هذا الوكيل، و التي تم إدراجها في العرف
libraryobject{ skills, subagents } -ما الذي تم تحميله آخر عملية
libraryStatusobjectلماذا المكتبة فارغة، عندما تكون كذلك.
mcpServersarrayالخوادم المرتبطة التي قد يستخدمها هذا التنفيذ.
machine · files · shellobjectما كان منحها.
ما الذي يتغيّر أثناء الركض
const running = agent.run({ message: "…" });
const timer = setInterval(() => {
console.log(agent.usage.credits, "credits ·", agent.context.tokens, "tokens");
}, 1000);
await running;
clearInterval(timer);import threading
done = threading.Event()
def watch():
while not done.wait(1):
print(agent.usage["credits"], "credits ·", agent.context["tokens"], "tokens")
threading.Thread(target=watch, daemon=True).start()
agent.run(message="…")
done.set()usage, context, todos and library are all updated as the loop goes. Events are the better channel — they carry the same numbers at the moment they change — but polling works.
(أ) يجري التنفيذ
لا يعتبر مجموع التشغيل للجسم العميل. حافظ على مجموعك الخاص على طول المدى إذا كنت بحاجة إلى تكلفة المحادثة كاملة.
مـن
| الحقل | محرف |
|---|---|
tokens | حجم الدور الأخير، كما قام مقدم العرض بقياسه |
limit | الحد الأقصى النافذ |
window | أو أنّ النموذج هو نافذة خاصة به، أو null إذا تعذرت قراءة الفهرس |
cachedTokens | What the provider served from cache |
cleared | كم عدد نتائج الأدوات التي تم إفراغها |
parts | { system, tools, memory, messages } |
هذا هو ما كان أنت انت انت انت انت انت انت انت انت، ليس ما هو
A tool that cannot run on this machine — bash with no shell on a phone — is already out of it. skill and task appear only once a library has something in it, so they are not in this list before the first run.