Composing across granularities with nested prompt graphs

Develop compositional semantics and mechanisms for nested prompt graphs in which nodes can themselves be prompt graphs, ensuring that state propagation, cost accounting, and failure handling are well-defined and preserved across levels of nesting.

Background

The authors contrast fine-grained nodes (prompt-parameterized invocations) with coarse-grained nodes (full agents) and note that frameworks often force a choice of granularity. They argue for composition across grains, where a node could itself be a graph, but this requires clear semantics that survive nesting.

They frame the need for well-defined behavior of state, cost, and failure across nested graphs as an open problem, pointing toward the flows abstraction as a direction for such compositionality.

References

The open problem is composition across grains: graphs whose nodes are themselves graphs, with semantics for state, cost, and failure that survive the nesting, the direction the flows abstraction points toward .

What makes prompts a graph: necessary and sufficient conditions for prompt graph engineering  (2607.27578 - Macedo, 30 Jul 2026) in Section 7 (Research Agenda), third axis: node granularity