类 AgentEvent
java.lang.Object
io.agentscope.core.event.AgentEvent
- 直接已知子类:
AgentEndEvent,AgentResultEvent,AgentStartEvent,AllToolsDeniedEvent,CustomEvent,DataBlockDeltaEvent,DataBlockEndEvent,DataBlockStartEvent,ExceedMaxItersEvent,ExternalExecutionResultEvent,HintBlockEvent,ModelCallEndEvent,ModelCallStartEvent,RequestStopEvent,RequireExternalExecutionEvent,RequireUserConfirmEvent,SubagentExposedEvent,TextBlockDeltaEvent,TextBlockEndEvent,TextBlockStartEvent,ThinkingBlockDeltaEvent,ThinkingBlockEndEvent,ThinkingBlockStartEvent,ToolCallDeltaEvent,ToolCallEndEvent,ToolCallStartEvent,ToolResultDataDeltaEvent,ToolResultEndEvent,ToolResultStartEvent,ToolResultTextDeltaEvent,UserConfirmResultEvent
Base class for all fine-grained agent events.
Each event carries a unique ID, creation timestamp, and type discriminator. Events are emitted during agent execution and can be consumed via reactive streams.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明getId()Returns optional metadata attached to this event.Returns the source path identifying the originating agent.abstract AgentEventTypegetType()toString()withMetadata(Map<String, Object> metadata) Attaches arbitrary key-value metadata to this event and returns it for chaining.withSource(String source) Sets the source path and returns this event.
-
构造器详细资料
-
AgentEvent
protected AgentEvent() -
AgentEvent
-
-
方法详细资料
-
getType
-
getId
-
getCreatedAt
-
getSource
Returns the source path identifying the originating agent.nullfor events from the top-level (parent) agent; a slash-separated path (e.g."main/researcher") for events forwarded from a subagent. -
withSource
Sets the source path and returns this event. Used by the subagent event forwarding mechanism to tag child events before injecting them into the parent's event stream. -
getMetadata
Returns optional metadata attached to this event. May benullor empty. -
withMetadata
Attaches arbitrary key-value metadata to this event and returns it for chaining. -
toString
-