A lightweight wrapper for running multiple agents in a fixed,
predefined sequence.
This class sets up a chain of agents where each agent's output is
automatically routed to the next agent in the list, until all
agents have executed in order.
Internally, it uses `AgentManager` to handle message passing
and execution, with the number of rounds set to the number of agents.
Attributes:
history (list): Stores the conversation or execution history.
agent_manager (AgentManager): Manages the sequential execution
of agents.
Args:
agents (List[Agent]): The list of agents to execute in sequence.
Each agent will have its `next_agent` attribute set to the
name of the following agent in the list.
init_message (str): The initial message content passed to the
first agent.
Methods:
start() -> List[Message]:
Runs the agents in sequential order, starting with the
initial message and passing outputs along the chain.
Returns the list of `Message` objects representing the
results of each agent's execution.