What it forgot to tell you.

Everything that changed, newest first. The contract is frozen at version 1, so new features arrive as optional fields: a request that does not use them runs exactly as before.

v1.6.0

latest release

The run inbox. Additive to contract "1": a harness that never calls the new endpoint sees exactly the same bodies.

Added

  • POST /runs/{id}/messages. User messages with text or event parts, each with your own id. A repeat is safe, a finished run says so with 409 run_finished, and limits per run keep it bounded.
  • One more step when it fits. If the model finished its answer while messages were waiting, the run takes another step for them, as long as steps, time and budget allow. A limit's final step reads them before it answers.
  • Nothing lost. Every accepted message ends up either in the run's messages or in pending_messages, whatever way the run ends: limit, cancel, timeout, waiting for a tool.
  • Writes stay honest. A tool call made after a follow-up carries that message's id as origin_request_id, so "do it again" becomes a new operation, not a repeat of the old one.
  • Visible everywhere. SSE message_injected places the message in the feed, reconnects keep its position, and the journal and /metrics count every message.

v1.5.0

The on-prem release. Additive to contract "1": everything is opt-in, and an engine with no new settings runs as before.

Added

  • Local models and model endpoints. LLM_ENDPOINT_<NAME>_* sets a server's URL, dialect (OpenAI or Anthropic), key, context window, limits, thinking and concurrency. One queue per server by default, so a single GPU is not flooded. Reasoning from a local model goes back in the field Ollama and vLLM read, or stays in the history only. Usage and fallbacks name the endpoint. npm run smoke:local checks a live server.
  • Your own gateway for a named provider. OPENAI_BASE_URL, ANTHROPIC_BASE_URL and the rest point a provider at an on-prem installation or a corporate gateway, with the env key. GigaChat on-prem takes its OAuth host too.
  • Private networks, on your terms. EGRESS_PRIVATE_CIDRS opens the ranges you list, and nothing else. Cloud metadata, link-local and multicast stay closed whatever the settings say, including in disguised IPv6 forms. Allowlist entries can carry ports, plain http works only for hosts you name, and public providers can be switched off so a request fails at once instead of hanging.
  • No content in logs. LOG_CONTENT=none keeps prompts, messages, tool payloads, provider and network error text, URL paths and meta values out of stdout, the journal and the error webhook. You can also keep only the classes you need. A request can ask for the same with "logging": { "content": "none" }. A canary test checks every log.
  • Installed from files. Every release carries image tarballs for amd64 and arm64, a plain Node bundle, an SBOM, third-party licenses and checksums. The image runs as non-root on a read-only filesystem, also under OpenShift. Secrets come from files. A test proves the engine never opens a connection on its own. deploy/ has a compose file with Ollama and a Kubernetes example.
  • Prometheus metrics. GET /metrics behind its own token: runs, provider attempts, latency, time to first token, tokens, queues, fallbacks, tools, callbacks and egress refusals.

Changed

  • LOG_BUFFER_CONTENT=0 removes more. It now means LOG_CONTENT=none: provider and network error text, exception messages, URL paths and meta values leave every log too. Credentials inside URLs are refused and never logged.

v1.4.1

One fix. No contract changes.

Fixed

  • llm errors say what is wrong. In v1.4.0 any mistake in llm came back as a bare invalid body: llm Invalid input. That covered six models in the array, an entry without a model, and even a single object without one. Now the refusal names the field and the reason, for example llm.1.model: … or llm: an llm array takes at most 5 models, got 6. A refusal about one model of the chain (allowlist, key, images) starts with its index.

v1.4.0

One feature. Additive to contract "1": llm also accepts an array, and a single object works exactly as before.

Added

  • Model fallback chain. Send llm as an array of up to five models, each with its own provider, key, params and price. The run starts on the first one. If it fails before any text reaches the client, the run moves to the next model instead of failing. That covers a bad key, a 4xx, 429, 5xx, a network error, a queue timeout or a context that is too long. The failed model is not retried; only the last one keeps the usual retries. Once a model answers, it serves the rest of the run. The result names the model that answered (llm_used) and every model skipped, with its error (llm_fallbacks). The switch also shows up on SSE, in the journal and on the error webhook, so a failing primary is never silent. Every model in the chain is validated on receipt, and each attempt is billed at its own price.

