Skip to content

v0.8.68 WhaleFlow: agent topology primitives (fan-out, pipeline, diamond, speculative) #4012

Description

@Hmbown

Problem

Today the only available topology is independent parallel fan-out. But the design space for agent orchestration is richer: pipelines (A→B→C), diamonds (N→1 integrator→M), speculative execution (try N approaches, pick best), critique loops (implement→review→fix), and waterfall waves (each wave depends on previous completions). There is no way to declare these topologies.

Scope

Add topology primitives that the conductor agent (#4010) can use:

  1. Fan-out — Spawn N agents in parallel, wait for all, collect results (already possible, needs formalization)
  2. Pipeline — Run agents sequentially: A completes → B receives A's output → C receives B's output
  3. Diamond — N parallel agents → 1 integrator that merges/synthesizes → M verifiers
  4. Speculative — Spawn N agents with different approaches, one verifier judges and picks the best
  5. Critique loop — Implement → reviewer critiques → implementer fixes → repeat until pass
  6. Waterfall — N waves, each wave starts only after the previous wave fully completes

API shape

These could be exposed as:

  • Higher-level tool primitives: agent_batch, agent_pipeline, agent_diamond
  • Declarative in WhaleFlow DAG: WorkflowNode already has depends_on and strategy fields
  • Inline in the conductor prompt: "run these in a pipeline"

Non-goals

  • Not replacing the existing sub-agent tool. Topologies compose on top of it.
  • Not requiring WhaleFlow config for simple cases. agent_pipeline([A, B, C]) should work inline.

Acceptance

  • Each topology is usable from a conductor agent (manual invocation or WhaleFlow config)
  • Pipeline: B receives A's output as context, C receives B's output
  • Diamond: integrator receives all N outputs before dispatching M verifiers
  • Speculative: verifier selects the best result and explains why
  • Critique loop: iterates up to N rounds or until reviewer passes
  • Tests cover each topology with mock agents

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv0.8.68Targeting v0.8.68whaleflowWhaleFlow branch/leaf workflow runtime and workflow mode

    Projects

    Status
    Backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions