We build Argentic, so weigh what we say about it. We read each tool's own page on 26 November 2026 and quote only what it says. Every Argentic number names the engine version and model it came from.
Over five simulated working days, Argentic engine 0.116.4 scored 0.86 on 1,401 questions (the share answered right): day 1 0.88, day 2 0.83, day 3 0.84, day 4 0.83 and day 5 0.88. Questions about a fact the agent was told 72 to 107 hours (3 to 4.5 days) earlier scored 0.83 (112 questions). Claude Haiku 5.5, a 200,000-token window, November 28, 2026, one run.
| Day | Questions | Argentic engine 0.116.4 | Letta (letta-code 0.34.67) |
|---|---|---|---|
| Day 1 | 663 | 0.88 | 0.93 |
| Day 2 | 194 | 0.83 | 0.85 |
| Day 3 | 185 | 0.84 | 0.79 |
| Day 4 | 180 | 0.83 | 0.78 |
| Day 5 | 179 | 0.88 | 0.37, partial: stopped before most of these were asked |
Letta scored higher on day 1 (0.93 against 0.88). Letta was stopped by its $46.00 spend cap before it was asked every question, so it has no whole-run score and its last day is partial. The window was set to 200,000 tokens, smaller than the model's own; that is a test condition, not stock settings. One run, on Claude Haiku 5.5. Identical runs of one Argentic engine on a 108-hour shift at a 200,000-token window have differed by up to 0.09 pooled (2 runs, engine 0.116.1), so a gap that small is noise. This five-day shift has not been repeated, so its own spread is not measured. A longer run, Argentic alone: Argentic engine 0.116.4: 11 of 14 days at 0.80 or higher. Days 8 to 14 scored 0.85, against 0.82 on days 1 to 7. One run on Claude Haiku 5.5 at a 200,000-token window. No other stack ran this long, so this is Argentic's line alone. day 4 (0.73), day 7 (0.78) and day 9 (0.77) scored under 0.80; the lowest was day 4. We have not yet worked out why those days dipped. Facts told 168 to 322 hours (7 to 13.5 days) before the question scored 0.73 on 214 questions, against 0.85 on facts told the same day. That group is one scenario's 214 questions. Lowest kinds of question: contradictions caught (0.00 on 72 questions) and running counts (0.33 on 134 questions). One run, on Claude Haiku 5.5. Identical runs of one Argentic engine on a 108-hour shift at a 200,000-token window have differed by up to 0.09 pooled (2 runs, engine 0.116.1), so the day-to-day swings and a gap that small are noise. This 14-day shift has not been repeated, so its own spread is not measured. The run, with every row.
We ran Argentic and Letta on the same 12-hour shifts (Claude Haiku 5.5, seed 20261217, one run of each stack in each row, November 27, 2026 to November 28, 2026). We have run none of the other tools on this page, so we make no claim about how they score against Argentic. We have no comparison against LangChain Deep Agents and Claude Agent SDK that stands: both ran without their recommended memory setup, so those results are withdrawn and a rerun is pending. Every row we have is public.
If your LangChain agent works for the first hour and gets worse by the sixth, the usual advice is to swap something. Which something depends on what went wrong, and a lot of the lists you will find skip that step. They put frameworks, memory layers and engines in one ranking, though one does not replace another. This page sorts them by the problem you have (if you would rather start from the symptom, the symptom guide does that), and starts with what staying right costs, because that is where the loops differ most.
What does it cost to keep a long-running agent right?
Our own data gives one comparison on cost: Against Letta (Claude Haiku 5.5, one run each, Argentic on engine 0.116.3), with its step fee counted Argentic cost less over 12 hours at a 200K window and cost more over 12 hours at a 100K window.
Keeping everything in the prompt works while the history fits in the window, and each call costs more than the last. Argentic builds each prompt from a record of the run under a size cap instead, so the prompt stays bounded however long the run goes. Every row is public.
What should I switch to when my LangChain agent gets worse over hours?
Start with the symptom.
- If it forgets a fact, or uses one that has since changed: Add a memory layer: Mem0, Zep with Graphiti, Cognee, Supermemory or Hindsight. Your code stores facts and fetches them back. That helps recall. It leaves the prompt your loop builds growing, so the agent can still drift and each call still costs more than the last.
- If the prompt keeps growing: Change what builds it. Pydantic AI and the OpenAI Agents SDK ship compaction, Mastra compresses older messages into observations, and Letta and Argentic run the loop themselves. Compaction rewrites the history to make it fit, and LangChain's own docs warn that culling a message queue can lose information.
- If you want an explicit graph and resumable state: Stay on LangGraph. It is LangChain's own framework, so it is not a way out of LangChain, but it gives you control of every node. What the model reads on each call is code you write.
- If your documents are the problem, not your conversation: LlamaIndex is built for data ingestion and retrieval, and it fits when the agent gets facts wrong because it is working from documents.
Swapping one framework for another, on its own, does not fix a run that degrades. The model still reads whatever prompt you send it. The fix is in what goes into that prompt.
Which tools replace the loop?
These run the agent loop, so they replace the loop LangChain gives you. Each handles a long history its own way.
| Question | Argenticus | Pydantic AIPython framework | OpenAI Agents SDKframework, with compaction | LangGraphLangChain's graph framework | MastraTypeScript framework | LlamaIndexPython toolkit |
|---|---|---|---|---|---|---|
| Built for | A hosted engine for long-horizon agents, the kind that work on one job for hours. our page | A Python agent framework: the agent loop, models from every major provider, tools and structured output. Its Harness adds memory and context management on top. Pydantic docs, Pydantic docs 2 | A framework for multi-agent workflows. Its compaction session wraps one of its sessions. OpenAI docs | A low-level orchestration framework for long-running, stateful agents. GitHub | A TypeScript framework for agents and workflows, with memory built in: conversation history, retrieval and Observational Memory. GitHub | A Python toolkit for building LLM-powered agents over your data, with workflows that combine agents, data connectors and tools. LlamaIndex docs |
| Who runs the loop | Argentic runs the loop. You bring your tools, your prompt and your model key. our page | Pydantic AI runs the loop, and you write the agent, the tools and the instructions. Pydantic docs | The SDK's Runner runs the loop. OpenAI docs | You define the graph of nodes and edges, and LangGraph runs it. LangChain has prebuilt agent loops on top. LangChain docs | Mastra's agent runs the loop. It reasons, picks tools and iterates until the model gives a final answer or a stopping condition is met. GitHub | LlamaIndex runs the agent and the workflow, and you supply the tools and data connectors. LlamaIndex docs |
| When the window fills | Each prompt is rebuilt from a record of the run, under a size cap, so the engine chooses what the model reads each time instead of trimming a growing transcript. New hosted agents write no summary of their history. our page | Compaction ships: provider-native compaction on OpenAI and Anthropic, and model-agnostic strategies in the Harness (tool-result clearing, sliding-window trimming, LLM summarization, tiered). The Harness's Memory is a notebook the agent keeps across sessions, with a bounded amount injected into the prompt and search on demand. Pydantic docs, PyPI | By default, after each turn it checks a threshold and, if it is met, calls OpenAI's Responses API compaction endpoint and rewrites the session's history. The docs warn that streaming can stay open a few seconds longer while it runs. OpenAI docs | The docs show how to trim, delete and summarize messages. You build that into your graph. LangChain docs | Observational Memory uses background agents to compress older messages into observations, and the docs say compression can lose exact wording, so a recall tool can go back to the original messages when you turn it on. Memory processors can also filter, trim or prioritize what goes to the model. Mastra docs | Not documented in the pages we read. |
| Where it runs | Hosted by us, with a TypeScript client and a Python one. our page | A library that runs inside your own application. Pydantic docs | A library that runs inside your application. OpenAI docs | Not documented in the pages we read. | A library, or a standalone server you deploy anywhere. GitHub | A library. Workflows can be deployed as services. LlamaIndex docs |
| Open source | The engine is closed source. our page | The pydantic-ai-harness package is MIT licensed. PyPI | MIT licensed. GitHub | LangGraph is MIT licensed. LangSmith is a paid product. GitHub | The core is Apache 2.0. Code in ee directories is source-available under an enterprise licence. GitHub | MIT licensed. LlamaIndex docs |
Pydantic AI is the one to look at first if you want to stay in Python and keep the code yours. Its Harness ships compaction and a notebook-style memory, the package is MIT licensed, and its docs target agents that run for hours. We have not run it, so we make no claim about how it scores.
Which tools add memory to the loop I keep?
These store what the agent learned and hand it back. They do not run your loop, so the prompt is still yours to build. Letta is the exception in this table: it is an agent platform, so it runs the loop and keeps its memory as files the agent edits.
| Question | Mem0memory layer | Zep and Graphitimemory layer | Cogneememory platform | Supermemorymemory layer | Hindsightmemory system, Vectorize | Lettaagent platform |
|---|---|---|---|---|---|---|
| Built for | Long-term memory for AI agents that persists across sessions. Mem0 docs | Zep is a context layer that builds temporal context graphs from business data and conversations. Graphiti is the open-source framework inside it. Zep docs, GitHub | An open-source memory platform that turns documents, code and conversations into a knowledge graph an agent can search. GitHub | A memory and context layer for AI: it extracts facts from conversations, keeps a user profile and returns relevant context. GitHub | An open-source memory system for agents that learn over time, from Vectorize. It retains, recalls and reflects. GitHub | A platform for building stateful agents. Letta docs |
| Who runs the loop | It runs no loop. Your code calls add and search. Mem0 docs | It runs no loop. You add messages and fetch a Context Block to put in your prompt. Zep docs | It runs no loop. Your code calls remember and recall, and your application uses what comes back. GitHub | It runs no loop. Your app calls add, profile and search, and puts the results in the prompt. Through its plugins and MCP server the assistant decides when to save. GitHub | 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. GitHub | Letta Code is a stateful agent harness, so Letta supplies the loop. GitHub |
| Where an old detail lives | When your code calls add, an LLM pulls key facts out of the messages and Mem0 stores them. Mem0 docs | Zep ingests the messages you add into the user's context graph. Zep docs | Content goes into permanent memory, or into a session. An improve step moves session knowledge into the graph. Recall picks a search strategy over graph, vector or code context. GitHub | Its memory engine extracts facts, tracks updates and resolves contradictions. Temporary facts expire after their date passes. GitHub | An LLM extracts facts, entities and relationships from what you retain. Recall searches them four ways at once (meaning, keywords, graph and time) and merges the results. GitHub | Memory is Markdown files in a git repository that the agent edits. Older versions used memory blocks in the context window. Letta docs |
| Where it runs | The hosted Mem0 Platform, or open source that you run yourself. Mem0 docs | Zep Cloud, or inside your own VPC on Enterprise. Graphiti is self-hosted only. Zep, GitHub | Local install, Docker, templates for your own infrastructure, or the managed Cognee Cloud. GitHub | A hosted platform, a Docker image, or a local binary. GitHub | Self-hosted with Docker, pip or Helm on PostgreSQL, or the hosted Hindsight Cloud. GitHub | Letta Cloud, or run it yourself. Letta docs |
| Open source | Apache 2.0. Some features, such as graph memory, are on the Platform only. GitHub, Mem0 docs | Graphiti is Apache 2.0. The Zep platform is not offered as open source in its current docs. GitHub | Apache 2.0. GitHub | MIT licensed. GitHub | MIT licensed. GitHub | Apache 2.0. GitHub |
If a fact that changed is your problem, Zep with Graphiti is built around it: each fact carries the time it became true and the time it stopped being true. Mem0's current algorithm only adds, so an old fact stays until you change it. Our guide to combining memory tools covers what to pair.
What does Argentic do differently?
Argentic is an engine that keeps AI agents right for hours while prompt size is bounded. It runs your agent's loop on our side. You bring your tools, your prompt and your model key. Each prompt is built fresh from a record of the run under a size cap, so what the model reads stays under a cap however long the run goes, and the agent can search the record for an old detail. The record is never rewritten or summarized. Our framework guides keep your LangChain tools and replace the loop around them.
That is one mechanism for memory and for the prompt, which is why it sits in the first table and not the second.
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.Those rows compare Argentic with Letta. A plain LangChain loop at its defaults also ran one of our 12-hour shifts and was stopped by its spend cap in hour 6; that post has its rows. We have not run Pydantic AI, so we make no claim about how it scores or what it costs.
What happens when the prompt window is smaller?
The table above says how each tool handles a full window. To see what that costs in accuracy, we ran the same shift at prompt windows smaller than the model's own, so a stack that cuts its history has to do it inside the shift. The only other stack in those rows is Letta. With its step fee counted, Argentic cost more than Letta over 12 hours at a 100K window.
Argentic's own row at the smaller window shows a drop over the shift. The recall-type questions are recall at distance, current value under change and standing instructions. Argentic did not hold perfectly: on engine 0.116.3 it scored 0.85 over hours 1 to 5 and 0.78 over hours 6 to 12, and 0.80 in the last hour on 44 questions. Its lowest scores were on contradictions caught (0.04), commitments (0.48) and conflicting updates (0.58), not on the recall-type questions above. The benchmark guide has every row and links each run.
A LangChain agent you have tuned yourself is not what any of these runs measured.
When is Argentic the wrong pick?
It is hosted, closed source and early. Use something else if you must self-host or read the code, if your agent runs an hour or two with a person watching, or if you depend on exact running counts: our known issues page says where counts drifted. Pydantic AI, Mastra and LlamaIndex are open source and run inside your own application. CrewAI and Haystack are frameworks we did not read for this page, so we say nothing about them.
How do I find out which problem I have?
Log the prompt size on every call, then run a five-fact test at the first hour, the middle and the end. The steps are in this guide.
Short answers
- What should I switch to when my LangChain agent gets worse over hours?
- It depends on what went wrong. A memory layer such as Mem0, Zep with Graphiti, Cognee, Supermemory or Hindsight helps when the agent forgets or uses a changed fact. A different loop, such as Pydantic AI, the OpenAI Agents SDK, Mastra, Letta or Argentic, helps when the prompt keeps growing. Swapping frameworks alone does not fix a run that degrades.
- Does switching away from LangChain fix context rot?
- Not by itself. The model reads whatever prompt you send it, so the fix is in what goes into that prompt, whichever framework builds it.
- Is Pydantic AI a good alternative to LangChain for long runs?
- It is a strong option if you want to stay in Python and keep the code yours. Its Harness ships compaction and a memory notebook, and the package is MIT licensed. We have not run it, so we make no claim about its accuracy.
- What does it cost to keep a long-running LangChain agent right?
- We have no comparison against LangChain Deep Agents or the Claude Agent SDK that stands: both results are withdrawn and the memory reruns give no comparison (Deep Agents with its memory option has no score, and the Claude Agent SDK with memory ran once, at the smaller window). Our own data compares Argentic with Letta, and with the Claude Agent SDK with memory at the smaller window. Against Letta (Claude Haiku 5.5, one run each, Argentic on engine 0.116.3), with its step fee counted Argentic cost less over 12 hours at a 200K window and cost more over 12 hours at a 100K window.
- Where does Argentic fit?
- Argentic runs the loop for you and builds each prompt from a record of the run under a size cap, so the prompt stays bounded however long the run goes. It is hosted, closed source and early.
Sources and method: Head-to-head on a 12-hour shift.