Safety Aware Task Planning via Large Language Models in Robotics

Azal Ahmad Khan, Michael Andrev, Muhammad Ali Murtaza, Sergio Aguilera, Rui Zhang, Jie Ding, Seth Hutchinson, Ali Anwar

Abstract

Large Language Models (LLMs) have significantly advanced robotic task planning, yet they often prioritize task completion over safety, a phenomenon known as "productivity bias." This paper introduces SAFER (Safety-Aware Framework for Execution in Robotics), a multi-LLM architecture that decouples high-level task planning from safety auditing. By integrating specialized LLM agents with low-level Control Barrier Functions (CBFs), SAFER provides a layered defense against safety violations. Experimental results on the COHERENT benchmark and real-world hardware demonstrate that SAFER reduces safety violations by up to 77.5% while maintaining execution efficiency.

1. Introduction

The integration of Large Language Models (LLMs) into robotics has enabled agents to interpret natural language instructions and reason through complex, long-horizon tasks. However, a significant gap remains between high-level reasoning and safe physical execution. LLMs frequently exhibit a "productivity bias," favoring the fastest path to a goal while neglecting critical safety constraints such as spatial conflicts or human proximity. Furthermore, attempting to incorporate all safety constraints into a single prompt often leads to "context window bloat," degrading the model's overall reasoning performance. Finally, there is a persistent "sim-to-real" gap where plans that appear safe in a text-based environment fail during physical execution due to a lack of formal safety guarantees at the controller level.

2. The SAFER Framework

To address these challenges, we propose the Safety-Aware Framework for Execution in Robotics (SAFER). SAFER utilizes a modular architecture to separate the "what" of task execution from the "how safely" of the process across four core modules.

2.1 Multi-LLM Planning and Auditing

The core of the planning module is a dual-agent system. Instead of a single LLM managing all constraints, SAFER employs a Task Planning LLM to generate initial sequences and a Safety Planning LLM to audit them. This iterative feedback loop ensures that the plan is refined for safety before any physical movement occurs, preventing the dilution of reasoning capabilities.

2.2 Execution and Feedback

Each robotic agent (e.g., arm, drone, or quadruped) is equipped with an Execution LLM that performs a final feasibility check based on the immediate environment. If an action fails, a Feedback Module analyzes the failure and provides structured data back to the planning module for real-time re-planning.

2.3 Safety Evaluation and CBF Integration

To quantify safety, an LLM-as-a-Judge evaluates plans against 15 distinct risk criteria, such as proximity hazards and handoff stability. Crucially, SAFER bridges the gap between high-level logic and low-level physics by incorporating Control Barrier Functions (CBFs) at the motor control level. While LLMs handle high-level "common sense" safety (e.g., avoiding fragile objects), CBFs provide mathematical guarantees, acting as a safety shield that minimally adjusts robot commands to prevent physical collisions with obstacles or humans.

3. Experimental Setup

The framework was evaluated using the COHERENT Benchmark, which includes tasks requiring coordination between one, two, or three robots (mono-type, dual-type, and trio-type tasks). We tested the framework using GPT-4o and DeepSeek-r1 to assess generalization across different model architectures. Real-world validation was conducted using two Kuka IIWA LBR 14 robotic arms mounted on Ridgeback omnidirectional mobile bases, with motion capture provided by a Vicon system.

4. Results and Discussion

The implementation of SAFER led to a dramatic decrease in safety violations. When utilizing DeepSeek-r1, the framework achieved a 77.5% reduction in average safety violations compared to baseline planning methods. GPT-4o showed a 47% reduction.

4.1 Key Insights

  • Reasoning and Safety: Models with stronger reasoning capabilities (e.g., DeepSeek-r1) naturally produce safer plans by anticipating risks multiple steps in advance rather than reacting to them.
  • Objectivity of the Safety Judge: While LLMs may show bias in self-grading for correctness, they remain remarkably objective when acting as a safety judge against explicit rule-based criteria.
  • Efficiency: The overhead of the safety-auditing LLM and CBFs is negligible. The number of steps required to complete tasks remained competitive, debunking the myth that safety must significantly hinder performance.

5. Conclusion and Future Work

SAFER demonstrates that decoupling safety from task planning through a multi-LLM architecture and low-level control guarantees significantly enhances robotic safety. Hardware experiments confirmed the system's ability to handle human interventions in real-time without crashing the high-level task plan. Future work will focus on making the Safety Planning LLM more adaptive to dynamic environments and refining human-robot interaction protocols to distinguish between different types of human users.

Summary updated

BibTeX
@inproceedings{khan2025safety,
  author = {Azal Ahmad Khan and Michael Andrev and Muhammad Ali Murtaza and Sergio Aguilera and Rui Zhang and Jie Ding and Seth Hutchinson and Ali Anwar},
  title = {{Safety Aware Task Planning via Large Language Models in Robotics}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2025},
  doi = {10.1109/iros60139.2025.11246041},
}
Figure