What it builds
- ✓A two-stage LangGraph agent with interrupt_before for HITL
- ✓Editable grid with a checkbox action column
- ✓SQLite checkpointer — state persists across process restarts
- ✓Agent reads back human edits via /<handle>/<slug>/edits?source=human
The key step
graph = (
StateGraph(State)
.add_node("generate", generate_candidates)
.add_node("publish", publish_for_review)
.add_node("read_picks", read_human_picks)
.add_node("analyse", deep_analyse)
.add_edge(START, "generate")
.add_edge("generate", "publish")
.add_edge("publish", "read_picks")
.add_edge("read_picks","analyse")
.add_edge("analyse", END)
.compile(checkpointer=sqlite_saver,
interrupt_before=["read_picks"])
)note ▸
This is the core of the recipe. The full file (including setup, error handling, and the surrounding scaffolding) lives in the GitHub folder linked below — clone or copy it directly.
Run it
Stack
langgraphpythonsqlite
Full source on GitHub
README, runnable code, .env.example, dependencies — all in one folder.