⚠️ Development Status: This project is currently Experimental (Work in Progress). The prompt engineering and group interaction logic are still being fine-tuned for stability. Expect occasional hallucinations or repetitive banter.
Myriad Realm Harem is an interactive Roleplay Group Chat simulation powered by Google Gemini 2.5 Flash.
Unlike standard 1-on-1 chatbots, this application simulates a chaotic "Group Chat" environment. You play as Su Yuan (The Master), and the AI orchestrates a roster of anime/fantasy characters who interact not only with you but also with each other—arguing, teasing, and interrupting in real-time.
The simulation launches with these pre-loaded personalities, featuring a mix of archetypes to ensure chaotic interactions:
| Character | Origin | Archetype / Trait |
|---|---|---|
| Makima | Chainsaw Man | Domineering, Control Freak, Manipulative |
| Yor Forger | Spy x Family | Deadly Assassin, Socially Awkward, Motherly |
| Esdeath | Akame ga Kill | Sadistic General, Obsessively in Love, Survivalist |
| Albedo | Overlord | Yandere, Obsessed Overseer, Hates other women |
| Mikasa Ackerman | Attack on Titan | Stoic Bodyguard (Kuudere), Overprotective |
| Rias Gremory | High School DxD | Noble Princess, Seductive, Caring Onee-san |
| Kaguya Shinomiya | Love is War | Tsundere Genius, Proud, Refuses to confess |
| Shinobu Kocho | Demon Slayer | Passive-Aggressive, Smiling Tease, Poison User |
| Mai Sakurajima | Bunny Girl Senpai | Mature, Straightforward, Emotional Anchor |
| Megumin | Konosuba | Chuunibyou, Loud, Explosion Maniac |
- Multi-Persona Simulation: The AI acts as a "Game Master," generating dialogue for multiple characters (e.g., Makima, Yor Forger, Esdeath) in a single response.
- Inter-Character Banter: Characters are programmed to reply to each other, creating a lively and chaotic atmosphere rather than a static Q&A session.
Powered by LangChain, the system uses a Reasoning + Acting (ReAct) framework:
- Visual Thought Process: View the agent's logic (Thought -> Action -> Observation) via the
StreamlitCallbackHandlerto see how it decides who speaks next. - Web Search: The group has access to DuckDuckGo to fetch real-world data (e.g., checking the weather or news) during the roleplay.
- Roster Expansion: Use the sidebar to create custom characters (Waifus/Husbandos) and instantly add them to the active chat.
- Contextual Memory: Uses
ConversationSummaryMemoryto remember past interactions and maintain long-term context.
- Thematic Styling: Custom CSS providing a "Pink/Purple" cultivation aesthetic with glowing text and gradient buttons.
- LLM: Google Gemini 2.5 Flash (via
langchain-google-genai). - Framework: Streamlit.
- Orchestration: LangChain (Agents, Tools, Memory).
- Search Tool: DuckDuckGo Search Run.
-
Clone the Repository
git clone https://github.com/viochris/chat-group.git cd Myriad-Realm-Harem -
Install Dependencies
pip install -r requirements.txt
-
Run the Application
streamlit run app.py
- Get API Key: Obtain a free API Key from Google AI Studio.
- Launch: Enter the API key in the sidebar.
- Chat: Type a message as "Su Yuan".
- Example: "I'm tired from cultivation today." -> Watch the characters fight over who comforts you.
- Add Characters: Open the "📝 Create Custom Character" expander in the sidebar to add new members to the group temporarily.
To permanently change the starting characters without adding them manually every time:
- Open the file
function.pyin your code editor. - Locate the dictionary
st.session_state.all_characterinside theinit_state()function. - Simply edit the names and descriptions in the code to your own preferred characters!
1. Experimental Prototype Status This application is a Proof-of-Concept and Experimental Prototype. It pushes the boundaries of prompt engineering to simulate a chaotic "Group Chat" using a single LLM agent.
- Expect Unpredictability: The characters might occasionally break persona, mix up speakers, or repeat themselves.
- Logic Breaks: The "Game Master" logic is complex; occasional disruptions in conversational flow are expected.
2. Parody & Fan Content This application involves characters based on existing fictional works (e.g., Esdeath from Akame ga Kill, Yor Forger from Spy x Family). These characters are used strictly for non-commercial, educational, and parody purposes to demonstrate AI persona steering capabilities. All rights to the original characters belong to their respective creators and publishers.
3. AI Generation & Safety The responses are generated by a Large Language Model (Google Gemini).
- Hallucinations: The AI may invent facts or deviate from canon lore.
- Safety Filters: This app utilizes Google's safety settings. Responses involving explicit content, hate speech, or extreme violence may be blocked by the API provider. Users are advised to interact responsibly.
4. Just for Fun This project was created solely for entertainment and hobby purposes. It is NOT intended to be a serious, commercial, or scalable product. It is simply a fun experiment to test the limits of AI roleplay capabilities.
Author: Silvio Christian, Joe "The myriad realms await your command."