Reusable evaluator-optimizer graph builders for LangGraph.
Provides helper functions to construct evaluator-optimizer subgraphs that can be embedded as nodes in larger LangGraph workflows. The pattern follows the LangGraph evaluator-optimizer documentation: a generator creates output, an evaluator grades it, and a conditional edge routes back to the generator or exits.
Build a compiled evaluator-optimizer subgraph.
Creates a LangGraph StateGraph that implements the
evaluate→refine loop pattern. The returned compiled graph can
be used as a node in a parent graph.
Build a compiled analyst subgraph with embedded eval-optimize loop.
Creates a LangGraph StateGraph for a specialist analyst:
research → write → eval-optimize (subgraph) → build_completed.
The eval-optimize loop is invoked as a subgraph with a different state schema, demonstrating the parent→child→grandchild pattern with state transformation.