Skip to content
Robotics.world

Research

Bridging Thought and Action: Taming Long-Horizon Instability in Open-Source LLM Agents with a MetaTool-Enhanced ROS Framework

Open-source LLMs wired into agentic robotic frameworks tend to behave erratically over long tasks: they repeat tool calls, loop, drift away from the user's original request, and generally produce…

The paper’s first page · arXiv:2609.13335
arXiv
2609.13335 · Preprint · not peer-reviewed
Published
2026-09-11
Authors
Kazi Abrar Mahmud, Nilotpaul Kundu Dhurubo, Tamal Kirttonia, Sabbir Hossain Ujjal, Mohammad Ariful Haque

In plain words

Open-source LLMs wired into agentic robotic frameworks tend to behave erratically over long tasks: they repeat tool calls, loop, drift away from the user's original request, and generally produce different tool sequences for identical queries.

AI summary

Overview

Research area: LLM-driven robotic agents (agentic robotics), human–robot interaction, and Robot Operating System (ROS) integration.

Technical level: Intermediate. Readers should be comfortable with ReAct-style reasoning–acting loops, tool/function calling, and basic ROS concepts; the formal notation is light and confined to one subsection.

Scope: The paper proposes and evaluates a "MetaTool" planning stage that forces an open-source LLM to write a persistent pseudo-code plan before touching any robot tool, and measures how much that single change stabilizes long-horizon task execution in a NASA JPL ROS-Agent (ROSA) pipeline.

What This Paper Is About

Open-source LLMs wired into agentic robotic frameworks tend to behave erratically over long tasks: they repeat tool calls, loop, drift away from the user's original request, and generally produce different tool sequences for identical queries. The authors keep the existing ROS-Agent architecture but insert a planning step that makes the model commit to an ordered list of tool invocations up front, stored in the agent's scratchpad and reused on every subsequent step. The goal is to buy reliability and execution efficiency from architecture rather than from a larger or proprietary model.

Key Contributions

  1. The MetaTool mechanism. An intermediate operator between the LLM and the ROS execution layer that induces the model to emit a structured pseudo-code plan of intended tool calls before any task tool runs. The plan is externalized into ROS-Agent's scratchpad and persists for the whole episode, unlike transient chain-of-thought.
  2. A plan-conditioned execution policy. The paper formalizes tool selection as π_meta(a_t | s_t, P), which is defined to be 0 for any action outside the plan-specified admissible set A_P(t), unless explicit replanning is triggered. This turns the scratchpad from a passive conversation log into what the authors call an enforceable execution contract.
  3. A four-way ablation (C1 adaptive prompt, C2 non-persistent prompt planner, C3 persistent scratchpad without constraint, C4 persistent scratchpad plus execution constraint) run in ROS–Gazebo across four environments (large office, hospital floor, factory floor with scattered obstacles, standard urban home), three task levels (T1–T3), four LLMs (GPT-4o, GPT-OSS-20B, GPT-OSS-120B, Kimi-K2), and 20 trials per task.
  4. Physical-robot validation on a custom mobile platform: a 40-trial efficiency study with GPT-OSS-120B, plus a failure-mode comparison against re-implemented ReAct and Code-as-Policies (CaP) baselines and vanilla ROSA.

Main Findings

  • Persistent planning is the most consistent single gain (C1 to C3). On T3, GPT-OSS-20B rose from 30% to 35% and GPT-OSS-120B from 40% to 50%. Comparing transient versus persistent planning (C2 to C3), GPT-OSS-20B improved on T1 from 60% to 70% and Kimi-K2 from 75% to 85%.
  • The execution constraint pays off most on long-horizon tasks (C3 to C4). On T3, GPT-OSS-20B went from 35% to 55%, GPT-OSS-120B from 50% to 70%, and Kimi-K2 from 65% to 70%. On T2, GPT-OSS-120B reached 90% under C4 versus 80% under C3.
  • The constraint is not a universal win. Under C4, GPT-4o on T1 fell from 95% (C3) to 90%, and GPT-OSS-120B on T1 fell from 95% to 85%, indicating the constraint can cost accuracy on simpler queries.
  • Hardware efficiency improves on all three measured metrics (40 trials, GPT-OSS-120B, T2). Repeated tool calls dropped from 19.0 ± 5.7% to 6.1 ± 2.2%; invalid or failed tool calls from 21.7 ± 6.5% to 8.1 ± 2.9%; execution time from 89.51 ± 16.48 s to 84.23 ± 9.71 s.
  • Fewer failures on the physical robot (40 trials). Successful trials: MetaTool 30/40 (75.0%), ROSA 23/40 (57.5%), CaP 20/40 (50.0%), ReAct 17/40 (42.5%). Tool unavailable/timeout fell to 3/40, against 17/40 for ROSA, 13/40 for CaP, and 10/40 for ReAct. Incorrect or hallucinated plans were 10/40, against 17/40 for ReAct, 13/40 for CaP, and 17/40 for ROSA; navigation failures were 7/40, against 13/40 for ReAct and 10/40 each for CaP and ROSA.
  • Token profiles are more stable. Fig. 5 is reported as showing much lower token-usage variance for the MetaTool agent than for vanilla ROS-Agent; the text gives no numeric token statistics, so no figures are quoted here.
  • Model choice. GPT-OSS-120B performed consistently better among the open-source models tested and was therefore used as the backbone for the hardware comparison. The abstract summarizes the overall effect as up to approximately 24% gains on complex tasks versus the baseline framework.
  • Statistical caveat stated by the authors. With 20 trials per condition, the ablation results are framed as indicative trends rather than statistically significant differences.

