Skip to content

Run the engineover HTTP.

Argentic is an engine that keeps AI agents accurate for hours and days. It is built for long-horizon agents, the kind that work on one job for hours. One endpoint wakes an agent that remembers between calls and runs on your own model key. A run that is cut off can be resumed.

If your agent runs out of context and gets worse after many tokens, that is the problem this is for. How it compares with Lossless Claw, Hindsight, Mem0 and Letta.

Get started

New here? Start with the first run: one script, two keys, about five minutes, and the run appears in the dashboard with what the model was shown at each step. The quickstart then builds an agent of your own. This section is the same first call over plain HTTP.

Make an account to get an API key. Anyone can make an account, and Prototype is free with no card.

You need two keys. An Argentic API key (aek_...) from us, which identifies you and sets your limits. And a key for a model provider, which the engine calls on your behalf. We don't sell model access, and we don't pick a model for you: every call names its own, so the snippets below carry a placeholder you replace with the provider and model id you chose.

  1. Sign in at the dashboard and create an API key. It is shown once, so copy it then.
  2. Set the three variables (your two keys and the model's id), then run the call below.
  3. Run the second call. The agent remembers the first.

More guides: the client reference for TypeScript and Python, proof of what ran, and the FAQ.

Building with a coding agent? Connect our MCP server and it wires Argentic into your agent's loop, then lets you inspect runs. Config for Cursor, VS Code and other clients is on the MCP server page.

Make your first call (bash, zsh)

export BASE="https://api.getargentic.com"
export ARGENTIC_API_KEY="aek_your_api_key"
export MODEL_KEY="your_model_provider_key"

curl -sS "$BASE/v1/agents/hello/wake" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY" \
  -H "X-Model-Key: $MODEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"Remember that the customer prefers email. Then draft a two-line reply to ticket 4412.","model":{"provider":"YOUR_PROVIDER","id":"YOUR_MODEL_ID"}}'

Using fish? Set the variables like this, then run the curl as is

set -gx BASE "https://api.getargentic.com"
set -gx ARGENTIC_API_KEY aek_your_api_key
set -gx MODEL_KEY your_model_provider_key

The first line sets $BASE to the API’s address, and every snippet below uses it. If the reply says your model provider answered 429, you hit its rate limit: wait a few seconds and call POST /v1/agents/hello/resume with the same headers and model. That runs the message you already sent; sending the wake again would add it a second time. You should get back something like:

You should see
{
  "status": "done",
  "reply": "Noted. Draft: Hi, following up on ticket 4412 by email as you prefer. We have fixed the issue; reply here if anything is still off.",
  "spent_usd": 0.0031,
  "turns": 3,
  "tool_calls": {
    "count": 1,
    "names": [
      "decide"
    ]
  },
  "usage": {
    "prompt_tokens": 5120,
    "cache_hit_tokens": 0,
    "cache_miss_tokens": 5120,
    "output_tokens": 310
  }
}

hello is an agent id you chose. Same id, same agent. Ask it something that depends on the first call:

curl -sS "$BASE/v1/agents/hello/wake" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY" \
  -H "X-Model-Key: $MODEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"What did I ask you to remember?","model":{"provider":"YOUR_PROVIDER","id":"YOUR_MODEL_ID"}}'

Replace the two placeholder values in model: the provider (or a base_url for your own OpenAI-compatible endpoint) and the model id. Use the same model on every call to an agent.

The same call from code:

Node 18+

