Skip to content

NAT langgraph_wrapper does not pass LangGraph thread_id, breaking checkpoint-backed thread memory #1994

@rmkraus

Description

@rmkraus

Is this a new feature, an improvement, or a change to existing functionality?

Improvement

How would you describe the priority of this feature request

High

Please provide a clear description of problem this feature solves

When serving a LangGraph agent through NAT’s langgraph_wrapper, LangGraph checkpoint/thread memory does not work because the wrapper invokes the graph without passing a RunnableConfig containing configurable.thread_id.

This breaks LangGraph graphs that are compiled with a checkpointer and rely on thread_id for conversation continuity.

It seems as if NAT has some built in utilities for long term memory, but not shorter term persistence.

Describe your ideal solution

When a user id and/or conversation id is given to NAT, it should probably combine those and pass them to langgraph like this:

conversation_id = f"{nat_user}:{nat_conversation_id}"
await graph.ainvoke(
    input,
    config={"configurable": {"thread_id": conversation_id}},
)

Additional context

This support is required for agents with preserved sessions and is analogous to how tools like Hermes manage sessions.

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I have searched the open feature requests and have found no duplicates for this feature request

Metadata

Metadata

Assignees

Labels

improvementImprovement to existing functionality
No fields configured for Enhancement.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions