LocalAgent

unqueue()

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

Retira un mensaje en cola, mientras el agente aún no lo haya leído.

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 significa que el mensaje salió de la cola por otro motivo: se leyó, y un evento user_message lo indicó, o la ejecución terminó y lo devolvió en unsent.