Science
Generative AI
8 min reading

AnyS1: Which Agent Steps Need a Frontier LLM?

A switchyard where a small signal box routes most trains onto short tracks while a few climb to a tall tower, showing small-model and frontier-model steps in an agent workflow.

Summarize this article with:

summary

AnyS1, posted on arXiv on November 18, 2026, compiles agent skills into code steps, finite choices for a calibrated 4B model, and open-ended steps for a frontier LLM. This explainer covers how it works, what the reported 75% to 91% savings include, and how to audit your own agent's decision points.

Rui Li, Liyang He, Zheng Zhang, Zhenya Huang and Qi Liu posted the AnyS1 paper on arXiv on November 18, 2026. Their answer to the title's question: a frontier System-2 model handles open-ended generation and the finite choices where a small model isn't confident. Code and one calibrated 4B System-1 model handle the rest.

The authors report 75% to 91% lower episode cost and 63% to 92% lower model-call time on three benchmarks they call unseen, relative to an uncompiled System-2 agent, while keeping task reliability. That baseline matters. Compiling the skill into a workflow, with System-2 still at every step, already saves 81% (DeepSeek-V4.1-Flash) and 71% (GPT-6 Sol) on average, and AnyS1 raises that to 89% and 82%.

Step-level delegation itself isn't new: the paper says earlier dual-system agents used hooks written for each environment. AnyS1's claim is one selector, trained on decision points mined from over 1,000 public skills, that serves workflows it hasn't seen. This article covers how the split works, what the results show, a D/E/G audit for your own agent, and a simple approximation you can build today.

How AnyS1 divides an agent workflow

AnyS1 compiles each step of a procedural skill (a SKILL.md file) into one of three node types, as the project page describes them:

  • D, deterministic: fixed tool calls, file predicates and state bookkeeping run as compiled Python code, at zero token cost.
  • E, enumerable: bounded choices among candidates, scored by the 4B System-1 in one forward pass and gated against a confidence threshold.
  • G, generative: open-ended synthesis, free-form code, search queries and low-confidence E decisions go to the frontier System-2 model.

Take an illustrative support workflow. Looking up an order by ID is D, because code can do it. Choosing one category from a fixed refund-policy list may be E. Drafting a tailored reply is G, because the output is open-ended.

In the skills the authors analyzed, 21.3% of extracted decision points were D, 64.5% E and 14.2% G. Every skill had at least one E point. These shares describe that 1,072-skill collection, not production agents in general.

An E node gives System-1 the current state, a question and the candidate options, and the served model returns one probability per option. The AnyS1-4B model card says it only scores decisions whose options are listed explicitly. Any-DP decision points have a median of 3 options, and the authors' dataset table shows 6.7% picking "none".

How one selector learns different workflows

How AnyS1 builds and uses its selector

Extract decision points

Three LLM passes mark D/E/G steps in 1,072 public skills.

Run tasks in containers

Verified tasks run in isolated containers; real states are kept.

Label by teacher consensus

Forward and reverse teacher passes must agree on the answer.

Train the pointer model

Qwen3.5-4B-Base, rank-16 LoRA, label smoothing at 0.1.

Gate at run time

Accept System-1 above the threshold, defer to System-2 below it.

The result is Any-DP: 17,865 typed decision points from 1,072 public skills, and 25,986 consensus-labeled states from container-executed tasks. A separate blind audit of 500 states found 98.0% of labels correct.

AnyS1-4B is built on Qwen/Qwen3.5-4B-Base with a rank-16 LoRA adapter, an OptionInteractionHead and label smoothing (ε = 0.1). The authors use smoothing to prevent overconfidence on unseen skills. Without it, the threshold jumped from 0.904 to 0.998, and on ALFWorld agreement with System-2 fell to 83.0%, against 98.4% with smoothing.

Real execution states mattered most. The model card reports 83.8% accuracy on held-out development states. Per the project page, container-executed training states beat LLM-written synthetic states by 18.8 points and cross-task real states by 7.0 points.

The practical lesson: if you train a selector, collect its inputs from real runs of your workflow. Generated summaries can miss the noisy tool output and state details present when an agent actually chooses. Our guide to choosing between small and large models in production covers the wider trade-off.

What the results show, and what they leave open

