Inspiration

Inspired by the anime Oshi no Ko season 3, which just finished last week, I wanted to share the dark underbelly of the entertainment industry. I am especially interested in how characters like idols, directors and managers often exist as manufactured personas, and how relationships behind the scenes are driven by power, incentives, and hidden agendas.

Because of this idea of lies and constructed identities, AI felt like a natural fit. It allows characters to gossip, lie, and react dynamically, mirroring how people in the industry perform different versions of themselves. It even leverages AI's tendency to hallucinate to make the murder mystery intentionally build ambiguity. It also allows replay-ability and completely new story lines each play-through.

SPOILER WARNING! Following the events of the anime's first episode, this led to the idea of a murder mystery of the main character Ai Hoshino where truth of the killing isn’t given, but extracted. Also, AI is literally in the name.

What it does

AI☆no☆Ko is an AI-driven murder mystery game set in the idol entertainment industry.

You play as Ai’s son, Aqua, investigating a network of suspects within the entertainment industry. As Aqua, you interact with characters via AI-powered chat, using elicitation techniques (such as flattery, misdirection, and probing etc) to extract hidden information. The goal: identify the killer before the system turns against you.

Each NPC is driven by structured LLM prompts and a shared world state, enabling persistent memory, trust, and suspicion levels across conversations that influence responses. Dialogue is dynamically generated through prompting that changes based on prior interactions and evolving relationships. The system also includes NPC-to-NPC gossip and backchannel communication, allowing characters to share information independently and influence future interactions. As tensions rise, NPCs become more aware of your intentions.

Core gameplay systems include:

  • A deal engine for task-based information exchange
  • Observable gossiping between NPCs
  • A stateful extraction pipeline that updates clues, memory, suspicion and helpers.
  • All generative dialogue, conditional logic and storylines performed by LLM.

How we built it

  • Frontend: Next.js + React (interactive dialogue system, notebook, relationship map)

  • Backend: API routes handling game state, NPC responses, and deal logic

  • AI integration: LLM-powered NPCs using structured prompts for:

    • Dialogue generation
    • Information extraction
    • Dynamic reactions (gossip, backchannel communication)
  • Game engine: Custom state system managing:

    • World state (clues, deals, relationships)
    • NPC memory and suspicion

Challenges we ran into

  • Balancing AI freedom vs structure
    It was really challenging balancing how freely the AI could speak where there wouldn't be a coherent storyline, or too much structure where it feels scripted, defeating the purpose of using AI. Additionally, I wanted to NPCs to be in character and not aware that the player is investigating, which made it harder for them to give clues. Overall, it was difficult designing a system where clues feel natural without giving away the killer too early .

  • State management complexity
    Another big challenge was tracking relationships, deals, and evolving NPC knowledge in real time. This was something I hadn’t worked on before, so it required careful use of data structures to manage state effectively. At the same time, I had to be mindful of how much information was sent in each API call, balancing tokens/message to prevent crashes on the free plan.

Accomplishments that we're proud of

I built something that felt almost impossible before, and am proud to try to mimic a show I really like through an AI-driven system. The NPCs feel alive and react not just to the player but to each other through gossip, helping capture the feel of an industry built on relationships and hidden agendas.

In particular, I also designed a deal-based progression system with clear stages (making the deal, completing it, and reporting back) which makes information feel earned. Finally, through system prompting, the characters feel relatively similar to their anime counterparts, which was important for preserving the tone of the experience. Designing the UI was also super fun, mimicking old retro games I loved to play.

What we learned

Having an idea that genuinely felt fun helped prevent burnout and made me want to keep building and exploring the project. Also having a purpose - to share this side of the industry and try to practice elicitation questioning - helps me a lot with direction in gameplay mechanics.

On the technical side, I learned that AI performs best when guided by strong prompts and structured scenarios, rather than being left fully open-ended. I also gained hands-on experience with Next.js and React, which I wasn't too familiar in, and developed a better understanding of how to preserve information through memory systems for NPCs. I also realised how much small UI/UX changes can really have a big difference.

What's next for AI☆no☆Ko

With more time, I plan to improve the AI prompting to make conversations feel more natural and to create more concrete, cohesive storylines. I also want to introduce multiple endings based on player choices and accusations. In terms of gameplay, I want add more rooms and discoverable items to deepen the investigation experience. It would also be really cool to enhance immersion through music or voice acting making interactions feel more alive, but copyright will probably be an issue.

Built With

Share this project:

Updates