Skip to main content
Back to registry

langgraph-persistence

langchain-ai/langchain-skills

Installs1
Install command
npx skills add https://github.com/langchain-ai/langchain-skills --skill langgraph-persistence
Security audits
Gen Agent Trust HubPASS
SocketPASS
SnykFAIL
About this skill
Two memory types: class State(TypedDict): messages: Annotated[list, operator.add] def add_message(state: State) -> dict: return {"messages": ["Bot response"]} checkpointer = InMemorySaver() graph = ( StateGraph(State) .add_node("respond", add_message) .add_edge(START, "respond") .add_edge("respond", END) .compile(checkpointer=checkpointer) # Pass at compile time ) config = {"configurable": {"thread_id": "conversation-1"}} result1 = graph.invoke({"messages": ["Hello"]}, config) print(len(result1["messages"])) # 2 result2 = graph.invoke({"messages": ["How are you?"]}, config) print(len(result2["messages"])) # 4 (previous + new) with PostgresSaver.from_conn_string( "postgresql://user:pass@localhost/db" ) as checkpointer: checkpointer.setup() # only needed on first use to create tables graph = builder.compile(checkpointer=checkpointer) graph.invoke({"messages": ["Hi from Alice"]}, alice_config) graph.invoke({"messages": ["Hi from Bob"]}, bob_config) result = graph.invoke({"messages": ["start"]}, config) states = list(graph.get_state_history(config)) past = states[-2] result = graph.invoke(None, past.config) # None = resume from checkpoint fork_config = graph.update_state(past.config, {"messages": ["edited"]}) result = graph.invoke(None, fork_config) graph.update_state(config, {"data": "manually_updated"}) result = graph.invoke(None, config) When compiling a subgraph, the...

Source description provided by the upstream skill listing. Community reviews and install context appear in the sections below.

Community Reviews

Latest reviews

Sign in to review

No community reviews yet. Be the first to review.

Browse this skill in context
FAQ
What does langgraph-persistence do?

langgraph-persistence is listed in SkillJury, but the source summary is still sparse.

Is langgraph-persistence good?

langgraph-persistence does not have approved reviews yet, so SkillJury cannot publish a community verdict.

What agent does langgraph-persistence work with?

langgraph-persistence currently lists compatibility with codex, gemini-cli, opencode, cursor, github-copilot, claude-code.

What are alternatives to langgraph-persistence?

Skills in the same category include telegram-bot-builder, flutter-app-size, sharp-edges, iterative-retrieval.

How do I install langgraph-persistence?

npx skills add https://github.com/langchain-ai/langchain-skills --skill langgraph-persistence

Related skills

More from langchain-ai/langchain-skills

Related skills

Alternatives in Software Engineering