类 SequentialPipeline

java.lang.Object
io.agentscope.core.pipeline.SequentialPipeline
所有已实现的接口:
Pipeline<Msg>

public class SequentialPipeline extends Object implements Pipeline<Msg>
Sequential pipeline implementation for agent orchestration. This pipeline executes agents in sequence, where each agent's output becomes the input for the next agent. Execution flow: Input -> Agent1 -> Agent2 -> ... -> AgentN -> Output Features: - Chain pattern execution - State propagation through the pipeline - Error handling and recovery - Support for empty agent lists
  • 构造器详细资料

    • SequentialPipeline

      public SequentialPipeline(List<AgentBase> agents)
      Create a sequential pipeline with the specified agents.
      参数:
      agents - List of agents to execute in sequence
  • 方法详细资料

    • execute

      public reactor.core.publisher.Mono<Msg> execute(Msg input)
      从接口复制的说明: Pipeline
      Execute the pipeline with the given input message.
      指定者:
      execute 在接口中 Pipeline<Msg>
      参数:
      input - Input message to process through the pipeline
      返回:
      Mono containing the pipeline result
    • execute

      public reactor.core.publisher.Mono<Msg> execute(Msg input, Class<?> structuredOutputClass)
      从接口复制的说明: Pipeline
      Execute the pipeline with the given input message and structured output.
      指定者:
      execute 在接口中 Pipeline<Msg>
      参数:
      input - Input message to process through the pipeline
      structuredOutputClass - The class type for structured output
      返回:
      Mono containing the pipeline result with structured output
    • getAgents

      public List<AgentBase> getAgents()
      Get the list of agents in this pipeline.
      返回:
      Copy of the agents list
    • size

      public int size()
      Get the number of agents in this pipeline.
      返回:
      Number of agents
    • isEmpty

      public boolean isEmpty()
      Check if this pipeline is empty (has no agents).
      返回:
      True if pipeline has no agents
    • getDescription

      public String getDescription()
      从接口复制的说明: Pipeline
      Get a description of this pipeline.
      指定者:
      getDescription 在接口中 Pipeline<Msg>
      返回:
      Human-readable description of the pipeline
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • builder

      public static SequentialPipeline.Builder builder()
      Create a builder for constructing sequential pipelines.
      返回:
      New pipeline builder