Structured result from plan execution. Provides both the output text and metadata about execution health, enabling the orchestrator to detect failures and make informed decisions about whether to proceed with dependent tasks.
| 43 | |
| 44 | @dataclass |
| 45 | class ExecutionResult: |
| 46 | """Structured result from plan execution. |
| 47 | |
| 48 | Provides both the output text and metadata about execution health, |
| 49 | enabling the orchestrator to detect failures and make informed decisions |
| 50 | about whether to proceed with dependent tasks. |
| 51 | """ |
| 52 | |
| 53 | output: str # Final output (context["prev_output"]) |
| 54 | success: bool # True if all steps completed without exceptions |
| 55 | steps_completed: int # Number of steps that actually ran |
| 56 | steps_total: int # Total steps in the workflow |
| 57 | errors: list[str] = field(default_factory=list) # Error messages from failed steps |
| 58 | plan_yaml: dict = field( |
| 59 | default_factory=dict |
| 60 | ) # Parsed plan data (for health assessment) |
| 61 | tokens_used: int = 0 # Total tokens consumed during execution |
| 62 | cost: float = 0.0 # Total cost of LLM calls during execution |
| 63 | |
| 64 | |
| 65 | class PlanExecutor: |