const res = await fetch(`${process.env.BASE}/v1/agents/hello/wake`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.ARGENTIC_API_KEY}`,
    "X-Model-Key": process.env.MODEL_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "message": "Remember that the customer prefers email. Then draft a two-line reply to ticket 4412.",
    "model": {
      "provider": "YOUR_PROVIDER",
      "id": "YOUR_MODEL_ID"
    }
  }),
});
const out = await res.json();
console.log(out.status, out.reply);

Python (requests)

import os, requests

res = requests.post(
    f"{os.environ['BASE']}/v1/agents/hello/wake",
    headers={
        "Authorization": f"Bearer {os.environ['ARGENTIC_API_KEY']}",
        "X-Model-Key": os.environ["MODEL_KEY"],
    },
    json={
        "message": "Remember that the customer prefers email. Then draft a two-line reply to ticket 4412.",
        "model": {
            "provider": "YOUR_PROVIDER",
            "id": "YOUR_MODEL_ID"
        }
    },
)
out = res.json()
print(out["status"], out["reply"])

Bring your tools

Bring your tools, your prompt and your model key, and Argentic runs the loop. It replaces your framework's loop, so you don't need a framework either. Tools you already wrote for the Vercel AI SDK, Mastra, LangChain / LangGraph, Pydantic AI or the OpenAI Agents SDK carry over; the framework's own runner, graph and sessions don't run. Each example is the same refund agent.

The TypeScript client is on npm as @argentic-ai/client, with /ai-sdk and /mastra entries that read those frameworks' tool definitions. The Python client installs from our public repo, as the Python guides show.

Step-by-step guides for carrying your tools over, each with a sample we ran: Vercel AI SDK, OpenAI Agents SDK, LangGraph, Mastra and Pydantic AI. The guides cover long-session cost, asking a person before your agent acts, proving what an agent did and forking an agent to try another path, with code that runs without Argentic. For other shapes of agent, three example agents show a paid tool, a webhook cut off mid-post and a long research loop.

TypeScript

npm i @argentic-ai/client
@argentic-ai/client on npm (opens in a new tab)See the examples (opens in a new tab)

Authentication

Send your API key on every /v1 request as Authorization: Bearer aek_.... Keep it out of source control and out of browsers: call the API from your server. A missing, wrong or revoked key is 401 unauthorized, and we don't say which. Lost or leaked a key? Tell us and we'll revoke it and issue another.

Your model

The model is yours. Send your provider key in the X-Model-Key header on every wake. It's used for that call only: not stored, not logged, not written to the agent's journal, and scrubbed from any error text before it's returned. It's sent only to the endpoint you name in the same request. Rotate it whenever you like; nothing on our side needs updating.

Name the endpoint with model.provider, one of: openai, anthropic, gemini, openrouter, deepseek, groq, together, fireworks, mistral, xai, nvidia. Or give model.base_url: any OpenAI-compatible chat-completions endpoint that supports tool calling. It must be https on port 443 at a public host; redirects are refused. Anthropic models are called through Anthropic's Messages API with prompt caching on. Gemini and the rest go through OpenAI-compatible endpoints.

How agents work

An agent id is a memory. Same id, same agent; different ids never share anything, not even inside your own account. The usual pattern is one agent id per end user, or per customer account if one agent should know the whole account. Send system and role on every call: they are not remembered between calls, which also makes system the place for per-call context you do not want kept in memory (today's date, the user's plan) instead of prefixing the message.

What an agent remembers is its own choice, made with built-in tools: decide (a rule or preference, with its reason; when a rule changes, the agent gives the number of the rule it replaces and the old one stops binding), plan and plan_close (a future commitment), recall (search its own memory), and spawn, checkpoint and complete for its own work. They appear in tool_calls.names. Read what it kept, without spending a model call, with GET /v1/agents/{agent}/memory; add ?q=allergy to get only the items that mention it.

Send only what is new. Argentic keeps the agent's history, so message is the next event, not the conversation so far: the user's new message, a result from your app, something that happened. Don't send earlier messages or the agent's replies again. The agent already has them, and each copy would be stored in its journal a second time. A messages or history field, or a message or outside that repeats one of the agent's last ten messages or replies word for word (200 characters or more), is refused with 400 history_resent. Nothing is recorded and nothing is charged. Sending the same message twice is not history: a retry is still a retry.

Nothing wakes an agent by itself. Argentic keeps no clock, and your app decides when an agent runs. By default a plan with a due date is only remembered and shown to the agent the next time you wake it, and the agent is told it cannot schedule, so it should not promise a reminder. To have timed wakes, send "schedule": true on the agent's calls: it can then put a wake_at time on a plan. Every answer carries wake_at, the time the agent next wants waking, or null. Keep the latest one per agent in your own scheduler (a cron job or a delayed queue job), and at that time wake the agent with {"fire_due": true} in place of a message, plus your model key and settings as usual. A fire_due wake with nothing due makes no model call and costs nothing. If your scheduler loses track, GET /v1/due lists every plan whose time has passed, across your agents, for free.

Your own tools. Declare tools in the wake request (tools). The agent can call them; each call comes back in actions in the response for your application to carry out. Nothing calls your servers, and the agent is told the action was requested, not what came of it, so report the outcome in your next message. This replaces parsing a line out of the reply. A tip: say in system that tool calls are requests, not confirmed results, and that outcomes arrive in later messages; otherwise a model will tell the user it is done before your application has acted. Declare them once with PUT /v1/agents/{agent}/tools and every wake of that agent can use them; tools sent with a call replace the stored ones for that call only (send an empty list to run one call with none). The names of tools the agent used appear in both actions and tool_calls.names.

Arguments are checked. Before a call is recorded, its arguments are validated against the schema you declared: types, enum values, required fields, and a 4,000 character cap on strings. A call that fails is not recorded and does not appear in actions; the agent is told the arguments were invalid and can try again. Still treat the values as untrusted input, since a model chose them. Limits: at most 32 tools per call and 48,000 characters of declarations in all, tool names up to 40 characters, 20 properties per tool. Models that do not support tool calling cannot use tools; check your model's documentation before you rely on it.

One call per operation. Put once_per on a tool to give the agent one call per business operation: a key such as "refund:{order_id}", where each {argument} is a required string, number, integer or boolean property of that tool. A repeat of the same key, in the same reply or in any later wake, is refused before it is recorded, so it never reaches actions and your app is never asked to do it twice. The agent is told why. This stops the agent from deciding to repeat an operation. It does not make your own side exactly-once, so keep keying on seq.

Many tools. Every declared tool takes space in the prompt on every turn. From about ten tools, or ten thousand tokens of schemas, set defer_loading: true on the ones used rarely. They leave the prompt, and the agent finds one with find_tools and calls it with use_tool. The call still comes back in actions under the tool's own name. Don't defer a tool named in tool_choice.

Making the agent call a tool. By default the model decides, so a reply with an empty actions is normal. When your flow needs the action, send "tool_choice": {"type": "tool", "name": "checkout"} (that tool) or "tool_choice": "required" (any of your tools). The agent works as usual first, so it can still look things up in its memory. If it tries to finish without the call, it is told so and its next turn is sent with the tool forced, which costs one or two more model calls only when it skipped it. It is asked once per call, so a model or provider that ignores forced tool choice can still finish without it: keep checking actions. Naming a tool the agent does not have, or required with no tools, is a 400.

Context for one call. context (up to 16,000 characters) is for facts that are true right now and belong to this call only: today's opening hours, the signed-in user's plan, what is in their cart. The agent sees it on every turn of the call, after its history. It is not written to the agent's journal or memory, and later calls don't see it unless you send it again, so you no longer have to paste it into message. We keep it with the call's record so a resume can finish the call and replay can check it.

Timing. A wake runs the model several times, so it takes longer than one completion: typically 2 to 25 seconds, longer when the provider is slow or the agent makes many turns. Set your client timeout to at least 60 seconds. Run one wake at a time per agent and queue the rest on your side; polling the 409 works but a queue is simpler, and different agents run in parallel.

Every call carries a fixed engine prompt (instructions and built-in tool definitions), which matters on small caps. A run stopped by a limit (spend_cap, budget_cap, turn_cap, time_cap) can come back with reply: null; whatever it recorded before stopping is kept, so show the user a fallback message.

Try another path

Every turn an agent has finished is a place you can fork from. A fork copies the agent's journal up to a turn you choose into a branch of its own, and you wake the branch by sending "memory": {"fork": "try-b"}. The original is never written to, so a fork is safe to cut from an agent that is in production.

Go back to a turn that went wrong. Cut at the turn before it, wake the fork with another system prompt, model or message, and compare its journal with the original's. Clone an agent mid-task. Cut at the newest turn boundary and the fork holds everything the agent knows now, so you can cut several and try a different approach in each, in parallel, before you choose one and send it to the original as a normal message.

Creating a fork is free and makes no model call. A wake on a fork is a wake like any other: your model key, your limits, one call against your plan. A fork never calls your tools; its tool calls are answered from what the original recorded, and it returns no actions. There is no delete route, and an account keeps up to 50 forks. The fork guide walks through both cases with requests you can run; the routes are POST /v1/agents/{agent}/fork, GET .../fork-points and GET .../forks in the reference.

When a call doesn't answer

A wake can die between your request and our answer: your connection drops, or our process does. Every wake is recorded before it runs, so nothing is lost and nothing has to be sent twice.

Send an Idempotency-Key header on wake, one new value per message. If no answer comes back, send the same request again with the same key. The message isn't added a second time. A wake that was cut off is finished, and one that already finished returns its stored answer with Idempotent-Replay: true. Without a key, a retry is a new message.

To finish a wake without resending the message, call POST /v1/agents/{agent}/resume with your model key again, since we never keep it. GET /v1/agents/{agent}/wakes shows what is open and why: running, interrupted, queued, stopped or done. If a run died, the agent stays held for up to two minutes. Until then you get 409 queued with retry_at, and a resume works once the hold lapses.

  • A tool call of yours that already has a recorded result is not requested again, but the resumed wake's actions still list it, so key your side effect on seq.
  • A call that was cut off before its result was recorded is requested once more, unless the tool is once-only (a mandate tool). That one is recorded as outcome unknown, because we can't know whether it ran. Each entry in actions has a seq that never changes, so key your side effect on it and a repeat does nothing.
  • actions is read from the journal, so a wake finished after a crash lists the calls from both runs.
  • The agent's own memory writes are not repeated.
  • A model call that was in flight is asked again. We count the lost one against your caps at its estimated cost. Your provider may or may not have billed it.

To see what happened, GET /v1/agents/{agent}/journal pages through every event the agent recorded. .../journal/bundle returns the same journal as one file with a SHA-256 hash chain you can recompute yourself: start from sha256("engine-journal-bundle/1:" + manifest.scope), then for each event in order take sha256(previous + "\n" + canonical(event)), where canonical is the event as JSON with keys sorted at every level, no whitespace between tokens, and non-ASCII characters left unescaped (JavaScript's JSON.stringify output). The last value must equal manifest.head_hash. The chain shows the file wasn't edited. It isn't signed, so it can't prove to a third party that nothing was held back.

POST /v1/agents/{agent}/replay rebuilds what the model was shown on each turn from the journal and compares it with the fingerprint recorded when the model was called. If every turn matches, the journal still says what the model saw. It calls no model, runs no tool and costs nothing. It checks the prompt side only: the reply is shown as it was recorded, not run again. Add rerun: true with a wake to check the other side: the engine runs that wake again over the journal as it stood when your message arrived, using the recorded model replies and tool results, and compares the events it writes with the journal's one by one. identical means the engine, given those replies, wrote exactly what the journal holds. It calls no model and costs nothing, and it doesn't show that the model would answer the same prompt again.

Reference

Base URL: https://api.getargentic.com (the production one; the dashboard shows yours). Generated from openapi.json, which you can load into Postman, Insomnia or a client generator.

post/v1/agents/{agent}/wake

Wake an agent with a message

Runs the agent once and returns its reply. The same agent id is the same agent: its memory, plans and history carry over between calls, and different ids never see each other, so a common pattern is one agent id per end user. One request at a time per agent: a second call while the agent is mid-run returns HTTP 409 with status: queued. Memory is the agent's own choice: it keeps what it records with its built-in tools decide (a rule or preference, with its reason; a rule that changes names the one it replaces), plan (a future commitment; nothing wakes it to carry out unless you send schedule and your app wakes it at the answer's wake_at), plan_close, recall (search its own memory), spawn and complete; they show up in tool_calls.names. Read what it kept with GET /v1/agents/{agent}/memory. Every call carries about 2,500 to 5,000 prompt tokens of engine overhead. Your own tools, declared in tools, come back in actions.

Example request

curl -sS "$BASE/v1/agents/support-bot/wake" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY" \
  -H "X-Model-Key: $MODEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"Remember that the customer prefers email. Then draft a two-line reply to ticket 4412.","model":{"provider":"openrouter","id":"deepseek/deepseek-chat"}}'

Parameters

Parameters
NameInDescription
agentpath, requiredAn agent id you choose: 1 to 64 letters, digits, - or _, starting with a letter or digit.
X-Model-Keyheader, requiredYour model provider's API key. Used for this call only; never stored, logged or journaled. 8 to 512 printable characters.
X-Embed-KeyheaderYour embedding provider's API key. With it, the agent's search also finds lines by meaning, not only by their words, and your provider handles the text it indexes and the search questions, under your account and at your cost. Used for this call only; never stored, logged or journaled. Without it nothing changes. 8 to 4096 printable characters. Send it on every call you want this for.
X-Embed-Providerheadercohere (the default: Cohere's API, with a Cohere key) or bedrock (Amazon Bedrock, with a Bedrock API key). Needs X-Embed-Key.
X-Embed-RegionheaderWith bedrock only: the AWS region your key calls (default us-east-1).
X-Time-Budget-SheaderWhen enabled on the host: the most seconds this call may keep starting new turns. It can only lower the host's own time limit, never raise it, and is ignored when the host has none. When the time is up the call answers time_cap and the work so far is kept.
Idempotency-Keyheader1 to 128 letters, digits, - _ . :. Send the same key when you retry a call that did not answer. The retry never adds your message a second time: it finishes the wake if it is not done, and repeats the stored answer (with an Idempotent-Replay: true header) if it is. Reusing a key with a different body is 422 idempotency_key_reused. Without a key, a retry is a new message. After a provider refusal (bad_model, model_key_rejected), sending the same message again with the model or key corrected, under the same Idempotency-Key or with none, continues that wake (resumed: true) instead of adding the message twice.

Request body

Request body
FieldTypeDescription
messagestringWhat is new for the agent this call: the new event, not the conversation so far. Argentic keeps the history, so send only what happened since the last wake. A message that repeats, word for word, a message or reply the agent already has (200 characters or more) is a 400 history_resent, and so is a messages or history field. Required unless fire_due is true or results is sent.
schedulebooleanSay that your app wakes the agent with fire_due at the wake_at each answer gives. The agent may then put a wake_at time on a plan. Without it nothing wakes an agent, and the agent is told not to promise reminders. Send it on every call of an agent that should schedule.
fire_duebooleanInstead of a message: wake the agent once for each of its plans whose wake_at has passed. Costs nothing and makes no model call when none is due. The response lists the plan ids in fired.
systemstringOptional system prompt. It is not remembered between calls: send it on every call.
rolestringOptional one-line description of the agent's standing job.
resultsarrayThe real results of actions the agent asked for in an earlier wake. Each is recorded as the result of that call, and the agent reads it as that call's result: the run history, the agent's state and its next turn show it instead of the placeholder it was given when the call was made. message is optional when results is sent; leave out any line that repeats the results. What your app got back is labelled as from the outside world unless you tag it owner, and a message sent with results is labelled the same way. The label is shown to the agent beside the text and never stops it doing anything: every rule it records binds, and what it may do is up to your app's own tools. A seq that is not an action of this agent is a 400 and nothing is recorded; a call that already has a result keeps it. Optional, and not allowed with fire_due.
outsidestringText that came from the outside world and arrived with this call: a web page, an email, a file, another person's message, a tool's output. The agent sees it labelled as outside text, beside your own words. Everything in message is read as your own voice, so put anything you did not write yourself here instead. Optional, and not allowed with fire_due.
stateobjectKeys and JSON values your app holds that the agent should know, such as the signed-in user's plan or what is in their cart. Send it as often as you like, whole or in part. Sending a value the agent already has costs nothing. A changed value is shown to the agent with this call and kept, so the agent still has it in later calls and can search for it. null removes a key, and a key you leave out stays as it is. Only your app can write these. Up to 64 keys a call, a key up to 120 characters on one line, a value up to 2,000 characters as JSON.
atstringWhen this happened in your app, as ISO 8601 with an offset. The agent reads every time on this clock: the message, the notes it keeps and the current time all show your app's day and time, in your offset. Send it when your app's time differs from the time of the call, for example when you work through a queue or a backlog. Without it, the agent uses the time the call arrived, in UTC. With fire_due, due plans are checked against this time.
modelobject, requiredWhich model to call with your key. Give provider (a preset) or base_url (any OpenAI-compatible chat-completions endpoint with tool calling).
model.idstring, requiredThe provider's model id. It must support tool calling.
model.providerenumA preset endpoint.
model.base_urlstringInstead of a preset. Must be https, port 443, a public host name. Redirects are refused.
model.pricesobjectOptional. Dollars per million tokens, each 0 to 1000 (a free model is { "in": 0, "out": 0 }). Only a spend limit needs them: a call with limits.max_usd, or under a spend limit your organization set, must be priced, by these or, for Anthropic's own models on api.anthropic.com, from the list, or it is refused with prices_required. With no limit, leave them out: the call runs, its tokens are counted, and spent_usd is null.
model.prices.innumber, required
model.prices.outnumber, required
model.prices.cache_hitnumber
model.prices.cache_writenumberOptional. What a token written to the provider's prompt cache costs. Without it a written token is counted at in (for Anthropic's own models on api.anthropic.com, 2 times in).
toolsarrayTools of your own. The agent may call them like its own; nothing here calls your systems. Each call is recorded and returned in actions for your app to carry out, and the agent is told it was requested, not what came of it: put the outcome in your next message. Tools sent here are used for this call only and replace any stored for the agent; to declare them once, use PUT /v1/agents/{agent}/tools and leave tools out. Their names also appear in tool_calls.names. Tip: tell the model in system that tool calls are requests, not confirmed results, and that outcomes arrive in later messages.
tool_choicestring | objectWhether this call must end with a call to one of your tools. auto (the default): the model decides. required: one of your tools. {"type": "tool", "name": "checkout"}: that tool. It is checked once per call, not per turn: the model works as usual (it can recall memory first), and if it tries to finish without the call it is told so, and its next turn is sent with the tool forced. That costs one or two more model calls, only when it skipped the call. It is asked once, so a model or provider that ignores forced tool choice can still finish without it: check actions. A name that is not one of the agent's tools, or required with no tools, is a 400.
limitsobjectPer-call limits. max_usd can only lower your organization's limit. max_turns defaults to your organization's turn limit and may be raised up to max_turns_ceiling from GET /v1/usage when your organization has one.
limits.max_usdnumberSpend cap for this call, in dollars, counted by the prices you declare. Enforced before every model call: the reply is limited to what the cap can still pay for, and a call it cannot pay for at all is not made (the run stops with spend_cap). Your organization's daily limit works the same way.
limits.max_turnsintegerMost model turns this call may take. Defaults to your organization's turn limit; may be raised up to max_turns_ceiling from GET /v1/usage when your organization has one. A larger value is lowered to that maximum, not refused.
memoryobjectUse a fork of this agent: { "fork": "<name>" }, a name from POST /v1/agents/{agent}/fork. Left out, the agent's own memory. A fork you do not have, or one that belongs to another agent, answers 404 not_found.
memory.forkstring, required

Example response

{
  "status": "done",
  "reply": "Noted. Draft: Hi, following up on ticket 4412 by email as you prefer. We have fixed the issue; reply here if anything is still off.",
  "spent_usd": 0.0031,
  "turns": 3,
  "tool_calls": {
    "count": 1,
    "names": [
      "decide"
    ]
  },
  "usage": {
    "prompt_tokens": 5120,
    "cache_hit_tokens": 0,
    "cache_miss_tokens": 5120,
    "output_tokens": 310
  }
}

Responses

Responses
StatusMeaning
200The run finished or was stopped by a limit. Check status; a stopped run can have reply: null, and the work it did is kept.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.
402Billed accounts only: your balance cannot cover another agent step. Nothing was run and nothing was spent on your model key. Buy a plan with POST /v1/billing/checkout.
409The agent is mid-run. Look again at retry_at (ISO 8601, UTC) or after retry_after whole seconds (never more than 5); the Retry-After header carries the same seconds. It is a polling interval, not a prediction: a call can take longer, and an early retry costs nothing and just gets another 409. Your message is already recorded: the run in progress handles it before it stops, so the agent never runs twice in parallel. Do not resend it without an Idempotency-Key, which would add it a second time; with the same key, a retry returns the answer of the run that handled it (handled_with). Send an Idempotency-Key on wake so that a retry after a lost answer finishes the same wake instead of adding the message again.
413The request body is over 128 KB. detail names the limit.
429Over your requests-per-minute limit. Wait Retry-After seconds.
500Something went wrong on our side. Retrying is safe.
507Only when the host sets a per-organization run-history storage cap: your organization's run history is over it. Nothing was run and nothing was spent on your model key.

post/v1/agents/{agent}/resume

Finish a wake that was cut off

Continues the agent's latest wake that is not done (or the one named by wake_id) with the settings it had, without adding its message again. Use it after a call that never answered because the connection or our process died, or that stopped on a cap. The agent picks up from its journal: a tool call that already finished is not run again, a tool call that was cut off is requested again once, and a model call that was lost is asked again and charged at its estimate. Needs your X-Model-Key again, because we never keep it. Only model is required when there is nothing to continue (then nothing runs and resumed is false); anything else you send replaces what the wake had, which is how you raise a cap that stopped it. A wake that is already done returns its stored answer and runs nothing. If a run still holds the agent you get 409 queued and nothing changes; a run that died keeps the agent for up to two minutes (its lease) before another run can take over, so keep looking again at retry_at until then.

Example request

curl -sS "$BASE/v1/agents/support-bot/resume" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY" \
  -H "X-Model-Key: $MODEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":{"provider":"openrouter","id":"deepseek/deepseek-chat"}}'

Parameters

Parameters
NameInDescription
agentpath, requiredThe agent id.
X-Model-Keyheader, requiredYour model provider's API key. Used for this call only; never stored, logged or journaled. 8 to 512 printable characters.
X-Embed-KeyheaderYour embedding provider's API key. With it, the agent's search also finds lines by meaning, not only by their words, and your provider handles the text it indexes and the search questions, under your account and at your cost. Used for this call only; never stored, logged or journaled. Without it nothing changes. 8 to 4096 printable characters. Send it on every call you want this for.
X-Embed-Providerheadercohere (the default: Cohere's API, with a Cohere key) or bedrock (Amazon Bedrock, with a Bedrock API key). Needs X-Embed-Key.
X-Embed-RegionheaderWith bedrock only: the AWS region your key calls (default us-east-1).
X-Time-Budget-SheaderWhen enabled on the host: the most seconds this call may keep starting new turns. It can only lower the host's own time limit, never raise it, and is ignored when the host has none. When the time is up the call answers time_cap and the work so far is kept.

Request body

Request body
FieldTypeDescription
wake_idstringWhich wake to continue. Default: the agent's latest wake that is not done.
modelobjectWhich model to call with your key. Give provider (a preset) or base_url (any OpenAI-compatible chat-completions endpoint with tool calling).
model.idstring, requiredThe provider's model id. It must support tool calling.
model.providerenumA preset endpoint.
model.base_urlstringInstead of a preset. Must be https, port 443, a public host name. Redirects are refused.
model.pricesobjectOptional. Dollars per million tokens, each 0 to 1000 (a free model is { "in": 0, "out": 0 }). Only a spend limit needs them: a call with limits.max_usd, or under a spend limit your organization set, must be priced, by these or, for Anthropic's own models on api.anthropic.com, from the list, or it is refused with prices_required. With no limit, leave them out: the call runs, its tokens are counted, and spent_usd is null.
model.prices.innumber, required
model.prices.outnumber, required
model.prices.cache_hitnumber
model.prices.cache_writenumberOptional. What a token written to the provider's prompt cache costs. Without it a written token is counted at in (for Anthropic's own models on api.anthropic.com, 2 times in).
systemstring
rolestring
toolsarray
scheduleboolean
tool_choicestring | objectAs on wake.
limitsobjectPer-call limits. max_usd can only lower your organization's limit. max_turns defaults to your organization's turn limit and may be raised up to max_turns_ceiling from GET /v1/usage when your organization has one.
limits.max_usdnumber
limits.max_turnsinteger

Example response

{
  "status": "done",
  "reply": "I sent both notes.",
  "spent_usd": 0.0011,
  "turns": 1,
  "actions": [
    {
      "id": 1,
      "tool": "send_note",
      "args": {
        "team": "ops"
      },
      "seq": 8
    },
    {
      "id": 2,
      "tool": "send_note",
      "args": {
        "team": "sales"
      },
      "seq": 9
    }
  ],
  "resumed": true,
  "wake_id": "wk_c12f1e4118e6a3f029"
}

Responses

Responses
StatusMeaning
200The wake finished (resumed: true), stopped again on a limit, or was already done.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.
404No such wake, or the agent has no journal yet.
409A run still holds the agent. Nothing changed; look again at retry_at.
413The request body is over 128 KB. detail names the limit.
429Over your requests-per-minute limit. Wait Retry-After seconds.

get/v1/agents/{agent}/wakes

List an agent's wakes

Every wake call is recorded before it runs, so a call that never answered can be found here. No model call, no spend, no model key. Newest first. state: running (a run holds the agent now), interrupted (the process ended early; wake the agent again), queued (journaled while another run held the agent), stopped (an error or limit ended the last attempt; stopped_by says which), done.

Example request

curl -sS "$BASE/v1/agents/support-bot/wakes" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Parameters

Parameters
NameInDescription
agentpath, requiredThe agent id.
statequeryOnly wakes that are open (not done) or done.
limitquery1 to 100; default 20.
memoryqueryfork:<name> reads a fork of this agent instead of the agent itself.

Responses

Responses
StatusMeaning
200The agent's wakes.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.
429Over your requests-per-minute limit. Wait Retry-After seconds.

get/v1/agents/{agent}/wakes/{id}

One wake

The record of one wake: its state, how many runs it took, and the stretch of the journal it covers (journal.from_seq to journal.to_seq, to read with GET /v1/agents/{agent}/journal?wake=...). A done wake carries the answer it gave in result.

Example request

curl -sS "$BASE/v1/agents/support-bot/wakes/wk_c12f1e4118e6a3f029" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Parameters

Parameters
NameInDescription
agentpath, requiredThe agent id.
idpath, requiredThe wake_id from the wake response.

Responses

Responses
StatusMeaning
200The wake.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.
404No such wake, or the agent has no journal yet.
429Over your requests-per-minute limit. Wait Retry-After seconds.

get/v1/agents/{agent}/journal

Read the agent's journal

The journal is the append-only record of everything the agent did: each trigger, model call, tool call and tool result, with its position seq. This returns it as it is, oldest first, in pages. Read only: no model call, no spend, no model key. wake limits it to one wake. bodies=true adds the text each tool returned (a result trimmed by retention comes back null; its hash stays in the payload). A page stops after about 2 MB; continue from next_after. The journal contains what your messages and your tools' outputs contained, so treat it like your own data.

Example request

curl -sS "$BASE/v1/agents/support-bot/journal" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Parameters

Parameters
NameInDescription
agentpath, requiredThe agent id.
memoryqueryfork:<name> reads a fork of this agent instead of the agent itself.
afterqueryOnly events after this seq; default 0.
limitquery1 to 500; default 100.
kindqueryComma-separated event kinds to keep, such as tool_call,tool_result.
bodiesquerytrue to include tool result text.
wakequeryOnly the part of the journal one wake covers.

Responses

Responses
StatusMeaning
200A page of events.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.
404No such wake, or the agent has no journal yet.
429Over your requests-per-minute limit. Wait Retry-After seconds.

get/v1/agents/{agent}/journal/bundle

The journal as a checkable file

The whole journal (events and tool result bodies) as one engine-journal-bundle/1 JSON file with a SHA-256 hash chain over it: each link covers the previous link and the event, starting from the agent's scope. Anyone can recompute the chain from the file and see that no event was edited, dropped, added or reordered. The chain is not signed, so it shows the file hangs together; it does not prove to a third party that we kept nothing back. Up to 4 MB; for a longer journal, to_seq takes an earlier part and GET .../journal reads it in pages. No model call, no spend.

Example request

curl -sS "$BASE/v1/agents/support-bot/journal/bundle" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Parameters

Parameters
NameInDescription
agentpath, requiredThe agent id.
to_seqqueryStop at this seq (inclusive).
memoryqueryfork:<name> reads a fork of this agent instead of the agent itself.

Responses

Responses
StatusMeaning
200The bundle.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.
404No such wake, or the agent has no journal yet.
413The request body is over 128 KB. detail names the limit.
429Over your requests-per-minute limit. Wait Retry-After seconds.

post/v1/agents/{agent}/replay

Replay the agent's turns with no model call

Re-renders what the model was shown on each turn from the journal and compares it with the hash recorded when the model was called. match: true means the journal still reproduces that prompt byte for byte, so what it says the agent saw is what the agent saw. match: false means the journal now renders differently (it was changed, or the settings differ). match: null means the turn could not be checked (reason), which says nothing about the journal: turns from before we recorded settings need config (the system, role, tools and schedule you woke the agent with). Each turn carries what the model answered, from the journal. Nothing is called, nothing is run, and nothing is spent. By default replay checks the prompt side. With rerun: true and a wake, it also runs the engine again over that wake with the model's recorded replies and your tools' recorded results and compares what the engine writes with the journal: rerun.status is identical, diverged (with first_divergence) or skipped (with reason). Either way no model is called, your tools are not called, and nothing is spent. A rerun does not show the model would answer the same prompt again, only that the engine, given the replies it got, did what the journal says.

Example request

curl -sS "$BASE/v1/agents/support-bot/replay" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":25}'

Parameters

Parameters
NameInDescription
agentpath, requiredThe agent id.

Request body

Request body
FieldTypeDescription
memoryobjectUse a fork of this agent: { "fork": "<name>" }, a name from POST /v1/agents/{agent}/fork. Left out, the agent's own memory. A fork you do not have, or one that belongs to another agent, answers 404 not_found.
memory.forkstring, required
afterinteger
limitinteger
wakestringOnly the turns of one wake.
promptsbooleanInclude the full rendered prompt of each turn (large).
rerunbooleanNeeds wake. Instead of checking prompts, run the wake's engine work again from the journal with the recorded model replies and your tools' recorded results, and compare the events it writes with the journal's. Response: { agent, model_calls: 0, spent_usd: 0, rerun }. Journals over 5,000 events are 413.
configobjectFor turns from before settings were recorded: how you woke the agent.
config.systemstring
config.rolestring
config.toolsarray
config.scheduleboolean
config.modelobject
config.model.idstring, required
config.model.pricesobject

Responses

Responses
StatusMeaning
200One page of turns.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.
404No such wake, or the agent has no journal yet.
413The request body is over 128 KB, or (rerun) the journal is over 300,000 events.
429Over your requests-per-minute limit. Wait Retry-After seconds.
503rerun only: other reruns are using this server's rerun memory. Try again after Retry-After seconds.

post/v1/agents/{agent}/fork

Cut a fork

Branches the agent's journal at to_seq into a fork of its own, called name. The agent itself is not touched: nothing is written to its journal, its memory or its wakes. Wake the fork, read it and replay it by passing memory: { "fork": name } to the wake, journal, wakes, memory and replay routes of the same agent. A fork belongs to the agent and the account it was cut from. The same request again (same name, same to_seq) answers 200 with already: true; the same name with another cut is a 409. No model call, no spend. Cutting a fork takes about the same time however long the journal is, and adds nothing to the account's run-history size until the fork is woken; the events up to the cut are not counted as spend a second time.

Example request

curl -sS "$BASE/v1/agents/support-bot/fork" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Parameters

Parameters
NameInDescription
agentpath, requiredThe agent id.

Request body

Request body
FieldTypeDescription
namestring, requiredYour name for the fork: 1-64 letters, digits, ., _ or -.
to_seqinteger, requiredThe seq to cut at, one of GET /v1/agents/{agent}/fork-points. The fork holds every event up to and including it.

Responses

Responses
StatusMeaning
200This fork already exists with this cut.
201The fork was cut.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.
404The agent has no journal up to that seq.
409The name is taken by a fork with another cut or by something else, or the account is at the most forks it may keep.
413The request body is too large.

get/v1/agents/{agent}/fork-points

Where a fork can be cut

The seq values of the agent's journal at which it can be forked: after each event at which no model call is in flight and no tool call is waiting for its result. Cutting anywhere else would leave the fork to finish a call the original was in the middle of, so it is refused. No model call, no spend.

Example request

curl -sS "$BASE/v1/agents/support-bot/fork-points" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Parameters

Parameters
NameInDescription
agentpath, requiredThe agent id.
afterqueryOnly points after this seq.
limitqueryAt most this many points (default 100).

Responses

Responses
StatusMeaning
200The points, oldest first. One page reads a bounded stretch of the journal, so a page can hold fewer than limit points, or none, while more remain: pass next_after as after for the next page. next_after is null when the journal has been read to its end.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.
404The agent has no journal yet.

get/v1/agents/{agent}/forks

An agent's forks

The forks cut from this agent, oldest first. No model call, no spend.

Example request

curl -sS "$BASE/v1/agents/support-bot/forks" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Parameters

Parameters
NameInDescription
agentpath, requiredThe agent id.

Responses

Responses
StatusMeaning
200The forks.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.

get/v1/agents/{agent}/memory

What an agent remembers

Reads the agent's stored memory straight from its record: no model call, no spend, no model key needed. Newest first, one kind per request. decisions are the rules and preferences it recorded with decide, facts are values it stored for later, plans are its open commitments. Page with before: pass the previous page's next_before until it is null.

Example request

curl -sS "$BASE/v1/agents/support-bot/memory" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Parameters

Parameters
NameInDescription
agentpath, requiredThe agent id.
memoryqueryfork:<name> reads a fork of this agent instead of the agent itself.
kindqueryWhich memory: decisions (default), facts or plans.
limitquery1 to 100; default 50.
beforequeryReturn items older than this id (the next_before of the previous page).
qqueryOnly items containing this text, case-insensitive (up to 100 characters). Matches the text and reason of decisions, the resource, path, predicate and value of facts, and the text and due of plans. Use it to ask for one thing ("allergy") without paging through everything.

Example response

{
  "agent": "support-bot",
  "kind": "decisions",
  "items": [
    {
      "id": 12,
      "text": "The customer prefers email.",
      "reason": "They said so on ticket 4412.",
      "reach": "shared",
      "at": "2026-10-19 06:19:33.429958+00"
    }
  ],
  "next_before": null
}

Responses

Responses
StatusMeaning
200One page of the agent's memory. An agent that has recorded nothing returns an empty list.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.
429Over your requests-per-minute limit. Wait Retry-After seconds.

put/v1/agents/{agent}/tools

Declare an agent's tools once

Stores the tools (same shape as tools on a wake, at most 32) for this agent. A wake that does not send tools uses them, so you no longer send them on every call; a wake that does send tools uses those instead. Replaces what was stored; an empty list clears it. Validated like tools on a wake.

Example request

curl -sS "$BASE/v1/agents/support-bot/tools" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tools":[{"name":"book_slot","description":"Book an appointment slot for the customer","parameters":{"type":"object","properties":{"day":{"type":"string","enum":["mon","tue","wed"]}},"required":["day"]}}]}'

Parameters

Parameters
NameInDescription
agentpath, requiredThe agent id.

Request body

Request body
FieldTypeDescription
toolsarray, required

Responses

Responses
StatusMeaning
200The stored tools.
400A tool declaration is invalid; detail says which.

get/v1/agents/{agent}/tools

The tools stored for an agent

Returns the tools declared with PUT, or an empty list.

Example request

curl -sS "$BASE/v1/agents/support-bot/tools" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Parameters

Parameters
NameInDescription
agentpath, requiredThe agent id.

Responses

Responses
StatusMeaning
200The stored tools.

get/v1/due

Plans that have fallen due

Lists the plans of all your agents whose wake_at time has passed and that nothing has woken yet, oldest first. Read only: no model call, no spend. Every wake answer already gives the agent's next wake_at; this list is for a scheduler that lost track. Wake each listed agent with fire_due: true and your model key. Agents only set a wake_at when the wake request had schedule: true.

Example request

curl -sS "$BASE/v1/due" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Parameters

Parameters
NameInDescription
limitquery1 to 500; default 100.

Example response

{
  "due": [
    {
      "agent": "support-bot",
      "plan_id": 41,
      "text": "Call the customer back about ticket 4412",
      "wake_at": "2026-10-20T09:00:00.000Z"
    }
  ]
}

Responses

Responses
StatusMeaning
200The due plans.

get/v1/usage

Your limits and recent usage

Your organization's limits and, per UTC day, wakes, turns, model calls, cost (counted by the prices you declare on each wake) and token counts. Usage is summed across all your agents. cost_usd is rounded to six decimals,. Only days with activity are listed, oldest first, so today is the last row if you have used anything today (UTC).

Example request

curl -sS "$BASE/v1/usage" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Parameters

Parameters
NameInDescription
daysqueryHow many days to return, ending today (UTC). 1 to 31; default 1.

Example response

{
  "limits": {
    "requests_per_minute": 30,
    "wake_usd": null,
    "daily_usd": null,
    "max_turns": 20,
    "max_turns_ceiling": 40
  },
  "days": [
    {
      "day": "2026-10-18",
      "wakes": 4,
      "turns": 11,
      "model_calls": 14,
      "cost_usd": 0.0212,
      "tokens": {
        "prompt": 41200,
        "output": 2150,
        "cache_hit": 18000,
        "cache_miss": 23200
      }
    }
  ]
}

Responses

Responses
StatusMeaning
200Limits and per-day usage.
401The API key is missing, wrong or revoked.
429Over your requests-per-minute limit. Wait Retry-After seconds.

get/v1/billing

Your dollar balance

Your dollar balance for running agents: how much is left (balance_usd.remaining), what the monthly allowance was and when it resets, and wake_price_usd, what one agent step takes from it. A call that comes back queued or error is not charged. Your own model costs are separate and stay on your model key.

Example request

curl -sS "$BASE/v1/billing" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Example response

{
  "plan_default": "free",
  "wake_price_usd": 0.00025,
  "balance_usd": {
    "allowed": true,
    "remaining": 0.412,
    "included": 1,
    "resets_at": "2026-11-19T00:00:00.000Z"
  }
}

Responses

Responses
StatusMeaning
200The dollar balance. balance_usd is null if the billing provider could not be reached. Each agent step a wake runs takes wake_price_usd from it (a step is one model reply; the plan counts steps and does not ration them); model spend is billed by your own model provider and is not part of it.
401The API key is missing, wrong or revoked.
404Billing is not enabled for this account (billing_unavailable).

post/v1/billing/checkout

Get a payment link for a plan

Returns a Stripe Checkout URL for the plan. Open it in a browser, pay, and the plan is active when you land on success_url. payment_url is null when the plan needs no payment (a free plan).

Example request

curl -sS "$BASE/v1/billing/checkout" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"success_url":"https://yourapp.example/billing/done"}'

Request body

Request body
FieldTypeDescription
planstringPlan id. Defaults to the plan named by plan_default in GET /v1/billing.
success_urlstring, requiredWhere the browser goes after paying. https only.
cancel_urlstringOptional. Where the browser goes if the customer closes checkout without paying. https only.

Example response

{
  "payment_url": "https://checkout.stripe.com/c/pay/cs_test_..."
}

Responses

Responses
StatusMeaning
200The checkout link.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.
403This account belongs to a dashboard organization, whose owners manage billing in the dashboard (dashboard_only). An API key can still read the balance.
404Billing is not enabled for this account (billing_unavailable).

post/v1/billing/portal

Manage payment method, invoices and cancellation

Returns a link to the Stripe customer portal, where you change your card, download invoices or cancel. Available once you have bought a plan.

Example request

curl -sS "$BASE/v1/billing/portal" \
  -H "Authorization: Bearer $ARGENTIC_API_KEY"

Request body

Request body
FieldTypeDescription
return_urlstringWhere the back button goes. https only.

Example response

{
  "url": "https://billing.stripe.com/session/..."
}

Responses

Responses
StatusMeaning
200The portal link.
400bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged.
401The API key is missing, wrong or revoked.
403This account belongs to a dashboard organization, whose owners manage billing in the dashboard (dashboard_only). An API key can still read the balance.
404Billing is not enabled for this account (billing_unavailable).

get/health

Is the service up

Answered by our function itself. No key needed. Does not touch the database. (/healthz is answered by the hosting platform before the request reaches us, so it says nothing about the function; use this one.)

Example request

curl -sS "$BASE/health"

Example response

{
  "ok": true,
  "build": "06be45e062d7",
  "commit": null
}

Responses

Responses
StatusMeaning
200Up.

get/changelog.json

What changed in the engine

What changed for a developer in each engine release this service runs, newest first. A release that changed nothing you can see is left out. No key needed. Does not touch the database. Cached for an hour.

Example request

curl -sS "$BASE/changelog.json"

Example response

{
  "engine": "0.98.1",
  "changes": [
    {
      "release": "0.98.0",
      "date": "2026-11-24",
      "text": "An agent that needs a person now just stops. Your app asks them and wakes the agent with their answer."
    }
  ]
}

Responses

Responses
StatusMeaning
200The engine release that answered, and its public changes, newest first.

Going past a spend cap

By default a wake that hits a spend cap just stops, and the work so far is kept. The wake ends with status: spend_cap or budget_cap. To go on, the owner raises the spend limit in the dashboard (or with the set_spend_limit tool), then you wake or resume the agent. To have a person say yes before an agent acts, see Ask a person before your agent acts.

Limits

Limits are set per organization and shown by GET /v1/usage. The request rate, and any daily limit or monthly spend limit you set, are shared by all of the organization's keys and agents. Starting values:

Limit, Starting value
LimitStarting value
Requests per minute30
Model spend, per call and per UTC dayNo cap until you set one
Model turns per call20 (up to 40)
Message length32,000 characters
System prompt length8,000 characters
Request body128 KB
Run history, across the organization8 MB
Active API keys5

A spend limit counts dollars, so only a call under one needs prices: declare them in model.prices (each 0 to 1000 dollars per million tokens; send 0 for a free model), or use an Anthropic model on the anthropic provider, which is priced from the list. A call with no limit needs none. Spend is counted from those prices, not from your provider's invoice, so declare real ones. Limits are enforced before every model call: a reply is capped at what the limit can still pay for, and a call it cannot pay for at all is not made. In each request you can set limits.max_usd to cap that call; if your organization has a per-call limit, it can go lower than that limit, never higher. limits.max_turns can go lower, or higher up to your organization's maximum (40 to start). A call also stops starting new turns after 10 minutes and ends with status: time_cap. Whether it hits the turn limit or the time limit, the work so far is kept and resume continues it. Each organization's stored run history also has a cap; the dashboard warns you at 80%, and over the cap new runs are refused. Need more? Ask.

Errors

Errors are JSON with an error field, and detail when there's something to fix. Every response, errors included, carries a request_id (also the X-Request-Id header): quote it when you ask us about a call.

Status, error, What it means
StatuserrorWhat it means
400model_key_required, bad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, prices_required, bad_embed_keybad_request, history_resent, bad_model, model_key_rejected, bad_agent, bad_json, model_key_required, prices_required (a spend limit counts dollars and no price is known for the model: send model.prices, or leave the limit out) or bad_embed_key (an embedding header we cannot use: an unknown provider, a region with cohere, a key with spaces). detail says what to fix. bad_model: your provider refused the request for that model id (unknown model, say); model_key_rejected: your provider refused your model key. Neither costs anything. history_resent: the call carried the conversation again (a messages or history field, or a message or outside that repeats an earlier message or reply of this agent); send only what is new. Nothing was recorded and nothing was charged. A tool declaration is invalid; detail says which.
401unauthorizedThe API key is missing, wrong or revoked.
402payment_requiredBilled accounts only: your balance cannot cover another agent step. Nothing was run and nothing was spent on your model key. Buy a plan with POST /v1/billing/checkout.
403dashboard_onlyThis account belongs to a dashboard organization, whose owners manage billing in the dashboard (dashboard_only). An API key can still read the balance.
404not_found, billing_unavailableNo such wake, or the agent has no journal yet. The agent has no journal up to that seq. The agent has no journal yet. Billing is not enabled for this account (billing_unavailable).
409conflictThe agent is mid-run. Look again at retry_at (ISO 8601, UTC) or after retry_after whole seconds (never more than 5); the Retry-After header carries the same seconds. It is a polling interval, not a prediction: a call can take longer, and an early retry costs nothing and just gets another 409. Your message is already recorded: the run in progress handles it before it stops, so the agent never runs twice in parallel. Do not resend it without an Idempotency-Key, which would add it a second time; with the same key, a retry returns the answer of the run that handled it (handled_with). Send an Idempotency-Key on wake so that a retry after a lost answer finishes the same wake instead of adding the message again. A run still holds the agent. Nothing changed; look again at retry_at. The name is taken by a fork with another cut or by something else, or the account is at the most forks it may keep.
413too_largeThe request body is over 128 KB. detail names the limit. The request body is over 128 KB, or (rerun) the journal is over 300,000 events. The request body is too large.
429rate_limitedOver your requests-per-minute limit. Wait Retry-After seconds.
500internalSomething went wrong on our side. Retrying is safe.
503busyrerun only: other reruns are using this server's rerun memory. Try again after Retry-After seconds.
507journal_fullOnly when the host sets a per-organization run-history storage cap: your organization's run history is over it. Nothing was run and nothing was spent on your model key.

A wake that runs but stops early still returns HTTP 200. If your client treats any 2xx as success, send the header X-Error-Status: http and a failed model call (status: error) returns HTTP 502 with the same body. Read status: done, spend_cap, budget_cap, turn_cap, time_cap or error (your model call failed; error says why, with your key removed). When your model provider rate-limits the call, error is provider_rate_limited with a retry_after: wait, then call resume. When the provider is down or times out, it is provider_unavailable; the wake is kept, so call resume. Every run that stopped early shows why on its page in the dashboard, under Runs.

Your data

  • The messages you send, the agent's replies and its memory are stored in our database so the agent can remember. Don't send anything you're not willing to have stored.
  • Each agent id has its own memory. Agents, including your own, never see each other's, and accounts never see each other's.
  • We don't sell your data or train models on it. It's held by the providers listed in the privacy policy.
  • We open stored content only to fix a fault or when you ask us to look.
  • An agent idle for a couple of days has its journal moved to cold storage. Nothing is dropped; the next read or wake restores it, so that call can be a little slower.
  • The stored answer of a finished wake, which a retried Idempotency-Key returns, is kept for 30 days. After that the retry comes back with reply: null. The journal and memory stay.
  • Email us and we'll delete your account's memory and journals by hand and revoke its keys. Stripe keeps billing records for as long as the law requires.
  • Your model key is never stored. Request logs record method, path, status, account and timing, never headers or bodies.

Connect Claude to your account

Connect Claude to your Argentic account and ask it to manage your API keys, check usage and balance, or set your monthly spend limit. This is for running the dashboard from a chat; your own code still calls the API with an API key.

Claude on the web or desktop. Open Customize, then Connectors, then Add custom connector. Name it Argentic Platform and use this address:

Server URL

https://getargentic.com/mcp

Claude Code.

Add the server

claude mcp add --transport http argentic-platform https://getargentic.com/mcp

Either way you sign in with the same Google account as the dashboard, pick the organization to connect, and approve what Claude may do. One connection works for one organization; connect again to use another.

What Claude can do

What Claude can do
ToolWhat it doesWho can use it
get_accountOrganization name, your role, balance, monthly spend limit and this month's usage.Everyone in the organization
list_api_keysYour keys by prefix and label, and whether each is revoked.Everyone in the organization
get_usageRequests, model calls and spend for each recent day.Everyone in the organization
create_api_keyMakes a key and shows it once, in the reply.Everyone in the organization
revoke_api_keyRevokes a key now.Owners and admins, any key. Members, keys they created.
set_spend_limitSets the monthly spend limit, or removes it.Owners and admins

Read your agents from the same connection. The connector also lists the read-only agent tools (argentic_wakes, argentic_wake_get, argentic_replay). They need no model key, and nothing on the connection can wake an agent or run a model: your app does that over the API (wake_at and fire_due). Only owners and admins can change a spend limit.

It can't add funds, change your plan, manage members or invites, or claim an account. Do those in the dashboard. Every call is checked against your role as it happens, so removing someone from the organization ends their connection at once. Changes made this way are recorded like the dashboard's, marked as made through a connected app.

A key Claude creates appears in that chat. Treat the conversation like any place you would paste a secret, and revoke the key if you share it.

Choose what it can do. When you connect, you set each area (usage and spend limit, API keys, agents) to off, read, or read and write. Read is the default. The app only sees the tools you allowed, and anything else is refused. To change it later, revoke the app under Connected apps in Settings, then connect it again and pick the access you want.

To stop an app, open your organization's Settings and choose Revoke under Connected apps. Its access ends at once, and it cannot renew. Owners and admins can revoke any app; members their own.

Not included yet

No tools that call your servers directly (declared tools come back as actions instead) and no streaming. Tell us which matters first.

The service runs in one region (US East) with no uptime guarantee yet, so expect an occasional slow first call after idle. Read the terms and privacy policy.

Get help

Stuck, or found a bug? Ask in the Discord or email hi@getargentic.com.

Join the Discord (opens in a new tab)