A Formal Hierarchical Architecture for Agentic Orchestration with Stack-Based Execution and Lazy Discovery¶
๐ Published (v1): 2026-07-13 06:15 UTC ยท Source: Arxiv ยท link
Why this paper was selected
Formal stack-based orchestration + lazy tool discovery; directly applicable to harness architecture
Ask a follow-up
Open an assistant pre-loaded with this paper's context.
๐ฌ Ask ChatGPTโฆ Ask Claude
TL;DR¶
This paper proposes a hierarchical, tree-structured architecture for LLM agent orchestration that replaces flat tool registries with a rooted capability tree, a LIFO stack-based execution loop modeled as a Pushdown Automaton, and manifest-driven lazy loading of child capabilities. The design bounds per-step context cost to the local tree path rather than the global registry, and is motivated by a production digital payments support deployment (UPI Help).
Problem¶
Contemporary LLM agents initialize with a monolithic registry of all available tools. As the number of tools \(N\) grows, the flat context window footprint \(|\Omega_t|_{\text{flat}} = \sum_{v \in V} |\text{schema}(v)| + |H_t|\) saturates the context limit, inflates latency, and degrades routing accuracy via decision-space explosion. Additionally, the append-only dialogue array \(H = \langle m_0, m_1, \ldots, m_t \rangle\) used as execution state has no hierarchical depth tracking, making it equivalent to a Finite State Machine that cannot recover deterministically from nested sub-task failures.
Method¶
Capabilities are organized as a rooted tree \(T = (V, E, r)\) with two exclusive node types: Decision-Making Skills (\(v_\delta\), internal nodes that route and delegate) and Executable Skills (\(v_\epsilon\), deterministic leaf nodes that call APIs/scripts). Global system state is a tuple \(S = \langle M, \Gamma, p_{\text{call}} \rangle\) where \(\Gamma\) is a LIFO Skill Path Stack of context frames \(\gamma_i = \langle id, \rho, \text{parent}, \tau, o_{\text{self}}, O_{\text{acc}} \rangle\) and \(p_{\text{call}}\) is a pending-invocation pointer. The single-step execution loop (Algorithm 1) at each step pops the pending target, loads its manifest lazily (Algorithm 2: only immediate children of the active node are parsed from a local skills_info.json), generates an LLM routing decision over that bounded context, and either pushes a new frame or pops/bubbles results back to the parent's localized accumulator \(O_{\text{acc}}\). This gives the system the power of a Pushdown Automaton: context-free control with deterministic return semantics and no LLM-inferred backtracking. A Stack-Pending Invariant is enforced โ if \(p_{\text{call}}\) points to node \(v \neq r\), then the top stack frame must correspond to \(\text{parent}(v)\).
Key Contributions¶
- Formal capability tree model decoupling probabilistic orchestration nodes from deterministic leaf execution.
- LIFO stack execution semantics with proven Stack-Pending Invariant, elevating agent control to a Pushdown Automaton.
- Manifest-driven lazy discovery: context load scales with explored path depth, not \(|V|\), achieving \(|\Omega_t|_{\text{hierarchical}} \ll |\Omega_t|_{\text{flat}}\).
- Execution isolation via localized stack frames (\(O_{\text{acc}}\)), preventing cross-branch context contamination and mitigating prompt injection persistence.
- Routing-agnostic extensibility: horizontal (new siblings) and vertical (deeper sub-orchestrators) scaling via JSON manifest edits with zero changes to the core loop.
- Production deployment context in UPI Help (digital payments support) motivating the design.
- Controlled benchmarks comparing flat vs. hierarchical routing across tool catalog size, workflow depth, and visible schema-token exposure.
Results¶
- Hierarchical routing bounds per-step visible schema tokens to the local out-degree of the active node, whereas flat routing grows linearly with \(N\); the paper states this is demonstrated empirically in controlled benchmarks.
- Benchmarks cover prompt scalability, visible schema exposure per LLM call, multi-step workflow pressure, and production-adjacent UPI flows.
- The paper qualifies that "accuracy depends on tree design" โ hierarchy bounds context but does not unconditionally improve routing accuracy independent of tree structure.
- Specific numbers (accuracy percentages, latency figures) are not fully reproduced in the provided text excerpt; the paper references Section 9 for full results.
Limitations¶
- Routing accuracy is contingent on tree design quality; a poorly structured tree can degrade performance even with bounded context.
- The architecture requires upfront hierarchical decomposition of the capability space, which may be non-trivial for unstructured or evolving capability sets.
- The stack discipline prevents lateral jumps across branches; cross-domain tasks requiring capabilities from disjoint subtrees must route through common ancestors, potentially adding traversal depth.
- Recovery from mid-tree failures relies on stack integrity; the paper does not detail handling of hardware/network failures that corrupt the stack itself.
- Evaluation is limited to a single production domain (UPI Help payments support); generalizability to other domains is asserted but not empirically tested in the excerpt.
Relevance to Agentic AI / LLM Agents¶
This work directly addresses the scalability ceiling of flat-registry agent architectures, a practical bottleneck as enterprise tool catalogs grow to hundreds or thousands of capabilities. The Pushdown Automaton formalization provides a rigorous theoretical grounding for hierarchical agent memory that contrasts with the Finite State Machine characterization of standard rolling-context agents, offering a framework for reasoning about agent expressiveness. The lazy manifest discovery protocol is directly analogous to (and designed to complement) the Model Context Protocol, making the architecture relevant to the current industry shift toward dynamic tool registration. The execution isolation guarantees are particularly pertinent for agentic deployment in regulated, high-trust environments where prompt injection and cross-branch context leakage are active security concerns.