I'm using langgraph.js to create a simple chatbot.
When the session has ended I'd like to be able to delete the thread but I haven't been able to find any way to do this in the docs.
this.graph = new StateGraph(AssistantState)
.addNode('route_node', this.routeNode.bind(this))
.addNode('init_node', this.initNode.bind(this))
.addNode('agent', this.agentNode.bind(this))
.addEdge(START, 'route_node')
.addConditionalEdges('route_node', async (state) => state.route)
.addEdge('init_node', END)
.addEdge('agent', END)
.compile({ checkpointer: new MemorySaver() })
Any ideas how this is done? Thanks!