v1.3.0

A new provider. Additive to contract "1": llm.provider gains one value.

Added

  • Kimi. llm.provider: "kimi" runs Moonshot AI's K3 line (kimi-k3.1-pro, -highspeed, kimi-k3, 1M window) through its Anthropic-compatible API, key from the request or KIMI_API_KEY. K3 always thinks. params.thinking sets the depth (low / high / max), and without it the engine asks for low, since the provider default is slow. Kimi's thinking blocks come unsigned. The engine still keeps them and returns them on the next step of a tool loop, as Kimi requires. Parallel tool calls, cache usage and images work out of the box.

v1.2.1

One fix. No contract changes: SPEC §10.1 gains rule 8.

Fixed

  • An empty answer no longer ends a run silently. The v1.2.0 fallback covered only the step-limit final step. A model whose tools were disabled for repeating itself could still reply with nothing, and the run ended completed with an empty answer. Now the empty reply is dropped and the model is asked once more, without tools. If it is empty again, the run ends completed with a localized fallback and answer_source: "fallback". The journal logs each case as empty_answer. limits.final_answer: false keeps the old behavior.

v1.2.0

Two RFCs. One default behavior change: a run that hits a step or tool-call limit now ends with an answer. Everything else is opt-in, through new optional fields.

Added

  • Journal on disk. LOG_DIR writes the event journal to daily JSONL files that survive a deploy, keeps a week by default and caps the directory size. GET /logs reads memory first and falls back to disk, and reports source. The system prompt is stored once by hash instead of in every run.
  • One presentation per run. Mark the tools and fenced blocks your UI renders with presents, and set limits.max_presentations. Once the budget is spent, presenting tools are hidden and refused, and presenting blocks are cut.
  • Blocks belong to the final answer. With interim: "drop", a block written in a tool step is removed from the history, so the model stops copying a half-finished card step after step.
  • Grounded values. grounded checks that values in a block came from results of the tools you name. An invented value goes through the normal repair.
  • Repeat tolerance. limits.max_repeated_calls sets how many repeated calls are forgiven before tools are disabled; 0 cuts on the first.

v1.1.2

Fixes from an external audit. No breaking contract changes: SPEC §6.5 now spells out the cancelled deferred call, and the harness gets one new obligation, H21.

Fixed

  • Cancel with a deferred call in the batch. If a write tool had already answered deferred while a parallel read was still running, cancel left that call open, and the next run with the history was refused with unresolved_tool_call. Any terminal status other than awaiting_tool now closes it with cancelled, and its tool_calls[] entry keeps the operation_id. The harness then cancels the operation (H21).
  • Cancel during an image download. The aborted download surfaced as image_fetch_failed, and the run ended failed. It now ends cancelled.
  • Repeats and max_tool_calls. A repeated call could end the run stopped_limit. Repeats are not executed and no longer count toward the limit. The model gets repeated_call and continues.
  • Token estimates. Without provider usage the output estimate now counts generated tool calls. The prompt estimate behind trimming and max_total_tokens counts the per-message date lines.

Security

  • Callback diagnostics. A receiver that echoed the request in its error body could leak CALLBACK_SECRET, a callback.headers value or a query value into last_error, the journal and stdout. These values are now redacted wherever they occur.

Example harness

  • A new amount for the same order updates the pending operation and bumps its version, so a card for the old amount can no longer be confirmed. A callback that beats the POST /runs response is no longer lost. An operation that is already closed continues the conversation at once. H21 is implemented.

v1.1.1

