We build Argentic, so weigh what we say about it. LangGraph's own documentation is quoted as we read it on 1 November 2026.
Usually you keep LangGraph and change how the prompt gets built. LangGraph is an orchestration framework: it runs your graph, saves its state and lets you resume. It does not decide what the model reads on each call, and that is where a long run goes wrong. Context degradation, often called context rot, is the name for it.
Why does a LangGraph agent get worse over hours?
The agent's messages are part of the graph's state, and the model node sends them on every call. As a run grows, so does what is sent. The docs show how to trim, delete and summarize messages. You build that into your graph. Checkpointers save a thread's graph state, and a Store keeps long-term data across threads. Your graph code writes both. So whatever keeps the prompt small and right is code you write, and the first version of that code is usually a trim that drops the oldest messages or a summary that replaces them. Both lose detail, and an early rule is the first thing to go.
What can I change?
You have four options, and the first three keep LangGraph.
Trim or summarize messages in a node. The LangGraph docs show how. It is the smallest change and it gives up detail, so it suits runs of tens of turns.
Move what must not be lost out of the messages and into state fields your code writes: totals, open tasks and standing rules. The model reads them fresh on every call and cannot rewrite them.
Add a memory layer your nodes call. The pages we read do not describe it running your agent's loop. Your agent reaches it through a REST API, client libraries, an MCP endpoint or a wrapper around the model call. Mem0 and Zep are the same kind of tool. Each stores facts outside the prompt and returns the relevant ones, and your graph still decides what goes in.
Change who runs the loop. Argentic is an engine that keeps AI agents right for hours while prompt size is bounded. It rebuilds each prompt from a record of the run under a size cap, and the agent can search the record for an old detail. Our LangGraph guide keeps your LangChain tools. It replaces the graph, so your nodes, edges and checkpointer do not run, and it fits a tool-calling agent better than a graph with several hand-written nodes. If your graph has branching you depend on, that is a reason to stay on LangGraph.
If you are not sure which problem you have, this guide starts from the symptom. If you are weighing a move off LangChain altogether, this comparison sorts the options by the problem you have.
How do I know which one I have?
Log the prompt size on every call. A sharp drop marks a trim or a summary, and a steady climb means the bill and the load on the model are climbing together. Then run the five-fact test: give the agent a rule, an ID, a number, a name and a decision at the start, change one around the middle, and ask for all five at the first hour, the middle and the end. The test is described here.
What have we measured?
Against Letta, across the two conditions both ran (Claude Haiku 5.5, seed 20261217, one run of each stack in each row, November 27, 2026 to November 28, 2026; Argentic on engine 0.116.3), Argentic was level over 12 hours at a 200K window (engine 0.116.3 0.83 against Letta 0.82, first of two; within 0.03, which one run cannot separate); scored higher over 12 hours at a 100K window (engine 0.116.3 0.80 against Claude Agent SDK with memory 0.62 and Letta 0.59, first of three). With its step fee counted it cost less over 12 hours at a 200K window and cost more over 12 hours at a 100K window. None of these rows has been rerun on the newest engine (0.116.4), so they describe an older build. Each row is its own shift (the events and the question set differ between rows), so compare the stacks within a row and not a stack with itself down the table. Every row is one run of each stack on Claude Haiku 5.5; a gap of a few hundredths in one run is not a result.We have not run a LangGraph graph, so these runs say nothing about what a careful setup with a node that trims or summarizes would do. We make no claim that Argentic is more accurate than LangGraph. Earlier versions of this guide compared Argentic with two other stacks. Those comparisons are withdrawn, because neither stack ran with its recommended memory setup. A rerun with each is pending, and until it is published nothing here compares Argentic with them. The benchmark guide names both and says what each run lacked.
Short answers
- Why does my LangGraph agent get worse after hours?
- LangGraph runs your graph and saves its state, but it does not decide what the model reads on each call. The messages in the state grow, and whatever keeps the prompt small and right is code you write.
- Should I replace LangGraph?
- Usually not. Try trimming or summarizing in a node, move standing rules and totals into state your code writes, or add a memory layer. Move to a different loop only if the prompt is still the problem.
- Can Argentic run my LangGraph agent?
- It keeps your LangChain tools and replaces the graph, so nodes, edges and the checkpointer do not run. It fits a tool-calling agent better than a graph with several hand-written nodes.
Sources and method: Head-to-head on a 12-hour shift.