Interface HandoffAgentConfiguration.Builder

  • Method Details

    • agentTarget

      The collaborator agent to hand off to.

      Parameters:
      agentTarget - The collaborator agent to hand off to.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • agentTarget

      The collaborator agent to hand off to.

      This is a convenience method that creates an instance of the AgentTarget.Builder avoiding the need to create one manually via AgentTarget.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to agentTarget(AgentTarget).

      Parameters:
      agentTarget - a consumer that will call methods on AgentTarget.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • instruction

      The instruction that tells the Orchestration AI Agent when and how to hand off to this collaborator agent.

      Parameters:
      instruction - The instruction that tells the Orchestration AI Agent when and how to hand off to this collaborator agent.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • instruction

      The instruction that tells the Orchestration AI Agent when and how to hand off to this collaborator agent.

      This is a convenience method that creates an instance of the MultiAgentInstruction.Builder avoiding the need to create one manually via MultiAgentInstruction.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to instruction(MultiAgentInstruction).

      Parameters:
      instruction - a consumer that will call methods on MultiAgentInstruction.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • audioStreamingEnabled

      HandoffAgentConfiguration.Builder audioStreamingEnabled(Boolean audioStreamingEnabled)

      Specifies whether the caller's audio is streamed directly to the collaborator agent and the collaborator's audio response is played back during the handoff. This applies only to voice handoffs.

      Parameters:
      audioStreamingEnabled - Specifies whether the caller's audio is streamed directly to the collaborator agent and the collaborator's audio response is played back during the handoff. This applies only to voice handoffs.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • immediateHandoff

      HandoffAgentConfiguration.Builder immediateHandoff(Boolean immediateHandoff)

      Specifies whether the conversation is handed off to this collaborator agent immediately on the first turn, without any orchestration reasoning. At most one handoff in an AI Agent's configuration can set this to true.

      Parameters:
      immediateHandoff - Specifies whether the conversation is handed off to this collaborator agent immediately on the first turn, without any orchestration reasoning. At most one handoff in an AI Agent's configuration can set this to true.
      Returns:
      Returns a reference to this object so that method calls can be chained together.