Fixes and security updates. No contract changes.

  • Signed Claude thinking after the engine's own edits. Newer Claude models bind each thinking block to the exact prefix before it, so replaying a block after trimming was a 400. On those steps the engine asks the provider to drop the stale blocks, and the run goes on. Drops are journaled as thinking_blocks_dropped.
  • Claude context window: 1M. The built-in profile assumed 200k for every Claude model and trimmed histories five times too early. It is now 1M, and 200k only for the models that have it.
  • Dependencies. hono, @hono/node-server, undici 7.30.1 and fast-uri updated for known advisories. The engine moved to Zod 4, because Zod 3 could exhaust memory on a large invalid body before the request was refused.

v1.1.0

Added

  • skills[] and the built-in load_skill. An index of skills (name and description, sorted) is appended to the system prompt. Loading a skill returns its body and makes the tools it lists callable from the next step. Built-in calls take a step but do not count toward max_tool_calls.
  • Deferred tools. tools[].defer_loading: true keeps a tool out of the context until something activates it. A call to a tool that is not loaded yet gets tool_not_loaded: it is not executed, not counted and not treated as a repeat, so the same call works on the next step.
  • The built-in search_tools. For deferred tools that belong to no skill: BM25 over tool names, descriptions and argument names. It is the same code on every provider and is reproducible from the request. Matches inside a skill point the model to load_skill, so a tool arrives together with its instructions.
  • Cache-friendly activation. On Anthropic models with tool search every tool is declared on every step with defer_loading, and activation is a tool_reference in the conversation, so the cached prefix never changes. Other providers get the new tool on the next step, at the cost of one prefix cache miss.
  • Stateless restoration. Loaded skills and found tools come back from the tool messages the engine marks builtin: true; the harness stores them like any other message. Trimming never drops a turn that keeps a tool loaded.
  • Observability. Built-in calls appear in tool_calls[] with builtin: true. New journal events: skill_loaded, skill_unknown, skills_restored, tool_search, builtin_history_invalid. Text the model wrote, like a search query, goes only to the journal's content.
  • An example harness. examples/sqlite-harness: history, a read tool, a write tool with approval, continuation and recovery on SQLite, with a chat in the terminal.

Changed

  • Vercel AI SDK 6. The engine moved to ai 6.0, @ai-sdk/anthropic 3.0 and @ai-sdk/openai-compatible 2.0. Billing still records uncached input separately from cache read and cache write. On tool_choice: none steps Anthropic now keeps the tools declared.
  • Checked live. The signed-thinking round trip across two runs, a tool call with thinking, images, and a skill loaded mid-run on the Anthropic API. The second turn of that run reads its prefix from the cache.
  • README. A banner, badges, a comparison with neighbouring tools, a quickstart with the published Docker image, and a CHANGELOG.md.

v1.0.1

Fixes and docs. No contract changes.

  • The quickstart works. npm run dev and npm start read .env. Before, the documented steps failed with ENGINE_TOKEN is required. Node 22.9+ is required.
  • The trust model. The README states what "a prompt-injected model can ask, not act" depends on, and what the engine guarantees on its own.
  • AGENTS.md. One instruction file for any coding agent working on the code.
  • Docker images. Every release tag publishes ghcr.io/paveler/theloop, after typecheck and tests.

v1.0.0

The first public release: the agent loop as a stateless HTTP service, with the v1 contract frozen.

  • The contract. One POST /runs is one run, with everything in the request. SSE with replay, synchronous cancel, at-least-once callback with recovery through GET /runs/{id}, and a session lock held until the result is acknowledged.
  • The loop. Driven step by step: tools run only after the model's step is complete, and limits are checked at step boundaries. It detects repeated calls and empty results, and repairs malformed fenced blocks in the answer.
  • Write intents. A tool with effect: write answers deferred with an operation id; approval and execution live in your system.
  • Usage. One record per provider attempt, including failed and interrupted ones, with cache tokens, optional cost and estimated budgets.
  • Providers. Anthropic, OpenAI, DeepSeek, GLM, GigaChat, MiniMax and any OpenAI-compatible endpoint, with a per-key queue and AIMD rate limiting.
  • Operations. Controlled egress, provider proxies, graceful shutdown, an error webhook, an in-memory event journal, and engine text in English and Russian.