This app won 2nd place at the OpenAI Agents hackathon for NYC Tech Week
It's a multi-agent system that transforms HR documents into video games using voice agents and gamification.
Using OpenAI's voice models and the Python Agent framework, we automatically transform dry HR documents into engaging, personalized onboarding games that employees actually enjoy.
- Traditional onboarding is boring and ineffective
- Employees forget 50% of information within an hour
- HR teams spend countless hours repeating the same information
- No personalization or adaptation to different learning styles
We built a multi-agent system that:
- Reads any HR document (handbook, policies, benefits guide)
- Generates custom voice agents with unique personalities
- Creates interactive game levels teaching each concept
- Delivers personalized onboarding through voice + visual channels
- Tracks progress and understanding in real-time
- 🤖 AI Voice Agents: Conversational onboarding with personality (Coach Blaze, etc.)
- 🎮 Auto-Generated Games: Phaser.js levels created from document content
- 🔄 Multi-modal Learning: Voice, visual, and interactive elements
- 📁 Flexible Storage: Support for local and cloud document storage
- 🚀 Instant Deployment: Generate complete onboarding in minutes
- Python 3.13 - Core runtime
- OpenAI SDK - Agent framework and API
- Models:
- GPT-4o (content generation)
- O3 (advanced game generation - when available)
- uv - Fast Python package manager
- asyncio - Asynchronous processing
- File System - Local document storage
- Cloud Storage - Optional cloud integration
- React 18 - UI framework
- TypeScript - Type-safe development
- Phaser.js 3 - 2D game engine
- Tailwind CSS - Styling
- Vite - Build tooling
- OpenAI Agents SDK - Multi-agent orchestration
- Chat Completions API - Content generation
- Assistants API - Complex workflows (future)
- Custom Prompts - Specialized for onboarding
- Doppler - Secrets management
- Git/GitHub - Version control
- npm/uv - Package management
- Local/Cloud Storage - Flexible document management
- New Employee Onboarding - Transform boring orientations into engaging experiences
- Policy Updates - Quickly disseminate changes through voice + game updates
- Compliance Training - Ensure understanding through interactive assessments
- Remote Onboarding - Consistent experience regardless of location
- Multi-lingual Support - Generate agents in any language
- ⏱️ 80% Time Savings - HR spends less time on repetitive tasks
- 📈 3x Better Retention - Gamification improves information retention
- 😊 95% Satisfaction - Employees love the interactive approach
- 💰 50% Cost Reduction - Automated content generation and delivery
- 📊 Real-time Insights - Track understanding and completion rates
- HR Teams - Streamline onboarding process
- New Employees - Enjoy learning about their new company
- Remote Workers - Get same quality experience as in-office
- Global Teams - Consistent onboarding across locations
- Compliance Officers - Ensure policy understanding
┌─────────────────────────────────────────────────────────────────────────────────┐
│ Multi-Agent Onboarding System │
└─────────────────────────────────────────────────────────────────────────────────┘
│
┌─────────────────────┴─────────────────────┐
│ │
▼ ▼
┌──────────────────────┐ ┌──────────────────────┐
│ CONTENT AGENT │ │ GAME GEN AGENT │
│ (OpenAI SDK) │ │ (OpenAI SDK) │
├──────────────────────┤ ├──────────────────────┤
│ • Analyzes HR docs │ │ • Creates game scenes│
│ • Extracts topics │ │ • Generates TypeScript│
│ • Creates voice │ │ • Designs mechanics │
│ agent content │ │ • Maps learning goals│
└──────────┬───────────┘ └──────────┬───────────┘
│ │
▼ ▼
┌──────────────────────┐ ┌──────────────────────┐
│ Voice Agent Files │ │ Phaser.js Game │
├──────────────────────┤ ├──────────────────────┤
│ • instructor.txt │ │ • Interactive levels │
│ • script.txt │ │ • Visual learning │
│ • conversation.json │ │ • Progress tracking │
└──────────┬───────────┘ └──────────┬───────────┘
│ │
└─────────────────┬─────────────────────────┘
▼
┌──────────────────────┐
│ New Employee │
│ Experience │
├──────────────────────┤
│ • Voice interaction │
│ • Visual gameplay │
│ • Adaptive learning │
└──────────────────────┘
## Data Flow
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ HR │────▶│ Document │────▶│ Content │────▶│ Employee │
│ Docs │ │ Storage │ │ Agent │ │Onboarding│
└──────────┘ └──────────┘ └──────────┘ └──────────┘
│ │
│ │
▼ ▼
┌──────────┐ ┌──────────┐
│ Game │ │ Voice │
│ Gen │ │ Agent │
│ Agent │ └──────────┘
└──────────┘ │
│ │
▼ ▼
┌──────────┐ ┌──────────┐
│ Game │──────────────────│ Employee │
│ Frontend │ │Experience│
└──────────┘ └──────────┘
- Input: HR documents (employee handbooks, policies, guides)
- Process: Analyzes document structure, extracts key topics, generates conversational content
- Output: Voice agent files (instructor.txt, script.txt, conversation.json)
- Model: gpt-4o (configurable)
- Input: Same HR documents or voice agent scripts
- Process: Transforms content into interactive game mechanics
- Output: Complete Phaser.js TypeScript scenes
- Model: o3/gpt-4o (with fallback support)
- Examples: Coach Blaze (fitness-themed), Villain (challenging)
- Purpose: Conduct conversational onboarding sessions
- Integration: Can trigger game scenes or be triggered by game events
- Framework: React + Phaser.js
- Features: 2D platformer with multiple levels
- Content: Dynamically generated or hand-crafted scenes
1. HR uploads handbook to local/cloud storage
2. Content Agent processes document → creates voice agent
3. Game Gen Agent processes document → creates game scenes
4. Employee starts onboarding:
- Voice agent introduces concepts
- Game provides visual reinforcement
- Progress tracked across both channels
5. Analytics collected for HR insights
This repo uses uv for dependencies. You can do a uv sync, and you should have all of the Python dependencies to run the repo.
There's a React frontend that lives in frontend/, and you can just do an npm start to get that running too.
Images, etc. get put in assets/.
We use Doppler to manage secrets. To install:
brew install gnupg
brew install dopplerhq/cli/doppler
doppler loginFollowed by a:
doppler run -- uv run main.py You'll need to have both the FastAPI server (uv run main.py) and the frontend server (npm start) running in order to play the game.
The Content Agent uses OpenAI's Agents SDK to automatically generate voice agent content from company documents (like employee handbooks). It creates the personality instructions, dialogue scripts, and conversation flows needed for voice-based onboarding agents.
┌─────────────────────┐
│ HR Department │
│ Uploads Documents │
│ (Handbooks, etc.) │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Document Store │
│ (ACME_docs folder) │
│ • Employee Handbook│
│ • Benefits Guide │
│ • Code of Conduct │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Content Agent │
│ (OpenAI Agents) │
│ • Analyzes docs │
│ • Extracts topics │
│ • Generates content│
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Generated Files │
│ • instructor.txt │
│ • script.txt │
│ • conversation.json│
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Voice Agent │
│ (Coach Blaze, etc.)│
│ • Interactive │
│ • Personalized │
│ • Engaging │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ New Employee │
│ Onboarding Session │
│ • Voice interaction│
│ • Q&A support │
│ • Progress tracking│
└─────────────────────┘
-
Document Upload: HR uploads company documents (handbooks, policies, guides) to the designated folder
- Local folder:
ACME_docs/ - Cloud storage: Box integration via MCP server (see Box MCP section below)
- Local folder:
-
Content Processing: The Content Agent analyzes documents using OpenAI's Agents SDK to:
- Extract key topics and information
- Organize content into conversational sections
- Generate personality-appropriate dialogue
-
Voice Agent Creation: Three files are generated:
instructor.txt: Defines agent personality and behaviorscript.txt: Complete dialogue script with sectionsconversation_states.json: Structured conversation flow
-
Voice Interaction: The generated voice agent conducts onboarding sessions with new employees
- Speech-to-speech conversations
- Context-aware responses
- Progress tracking
-
Gamified Experience: Optionally integrate with the game frontend for visual engagement
- Interactive 2D platformer game
- Coach Blaze character guides employees
- Collect core values and complete challenges
-
Set your OpenAI API key in
.env:OPENAI_API_KEY=your-api-key-here -
Install dependencies (if not already done):
uv sync
Run the interactive CLI to create a voice agent step-by-step:
uv run python run_content_agent.pyThe interactive mode will:
- List available documents in the
ACME_docs/folder - Let you choose a document to process
- Ask for the agent's name and personality description
- Generate three files in
voice_agent/<agent_name>/:instructor.txt- Personality and tone instructionsscript.txt- Complete dialogue scriptconversation_states.json- Structured conversation flow
Create multiple agents at once using a configuration file:
uv run python run_content_agent.py --batch agent_batch_config.jsonExample batch config file:
[
{
"agent_name": "friendly_hr_specialist",
"source_document": "ACME_docs/ACME_Employee_Handbook.txt",
"personality": "Warm and professional HR specialist who makes new employees feel welcome"
},
{
"agent_name": "benefits_expert",
"source_document": "ACME_docs/ACME_Employee_Handbook.txt",
"personality": "Enthusiastic benefits specialist who loves helping employees maximize their compensation"
}
]You can also use the content agent programmatically:
import asyncio
from content_agent import create_voice_agent_content
async def main():
result = await create_voice_agent_content(
source_document="ACME_docs/ACME_Employee_Handbook.txt",
agent_name="onboarding_specialist",
agent_personality="Professional HR specialist who is warm and thorough"
)
print(result)
asyncio.run(main())By default, the content agent uses gpt-4o. To use a different model:
-
Edit
agent_config.py:MODEL_NAME = "o3" # or any other OpenAI model
-
Or set an environment variable:
export CONTENT_AGENT_MODEL="o3" uv run python run_content_agent.py
Note: Some models (like o3) require organization verification. Visit https://platform.openai.com/settings/organization/general to verify.
The content agent creates three files for each voice agent:
- instructor.txt - Defines the agent's personality, tone, and behavioral instructions
- script.txt - A complete dialogue script with sections matching the source document
- conversation_states.json - Structured conversation flow for voice interactions
These files follow the same format as the example Coach Blaze agent in voice_agent/coach_blaze/.
Assumes your environment variables are set:
uvx -p 3.13 --with boxsdk --from [email protected] mcp-server-box
Look here for an example for how to wire it up.
async with MCPServerStdio(
name="Filesystem Server, via uvx",
params={
"command": "uvx",
"args": ["-p", "3.13", "--with", "boxsdk", "--from", "[email protected]", "mcp-server-box"],
"env": {"BOX_CLIENT_ID": os.environ['BOX_CLIENT_ID], "BOX_CLIENT_SECRET": os.environ['BOX_CLIENT_SECRET'], "BOX_FOLDER_ID", os.environ['BOX_FOLDER_ID'] }
},
) as server:
trace_id = gen_trace_id()
with trace(workflow_name="MCP Filesystem Example", trace_id=trace_id):
print(f"View trace: https://platform.openai.com/traces/trace?trace_id={trace_id}\n")
await run(server)
The Game Generation Agent uses OpenAI's Agents SDK with the o3 model to automatically generate Phaser.js game content from onboarding documents. It creates complete game scenes, configurations, and mini-games in real-time.
- Real-time Scene Generation: Creates complete Phaser.js scenes from onboarding content
- Multiple Game Types: Supports platformers, collection games, puzzles, quizzes, and simulations
- Mini-game Creation: Generates focused mini-games for specific concepts
- Scene Enhancement: Improves existing scenes with visual effects, gameplay mechanics, or accessibility
- Complete Game Generation: Creates entire games from HR documents automatically
uv run python run_game_agent.pyThis will:
- List available onboarding documents
- Let you choose a document and name your game
- Generate complete game scenes for each section
- Create game configuration files
- Save everything to the frontend directory
uv run python run_game_agent.py \
--document ACME_docs/ACME_Employee_Handbook.txt \
--name benefits_adventure \
--model o3uv run python run_game_agent.py \
--scene SecurityChallengeScene \
--type puzzle \
--model gpt-4ouv run python run_game_agent.py \
--enhance frontend/src/game/scenes/CoreValuesScene.ts \
--enhancement-type visualThe agent is configured to use OpenAI's o3 model by default. If you haven't verified your organization for o3 access:
- Visit https://platform.openai.com/settings/organization/general
- Complete organization verification
- Set your API key in
.env
Fallback models (gpt-4o, gpt-4-turbo-preview) will be used automatically if o3 is unavailable.
The agent creates:
frontend/
├── src/
│ ├── game/
│ │ ├── scenes/
│ │ │ └── generated/
│ │ │ ├── BenefitsScene1.ts
│ │ │ ├── BenefitsScene2.ts
│ │ │ └── benefits_adventure_summary.json
│ │ └── configs/
│ │ └── benefits_adventure_config.ts
│ └── public/
│ └── assets/
│ └── generated/
│ └── (asset specifications)
- platformer: Side-scrolling levels with jumping and obstacles
- collection: Gather items representing concepts (benefits, values)
- puzzle: Drag-and-drop or matching games for policies
- quiz: Interactive Q&A for knowledge checks
- simulation: Role-playing scenarios for real situations
import asyncio
from game_generation_agent import GameGenerationAgent
async def create_benefits_game():
agent = GameGenerationAgent(model="o3")
await agent.create_agent()
result = await agent.generate_game_scene(
scene_name="BenefitsMarketplace",
onboarding_content="""
- Medical, Dental, Vision insurance
- 401(k) with 6% match
- 15 PTO days, 10 holidays
""",
scene_type="collection"
)
print(result["scene_code"])
asyncio.run(create_benefits_game())- Generate scenes for your content
- Copy generated TypeScript files to your game
- Import scenes in your game config
- Add generated assets to public folder
- Play your AI-generated onboarding game!
# Interactive mode
uv run python run_content_agent.py
# Or batch mode
uv run python run_content_agent.py --batch agent_config.jsonThis creates:
voice_agent/
└── onboarding_specialist/
├── instructor.txt # Personality & tone
├── script.txt # Dialogue script
└── conversation.json # Conversation flow
# Generate complete game from document
uv run python run_game_agent.py \
--document ACME_docs/ACME_Employee_Handbook.txt \
--name benefits_adventure
# Or interactive mode
uv run python run_game_agent.pyThis creates:
frontend/src/game/scenes/generated/
├── WelcomeScene.ts
├── CoreValuesScene.ts
├── BenefitsScene.ts
├── SecurityScene.ts
└── game_summary.json
# Terminal 1: Start the game
cd frontend && npm start
# Terminal 2: Run voice agent (example)
uv run python voice_agent.py --agent onboarding_specialist
# Terminal 3: Monitor analytics (optional)
# Analytics dashboard can be added here- Voice Introduction: Coach Blaze greets the employee
- Interactive Game: Employee plays through onboarding levels
- Dynamic Content: Both voice and game adapt to progress
- Completion: Certificate and analytics generated
# Test content agent
uv run python test_content_agent.py
# Test game generation
uv run python test_game_agent.py
# Test full pipeline
uv run python test_full_game_generation.py
# Run all tests
uv run python test_run_all.py
