PlanState#
Module: agent_framework.planning.plan_state
- class agent_framework.planning.plan_state.PlanState(plan=(), step_results=<factory>, completed_steps=<factory>, plan_revision=0, total_steps_executed=0, pending_callback_step_id=None, awaiting_caller_callback=False)[source]#
Bases:
objectMutable per-run state for a planning invocation.
Created lazily by
PlanningTurnDriveron its firstrun_turncall. In-memory only in v1; persistence is a future feature.- Fields:
- plan: Current plan — a tuple of
PlanStepobjects. Replaced (not mutated) each time the model emits
submit_planoramend_plan.- step_results: Map of
step_id → result payloadfor all completed steps. Used by the
{{ref}}resolver.
completed_steps: Ordered log of all
CompletedSteprecords. plan_revision: Number of timessubmit_planoramend_planhasbeen emitted in this run. Incremented by the driver before executing each new plan.
- total_steps_executed: Cumulative count of step executions. Checked
against
PlanningConfig.max_steps.- pending_callback_step_id: When a step emits a model-bound callback,
this is set to that step’s ID so the reflect phase can route the resolution back.
- awaiting_caller_callback: Set to
Truewhen the plan is paused waiting for a user-bound callback response from the caller.
- plan: Current plan — a tuple of
- Parameters:
plan (tuple[PlanStep, ...])
step_results (dict[str, Any])
completed_steps (list[CompletedStep])
plan_revision (int)
total_steps_executed (int)
pending_callback_step_id (str | None)
awaiting_caller_callback (bool)
- step_results: dict[str, Any]#
- completed_steps: list[CompletedStep]#
- plan_revision: int#
- total_steps_executed: int#
- pending_callback_step_id: str | None#
- awaiting_caller_callback: bool#