Skip to content

hmoskios/WalkXR-AI-Simulation

Repository files navigation

WalkXR Multi-Agent Simulation Engine

A multi-agent simulation system for testing and evaluating WalkXR gaming experiences using LLM-driven personas and structured rubric scoring.


What is WalkXR?

WalkXR is an immersive, game-based platform that uses interactive storytelling, emotional regulation practices, and ritualized play. Participants progress through guided “walks” designed to support growth, reflection, and behavioral change. There are four different WalkXR games that exist:

  1. WalkXR PlayNow is an digital coaching experience for athletes and teams that combines mental performance training, emotional regulation practices, and reflection. It is designed to help players thrive on and off the field.

  2. WalkXR Diabetes is a empowering experience that blends diabetes education with play, humor, and reflection. It helps participants challenge myths, build confidence, and strengthen their emotional relationship to diabetes in a judgment-free way.

  3. Big Joy is a “hero’s journey of joy” where participants build joy through seven evidence-based micro-acts, including gratitude, kindness, perspective shifting, awe, and celebrating others.

  4. The Veterans Walk supports transition from the internal “Command Voice” of survival and control toward connection and relational strength.


Purpose of This Simulation System

This project simulates WalkXR experiences using AI agents in order to:

  • Prototype new walk concepts
  • Evaluate facilitator prompts and rituals before deployment
  • Stress-test emotional safety and behavioral impact
  • Compare different walk strategies across personas

The system enables rapid experimentation without requiring live user testing.


System Architecture

The simulation is built as a multi-agent workflow using LangGraph.

Agents

There are three AI agents deployed in the simulation, which are all powered by Gemini 2.0 Flash via API.

  1. Facilitator Agent: Generates ritual-based prompts aligned with walk goals.

  2. Evaluator Agent: Scores each prompt using a structured 5-dimension rubric: Relevance, Emotional Safety, Clarity, Forward Movement, and Behavioral Nudge.

  3. Persona Agent: Simulates an in-character participant response.


Simulation Workflow

When a simulation is run, the following steps are automatically executed:

  1. The Persona Agent completes the pre-walk well-being survey.
  2. The Facilitator Agent generates a ritual-based prompt for the persona.
  3. The Evaluator Agent assesses the prompt against a rubric.
  4. The Persona Agent responds to the prompt in-character.
  5. Steps 2-5 are repeated until num_turns is reached
  6. The Persona Agent completes the post-walk well-being survey.
  7. The results are packaged and exported to Google Sheets for review.

Tech Stack

  • Python 3.11+
  • LangGraph (stateful multi-agent orchestration)
  • Google Gemini API (LLM inference)
  • Google Sheets API (data storage + experiment logging)
  • gspread + Google service account authentication

Data Flow

Input

  • Persona profile information (loaded from Google Sheets)
  • Walk ID
  • Number of turns

Output

  • Pre-walk well-being survey responses
  • Turn-by-turn prompt + rubric evaluation + persona response
  • Post-walk well-being survey responses
  • Structured export to Google Sheets

Installation & Setup

1️⃣ Clone Repository

git clone https://github.com/yourusername/walkxr-simulation.git
cd walkxr-simulation

2️⃣ Install Dependecies

pip install -r requirements.txt

3️⃣ Set Environment Variables

Set the following:

export GEMINI_API_KEY="your_key_here"
export SPREADSHEET_ID="your_sheet_id"
export GOOGLE_SERVICE_ACCOUNT_JSON="/path/to/service_account.json"

4️⃣ Google Sheets Setup

Required tabs:

  • User Personas: Database containing the user persona profiles to be deployed in the simulation. Includes information such as a persona ID, name, age, location, occupation, personality traits, and reason(s) for joining the walk.
  • Simulation Results: Database containing the results of each simulation. Includes the WalkXR type (PlayNow, Diabetes, Big Joy, or Veterans), persona ID, pre-/post-walk survey responses, and the prompts/rubric evaluations/persona responses.

Ensure the service account email has access to the spreadsheet.


Running the Simulation

Edit the following three lines in run_simulation.py:

WALK_ID = # enter either "playnow", "diabetes", "big_joy", or "veterans"
NUM_TURNS = # enter any integer
PERSONA_ID = # enter a persona ID from the "User Personas" Google Sheets tab

Then run:

python run_simulation.py

Results will automatically export to the configured Google Sheet.


Disclosure

This project was developed with permission for public demonstration. It contains no proprietary internal data, user information, or confidential materials.

About

Multi-agent platform for simulating WalkXR gaming experiences using LangGraph and Gemini.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages