examples/multiagent-patterns/pipeline/README.md
Pipeline examples demonstrating SequentialAgent, ParallelAgent, and LoopAgent from Spring AI Alibaba Agent Framework.
AI_DASHSCOPE_API_KEY environment variable set (for DashScope API)./mvnw spring-boot:run -pl examples/multiagent-patterns/pipeline
Then open http://localhost:8080/chatui/index.html to chat with the agents via Spring AI Alibaba Studio.
sequential_sql_agentBusiness scenario: Natural language to SQL generation pipeline.
Sub-agents run in sequence; each output feeds the next.
Example prompt: "I have a user table with columns (id, name, email). Find all users whose name starts with 'A'."
parallel_research_agentBusiness scenario: Multi-topic research.
Given a broad topic, researches from three angles in parallel:
Results are merged into a single report.
Example prompt: "Research the current state of large language models"
loop_sql_refinement_agentBusiness scenario: Iterative SQL refinement until quality threshold.
Runs the SQL generation + rating pipeline in a loop until the quality score exceeds 0.5 (or max iterations).
Example prompt: "Query the top 10 users from the user table ordered by created_at"