Migration
From LangGraph boilerplate to Nodex
Keep the graph model, remove repetitive wiring, and add a cleaner execution trace.
graph = StateGraph(AgentState)
graph.add_node("research", research)
graph.add_node("writer", writer)
graph.add_edge(START, "research")
graph.add_edge("research", "writer")
graph.add_edge("writer", END)
app = graph.compile()
app = Agent()
@app.node(next="writer")
def research(state):
...
@app.node(next="end")
def writer(state):
...
Checklist
Migration checklist
| Nodes | Move each LangGraph node function under `@app.node`. |
|---|---|
| Edges | Replace direct edges with `next="node_name"`. |
| END | Use `next="end"` for terminal nodes. |
| Conditional edges | Use `@app.route(condition, if_true, if_false)`. |
| Tests | Test one full graph path and key nodes in isolation. |