AS AgentScopeAPI 手册 / API Reference
类class agentscope.event

UserInterruptEvent

class UserInterruptEvent(EventBase)
源码Source agentscope/event/_event.py:495–517

用户中断事件,描述执行过程中的事件。位于 agentscope.event 包,继承自 EventBase。

Delivered to :meth:Agent.reply_stream (or :meth:Agent.reply) to abort a reply that is currently waiting on external input — either user confirmation (:class:RequireUserConfirmEvent) or external execution (:class:RequireExternalExecutionEvent).

On receipt, the agent closes every pending tool call with an interrupted tool result, emits a fallback assistant message, ends the reply with :attr:ReplyEndReason.INTERRUPTED, and does not enter the reasoning-acting loop.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
typeLiteral[EventType.USER_INTERRUPT]
类型字段。
EventType.USER_INTERRUPT
reply_idstr
回复标识字段。
—

属性详情Attribute Detail

type

Literal[EventType.USER_INTERRUPT] = EventType.USER_INTERRUPT

类型字段。声明为 Literal[EventType.USER_INTERRUPT]。

The type field.

源码Source agentscope/event/_event.py:514

reply_id

str

回复标识字段。声明为 str。

The reply id field.

源码Source agentscope/event/_event.py:516

继承成员Inherited Members

继承自Inherited from EventBase
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.