Methodology in Plain English

The system keeps ROS-Agent's observe–reason–act loop. A user request is sent to the LLM together with a fixed system prompt describing the robot's body and the tools it can call, so the model's reasoning is bounded by what the platform can actually do. The change is what happens first: instead of letting the model start calling tools immediately, the MetaTool prompts it to write out a short pseudo-code plan — an ordered list of the tool names it intends to use. That plan is written into the agent's scratchpad, and it stays there for the entire interaction. On every following step, the model sees the original plan alongside the accumulated tool outputs, and the framework only permits the tool the plan calls for. If the situation genuinely requires a change, replanning can be triggered; otherwise the agent cannot wander off-plan.

The available actions include ROS-Agent's native system tools (rosnode, rostopic) plus custom modules: describe_image for vision–language understanding, RAG_query for vector-database knowledge retrieval, face_expression for affective display, follow_me for keypoint-based human following, get_goal_odometry, set_goal, publish_twist_to_move_base for navigation dispatch, and stop_uh_v1 for emergency stop and goal cancellation.

The testbed is a low-cost custom mobile robot with an Intel onboard computer and an NVIDIA GTX 1050 Ti GPU, a custom motor driver fusing IMU and wheel encoder data for odometry, perception and control models running locally, and the LLM accessed through the Groq API. The robot also carries a facial emotion display and an articulated arm for gestures. The ablation was deliberately confined to Gazebo to avoid the safety risks of autonomous LLM control on real hardware; the T2 hardware study and the failure-mode comparison were then run on the physical platform against re-implemented ReAct and CaP baselines. Those baselines were re-implemented inside the authors' own pipeline because the originals were validated on incompatible environments (text QA and ALFWorld for ReAct, simulated tabletop manipulation for CaP), while preserving each method's defining mechanism.

Why This Matters

The paper argues that a large part of the long-horizon instability attributed to open-source models is an architectural problem rather than a capability ceiling. If a persistent, enforced plan recovers a substantial share of the reliability gap, then teams can use cheap or locally hosted models instead of paying for proprietary ones — a practically important result for anyone deploying agents on real robots. The mechanism is also described as a potential drop-in for other agentic frameworks, since it constrains the action space without changing the underlying model.

Real-world applications:

  • Indoor guidance and assistance robots in facilities — the paper's own T2 scenario asks the robot to find a laboratory researching power system equipment and lead the user there, using RAG_query and navigation tools.
  • Hospital and clinical floor navigation, one of the four simulated environments, where multi-step, multi-room tasks are prone to loops.
  • Warehouse and factory floors with scattered obstacles, another evaluated environment, where premature or repeated tool calls translate directly into wasted motion.
  • Home and companion robots that must remember a landmark shown earlier (the red shelf in T3) and later guide the user back to it, combined with affective display and human-following behaviors.

Industry relevance: the hardware bill of materials is deliberately modest (GTX 1050 Ti, off-the-shelf onboard computer) and the LLM is served remotely through an API, so the reliability gains come without new sensors or a bigger accelerator. The reduction in invalid and repeated tool calls is directly a compute-and-latency cost saving for anyone running LLM agents as a service on robot fleets.

Future Directions

  • Adapting the architecture to smaller open-source models so it can run on resource-constrained robotic platforms, which the authors name as their primary next step.
  • Extending the platform and tool ecosystem to cover broader real-world applications of structured agentic robotics.
  • Strengthening the evidence base. The authors flag the 20-trial ablation as indicative only; larger, statistically powered studies across more tasks and models would test whether the C4 gains, and the occasional regressions on T1, hold up.
  • Testing whether the constraint generalizes beyond ROS-Agent. The paper claims the plan-conditioned policy could be a drop-in mechanism for similar frameworks, but this is asserted rather than demonstrated, and the mechanism's behavior on manipulation-heavy or partially observable tasks is not reported.

Target Audience

Robotics and embodied-AI researchers working on LLM-based task planning; engineers building ROS-integrated agents who need reliability rather than benchmark scores; practitioners choosing between proprietary and open-source backbones for a deployed robot; and graduate students looking for a compact, well-structured example of an ablation-driven agent architecture paper with both simulation and hardware evidence.

Authors’ abstract

Large Language Models (LLMs) have enabled more natural human-robot interaction, but open-source models often exhibit unstable long-horizon reasoning and inefficient action execution when deployed in agentic robotic frameworks. This paper presents an enhanced ROS-Agent based architecture that improves task reliability and execution efficiency for agentic robotic systems using open-source LLMs. The proposed system introduces a novel intermediate mechanism, termed the MetaTool,…

The full abstract on arXiv
Read the original paper

Related papers