44
55from typing import Any
66
7- from prompture import GroupCallbacks , LoopGroup , SequentialGroup
7+ from prompture import AsyncLoopGroup , AsyncSequentialGroup , GroupCallbacks
88
99from ..config import settings
1010from ..models import AgentConfig
@@ -21,7 +21,7 @@ def create_pipeline(
2121 max_review_iterations : int | None = None ,
2222 review_threshold : int | None = None ,
2323 agent_configs : dict [str , AgentConfig ] | None = None ,
24- ) -> SequentialGroup :
24+ ) -> AsyncSequentialGroup :
2525 """Build the full generation pipeline (static — all 4 agents).
2626
2727 Pipeline structure::
@@ -60,7 +60,7 @@ def _exit_condition(state: dict[str, Any], iteration: int) -> bool:
6060 lower = feedback_text .lower ()
6161 return '"approved": true' in lower or '"approved":true' in lower
6262
63- build_review_loop = LoopGroup (
63+ build_review_loop = AsyncLoopGroup (
6464 [
6565 (
6666 developer ,
@@ -92,7 +92,7 @@ def _exit_condition(state: dict[str, Any], iteration: int) -> bool:
9292 )
9393
9494 # Full pipeline
95- pipeline = SequentialGroup (
95+ pipeline = AsyncSequentialGroup (
9696 [
9797 (pm , "{prompt}" ),
9898 (
@@ -120,7 +120,7 @@ def create_dynamic_pipeline(
120120 review_threshold : int | None = None ,
121121 agent_configs : dict [str , AgentConfig ] | None = None ,
122122 error_policy : Any = None ,
123- ) -> SequentialGroup :
123+ ) -> AsyncSequentialGroup :
124124 """Build a dynamic pipeline based on PM's required_agents output.
125125
126126 PM always runs before this. This builds the remaining pipeline steps
@@ -169,7 +169,7 @@ def _exit_condition(state: dict[str, Any], iteration: int) -> bool:
169169 return True
170170 return False
171171
172- build_review_loop = LoopGroup (
172+ build_review_loop = AsyncLoopGroup (
173173 [
174174 (
175175 developer ,
@@ -220,7 +220,7 @@ def _exit_condition(state: dict[str, Any], iteration: int) -> bool:
220220 kwargs : dict [str , Any ] = {"callbacks" : callbacks }
221221 if error_policy is not None :
222222 kwargs ["error_policy" ] = error_policy
223- return SequentialGroup (steps , ** kwargs )
223+ return AsyncSequentialGroup (steps , ** kwargs )
224224
225225
226226def _agent_model (
0 commit comments