We build Argentic, so weigh what we say about it. The code below was checked on 28 November 2026 against the npm package @argentic-ai/client 0.10.0 and @langchain/core 1.5.1. 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.
Of the tools this page compares, we ran LangChain. We have not run LangGraph, LangMem, Zep and Amazon Bedrock AgentCore yet, so we make no claim about accuracy against them. The LangChain arm was a plain loop, not LangGraph.
Argentic is an engine that keeps AI agents right for hours while prompt size is bounded. If you have a LangChain or LangGraph agent, you keep your tools and hand the loop to Argentic. It is a hosted engine, so there is nothing to run next to your code and no separate memory layer to wire in. It is not a drop-in for a graph: your nodes, edges and checkpointer do not run, and the sections below say what carries over and what does not.
What do I keep, and what does Argentic replace?
You keep the tools: each one's name, description, schema and function, which still run in your own process. Argentic never calls your servers. It tells your code which tool the agent wants, your code carries it out, and the result goes back on the next call. You also keep your system prompt and your choice of model. The model key is yours, used for that call only and never stored.
Argentic replaces the loop that calls the model: the agent executor or the graph, the message list it keeps, and whatever trim, summary or memory layer you added to stop the prompt growing. The engine keeps a record of everything the agent did and builds each prompt from that record under a size cap. The agent can search the record for an old detail, so an early rule or a number from hour two is still there to find. The record is not summarized.
Does it work with LangChain for TypeScript and for Python?
The npm client is what this guide uses. Its version is 0.10.0, and it needs Node 22. It ships adapters for the Vercel AI SDK and Mastra and none for LangChain.js, so the conversion below is about ten lines you keep in your own code. It reads a tool's name, description and schema and calls its invoke.
LangChain for Python has an adapter in our Python package, from_langchain_tools, and the package is not on PyPI. It installs from one pinned commit of our public repository, and the LangGraph guide has a full file for it:
Python, with the LangChain adapter
pip install "argentic-ai[langchain] @ git+https://github.com/Argentic-AI/argentic-plugins@98abf1b4dedf54342876d8018d97e92cf110487a#subdirectory=adapters/python"Do not pip install argentic: that name belongs to an unrelated open-source project.
How do I move my agent over?
First, install the client. Use a Node 22 project set up as an ES module ("type": "module" in package.json), and add the packages your tools use.
Install
npm i @argentic-ai/client @langchain/core zod
npm i -D tsxEnvironment, bash, zsh
export ARGENTIC_API_KEY="aek_your_api_key"
export MODEL_KEY="your_model_provider_key"
export ARGENTIC_MODEL_PROVIDER="YOUR_PROVIDER" # or ARGENTIC_MODEL_BASE_URL="https://..." for any public OpenAI-compatible endpoint
export ARGENTIC_MODEL_ID="YOUR_MODEL_ID"Environment, fish
set -x ARGENTIC_API_KEY aek_your_api_key
set -x MODEL_KEY your_model_provider_key
set -x ARGENTIC_MODEL_PROVIDER YOUR_PROVIDER # or ARGENTIC_MODEL_BASE_URL https://... for any public OpenAI-compatible endpoint
set -x ARGENTIC_MODEL_ID YOUR_MODEL_IDYou always name the model. There is no default, and a price is never guessed: with neither price set, the engine uses its own price for a model it has one for and refuses any other with prices_required.
Second, keep your tools and convert them. Third, let Argentic run the loop. This file is the whole agent: the first block is your tools as you would write them for LangChain, the second is the conversion, and the third is the call that runs it.
Save as agent.mts, run with npx tsx agent.mts
import { tool, type StructuredToolInterface } from "@langchain/core/tools";
import { toJsonSchema } from "@langchain/core/utils/json_schema";
import { z } from "zod";
import { Argentic, modelFromEnv, run, type Tool } from "@argentic-ai/client";
// 1. Your LangChain tools, as you already wrote them. config.configurable.idempotencyKey is
// the same every time this action is retried, so pass it on to the system you call.
const refundOrder = tool(
async ({ order_id, amount_usd }, config) => {
console.log(` refunding $${amount_usd} on ${order_id} (key ${config?.configurable?.idempotencyKey})`);
return { refunded: true, order_id };
},
{
name: "refund_order",
description: "Refund an order.",
schema: z.object({ order_id: z.string(), amount_usd: z.number() }),
},
);
const sendEmail = tool(async ({ to }) => ({ sent: true, to }), {
name: "send_email",
description: "Email a customer.",
schema: z.object({ to: z.string(), subject: z.string(), body: z.string() }),
});
// 2. The one piece of glue: each LangChain tool becomes an Argentic tool.
const fromLangChainTools = (tools: StructuredToolInterface[]): Tool[] =>
tools.map((t) => ({
name: t.name,
description: t.description,
parameters: toJsonSchema(t.schema) as Record<string, unknown>,
execute: (args, ctx) => t.invoke(args, { configurable: { idempotencyKey: ctx.idempotencyKey } }),
}));
// 3. Argentic runs the loop. apiKey comes from ARGENTIC_API_KEY, the model key from MODEL_KEY.
const client = new Argentic();
const out = await run({
client,
agent: "support-bot",
runId: "ticket-77", // keep it the same when you retry
ledgerPath: ".argentic-ledger.json",
task: "Order 1182 arrived broken. Refund the $42, then email dana@example.com.",
system: "Tool calls are requests: their results arrive in the next message.",
tools: fromLangChainTools([refundOrder, sendEmail]),
model: modelFromEnv(), // ARGENTIC_MODEL_ID, plus ARGENTIC_MODEL_PROVIDER or ARGENTIC_MODEL_BASE_URL
maxSteps: 200, // wakes in this run; the default is 8
limits: { max_usd: 0.5, max_turns: 20 }, // for each wake
});
console.log(out.status, out.reply, out.spentUsd);Some details of that file:
taskis the new event, what happened since the agent last ran, never the earlier messages. Argentic keeps the history, so resending it is refused.idempotencyKeyis the same every time one action is retried, so pass it on to the system you call (a payment, an email) and a retry cannot do it twice.runIdstays the same when you retry a run, andledgerPathis a file where finished actions are written. If the process is killed and started again with the same ledger, finished actions are skipped. That is a side benefit.maxStepsis how many calls to the engine onerunmay make. Its default is 8, which is low for a long task.
Tools that depend on LangGraph state, a store or a returned Command need rewriting. There is no graph to give them one, and we did not run any.
How do I set limits?
Three things set the limits.
- You declare the model's prices. Spend is counted from the model's prices per million tokens, not from your provider's invoice, so declare real ones.
modelFromEnv()reads them fromARGENTIC_PRICE_INandARGENTIC_PRICE_OUT. - You set
limitson a call.max_usdcaps the spend of one wake, andmax_turnscaps its model turns.runmakes one wake per step, so these apply to each wake, not to the whole run. - Your organization has limits too: a daily limit and a monthly limit, shown by
GET /v1/usageand shared by all your keys and agents. These cover everything, whatever a single call allows. Limits are checked before every model call: a reply is capped at what the limit can still pay for, and a call it cannot pay for is not made.
When a limit stops a wake, out.status is spend_cap or budget_cap and the work so far is kept. A stopped wake can come back with no reply, so show your user a fallback. Raise the limit and call again.
What Argentic charges is separate from your model's cost. Prototype is free and needs no card. It includes 5,000 agent steps a month. Production is $20 a month per organization with 80,000 agent steps included and a higher request rate. You add a card when you buy it, and the subscription starts right away. The first 10 organizations get Production at $15 a month, kept for as long as they stay on it. Past what is included it is $0.25 per 1,000 agent steps. The model's tokens are billed by your own model provider, never by Argentic.
How does it run for hours?
There are two shapes. One long task is one run with a high maxSteps. Events over time are many short calls to the same agent id: each call sends only the new event, and the agent keeps its own history between them. Nothing wakes an agent by itself, so your scheduler decides when. Pass schedule: true and the agent can put a time on a plan, which comes back as wakeAt for your scheduler to use.
When your app knows something the agent should know too, such as the signed-in user's plan, send it as state on the wake. In 0.10.0 run does not take state, so use client.wake for that call.
The next event, with state
import { Argentic, modelFromEnv } from "@argentic-ai/client";
const client = new Argentic();
const out = await client.wake("support-bot", {
message: "Dana asks to move to the annual plan.",
model: modelFromEnv(),
// what your app holds, not what the agent said: a value it already has costs nothing to send again
state: { "account.plan": "Pro", "cart.items": 3 },
limits: { max_usd: 0.5 },
}, "event-9120"); // the id of the event that woke it, so a retry is not a second message
console.log(out.status, out.reply);state replaces context. A wake that still sends context is refused with a 400 that names state. A value you send is journaled, so the agent still has it on later wakes and can search for it.
How do I see what it did?
The journal is the record of every tool call, model call and result, oldest first. Reading it makes no model call and costs nothing. A replay rebuilds what the model was shown on a wake and compares it with what was recorded. Every run also has a page in the dashboard under Runs.
Read the journal, then replay a wake
import { Argentic, defaultBaseUrl } from "@argentic-ai/client";
// Every tool call and result the agent recorded, oldest first. Read only: no model call, no spend.
const url = `${defaultBaseUrl}/v1/agents/support-bot/journal?kind=tool_call,tool_result&bodies=true&limit=100`;
const page = await (await fetch(url, { headers: { Authorization: `Bearer ${process.env.ARGENTIC_API_KEY}` } })).json();
for (const e of page.events) console.log(e.seq, e.kind, e.at);
// And a check that the journal still says what the model was shown on a wake. It calls no model and costs nothing.
const check = await new Argentic().replay("support-bot", "wk_000000000000000001");
console.log(check.matched, "turns match,", check.mismatched, "do not");Will it forget older facts?
Any agent can. Here is what we measured. We have not run your agent, so treat this as the closest evidence we have.
The one longer run is 14 working days at a 200,000-token window (Claude Haiku 5.5, November 29, 2026), one run each of Argentic engine 0.116.4: it was run at a smaller prompt window than the model's own, so it is not a stock-settings result, and nothing is measured longer. 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. Share of questions right over 1,401 questions, from the benchmark's fixed grader. Day 1 0.88, day 5 0.88; the lowest day was day 2 at 0.83. Argentic engine 0.116.3 (November 28, 2026) scored higher than Argentic engine 0.116.4 on running counts (0.65 against 0.56 on 71 questions). Argentic engine 0.116.4 stayed within 0.05 below its day 1 score (0.88) on every later day.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. The run's engine, model and date: Claude Haiku 5.5 · Argentic engine 0.116.4, November 28, 2026 · one run.
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. The full table, with every row where Argentic lost, is in Compaction or full history for a long-running agent?.
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.
OpenHaulBench is written and run by Argentic, and Argentic is one of the entries. The grader is a program with no model in it, the scripted cheat agents run free on every seed, and every run's rows are published so anyone can recount them.We claim hours, and the one longer run above. The longest run at the model's own window is 12 hours. We do not claim weeks. If your agent has to carry a project across weeks, no run of ours covers that yet, and you should test any tool on your own events before you rely on it.
Where is Argentic the wrong pick?
With its step fee counted, Argentic cost more than Letta over 12 hours at a 100K window.- A graph with several hand-written nodes, or branching you depend on. Argentic runs a tool-calling loop, so that graph does not map onto it, and staying on LangGraph is the better choice.
- An agent that finishes in a few turns. Every call carries a fixed engine prompt, so a short run gains nothing from it.
- A team that needs the Python package from PyPI, or an engine it can read and run itself. The Python package installs from a pinned commit and the engine is hosted and closed source.
- A loop you like that only needs a memory store added. A memory layer your loop calls fits that better, and this comparison sorts the options by the problem you have. We have not run LangMem, Zep or Amazon Bedrock AgentCore, and we make no claim that Argentic is more accurate than any of them.
If you are not sure what is going wrong in your agent first, this guide starts from the symptom. The LangGraph version of this question is here.
Short answers
- Is there a ready-made way to run a LangChain agent for hours without building my own memory layer?
- Argentic is a hosted engine that runs the loop. It keeps a record of the run, builds each prompt from that record under a size cap, and lets the agent search the record for an old detail, so there is no separate memory store to wire in. You keep your LangChain tools. It is not a drop-in for a graph with several hand-written nodes.
- Can I keep my LangChain tools?
- Yes. A short function reads each tool's name, description and schema and calls its invoke method, and the tool still runs in your own process. The npm client has no LangChain.js adapter, so that function lives in your code. Tools that need LangGraph state, a store or a returned Command need rewriting.
- Does it work with LangChain for Python?
- The Python package has a LangChain adapter. It is not on PyPI and installs from a pinned commit of our public repository. The npm client is what the working code in this guide uses.
- How do I set limits on a run?
- Declare your model's prices and set limits.max_usd and limits.max_turns on a call. The call limits apply to each wake, and the organization's own limits cover everything.
- What happens when a limit stops a run?
- The wake ends with status spend_cap or budget_cap and the work so far is kept. It can come back with no reply. Raise the limit and call again.
- Will the agent forget older facts?
- We measured it over hours and over one longer run, with the losses listed. The one longer run is 14 working days at a 200,000-token window (Claude Haiku 5.5, November 29, 2026), one run each of Argentic engine 0.116.4: it was run at a smaller prompt window than the model's own, so it is not a stock-settings result, and nothing is measured longer. We do not claim weeks.
- Can I see every step the agent took?
- Yes. The journal lists every tool call, model call and result, and reading it costs nothing. A replay checks what the model was shown on a wake. Each run also has a page in the dashboard.
- When should I not use Argentic for this?
- When your graph has several hand-written nodes or branching you depend on, when the agent finishes in a few turns, when you need the Python package from PyPI or an engine you can run yourself, or when you only want a memory store added to a loop you already like. Argentic is hosted and closed source.
Sources and method: Head-to-head on a 12-hour shift.