Inspiration

We were tired of polite, subservient AI assistants. We asked ourselves: what if AI had a real personality? What if it could be funny, opinionated, and even a little bit savage? Inspired by sitcoms and the chaotic energy of living with roommates, we wanted to create an AI experience that was less about servitude and more about engaging, humorous, and unpredictable interaction. We didn't want another assistant; we wanted a digital frenemy.

What it does

Flatshare Chaos: Roast Edition is an offline-first, multi-agent simulator for macOS where you live with AI roommates who have distinct personalities, moods, and relationships. Instead of just helping you, they roast you and each other, leading to hilarious and emergent social dynamics. You can even control the intensity of the burns with our custom "spice" level! The system is fully voice-interactive, running locally without needing a constant internet connection, but can also be used in a text-only mode.

How we built it

We built Flatshare Chaos using a modular, Python-based architecture to simulate the complex social dynamics of a shared living space.

  • Core Simulation: The heart of the project is a custom engine that manages the state of each AI roommate, including their mood (mood_system.py) and their relationships with others (relationship_engine.py).
  • Personalities: The personality of each roommate is powered by a fine-tuned version of the open-source gpt-oss:20b model, running locally. The personality_engine.py manages distinct, context-aware prompts for each agent, allowing us to craft unique characters—from a sarcastic artist to a hyper-enthusiastic tech bro—all on a single machine.
  • Dynamic 'Spice' Engine: We didn't just want roasts; we wanted control. We developed a "spice" system that lets the user dial the intensity of the roasts from 1 to 5. This spice value is fed directly into the model's prompt and our custom scoring algorithm, which calculates the quality of the burn in real-time. The formula is: $$ s = \min(10.0, \text{base} + 0.6 \times \text{spice}) $$ This allows us to quantify the heat and adds another layer of dynamic control to the simulation.
  • Voice I/O: For a truly immersive experience, we implemented a fully offline voice interface on macOS. We used the Vosk library for speech-to-text and pyttsx3 for text-to-speech, allowing for natural, real-time conversation.
  • Conversation Flow: The conversation_analyzer.py sits at the center, interpreting the user's speech and deciding which roommate should respond, creating a dynamic, multi-participant conversation.

Challenges we ran into

  1. Consistent Personalities: Getting an LLM to consistently maintain a specific, nuanced personality without "drifting" was a major challenge. It required extensive prompt engineering and a system to manage conversational context for each individual agent.
    1. Offline Voice Latency: Integrating local speech-to-text and text-to-speech required careful handling of audio streams and model loading to keep the conversation feeling fluid and responsive without cloud-based services.
    2. Multi-Agent Orchestration: In a conversation with multiple agents, who speaks when? We had to develop a system to manage conversational turns, prevent agents from talking over each other, and ensure their responses were relevant to the ongoing group dynamic. It was, true to the name, chaotic to manage.

Accomplishments that we're proud of

  • Truly Funny AI: We're incredibly proud of creating AI agents that are genuinely funny and have believable, distinct personalities. The "roast" dynamic works better than we expected.
    • The 'Spice' Engine: Designing a system to not only influence the AI's creativity but also to objectively score the "burn" of a roast was a fun and unique challenge.
    • Offline-First Voice Interaction: Building a smooth, real-time, and completely local voice interface on macOS was a significant technical achievement.

What we learned

This project was a deep dive into the practicalities of building personality-driven AI. We learned a ton about advanced prompt engineering, the complexities of state management for multi-agent systems, and the technical hurdles of integrating local, real-time voice processing. Most importantly, we learned that the future of human-AI interaction might be less about utility and more about connection and entertainment.

What's next for flatshare-chaos

We're just getting started with the chaos! Here's what we're thinking:

  • Web Interface: We've laid the groundwork for a server backend, and a full web UI is the next logical step to make the experience more accessible.
  • Long-Term Memory: We want to expand the memory_manager to give the roommates memory of past interactions, allowing relationships and inside jokes to develop over time.
  • More Roommates & Scenarios: Introducing new personalities and creating specific household scenarios (like arguments over chores or planning a party) to drive more complex interactions.
  • Cross-Platform Support: Expanding beyond macOS to make Flatshare Chaos available to a wider audience.

Built With

Share this project:

Updates