About Red Thread
Inspiration
We wanted to explore how AI and computer vision could be used to create something genuinely entertaining and interactive. Rather than building another traditional application, we wanted to create an experience where users could step into a different role, interact with AI, and influence how a story unfolds. That idea led us to Red Thread, an AI-powered financial mystery game where players become detectives, interrogate suspects, uncover hidden evidence, and piece together the truth.
What We Learned
Throughout development, we learned how to build personalized AI agents that bring individual characters to life. Each character has their own personality, knowledge, motivations, and secrets, allowing players to have dynamic conversations rather than simply choosing from predetermined dialogue options.
We also explored integrating computer vision and physical interactions into a web application, alongside speech recognition and AI-generated voice outputs. This taught us how different AI technologies can work together to create a more immersive and natural user experience.
How We Built It
We built Red Thread using React and TypeScript for the frontend and Python with FastAPI for the backend. We integrated Gemini and locally hosted models to power character conversations and voice generation.
Each of our characters (5 for the demo) have a personalized AI agent with its own background, personality, and knowledge of the case. A backend system validates character responses and controls when evidence can be revealed, ensuring that the mystery has a consistent underlying truth even while conversations remain dynamic.
We also implemented speech input and generated character voices, allowing players to speak directly with suspects. Using computer vision and MediaPipe, we added hand-tracking capabilities so players can physically interact with the investigation board, move between clues, and navigate the experience.
Challenges We Faced
One of our biggest challenges was balancing the complexity of AI-generated interactions with performance. Generating conversations and voice outputs introduced significant delays, which could interrupt the flow of an otherwise immersive investigation.
We also struggled with voice generation. Some of the voice libraries we experimented with did not consistently capture the intended emotions and tones of different characters. A suspicious character did not always sound suspicious, and emotional dialogue could sometimes feel unnatural.
To address these challenges, we experimented with different AI models, integrated local fallback systems, optimized voice generation through caching and parallel processing, and refined how character personalities influenced their dialogue and delivery.
Ultimately, Red Thread taught us that building an engaging AI experience involves much more than simply connecting to an AI model. It requires carefully coordinating different technologies, designing reliable interactions, and making sure the technology enhances the experience rather than distracting from it.
Built With
- fastapi
- framermotion
- geminiai
- mediapipe
- ollama
- python
- react
- sqlite
- typescript
- vite