This project facilitates an autonomous dialogue between AI agents with distinct personas and backgrounds. It is designed for the study of synthetic personality interactions, linguistic patterns, and behavioral modeling in autonomous AI environments. The architecture of the system is based on the multi-agent simulation principles and the Parallel Information Aggregation via Neural Orchestration (PIANO) framework (Al et al., 2024) and the SimpleMEM efficient memory model (Liu et al., 2026).
To simulate realistic human-like conversation and avoid the repetitive "assistant-speak" common in traditional large language models, the agents utilize a multi-module parallel architecture inspired by the PIANO framework. While the original framework was designed for open-world simulations, this implementation adapts those cognitive loops for nuanced dialogue within a conversational interface.
Each agent maintains a persistent internal state that serves as a central repository for cognitive data:
- Identity: Encapsulates the agent's role, traits, and a specific communication style.
- Evolved Identity: A lifelong evolving understanding of the agent's current life-state (SimpleMEM implementation).
- Environment: Tracks situational context, including location and scene descriptions (PIANO Action Awareness).
- Cognitive Context: Stores social analysis, emotional state, and immediate strategic goals.
- Memory: Implements a vectorized dual-store system consisting of high-fidelity "Situational Snapshots" in Working Memory and semantically indexed episodes in Long-Term Memory.
The system utilizes a Parallel Information Aggregation (PIANO) model where modules are executed concurrently to mimic the non-linear nature of human cognition:
- Social Awareness: Decodes sentiment, underlying intent, and relationship dynamics.
- Action Awareness: Manages situational transitions and non-verbal actions (e.g., MOVE, ARRIVE).
- Vectorized Memory Retrieval: Performs semantic searches using 1536-dimensional embeddings to retrieve relevant past events, using a hybrid approach that prioritizes Semantic Similarity, Spatial Consistency, and Social Relevance.
- Goal Generation: Formulates strategic objectives based on the agent's persona and context.
- Talking Module: Synthesizes response text by aggregating inputs from all other modules.
During consolidation phases, the system filters snapshots for Utility and Salience, categorizing them into Spatial, Social, or Factual buckets. These are then converted into vectors for efficient lifelong retrieval.
The implementation includes a real-time CLI dashboard for monitoring agent cognition:
- Dialogue: A scrolling conversation log with adaptive line-fitting. Users can navigate history using the Up/Down arrow keys.
- Social Analysis: Displays the agent's real-time interpretation of social cues and intent.
- Goals & Memory: Visualizes the agent's strategic planning and retrieval of episodic history.
- Environment: Tracks the situational and spatial context of the interaction.
- Python 3.10+
- OpenRouter API Key
- Install dependencies:
uv sync
- Configure Environment:
Create a
.envfile in the root directory:OPENROUTER_API_KEY=your_key_here
- Configure Characters:
Edit
sandbox.jsonto define character roles, traits, and unique communication styles.
Run the simulation with specific characters and an initial opener:
# Standard interaction
uv run main.py --chars alice,bob --opener "How have you been lately?"
# Identifies agents as Alpha_0 and Alpha_1
uv run main.py --chars alpha,alpha --opener "Lets debate the following: The end is near"CLI Flags:
--chars: Comma-separated IDs fromsandbox.json. Supports duplicate IDs for identical persona interactions.--opener: The message that initiates the session.--interval: Number of turns between episodic memory consolidation.
This tool is intended for the study of synthetic personality interactions and behavioral boundaries. All interactions are simulated and do not reflect the views of the developers.
Al, A., Ahn, A., Becker, N., Carroll, S., Christie, N., Cortes, M., Demirci, A., Du, M., Li, F., Luo, S., Wang, P. Y., Willows, M., Yang, F., & Yang, G. R. (2024). Project Sid: Many-agent simulations toward AI civilization. arXiv (Cornell University). https://doi.org/10.48550/arxiv.2411.00114
Liu, J., Su, Y., Xia, P., Han, S., Zheng, Z., Xie, C., Ding, M., & Yao, H. (2026b). SimpleMEM: efficient Lifelong memory for LLM agents. arXiv (Cornell University). https://doi.org/10.48550/arxiv.2601.02553