Bridging Thought and Action: Taming Long-Horizon Instability in Open-Source LLM Agents with a MetaTool-Enhanced ROS Framework
Organizations: Department of Electrical and Electronic Engineering, Bangladesh University of Engineering and Technology (BUET), Dhaka 1000, Bangladesh · University of Massachusetts Amherst, 300 Massachusetts Ave, Amherst, MA 01003, United States
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, which enforces structured planning prior to action execution. Given a natural-language command, the MetaTool induces the LLM to generate a pseudo-code plan of intended tool invocations, which is stored in the ROS-Agent's scratchpad and persists throughout execution. By explicitly separating planning from execution, the proposed approach reduces execution loops and improves deterministic behavior. The architecture is validated on a custom mobile robotic platform with multimodal perception and motion control capabilities. Experimental results on real-world interactive tasks demonstrate improved task completion and contextual consistency, with up to ~24% gains on complex tasks compared to the baseline framework.
Figures & tables
| System | Explicit Plan Buffer | Execution Constraint | ROS-native | Open-LLM Focus | Real Robot |
|---|---|---|---|---|---|
| ReAct [ 10 ] | |||||
| SayPlan [ 11 ] | |||||
| RoboGPT [ 2 ] | |||||
| CaP [ 12 ] | |||||
| MetaTool-ROS-Agent (ours) |
| Tool | Functionality |
|---|---|
| describe_image | Vision–language understanding from live camera input |
| RAG_query | Knowledge retrieval via vector database querying |
| face_expression | Affective state publishing for social interaction |
| follow_me | Human-following behavior using pose keypoints |
| get_goal_odometry | Goal-conditioned odometry estimation |
| set_goal | Goal definition and storage for navigation tasks |
| ID | Configuration | Task | GPT-4o [ 33 ] | GPT-OSS-20B [ 32 ] | GPT-OSS-120B [ 32 ] | Kimi-K2 [ 34 ] |
|---|---|---|---|---|---|---|
| C1 | ROS-Agent + Adaptive Prompt | T1 | 15/20 (75%) | 11/20 (55%) | 11/20 (55%) | 15/20 (75%) |
| T2 | 10/20 (50%) | 8/20 (40%) | 15/20 (75%) | 17/20 (80%) | ||
| T3 | 11/20 (55%) | 6/20 (30%) | 8/20 (40%) | 10/20 (50%) | ||
| C2 | ROS-Agent + Prompt-Based Planner (Non-Persistent) | T1 | 17/20 (85%) | 12/20 (60%) | 15/20 (75%) | 15/20 (75%) |
| T2 | 17/20 (85%) | 12/20 (60%) | 15/20 (75%) | 17/20 (80%) | ||
| T3 | 15/20 (75%) | 7/20 (35%) | 8/20 (40%) | 13/20 (65%) |
| ID | Configuration | Description |
|---|---|---|
| C1 | ROS-Agent + Adaptive Prompt | Natural-language task execution guided solely by adaptive prompting, without explicit planning or persistent state. |
| C2 | ROS-Agent + Prompt-Based Planner (Non-Persistent) | Prompt-based task decomposition generated at runtime; intermediate plans are not stored persistently and may be regenerated. |
| C3 | ROS-Agent + MetaTool (Persistent Scratchpad, No Execution Constraint) | Explicit task plan stored in persistent scratchpad memory; tool selection is not constrained by the stored plan. |
| C4 | ROS-Agent + MetaTool (Persistent Scratchpad + Execution Constraint) | Persistent task plan maintained and used to explicitly condition tool invocation, enforcing adherence throughout execution. |
| Repeated Tool Calls (%) | Invalid/Failed Tool Calls (%) | Execution Time (s) | |
|---|---|---|---|
| ROS-Agent | 19.0 ± 5.7 | 21.7 ± 6.5 | 89.51 ± 16.48 |
| MetaTool (ours) | 6.1 ± 2.2 | 8.1 ± 2.9 | 84.23 ± 9.71 |
| Method | Incorrect / Hallucinated Plan | Navigation Failure | Tool Unavailable / Timeout | Successful Trials |
|---|---|---|---|---|
| ReAct [ 10 ] | 17/40 | 13/40 | 10/40 | 17/40 |
| CaP [ 12 ] | 13/40 | 10/40 | 13/40 | 20/40 |
| ROSA [ 4 ] | 17/40 | 10/40 | 17/40 | 23/40 |
| MetaTool (ours) | 10/40 | 7/40 | 3/40 | 30/40 |
| Note: Failure categories are non-exclusive. Individual failed trials may encounter multiple failure modes, so total category counts may exceed total failed trials. | ||||
Long-Horizon LLM Agents
Long-horizon large language model agents plan, use tools, and preserve task state across extended, multi-step interactions.
See all 429 papers