Agent_Design
Last updated: 3/24/2025, 6:40:28 PM
AgentSociety: Agent Design and Cognitive Architecture
Overview of LLM-driven Social Generative Agents
AgentSociety's agent design represents a significant advancement over previous generative agent implementations, integrating sophisticated psychological models with complex social behaviors. The agents are designed to simulate comprehensive social beings with realistic mental processes, behaviors, and interactions with their environment.

Agent Components
Profile and Status
Profile (relatively stable attributes):
- Basic demographics (name, age, gender, education)
- Personality traits
- Background information
Status (dynamic attributes):
- Mental states (current emotions, thoughts, attitudes)
- Economic status (income, savings, consumption patterns)
- Social relationships (connections, relationship strengths)
Mental Processes
AgentSociety implements a three-level mental process framework deeply rooted in psychological theories:
1. Emotions
- Implementation: Based on Shvo et al.'s emotion measurement framework
- Components:
- Keyword selection for current emotional state
- Sentence-based thought related to the emotion
- Intensity ratings for six core emotions (sadness, joy, fear, disgust, anger, surprise) on a 0-10 scale
- Function: Drives rapid responses to external events and influences decision-making
- Update Mechanism: Continuously updated based on interactions and experiences
2. Needs
- Implementation: Based on Maslow's hierarchy of needs
- Components:
- Hierarchical representation of motivational drives
- Priority system for competing needs
- Need satisfaction tracking
- Function: Serves as the underlying motivator for sustained behavior
- Update Mechanism: Adjusted based on:
- Active behaviors
- External events
- Current psychological states
- Behavioral Connection: Leverages Theory of Planned Behavior to formulate action plans aimed at meeting priority needs
3. Cognition
- Implementation: Informed by Theory of Mind and Cognitive Appraisal Theory
- Components:
- Reasoning processes
- Attitude formation and updating
- Decision-making frameworks
- Function: Enables higher-level processing, planning, and adaptation
- Update Mechanism: Updated through:
- Behavioral outcomes
- Interaction experiences
- Environmental feedback
Memory System
AgentSociety implements a sophisticated memory system that serves as the bridge between mental processes and behaviors:
Memory Components
Profile Memory: Static attributes that remain constant
Status Memory: Dynamic state information stored as key-value pairs
Stream Memory: The core memory system with two parallel streams:
- Event Flow: Chronological record of objective events
- Proactive actions by the agent
- Passive external events
- Environmental changes
- Perception Flow: Subjective experiences linked to events
- Thoughts about events
- Emotional responses
- Attitude updates
- Event Flow: Chronological record of objective events
Memory Nodes
Each memory node contains:
- Time information
- Location data
- Event/perception description
Social Behaviors
AgentSociety models three primary types of complex social behaviors, each with sophisticated implementation:
1. Mobility Behaviors
Mobility serves as the foundation for other social interactions, enabling agents to physically navigate their environment to fulfill needs.
Hierarchical Decision Framework
Intention Extraction: Derive mobility intentions from need hierarchies
- Example: "Social need" → "Move to social venue"
Place Type Selection: Match demands with POI types
- Example: Social interaction → Cafés, parks, etc.
Radius Decision: Determine feasible ranges based on:
- Internal states (age, stamina)
- Environmental parameters (weather, traffic)
Place Selection: Apply Gravity model for spatial optimization
- Formula: P_ij = (S_j / D_ij^β) / ∑(S_k / D_ik^β)
- Where S_j is location attractiveness, D_ij is distance, and β is distance decay
Integration with Other Behaviors
Mobility enables:
- Social synergy: Spontaneous encounters and relationship building
- Economic synergy: Commuting to work, visiting commercial hubs
- Environmental adaptation: Adjusting routes based on conditions
2. Social Behaviors
Social behaviors enable information flow and influence between agents, leading to emergent collective phenomena.
Social Relationships
- Types: Family bonds, friendships, colleagues
- Attributes: Strength values (0-100) representing social closeness
- History: Detailed interaction records between connected agents
Social Interactions
Partner Selection:
- Based on relationship type and strength
- Considers recipient's profile characteristics
- Targets friends with relevant expertise for specific topics
Message Generation:
- Content shaped by agent's needs and intentions
- Specific content influenced by thoughts and beliefs
- Tone affected by emotional state
Response Generation:
- Based on relationship strength
- Influenced by chat history
- Affected by current emotional state
Integration with Other Behaviors
- Emotional influence: Interactions affect emotional states and beliefs
- Economic influence: Exchange of economic information triggers economic behaviors
- Mobility influence: Social interactions lead to mobility behaviors (e.g., meeting arrangements)
3. Economic Behaviors
Economic behaviors are essential for sustaining life, with employment and consumption as core activities.
Economic Decision Framework
Work Propensity:
- Determines working hours
- Affects monthly income
- Influenced by economic factors and personal needs
Consumption Propensity:
- Determines monthly consumption budget
- Affected by income, savings, and economic conditions
- Guides spending decisions
Budget Allocation:
- Autonomous decisions on where to spend money
- What products to purchase
- How to balance saving and spending
Integration with Macroeconomic Environment
- Agents interact with firms, government, and banks
- Behaviors influenced by prices, taxes, and interest rates
- Collective behaviors contribute to economic indicators (GDP, employment)
Agent Workflow
AgentSociety implements a continuous feedback loop between mental processes and behaviors:
Workflow Steps
Action Determination:
- Assess current state from Status memory
- Decide on action based on emotional and cognitive evaluations
- Example: Need for social interaction + positive emotional state → initiate conversation
Event Feedback:
- Receive feedback after performing action
- Check success/failure of action
- Process environmental responses
Memory Update:
- Record event and feedback in Event Flow
- Update associated Perception Flow with responses
Emotion and Cognition Analysis:
- Analyze outcome of event
- Update emotional state and attitude
- Adjust future decision-making based on experience
Passive and Environmental Events:
- Process external stimuli using same memory framework
- Update Event Flow and Perception Flow accordingly
Comparison with Previous Implementations
Park et al. (2023) Generative Agents
Mental Processes:
- Original: Basic memory, planning, and reflection modules
- AgentSociety: Three-level mental process framework with explicit psychological grounding
Behaviors:
- Original: Basic movement and interaction capabilities
- AgentSociety: Sophisticated mobility, social, and economic behaviors with interdependencies
Memory:
- Original: Recency-weighted retrieval system
- AgentSociety: Dual-stream memory with objective events and subjective experiences
Psychological Grounding:
- Original: Limited explicit psychological theory
- AgentSociety: Integration of multiple psychological frameworks (Maslow, Theory of Planned Behavior)
D2A (Wang et al., 2024)
Mental Processes:
- D2A: Desire-driven autonomy with basic needs modeling
- AgentSociety: More comprehensive mental framework with emotions, needs, and cognition
Behaviors:
- D2A: Focus on daily activities with limited economic modeling
- AgentSociety: Broader behavioral repertoire with sophisticated economic behaviors
Environmental Integration:
- D2A: Text-based environment
- AgentSociety: Realistic societal environment with urban, social, and economic spaces
Innovations and Contributions
1. Psychological Realism
AgentSociety advances the psychological realism of generative agents by:
- Integrating established psychological theories from multiple disciplines
- Implementing a three-level mental process framework
- Creating explicit connections between mental states and behaviors
- Modeling the dynamic interplay between emotions, needs, and cognition
2. Behavioral Complexity
The implementation enhances behavioral complexity through:
- Sophisticated mobility modeling using gravity models
- Realistic social relationship dynamics with different relationship types
- Complex economic behaviors integrated with a macroeconomic environment
- Interdependent behavioral systems that influence each other
3. Memory Architecture
The dual-stream memory system represents a significant innovation by:
- Separating objective events from subjective experiences
- Creating explicit links between events and perceptions
- Organizing memory chronologically to reflect natural temporal flow
- Enabling more nuanced and context-aware decision-making
Conclusion
AgentSociety's agent design represents a significant advancement in generative agent technology, moving beyond simple role-playing to create psychologically grounded, behaviorally complex social beings. By integrating sophisticated mental processes with realistic behaviors and a dual-stream memory system, these agents can simulate human-like social interactions at unprecedented levels of fidelity.
The explicit modeling of the relationships between mental states and behaviors, grounded in established psychological theories, enables more realistic and coherent agent actions. This approach, combined with the interdependence of different behavioral systems, creates a foundation for emergent social phenomena that more closely resemble real-world human societies.
As LLM technology continues to advance, this agent architecture provides a robust framework for further enhancing the realism and complexity of simulated social beings, opening new possibilities for social science research and policy evaluation.