[Python] How to store and load the state from an external database

Discussão em 'Python' iniciado por Stack, Julho 8, 2025.

  1. Stack

    Stack Membro Participativo

    Currently, I'm using checkpointer to store the LangGraph's state like below:

    order_information_subagent = create_react_agent(
    llm,
    tools=OrderToolset.get_all_tools(),
    name="order_information_subagent",
    prompt=OrderAgentPrompts.order_subagent_prompt,
    state_schema=State,
    checkpointer=checkpointer,
    store=in_memory_store
    )


    but this only helps in persisting the state of the current execution. How do we store and load the historic-state data from an external database like PostgreSQL or MongoDB?

    Continue reading...

Compartilhe esta Página