05
Inner Circle
AI-Powered Browser Game — 2026 →
Problem
Narrative games with NPCs feel scripted — characters follow decision trees, not motivations. I wanted followers that could genuinely surprise the player: scheme, leak thoughts under pressure, recruit sub-followers based on their own loyalty arc. No existing framework combined structured game mechanics with open-ended LLM reasoning at this granularity.
Approach
Built a clean-architecture Python backend where the engine is pure business logic and agents are stateless LLM wrappers that receive full context per call and return validated JSON. All follower reactions are batched into a single LLM call per round for cost control. The frontend uses React with useReducer and raw WebSockets. A provider abstraction lets me swap between OpenAI and Google GenAI with an env var.
Outcome
Shipped a playable game with 5+ failure conditions, thought-leak mechanics, a reputation system, and three visual themes. The biggest surprise was how much personality emerges from well-structured system prompts — followers with high outgoing stats and low loyalty genuinely feel like they're plotting. Learned that batching LLM calls is essential for cost, and Pydantic schemas as the agent-engine contract eliminate an entire class of integration bugs.