EvidenceReported resultScope
BenchmarksSOPBench, ALFWorld, WebShopUnseen, per the authors
System-2 modelsDeepSeek-V4.1-Flash, GPT-6 SolTwo model families
Episode cost75% to 91% lowerVs uncompiled System-2 agent, AnyS1 warm
Model-call time63% to 92% lowerCritical-path model calls per episode
Task reliabilityPreserved, per the authorsVs all-System-2
Training states+18.8 pointsReal vs LLM-written synthetic states

Sources: AnyS1 arXiv abstract and project page, November 18, 2026. Checked December 1, 2026.

The cost figures include System-1 itself. The authors price self-hosted 4B inference at $0.0045 per 1,000 decisions on L4 GPUs, and put its overhead at no more than 2.1% of the compiled all-System-2 cost.

The time figures are critical-path model-call seconds per episode, so tool, network and environment time sits outside them. Per decision, the model card reports a median of 21.8 to 31.7 ms for System-1 on one H100, against 1.51 to 1.78 s per System-2 call.

How often the gate accepts System-1 varies widely by workflow. On ALFWorld, the decisions sent back to System-2 were mostly room searches.

Share of E-decisions answered by System-1 (AnyS1 warm)

Percent of E-decisions delegated

  • SOPBench
  • ALFWorld
  • WebShop

Source: AnyS1 project page, savings breakdown. Checked December 1, 2026.

The gate is what keeps success intact. Without the gate (All-S1), ALFWorld success drops from 96.3% to 40.3%, and 71 of 77 losses diverge at a search node. With it, AnyS1 loses one game and scores 95.5%.

The threshold comes two ways. The warm setting fits it on 50 unlabeled development episodes. The cold setting transfers a single threshold of 0.918, fitted on 153 dev-split examples, with no runs on the target workflow.

Audit your agent's decision points

Your savings depend on two numbers: the share of your cost spent on E steps, and how often a gate would accept them. The authors show that if trajectories stay unchanged, delegation can save at most the E-node share of compiled cost, minus System-1 overhead. That share was 94% on WebShop, 90% on ALFWorld and 28% on SOPBench, where shorter later turns pushed savings past the ceiling.

The D/E/G audit

  • Inventory every operation. List model calls, tool calls, predicates and state updates from a real trace.
  • Mark deterministic work as D. Move fixed calculations, literal lookups and structured checks into code.
  • Find complete candidate lists. Treat a step as E only when every valid answer can be listed.
  • Add a "none" option. Give the selector a way to say that no candidate fits.
  • Reserve G for open output. Drafting, synthesis and unconstrained planning stay with System-2.
  • Measure the E-node cost share. Record calls, tokens, latency and cost for each E step.
  • Test failure paths. Invalid output, ambiguous states and missing candidates need an escalation path.

Workflows whose frontier calls are mostly bounded checks have the most room. Mixed workflows should start with one narrow, frequent E node. An open-ended research agent will expose fewer steps with complete candidate sets.

Don't classify a step as E just because its usual answers are predictable. If a valid answer can fall outside the list, the selector can't return it: improve the enumeration or send that state to G.

Is AnyS1 ready for production?

Not as a drop-in service. AnyS1 is a research release on arXiv, with code and a downloadable 4B checkpoint. Inference needs the AnyS1 code because of the model's custom pointer head.

Production rule

Treat candidate completeness and threshold calibration as safety boundaries. A selector should never be forced to choose from a list that may omit the correct action.

The model card says calibration was checked on the benchmarks in the paper. For a new workflow, it says to calibrate the deferral threshold on a few development episodes or use the conservative transferred threshold. Recalibrate after workflow, tool, prompt or data changes.

Serving economics need your own numbers: GPU time, utilization, replicas, monitoring, and the frontier calls left after deferral. Compare that total with your current E-node spend.

Put adversarial tests in the plan too: malformed states, injected instructions, reordered options and lists with no correct answer. Our guide to evaluating agents in production covers how to run them continuously.

How to approximate the pattern with Eden AI

The sample below calls Eden AI's OpenAI-compatible LLM endpoint.

In the sample, a cheaper model plays the selector and a stronger one is the escalation target. In the paper, the selector is AnyS1-4B. So this is validation-based escalation: it catches malformed or out-of-range answers, not low-confidence ones.

Python

import requests

BASE_URL = "https://api.edenai.run/v3"
API_KEY = "YOUR_EDENAI_API_KEY"
OPTIONS = ["refund", "replacement", "manual review", "none"]
PROMPT = (
    "Return only the zero-based index of the best option. "
    "Options: ['refund', 'replacement', 'manual review', 'none']\n"
    "State: customer reports a damaged item"
)

