Leveraging Dual Process Theory in Language Agent Framework for Real-time Simultaneous Human-AI Collaboration

Shao Zhang, Xihuai Wang, Wenhao Zhang, Chaoran Li, Junru Song, Tingyu Li, Lin Qiu, Xuezhi Cao, Xunliang Cai, Wen Yao, Weinan Zhang, Xinbing Wang, Ying Wen

Abstract

Large Language Model (LLM) agents have demonstrated remarkable capabilities in sequential tasks, yet they often struggle in real-time, simultaneous collaborative environments where immediate reaction and strategic reasoning must coexist. This paper introduces DPT-Agent, a novel framework inspired by Dual Process Theory (DPT). By decoupling immediate, low-latency actions (System 1) from deliberate, high-level reasoning (System 2), DPT-Agent overcomes the inherent latency of LLMs while maintaining sophisticated coordination. Evaluated in the Overcooked environment, the framework demonstrates superior performance and human preference compared to traditional agent architectures.

1. Introduction

While LLM-based agents excel in turn-based domains like coding or text generation, real-time human-AI collaboration presents a unique set of challenges. In dynamic environments, agents must react instantly to environmental changes and human movements while simultaneously inferring their partner's intent and adapting long-term strategies.

Existing agents face a critical Latency-Reasoning Trade-off: high-parameter models provide the reasoning depth required for coordination but suffer from inference delays that make them unresponsive in real-time. Conversely, smaller models offer the necessary speed but lack the cognitive capacity to handle complex, unscripted collaboration. DPT-Agent addresses this by implementing a cognitive architecture that mimics the human brain's dual-process system.

2. The DPT-Agent Framework

The DPT-Agent architecture splits the agent's decision-making process into two distinct yet interconnected systems:

2.1 System 1: Fast and Intuitive

System 1 handles the agent's "reflexes." It is built upon a Finite-State Machine (FSM) and an Action Executor utilizing A* path planning. This system ensures the agent remains active and productive at every game tick, preventing the "freezing" behavior common in LLM agents waiting for a response. It executes basic tasks—such as picking up an onion or moving to a station—without requiring immediate LLM intervention.

2.2 System 2: Slow and Deliberate

System 2 serves as the LLM-driven reasoning core, operating asynchronously in the background. It consists of two primary modules:

  • Theory of Mind (ToM): This module analyzes the history of the game to infer the human partner’s tendencies, current plans, and potential bottlenecks.
  • Asynchronous Reflection: This process evaluates the agent's overall performance and generates high-level "Behavior Guidelines" based on the current state of play.

2.3 The Bridge: Code-as-Policy

The critical innovation of DPT-Agent is how System 2 influences System 1. Rather than selecting individual actions, System 2 generates executable code (lambda functions) that modifies the logic of the System 1 FSM. This "Code-as-Policy" approach allows the slow reasoning system to update the fast execution rules dynamically. For example, if System 2 observes a human partner focusing exclusively on chopping, it can rewrite the FSM's priorities to focus on soup delivery, all without interrupting the agent's physical movement in the environment.

3. Experimental Evaluation

The framework was tested using a modified version of the Overcooked Challenge, specifically designed to test coordination in high-pressure scenarios. Two new layouts were introduced:

  1. New Counter Circuit: Focused on workflow optimization and movement efficiency.
  2. New Asymmetric Advantages: Designed to test labor division and role specialization.

The study utilized 11 state-of-the-art LLMs, including GPT-4o, o3-mini, and DeepSeek-R1, to serve as the reasoning core for System 2.

4. Key Results and Insights

4.1 Performance and Efficiency

DPT-Agent significantly outperformed mainstream frameworks such as ReAct and Reflexion. In human-AI collaboration trials, DPT-Agent achieved a mean score of 111.53 on Map 1, compared to ReAct’s 99.03. Notably, the framework allowed high-latency models like DeepSeek-R1-70b to achieve high "score efficiency," proving that deep reasoning can be effectively translated into real-time success if decoupled from the immediate action loop.

4.2 Human Preference

Subjective evaluations using Borda counts revealed that human participants consistently preferred DPT-Agent as a partner. Participants noted that the agent felt more "collaborative" and appeared to "understand" their intentions, likely due to the Theory of Mind module's ability to adapt to individual human playstyles mid-game.

4.3 The Necessity of Decoupling

The research validates that even the most advanced reasoning models (like o3-mini) perform poorly if they attempt to act as a monolithic system. Their thinking time inevitably exceeds the pace of the environment. The asynchronous evolution of strategy—where the agent "evolves" its behavior guidelines every 30 seconds while continuing to move—is essential for effective real-time interaction.

5. Limitations and Future Work

Despite its success, DPT-Agent faces challenges with smaller LLMs, which occasionally produce syntax errors in the generated lambda functions, leading to logic failures. Additionally, while the FSM provides stability, it is inherently less flexible than a purely neural end-to-end approach.

Future research will focus on integrating LLMs more deeply into industrial-grade FSMs to support real-world human-robot collaboration and expanding the Theory of Mind module to account for a broader range of human demographic playstyles.

Summary updated

BibTeX
@inproceedings{zhang2025leveraging,
  author = {Shao Zhang and Xihuai Wang and Wenhao Zhang and Chaoran Li and Junru Song and Tingyu Li and Lin Qiu and Xuezhi Cao and Xunliang Cai and Wen Yao and Weinan Zhang and Xinbing Wang and Ying Wen},
  title = {{Leveraging Dual Process Theory in Language Agent Framework for Real-time Simultaneous Human-AI Collaboration}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure