Linglong Agent Service: A Runtime for Centralized Agent Reasoning and Distributed Execution

Hua Zhang, Min JiangarXiv 2026

TL;DR

Linglong Agent Service (agentsvc) is a new runtime that decouples an LLM agent's reasoning from its execution. By treating the "execution site" as a first-class configuration dimension, it allows a centralized "brain" to orchestrate tools across distributed, heterogeneous environments—even those behind NAT—without needing to deploy a full agent stack on every remote machine.

What Problem Does This Paper Address?

LLM agents are only as useful as the tools they can access, but those tools often live in messy, distributed places: GPU servers behind firewalls, local developer machines, or cloud sandboxes.

Currently, developers face a dilemma: either run a full, complex agent on every machine (which fragments configuration and history) or use limited remote execution methods like SSH that don't preserve a coherent session state. The authors identify a missing "contract" in agent design—a way to keep reasoning, memory, and orchestration in one place while "projecting" execution capability across diverse IT infrastructure.

Methods

The authors introduce agentsvc, a self-hosted HTTP service and embeddable Python runtime. Its core innovation is the formalization of the agent model as: Agent = Model × Tools × Context × Execution Site

Key technical components include:

  • Parent-Child Architecture: A central "Parent" service manages inference, tool descriptions, and conversation history. It dispatches tool calls to "Child" environments that handle the actual file, shell, or terminal operations.
  • Dual Transports: To handle different network topologies, it supports direct HTTP (for reachable hosts) and reverse WebSocket tunnels (where the child initiates the connection to bypass NAT).
  • Low-Dependency Core: The runtime is built primarily on the Python standard library. This "stdlib core" approach minimizes the friction of deploying child roles into restricted environments where installing heavy third-party packages is impossible.
  • online_debugger: A specialized application of this architecture. When a program crashes, an instrumented "accessory" captures the exception state and allows the agent to "enter" the incident process to run diagnostic tools and propose source-code repairs.
Figure 2: Runtime ownership. Only one child is selected for a given inference request. Parent-side orchestration can issue further model requests while forwarding its execution tools to that child. The model endpoint may be local or remote.

Datasets

As this is a systems and architecture paper, it does not use traditional machine learning training datasets. Instead, the authors evaluate the system using:

  • Baseline Verification Record: A suite of 1,969 regression tests covering tunnel mechanisms, orchestration behavior, and debugger contracts.
  • Architectural Comparison: A qualitative comparison against existing agent frameworks like Hermes Agent, Pi, OpenAI Codex, and Claude Code.

Key Insights and Ideas

  • Execution Site as a Variable: By making the execution site explicit, you can switch where a tool runs (e.g., from local to a remote GPU server) without changing the tool's name or the agent's logic.
  • Expected Utility Rationale: The authors justify their design choices (like using a custom tunnel instead of a mature library) using a formal utility function $U(d)$, weighing task benefits and future adaptability against development and deployment costs.
  • Client-Side Handoff: This mechanism allows the service to return a tool call to the caller (like a human or a debugger) to execute. This is crucial for the online_debugger, where the agent needs to inspect objects inside a live, failing process that the central service cannot see directly.
Figure 4: Reverse tunnel lifecycle and data path. Admission and connection ownership belong to the control plane. Requests and terminal streams share the established connection but execute through the child’s local service.

Key Results

The paper focuses on establishing "executable contracts" rather than performance benchmarks.

  • Successful NAT Traversal: The implementation proves that a centralized agent can effectively operate remote shells and terminals through child-initiated tunnels.
  • Regression Success: The system passed all 1,969 tests in the full Python regression suite, confirming the stability of the cross-boundary orchestration.
  • Comparison: The authors argue that while other systems offer better "learning" workflows (Hermes) or sandboxing (Codex), agentsvc is unique in its combination of a standard-library core and centrally operated, distributed child environments.

Limitations and Future Work

The authors are refreshingly candid about what the system doesn't do yet:

  • No Performance Data: There are currently no benchmarks for latency overhead or concurrency scaling.
  • Security Gaps: The system lacks per-tool approval workflows and robust multi-tenant isolation. It relies on service-level authentication, which may not be enough for high-stakes production environments.
  • Unimplemented Recovery: While the online_debugger can diagnose and modify source code (L0-L4 in their taxonomy), it cannot yet "hot-patch" a running process or automatically retry a failed call (L5).
  • Future Studies: The authors propose three priority studies to measure remote transport overhead, capability alignment across different paths, and the impact of "incident-evidence ablation" on repair accuracy.

Summary updated

Abstract

LLM agents can use remote tools and cloud sandboxes, but integrating reasoning, session state, and heterogeneous execution sites remains a runtime design problem. We present Linglong Agent Service (agentsvc), a self-hosted HTTP service and embeddable Python runtime that treats execution site as a configurable dimension alongside model, tools, and context. A parent service retains inference orchestration, tool descriptions, and conversation history; each inference request selects one child environment for file, shell, terminal, and MCP operations. Direct HTTP and child-initiated WebSocket tunnels carry the same application interfaces, including portable request context and centrally managed updates. The normal core path requires no third-party Python packages, with an optional Windows pseudo-terminal dependency. We further present online_debugger as the process-scale special case of execution-site separation: an instrumented program submits exception evidence, executes session-scoped inspection tools inside the incident process, and resumes the same diagnostic session. Its default prompt requires failing-then-passing reproduction evidence for source changes, while runtime patch activation and failed-call recovery remain unimplemented. We explain the design through constrained expected-utility reasoning, compare concrete mechanisms with Hermes Agent, Pi, Codex, and Claude Code, and report implementation and regression-test evidence. The current evidence establishes executable contracts, not performance advantages, repair accuracy, or production recovery. The source code is open source under the MIT license at https://github.com/mz24cn/agents.
BibTeX
@misc{zhang2026linglong,
  author = {Hua Zhang and Min Jiang},
  title = {{Linglong Agent Service: A Runtime for Centralized Agent Reasoning and Distributed Execution}},
  year = {2026},
  eprint = {2611.21129},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.21129},
}
Figure