langgraph_agent_toolkit.core.memory.threads module

List saved conversations without loading checkpoint state.

exception langgraph_agent_toolkit.core.memory.threads.InvalidThreadCursor[source][source]

Bases: ValueError

The cursor is invalid or belongs to another conversation scope.

exception langgraph_agent_toolkit.core.memory.threads.ThreadListingUnsupported[source][source]

Bases: NotImplementedError

The checkpointer cannot list saved conversations.

class langgraph_agent_toolkit.core.memory.threads.ThreadSummary(thread_id: str, agent_id: str)[source][source]

Bases: object

Parameters:
  • thread_id (str)

  • agent_id (str)

thread_id: str
agent_id: str
__init__(thread_id, agent_id)
Parameters:
  • thread_id (str)

  • agent_id (str)

Return type:

None

class langgraph_agent_toolkit.core.memory.threads.ThreadPage(threads: list[langgraph_agent_toolkit.core.memory.threads.ThreadSummary], next_cursor: str | None)[source][source]

Bases: object

Parameters:
threads: list[ThreadSummary]
next_cursor: str | None
__init__(threads, next_cursor)
Parameters:
Return type:

None

async langgraph_agent_toolkit.core.memory.threads.list_threads(saver, *, user_id, agent_id, storage_key, limit=100, cursor=None)[source][source]

Read a bounded page of conversation identities from root checkpoints.

The cursor orders conversations by their first step 0 checkpoint. It does not order them by their latest activity. Other agents in the same user scope can require extra pages. Continue until next_cursor is None, including after an empty page. storage_key must bind public IDs to the authenticated owner and selected agent.

Parameters:
  • saver (Any)

  • user_id (str)

  • agent_id (str)

  • storage_key (Callable[[str], str])

  • limit (int)

  • cursor (str | None)

Return type:

ThreadPage