类 PreCallEvent

java.lang.Object
io.agentscope.core.hook.HookEvent
io.agentscope.core.hook.PreCallEvent

public final class PreCallEvent extends HookEvent
Event fired before agent starts processing.

Modifiable: Yes - setInputMessages(List)

Context:

Use Cases:

  • Log the start of agent execution
  • Initialize execution-specific resources
  • Track agent invocation metrics
  • Filter or modify input messages before agent processing
  • 构造器详细资料

    • PreCallEvent

      public PreCallEvent(Agent agent, List<Msg> inputMessages)
      Constructor for PreCallEvent.
      参数:
      agent - The agent instance (must not be null)
      inputMessages - The messages input to the agent (must not be null)
      抛出:
      NullPointerException - if agent or inputMessages is null
  • 方法详细资料

    • getInputMessages

      public List<Msg> getInputMessages()
      Get the input messages for the agent call.
      返回:
      The input messages
    • setInputMessages

      public void setInputMessages(List<Msg> inputMessages)
      Modify the input messages for the agent call.
      参数:
      inputMessages - The new message list (must not be null)
      抛出:
      NullPointerException - if inputMessages is null