M e KB -Sim: Personal Knowledge Base-Powered Multi-Agent Simulation (2025)

Abstract: Language agents have demonstrated remarkable emergent social behaviors within simulated sandbox environments. However, the characterization of these agents has been constrained by static prompts that outline their profiles, highlighting a gap in achieving simulations that closely mimic real-life interactions. To close this gap, we introduce MeKB-Sim, a multi-agent simulation platform based on a dynamic personal knowledge base, termed MeKB. Each agent’s MeKB contains both fixed and variable attributes—such as linguistic style, personality, and memory—crucial for theory-of-mind modeling. These attributes are updated when necessary, in response to events that the agent experiences. Comparisons with human annotators show that the LLM-based attribute updates are reliable. Based on the dynamic nature of MeKB, experiments and case study show that MeKB-Sim enables agents to adapt their planned activities and interactions with other agents effectively. Our platform includes a Unity WebGL game interface for visualization and an interactive monitoring panel that presents the agents’ planning, actions, and evolving MeKBs over time. For more information, including open-source code, a live demo website, and videos, please visit our project page at https://mekb-sim.github.io/.

## introduction agent-based modeling and simulation focus on modeling complex systems by simulating individual agents and their interactions within an environment @xcite . the rapid development of large language models (llms) has significantly advanced these simulations, offering more realistic representations of agents' decision-making processes, communication, and adaptation within simulated environments @xcite . the observation of emergent social behaviors in generative agents @xcite has spurred a series of multi-agent simulation demonstrations @xcite @xcite . however, in these demonstrations, each agent is specified by a paragraph of natural language description, detailing the agent's identity, occupation, and relationships with other agents. such specification is far from true-to-life simulations of human-like agents, thus constraining the potential for simulating more sophisticated human behaviors to test and prototype social systems and theories. to address the limitations in existing demonstrations, we introduce mekb-sim, a multi-agent simulation platform that leverages a dynamic personal knowledge base, denoted as mekb. the mekb of each agent incorporates attributes critical for theory-of-mind modeling @xcite . specifically, the mekb for each agent is structured into hierarchical layers, comprising the central fixed attributes such as occupation, race, education level, relationships, and linguistic style, surrounded by variable attributes such as personality, long-term and short-term memory, the emotion status. note that variable attributes are subject to modification in response to experienced events. by comparing llm-based attribute modifications with human annotations, we find a high acceptance rate for mekb updates, demonstrating the reliability of our system. this dynamic attribute adjustment mechanism underscores the flexibility and adaptability of mekb-sim, making it suitable for simulating complex interactions and mental states in language agents. drawing upon the main components of language agents outlined by @xcite , the architecture of agents in mekb-sim integrates a planning system and a mekb-empowered characterization with an included memory module. the agent simulation begins by setting a daily goal, generated by llms using prior experiences as in-context examples. subsequently, the planning system performs name: leonard occupation: experimental physicist... short-term goal: make changes, to be more supportive and present as a partner to penny. long-term memory ... fixed attributes variable attributes short-term goal: invite penny to movie marathon and then promise her about being more supportive. long-term memory ... variable attributes sheldon complains about amy rejecting his proposal, and leonard suggests watching his favorite movie marathon to calm down. previous activity mekb update leonard: hey, penny. sheldon and i were just talking about a movie marathon. want to join us and make it a fun night? new action figure 1: an example in mekb-sim demonstrating how prior experiences influence the mekb, which subsequently impacts the ongoing dialogue. the complete conversation for this instance is detailed in sec. 6. the contributions of this work are threefold: ## mekb-sim in this section, we introduce the technical details of our multi-agent simulation platform, mekb-sim. we first describe the construction and updating processes of the mekb (sec. 3.1). we use the openai gpt-4-1106-preview api for all generations during simulation. following this, we detail the agent architecture, the simulation process and the methods for integrating mekbs into their planning and actions (sec. 3.2). ## platform implementation in this section, we introduce our simulation of the sandbox environment (sec. 4.1), and describe how the unity webgl game interface and interactive monitoring panel facilitate user visualization of agent statuses (sec. 4.2). ## experiments we conducted two sets of experiments to assess the reliability of llm-based attribute updates and the impact of mekb on simulated activities. we first investigate the reliability of llm-based attribute updates, validated by human annotating the correctness of updated attributes (sec. 5.1). then, we study the effects of mekb on the simulated activity results, regarding the alignment with brainstormed goals, timeline coherence and consistency with the character profiles (sec. 5.2). ## case study from the case presented in figure 5 , incorporating mekb enables character lines to reference their previous experiences in the show, makes the overall timeline coherent, and maintains consistent goals and emotions across different scenes. for example, as we simulate from the end of season 8, both activities #1 and #2 draw upon a long-term memory of the season's final episode. this memory is sum-marized as, "amy rejects sheldon's proposal and expresses her need for space and time to re-evaluate her relationship with sheldon". based on these simulated activities, the mekbs of the characters are updated to reflect changes, such as penny's emotions and leonard's short-term goals. these updated attributes are then incorporated into the next conversation, showing the continuous evolution of characters throughout the simulation process. ## conclusion in this paper, we introduce mekb-sim, a platform specifically designed to simulate the behavior of human-like language agents. the simulation is based on mekb, a dynamic personal knowledge base aimed at providing a comprehensive theory-ofmind modeling of an agent. to enhance interaction with mekb-sim, we employ a unity webgl game interface, enabling users to visually engage with the simulation. additionally, we offer an interactive monitoring panel that details the planning, actions, and the evolution of the mekb over time.