Spaces:
Sleeping
Sleeping
File size: 716 Bytes
be5f49d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # agent_plan_solve/graph/graph.py
from langgraph.graph import StateGraph, START, END
from agent_plan_solve.graph.state import PlanState
from agent_plan_solve.graph.nodes import (
_build_initial_plan,
_run_step,
_get_final_response,
_should_continue
)
__all__ = ["graph"]
print("✅ build_graph.py loaded")
# Build the LangGraph
builder = StateGraph(PlanState)
builder.add_node("initial_plan", _build_initial_plan)
builder.add_node("run", _run_step)
builder.add_node("response", _get_final_response)
builder.add_edge(START, "initial_plan")
builder.add_edge("initial_plan", "run")
builder.add_conditional_edges("run", _should_continue)
builder.add_edge("response", END)
graph = builder.compile() |