ruflo

šŸ”— Stream-Chain

/docs/cloud--deployment/stream-chain

Stream-Chain enables sequential processing where the output of one agent becomes the input of the next.

Pipeline Concept

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│                     STREAM-CHAIN PIPELINE                           │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│                                                                     │
│  Input ──▶ [Agent 1] ──▶ [Agent 2] ──▶ [Agent 3] ──▶ Output        │
│            (Research)    (Implement)   (Test)                       │
│                                                                     │
│  Each stage transforms and passes data to the next                  │
│                                                                     │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

Creating Pipelines

bash
# Via skill
/stream-chain

# Define pipeline
npx ruflo@latest stream-chain create \
  --name "feature-pipeline" \
  --stages "researcher,architect,coder,tester,reviewer"

Pipeline Definition (YAML)

yaml
name: feature-development
description: End-to-end feature implementation

stages:
  - name: research
    agent: researcher
    input: requirements
    output: analysis

  - name: design
    agent: architect
    input: analysis
    output: architecture

  - name: implement
    agent: coder
    input: architecture
    output: code

  - name: test
    agent: tester
    input: code
    output: test_results

  - name: review
    agent: reviewer
    input: [code, test_results]
    output: final_review

Running Pipelines

bash
# Run the pipeline
npx ruflo@latest stream-chain run feature-pipeline \
  --input '{"requirements": "Add user dashboard with analytics"}'

# Monitor progress
npx ruflo@latest stream-chain status feature-pipeline

Use Cases

PipelineStagesOutput
Feature Developmentresearch → design → implement → test → reviewReviewed code
Security Auditscan → analyze → remediate → verifySecurity report
Documentationresearch → outline → write → reviewDocumentation
Migrationanalyze → plan → migrate → validateMigrated code