We build Argentic, so weigh what we say about it. We read the tracing and evaluation tools' own pages on 27 November 2026 and quote only what they say. Every Argentic number names the engine version and model it came from.
What we ran ourselves
We ran Argentic, Letta and LangChain on the 12-hour head-to-head shift (Claude Haiku 5.5, seed 20261217, Argentic four runs, the others one each, 25 November 2026, Argentic on engine 0.104.1), each on the setup the run post lists for it.
We have not run LangSmith, Langfuse, Arize Phoenix, DeepEval and LangGraph yet, so we make no claim about accuracy against them. The LangChain arm was a plain loop, not LangGraph.
"Losing the plot" is not one problem. An agent that forgets its goal, loops, contradicts a decision from hours ago, calls the wrong tool or drifts on a long task is showing four or five different failures, and the fix for each is different. Lists of tools for it mix tracing tools, memory layers, evaluation suites and loops in one ranking, though one does not replace another. This page sorts them by symptom, says when the answer is a tool that is not ours, and says what a long run cost when we measured it.
Which symptom do you have?
Find your row. The middle column is the cheapest fix, and most of those are yours to make whatever you run the agent on.
| Question | Usually caused by | Try first | Reach for a different tool when |
|---|---|---|---|
| Forgets its goal or a rule it was given | The rule lived in the early messages, and trimming or summarizing the history dropped it, or it is buried in a long prompt. | Keep the objective and standing rules in state your code writes, and print them at the top of every prompt. | The state itself has grown too big to print every time. Then something has to decide what goes in the prompt. |
| Loops or repeats a tool call | It cannot see that it already did the step, because the record of the step was dropped, or the tool's answer was unclear, or nothing tells the loop to stop. | A hard step cap, a plain result from every tool, and a list of finished actions the agent can see. | The same event reaches the agent twice. That is a fix at the door, before the agent. |
| Contradicts a decision it made earlier | The decision was a message in the history, and the message was summarized away or is far from the question. | A decision ledger in state: each decision as its own entry, and a way to mark one as replaced. | The ledger outgrows the prompt, and you need the agent to look an old decision up instead of reading all of them. |
| Drifts and gets worse the longer it runs | The prompt grows with the run, so the details that matter are harder for the model to use and each call costs more than the last. | Log the prompt size on every call, then trim, move state out of the messages, or add a memory layer. | A trim or summary has to drop something. When the run is hours long, change who builds the prompt. |
| Calls the wrong tool or passes bad arguments | Often not context at all: a vague tool description, a loose schema, or a model that is too weak for the job. | Read the traces, tighten the tool descriptions and schemas, and turn the failures into tests. | A tracing or evaluation tool is the right reach. A different loop will not fix this. |
| Forgets a user between separate conversations | Nothing carries facts from one conversation to the next. | A memory layer your code calls, such as Mem0 or Zep with Graphiti. | What you need is a memory of many users across separate conversations. That is a different problem from one job running long, and a memory layer is built for it. |
| Loses its place after a failure or a restart | The work was in the process, and the process stopped. | Save the agent's progress somewhere outside the process. | The job is mostly steps outside the model, and the hard part is finishing them after a failure. That is a workflow problem, not a prompt problem, and this guide does not cover it. Argentic can resume a stopped run from its record, but it is built for the prompt, not for orchestrating steps. |
Three of the rows, forgetting a rule, contradicting a decision and drifting over a long run, share a cause: the model reads a prompt that was built from a history, and a long history gets trimmed, summarized or buried. The post on why agents forget in long histories goes through how. The post on a repeated action goes through the loop row.
How do I tell which one I have?
Do two things before you change anything.
Log the prompt size on every model call. A steady climb means the prompt grows with the run. A sharp drop means something is trimming or summarizing it. A flat line with the agent still drifting means the cause is elsewhere. This callback writes one line per call.
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. What it loses names the row: the test is described here.
What do the tracing and evaluation tools do about it?
They show you where it went wrong, and they turn a failure into a test. That is worth doing first, and none of them is a substitute for a fix. They read the run. Your loop still builds each prompt.
| Question | LangSmithLangChain's tracing and evaluation | Langfusetracing, prompts, evals | Arize Phoenixtracing and evals | DeepEvalevaluation framework |
|---|---|---|---|---|
| Built for | Visibility into an LLM application, from single traces to production-wide metrics. Its traces help you troubleshoot, track output quality and build evaluation datasets. LangChain docs | Tracing on OpenTelemetry, prompt management that versions your prompts, and evaluation with LLM-as-a-judge scoring, code evaluators and human labeling. GitHub | Observability for experimentation, evaluation and troubleshooting: tracing through OpenTelemetry-based instrumentation, and evals of responses and retrieval. GitHub | Unit-test-style evaluation of LLM apps. Its agent metrics include Task Completion, which checks whether an agent accomplished its goal, and Tool Correctness, which checks whether the right tools were called with the right arguments. GitHub |
| Works with | Many frameworks and providers, not only LangChain. Its page lists OpenAI, Anthropic, CrewAI, the Vercel AI SDK and Pydantic AI. LangChain docs | OpenTelemetry-based tracing, so it is not tied to one framework. GitHub | OpenTelemetry-based instrumentation, so it is not tied to one framework. GitHub | LLM applications generally, run like a test suite. GitHub |
| Open source | Not documented in the page we read. | MIT licensed, apart from its ee folders. You can self-host it or use Langfuse Cloud. GitHub | Its README calls it open source and says it is licensed under the Elastic License 2.0. GitHub | Apache 2.0. GitHub |
If your symptom is the wrong-tool row, this table is your answer and the rest of this page is not. There are more tools in this category than the four we read. We have not run any of them.
Is an explicit state object the fix?
Often, yes. The most useful advice in most of the answers you will find is to stop relying on a giant transcript and keep the objective, constraints, finished steps and decisions as explicit state, then hand that to the model on every call. We agree. It is the first row of the table, and for a run of tens of turns it is usually enough. The facts file in our LangChain guide is a working version of it, and it works without Argentic.
It stops working where the state stops being small. The model decides what to save, every saved item rides in every prompt, a changed fact replaces the old one only when the model reuses its key, and the messages still grow beside it. At that point you are writing a record of the run, a prompt builder with a size cap, and search over the record, which is a loop of your own.
When does the agent need a different loop?
When the run is hours long and the symptom is drift. A memory layer such as Mem0, Zep with Graphiti or Hindsight stores facts outside the prompt and returns the relevant ones. That helps recall. It leaves the loop in charge of the prompt, so the prompt can still grow. Our comparison sorts the options by the problem you have.
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 from a record of the run under a size cap, so what the model reads stays under the cap however long the run goes, and the agent can search the record for an old detail. The record is never rewritten or summarized, and the same system is the agent's memory and its context.
It is not a drop-in for a LangChain graph. Keep your tools and replace the loop: the framework guides show how, and the swap section of our LangChain guide has the code. A graph with hand-written nodes, edges and a checkpointer does not run on it, so a model-plus-tools agent moves over more easily. Prototype is free and needs no card. It includes 5,000 agent steps a month.
What did that look like when we measured it?
Argentic engine 0.116.4: 0.88 on day 1, then 0.83 to 0.88 on each later day. One run on Claude Haiku 5.5 at a 200,000-token window. This run cost $4.12 all in: $2.82 for the model's calls at Claude Haiku 5.5's standard rates and $1.30 in step fees. The window was set to 200,000 tokens, smaller than the model's own; that is a test condition, not stock settings.We have not run a LangChain agent tuned with the state and memory steps above, so this run says nothing about one, and we make no claim that Argentic is more accurate than one. 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.
What happens when the history is compacted?
Three of the symptoms above, forgetting a rule, contradicting a decision and drifting over a long run, are what a compacted history looks like to the agent: the detail from hours ago is gone from the prompt. To see how a stack does when it has to cut its history, we ran shifts with the prompt window held below the model's own. 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.
What each stack does when its window fills, and the fixes inside each, are in the guide to an agent that forgets after compaction or summarization. If the symptom is the bill and not the forgetting, see why a long-running agent costs more every turn.
Where is Argentic the wrong pick?
Argentic is hosted, closed source and early. Use something else if the symptom is a wrong tool call or bad arguments, if what you need is a memory of many users across separate conversations, if most of your job is steps outside the model that a workflow tool should orchestrate, 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.
Short answers
- Why is my LangChain agent losing the plot on long tasks?
- It is usually several problems under one name: forgetting a rule, looping, contradicting a decision, drifting as the prompt grows, calling the wrong tool, forgetting a user between conversations, or losing its place after a failure. The usual cause of the first four is that the model reads a prompt built from a long history that gets trimmed, summarized or buried.
- How do I stop my agent forgetting its goal?
- Keep the objective and standing rules in state your code writes, and print them at the top of every prompt, so a trimmed or summarized history cannot drop them. This works for runs of tens of turns and stops working when the state itself grows too big to print every time.
- Why does my agent loop and repeat tool calls?
- Usually it cannot see that it already did the step, because the record of the step was dropped, the tool's answer was unclear, or nothing tells the loop to stop. A hard step cap, a plain result from every tool and a visible list of finished actions are the first fixes.
- Will LangSmith, Langfuse or Phoenix fix it?
- They show you where the run went wrong and help you turn failures into tests, and that is worth doing first. They read the run and your loop still builds each prompt, so they do not by themselves change what the model reads.
- What did a long run cost when you measured it?
- Argentic engine 0.116.4: 0.88 on day 1, then 0.83 to 0.88 on each later day. One run on Claude Haiku 5.5 at a 200,000-token window. This run cost $4.12 all in: $2.82 for the model's calls at Claude Haiku 5.5's standard rates and $1.30 in step fees. The window was set to 200,000 tokens, smaller than the model's own; that is a test condition, not stock settings.
- Where does Argentic fit, and where does it not?
- Argentic runs your agent's loop and builds each prompt from a record of the run under a size cap, so the prompt stays bounded however long the run goes. You keep your tools and replace the loop. It does not fix a wrong tool call, and it is built for one agent working one job for hours, not for remembering many users across separate conversations. It is hosted, closed source and early.
Sources and method: Head-to-head on a 12-hour shift.