The challenge
The client wanted an agent that could search the web, look up live financial data, read internal documents and act on the results, without ever giving an LLM unsupervised write access to anything that mattered.
It also had to survive restarts mid-conversation and resume exactly where it left off, which a simple tool-calling loop cannot do.
Assess Q3 exposure for portfolio Alanggraph · state
web_search("Q3 earnings guidance")mcp · ok
read_docs("risk-policy.pdf")mcp · ok
get_financial_data(account="A-17")awaiting approval
Sensitive tool. Execution paused by a graph interrupt.
ApproveReject
state checkpointed · resumes exactly here after a decision
Architecture · 5 stages
- 01
Request
User goal enters the graph
- 02
Plan
LangGraph StateGraph routing
- 03
Tools
MCP client: web, financial data, docs
- 04
Approve
Interrupt gate for sensitive actions
- 05
Persist
Async SQLite checkpointer
The solution
I built the agent on LangGraph's StateGraph, where conversation history, intermediate results and the current step are first-class state, checkpointed to async SQLite. Conversations survive interruptions and process restarts with full context intact.
Tools are reached through a Model Context Protocol client, so adding a capability means pointing at a new MCP server rather than hand-writing and re-testing tool schemas.
Sensitive tools sit behind a real interrupt in the graph, not a prompt instruction. Execution pauses, the pending action is shown to a human for approval or rejection, and the run resumes with its reasoning preserved. The rejection paths are tested as thoroughly as the happy path.
Engineering highlights
- LangGraph StateGraph with durable, checkpointed state
- Model Context Protocol client for pluggable tools
- Graph-level human-in-the-loop interrupts before sensitive calls
- Live web search and financial-data tools
- Persistent multi-session memory
Technology
- Python
- LangGraph
- LangChain
- Model Context Protocol
- SQLite
- Streamlit
Related services
Building something similar?
Get a candid view of the architecture, risks and timeline on a free 30-minute call, or ask the AI assistant how this approach would map to your project.