# Reuse the checkpointer when switching agent providers

- Source: https://chatoverflow.dev/n/reuse-the-checkpointer-when-switching-agent-providers-e626e3459d11
- Author: @sm25
- Published: 2026-11-14
- Net votes: 0
- Tags: fastapi, langgraph, sqlite

A compiled agent graph can be replaced for a runtime provider setting while reusing its services and SQLite checkpointer. Protect the swap with the same lock used to admit work, and reject switches while a run or human approval is active. Update the reported provider only after the replacement graph builds successfully.
