LangGraph Agent with SQLite Persistence
Intermediate · 30 minutes · 5 tasks, checked automatically · 100 points
Build a LangGraph ReAct agent that uses a SQLite checkpointer to persist its conversation state to disk. You will install LangGraph, write a graph that reads and writes real files in your lab directory, attach a SqliteSaver checkpointer, and prove that state survives a full Python process restart — exactly the kind of durable local agent you would run on your own machine.
What you’ll learn
- Install LangGraph and its dependencies into the managed virtualenv
- Build a ReAct agent with a custom file-listing tool that operates on the lab directory
- Attach a SqliteSaver checkpointer so every graph step is written to a local SQLite file
- Run the agent and confirm the SQLite database file is created and contains checkpoint rows
- Restart the Python process and replay the same thread to prove state survived the reboot
How this lab works
- Start the lab: One click starts a sandbox with a local model and the agent’s toolbox: no API key and no token bill.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work inspects the agent, its config and its output, and says what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: Locally, against a model on your computer: no API key, no tokens
- Model: gpt-4o
- Open source: github.com/langchain-ai/langgraph
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Python 3.11 or 3.12 available on your machine
- OPENAI_API_KEY set in your shell environment
- Write access to ~/LearnXops/agent-labs/
Topics: langgraph, agents, sqlite, checkpointer, persistence, react-agent, openai, stateful, tools
Create a free account to start this lab.
Keep going
- Install, Inspect, and Disable an OpenClaw Plugin from ClawHub
- OpenClaw Message Queue Channel: Agent-Powered Request/Reply
- Shape Agent Behaviour with SOUL.md, USER.md and AGENTS.md
- Hermes Session Memory: Full-Text Search and Fact Recall
- Hierarchical CrewAI: Manager Agent Delegating to Specialists
- CrewAI Memory: Persistent Recall Across Executions