START and END
START and END are virtual markers, not business functions. START routes graph input to the first node. END marks a completed path.1
Tiny example
Section titled “Tiny example”from langgraph.graph import START, END
builder.add_edge(START, "load_order")builder.add_edge("send_reply", END)| Marker | Read it as |
|---|---|
START |
“When input arrives…” |
END |
“…this path is finished.” |
You can also add a conditional edge from START when different inputs need different entry nodes.
Failure note
Section titled “Failure note”Reaching END stops routing; it does not prove that an external side effect succeeded. Record and verify the outcome inside the node that owns the side effect.
Related
Section titled “Related”Footnotes
Section titled “Footnotes”-
LangChain, Graph API overview. ↩