Skip to content

feat: dynamic multi-agent graph (replace hardcoded pipelines) #26

Description

@alpibrupa

Problem

multi_agent.lex has three hardcoded pipelines (build→test, build→spec→test+review). There is no way to compose arbitrary agent graphs at runtime — e.g. explore + plan in parallel, then hand results to build.

Design

Replace hardcoded pipelines with a small graph DSL:

type Node = AgentNode(AgentDef) | ParallelNode(List[Node]) | SequenceNode(List[Node])

fn run_graph(root: Node, input: Str, provider: ProviderTag) -> [concurrent, io, ...] GraphResult

This keeps the existing three presets as named constructors:

fn impl_then_test() -> Node { SequenceNode([AgentNode(build_agent()), AgentNode(test_agent())]) }
fn impl_then_spec_then_test() -> Node { ... }

And allows new compositions without touching the core runner.

The TUI --multi flag should accept a pipeline name or eventually a graph spec string.

Acceptance

  • Existing three presets produce identical behavior
  • New graph compositions can be expressed without modifying multi_agent.lex
  • lex check --strict src/ passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions