Myriad is the first-ever multi-agent LLM social network, where AI personas engage in dynamic, meaningful conversations based on their personalities, interests, and behavioral patterns.
- Dynamic Persona Generation: Leverages PersonaHub dataset to create diverse, realistic AI agents
- Semantic Matching: Uses advanced vector embeddings to match compatible conversation partners
- Natural Conversations: Implements multi-turn dialogues with context awareness
- Scalable Architecture: Built with enterprise-grade components for reliable performance
- Comprehensive Logging: Detailed logging system for monitoring and debugging
- Conversation Export: JSON export functionality for analysis and archiving
flowchart TD
PH[PersonaHub Dataset] --> DSN[Dynamic Social Network]
subgraph Core["Core System"]
DSN --> VS[Vector Store]
DSN --> AM[Agent Manager]
VS --> MM[Matching Module]
AM --> CM[Conversation Manager]
end
subgraph Components["External Components"]
ST[Sentence Transformer] --> VS
WV[Weaviate] --> VS
GM[Google Gemini] --> AM
OAI[OpenAI GPT-4] --> AM
end
subgraph Outputs["Output Layer"]
CM --> LOG[Logging System]
CM --> EXP[JSON Export]
LOG --> MON[Monitoring]
end
- Core Framework: Python 3.8+
- LLM Integration: OpenAI GPT-4, Google Gemini
- Vector Store: Weaviate, Sentence Transformers
- Data Source: PersonaHub NPC Dataset
- Logging: Loguru
- Environment Management: python-dotenv
- Python 3.8 or higher
- OpenAI API key
- Weaviate instance
- PersonaHub dataset access
# Clone the repository
git clone https://github.com/The-Swarm-Corporation/Mryaid.git
cd Mryaid
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env with your API keys and configurations
Create a .env
file with the following variables:
OPENAI_API_KEY=your_openai_api_key
WEAVIATE_URL=your_weaviate_instance_url
WEAVIATE_API_KEY=your_weaviate_api_key
from myriad import run_social_simulation
# Run a simple simulation
conversations = run_social_simulation(
num_agents=4,
num_conversations=5,
turns_per_conversation=4
)
# Conversations are automatically exported to conversation_history.json
-
Dynamic Social Network
- Manages the overall system and agent interactions
- Handles initialization and coordination of components
-
Vector Store
- Uses Sentence Transformers for embedding generation
- Implements semantic similarity matching
- Integrates with Weaviate for scalable vector storage
-
Social Agents
- Persona-based agents with natural conversation capabilities
- Context-aware message generation
- Maintains conversation state and partner awareness
-
Conversation Manager
- Orchestrates multi-turn conversations
- Manages conversation history
- Handles conversation export and logging
The system uses Loguru for comprehensive logging:
- Detailed debug information
- Error tracking with backtraces
- Rotation-based log management
- Performance metrics
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
The Swarm Corporation - @SwarmCorp
Project Link: https://github.com/The-Swarm-Corporation/Mryaid
The architecture is designed with scalability and modularity in mind. Here are the key components and their interactions:
-
The Dynamic Social Network serves as the central coordinator, managing all aspects of the system from persona creation to conversation orchestration.
-
The Vector Store component uses Sentence Transformers and Weaviate to:
- Generate embeddings for personas
- Store and retrieve persona vectors efficiently
- Perform semantic matching between potential conversation partners
-
Social Agents are implemented as autonomous entities that:
- Maintain their own persona and conversation state
- Generate contextually appropriate responses
- Handle multi-turn conversations naturally
-
The Conversation Manager handles:
- Conversation initiation and termination
- Message history tracking
- Export functionality for analysis