SELECTOR_REQUEST = {
    "model": "qwen/deepseek-v4.1-flash",
    "fallbacks": ["scaleway/deepseek-v4.1-flash"],
    "messages": [{"role": "user", "content": PROMPT}],
}

ESCALATION_REQUEST = {
    "model": "openai/gpt-6-sol",
    "fallbacks": ["azure/gpt-6-sol"],
    "messages": [{"role": "user", "content": PROMPT}],
}

def valid_choice(text, count):
    text = (text or "").strip()
    return text.isdigit() and int(text) < count

def ask(payload):
    try:
        response = requests.post(
            f"{BASE_URL}/chat/completions",
            headers={"Authorization": f"Bearer {API_KEY}"},
            json=payload,
            timeout=30,
        )
        response.raise_for_status()
        return response.json()["choices"][0]["message"]["content"] or ""
    except (requests.RequestException, KeyError, IndexError, ValueError):
        # The model and its fallbacks all failed: return no answer so the step escalates.
        return ""

answer = ask(SELECTOR_REQUEST)
if not valid_choice(answer, len(OPTIONS)):
    answer = ask(ESCALATION_REQUEST)
print(OPTIONS[int(answer.strip())] if valid_choice(answer, len(OPTIONS)) else "escalate to a person")

Eden AI's fallback covers a different failure: if the primary model or its provider fails (an outage, a rate limit, an error), Eden AI retries with the next model in your fallbacks list. Each request in the sample lists one fallback, and if every attempt still fails, the sample returns an empty answer so the step escalates instead of crashing. Use fallbacks for availability, and keep the index check in your own code for decision quality. Eden AI's provider routing picks which provider serves a model, by price, speed or latency.

Some steps need a specialized model rather than an LLM, such as reading a scanned invoice. For those, Eden AI's MCP server gives agents the expert models as tools, including OCR, web search, speech and translation. They are fixed-purpose calls, closer to D than to G.

What to keep in mind

  • Read the baseline: the 75% to 91% is against an uncompiled agent, and compilation alone does much of the work.
  • The gate is the product: without it, ALFWorld success collapsed, so test deferral before trusting any savings figure.
  • Candidate completeness is your job: an E node is only valid when its list covers every acceptable result.
  • Collect real states: execution-grounded training data beat synthetic summaries by 18.8 points.
  • Price the whole deployment: selector serving, deferred calls, monitoring and recalibration.

FAQ

What is System-1 in AnyS1?
System-1 is a calibrated 4B pointer model, AnyS1-4B, that scores the listed options of an enumerable decision in one forward pass. Its answer is used when its top probability clears a calibrated threshold.
What makes an agent step enumerable?
The step must choose from a finite, complete list of candidates for the current state. Open-ended writing, planning and synthesis are generative steps instead.
Can plain code replace the 4B selector?
Yes, when structured state fully determines the answer. AnyS1 runs fixed tool calls, file predicates and state bookkeeping as deterministic code at zero token cost.
Does AnyS1 replace frontier LLMs?
No. In AnyS1, the frontier System-2 model still handles generative steps and every enumerable decision that falls below the confidence threshold.
How does AnyS1's confidence-gated deferral work?
AnyS1-4B returns one probability per option, and the top option is accepted only if it clears a threshold. The threshold is fitted on 50 unlabeled development episodes (warm) or transferred as 0.918 (cold).
Do teams need to train their own AnyS1 selector?
Not to start: the authors publish the AnyS1-4B checkpoint on Hugging Face, trained on Any-DP. Its model card says to calibrate the threshold on a few development episodes for a new workflow, or use the transferred threshold.
Will AnyS1's reported savings transfer to my agent?
They depend on how much of your cost goes to enumerable steps and how often the gate accepts System-1. On the authors' benchmarks, System-1 answered between 44% and 99% of those decisions.
Can AnyS1 choose an option missing from the list?
No. AnyS1-4B only scores options listed explicitly, so incomplete candidate sets need better enumeration, a "none" option or escalation to System-2.

Further reading

Similar articles

One prompt splits into a stack of repeated samples and a ring of communicating agents, fed by one shared fuel gauge and weighed on a level scale.
Science
Generative AI
Is Your Multi-Agent LLM Gain Just Extra Samples?
11/21/2026
·
Written byClément Moreau
Science
Generative AI
NCM vs LLM: What Next-Concept Modeling Really Changes
10/20/2026
·
Written byClément Moreau
let’s start

Start building with Eden AI

A single interface to integrate the best AI technologies into your products.