محل & محلي

unqueue()

agent.unqueue(id) → { removed: boolean }

تسترجع رسالة من الطابور، ما دام الوكيل لم يقرأها بعد.

synchronousbefore it is read
Using Python?

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

const { id } = agent.queue("Rename it to final.md");
agent.unqueue(id);   // { removed: true }
agent.unqueue(id);   // { removed: false } — already removed, or already read
queued = agent.queue("Rename it to final.md")
agent.unqueue(queued["id"])   # {"removed": True}
agent.unqueue(queued["id"])   # {"removed": False} — already removed, or already read

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