Skip to content

Agent-driven group routing: split artifacts into named groups for parallel downstream processing #127

@marklubin

Description

@marklubin

Context

The current group() agent method groups artifacts AND synthesizes each group in one call (list[Group] with key + artifacts + content). This works but can't parallelize across groups since the agent does everything.

Proposal

Add a second group operation type: group + feed forward. The agent assigns artifacts to named groups, but does NOT synthesize them. The groups are then fed to downstream transforms for parallel processing.

# Current: group + synthesize (agent does both)
def group(self, artifacts: list[Artifact]) -> list[Group]

# New: group + feed forward (agent just routes, downstream processes)
def route(self, artifacts: list[Artifact]) -> dict[str, list[Artifact]]

This is fundamentally a different transform primitive — a "router" or "splitter" that creates named subsets for parallel downstream processing. It enables:

  • LLM-driven semantic grouping (agent decides grouping via embeddings or classification)
  • Parallel per-group synthesis via downstream MapSynthesis/ReduceSynthesis
  • Dynamic pipeline branching based on content analysis

Relationship to current work

The group() method (group + synthesize in one call) ships first. This issue tracks adding the parallel-friendly variant as a follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions