diff --git a/models.py b/models.py new file mode 100644 index 0000000..4d5fbb8 --- /dev/null +++ b/models.py @@ -0,0 +1,23 @@ +""" +Shared data structures for the Planning Agent. + +The module contains a TypedDict that represents the state used by LangGraph. +It is imported in ``main.py`` to keep type hints consistent across files. +""" + +from typing import List, TypedDict + +class PlanningState(TypedDict): + """State of the planning agent. + + Attributes: + task: The original natural‑language description. + plan: Optional list of steps produced by the LLM. + current_step: Index of the next step to execute. + results: Accumulated textual results for each executed step. + """ + + task: str + plan: List[str] | None + current_step: int + results: List[str]