Back to articles
AI Agents

EdgeWise Teaches Long-Horizon Agents When to Call the Cloud

3 min read

Introduction

Long-horizon agents do not solve a task in a single pass. They repeatedly analyze the state, plan an action, interact with an environment, and recover from mistakes. Running a powerful cloud model at every step can improve capability, but the cost grows with the length of the trajectory. EdgeWise starts from a simple observation: the steps in a trajectory are not equally difficult, and only a small subset may need frontier-model capacity.

How EdgeWise works

EdgeWise places a small language model on the local device as the primary solver. A cloud LLM is treated as an on-demand specialist rather than the default engine. The system learns whether each step should remain local or be delegated, with four main elements:

  • Local-first execution: Routine steps are handled by the on-device model, reducing cloud requests and repeated high-end inference.
  • Selective delegation: Steps that require stronger reasoning, planning, or recovery can be sent to the cloud model.
  • Step-level reinforcement learning: Task solving and delegation are optimized together. Fine-grained credit assignment links individual delegation choices to their contribution to the final outcome.
  • Judge-based analysis: An external judge strategy allows the authors to examine when delegation helps, who should make the decision, how much context should be shared, and how often the cloud model should be invoked.

This is more than setting a fixed percentage of steps to run in the cloud. The goal is to align model capacity with the changing difficulty and state of a task. In a long trajectory, a lightweight model can cover frequent and predictable actions, while a stronger model is reserved for decisions with greater impact on the eventual result.

Results and implications

On SWE-Rebench, EdgeWise reduces inference cost by up to 62%; on Terminal-Bench 2.1, the reported reduction reaches 34%. At the same time, it matches or outperforms pure-LLM execution in the reported experiments. The authors also deploy the framework on a local workstation and observe comparable savings in a practical edge-cloud setting.

The broader contribution is an alternative way to think about agent deployment. Instead of choosing between an entirely local system and an entirely cloud-based one, EdgeWise assigns different parts of a trajectory to different levels of model capacity. This may be useful for coding agents, terminal-based workflows, and other applications where many steps are routine but a few failures are costly.

The approach also exposes a central reliability challenge. Delegating too often erodes the cost advantage, while failing to delegate at a critical moment can damage the whole trajectory. Identifying that boundary therefore becomes a core part of agent design. EdgeWise makes delegation an explicit, learnable step-level decision, turning an infrastructure trade-off into a problem that can be measured and optimized.

Source: Hugging Face Daily Papers

Comments

Checking sign-in status...

Loading comments...

Related articles