Large language models are increasingly used to plan and control robots, but they remain vulnerable to jailbreak attacks that can trigger unsafe behavior. Existing defenses are usually tested on short instructions containing a single hazard. Realistic tasks, however, often mix safe and unsafe sub-tasks, hide dangerous steps, or combine individually benign actions into harmful outcomes. A single safety check may either miss the hazard or reject the entire instruction.
RuleGraph addresses this by distributing safety enforcement across multiple reasoning and verification stages. Five cooperating agents translate general safety principles into world-specific rules, assess each sub-task in context, and derive a safe goal from the legitimate parts of the instruction. Planning is then organized as a graph of rule-specific nodes, where higher-level nodes inherit the union of their parents' rules. Candidate plans are progressively verified and aggregated until one plan satisfies every relevant rule.
The authors evaluated RuleGraph on both pure-attack and compound instructions across two benchmarks. It reduced attack success rate to 0% on both, while achieving the highest task success rate among all compared methods: 98.57% on the RoboGuard benchmark and 84.54% on their long-horizon compound instructions. The results suggest that multi-agent rule grounding and graph-based verification can help robots refuse harmful parts of an instruction without sacrificing the legitimate task.