Real-Time BDI Agents: a model and its implementation

Andrea Traldi, Francesco Bruschetti, Marco Robol, Marco Roveri, Paolo Giorgini · DOI

Introduction

The Belief-Desire-Intention (BDI) model has long served as a cornerstone of autonomous agent research, providing a framework for agents to mimic human-like reasoning. By maintaining Beliefs (world state), Desires (objectives), and Intentions (active plans), BDI agents can navigate complex, open-ended environments. However, traditional BDI frameworks suffer from a critical flaw: they are "time-blind." While they excel at determining what to do, they often lack the mechanisms to ensure actions are completed within strict temporal constraints.

In safety-critical domains such as autonomous driving or high-stakes robotics, a logically sound decision is worthless if it arrives too late. This paper introduces a novel three-layer architecture that integrates hard real-time scheduling principles directly into the BDI reasoning loop, ensuring that autonomous agents can respect deadlines and computational limits in dynamic environments.

The RT-BDI Architecture

The authors propose a Real-Time BDI (RT-BDI) architecture designed to ensure predictability by separating high-level deliberation from low-level execution while maintaining a tight feedback loop between them. The architecture is organized into three distinct layers:

1. The BDI Layer (The Brain)

This layer handles high-level symbolic reasoning. When an agent identifies a goal for which it lacks a pre-existing plan, it invokes a Temporal Planner (OPTIC) using PDDL 2.1. This allows the agent to dynamically generate time-triggered plans that account for duration and resource constraints rather than just logical sequences.

2. The Execution and Monitoring Layer (The Bridge)

This intermediate layer serves as a gatekeeper. Before a plan is committed to execution, this layer performs a real-time schedulability check. It evaluates the agent's current CPU capacity and existing commitments to determine if the new plan can be completed before its deadline. If the plan is deemed unfeasible, the system triggers immediate re-planning, preventing the agent from embarking on "doomed" intentions.

3. The Real-Time Layer (The Muscle)

This layer maps high-level plan steps into low-level periodic tasks. By utilizing established Real-Time Operating System (RTOS) algorithms—specifically Earliest Deadline First (EDF) and the Constant Bandwidth Server (CBS)—the system manages CPU execution. This ensures temporal isolation: a complex reasoning task cannot "starve" critical motor functions or other high-priority processes of necessary computational resources.

Implementation and Validation

The system was implemented by extending Kronosim, a C++ discrete-event simulator, and integrating it with the Unity game engine to create a visualization and testing environment called Kronity. Kronity simulates a resource-collection game where agents must navigate, collect items, and manage internal energy levels under strict time pressure.

The architecture was validated through three paradigmatic scenarios:

  • Reactivity: Testing how quickly an agent can replan when environmental conditions change (e.g., a human player moving a target).
  • Coordination: Evaluating a coordinator agent’s ability to distribute tasks among multiple robots to optimize global deadlines.
  • Learning: Demonstrating the agent's ability to generate a new plan for a novel sub-goal and store it in its plan library for future use, reducing subsequent planning latency.

Key Insights

The primary innovation of this work is the treatment of atomic plans as periodic tasks. By abstracting high-level agent actions into the language of real-time scheduling theory, the authors bridge the gap between symbolic AI and systems engineering. The "pre-flight" schedulability check allows agents to fail fast and pivot to alternative strategies, a necessity in resource-constrained environments.

Experimental results showed that RT-BDI agents successfully maintained temporal compliance even during dynamic overloads. Unlike standard BDI agents, which may experience "drift" or system hangs when overloaded, the RT-BDI agents used the CBS mechanism to guarantee that high-priority tasks met their deadlines.

Limitations and Future Work

While the RT-BDI model represents a significant step forward, several challenges remain:

  • Planning Latency: The current model does not fully account for the time the agent spends thinking (the search time of the PDDL planner). Future iterations must bound the time taken to generate a plan to achieve true hard real-time performance.
  • Automated Deadlines: Currently, deadlines are manually specified by developers. The authors envision future agents that can estimate their own deadlines based on environmental pressure and historical data.
  • Physical Deployment: The next phase of research involves moving beyond the Kronity simulation to deploy the architecture on physical robotic hardware, where it will face real-world sensor noise and unpredictable physical delays.

By successfully merging temporal planning with low-level task scheduling, this research provides a robust framework for building autonomous agents that are not only intelligent but also reliably punctual.

Summary updated

BibTeX
@inproceedings{traldi2022real,
  author = {Andrea Traldi and Francesco Bruschetti and Marco Robol and Marco Roveri and Paolo Giorgini},
  title = {{Real-Time BDI Agents: a model and its implementation}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/73},
}
Figure