How zarmoin/magxr works
MagXR is an AI-assisted XR magnification system: voice commands are captured or received, interpreted into magnification parameters, paused for user confirmation, then dispatched over WebSockets to Unity for view changes or spatial checkpoint actions. The graph preserves those stages and the Unity confirmation UI and controller. The README contains no capability detail beyond the product context; several agent and Unity internals are only partially sampled, so uncertain links are omitted.
Main entry points: MagXRWebSocketClient.cs Unity WebSocket Client · prompt_parser.py Speech Parsing · agent.py Agent Orchestrator · server.py WebSocket Server
Components 11
Voice Input
- Audio Capture
voiceCommand.py
Command Intelligence
- Speech Parsing
src/magxr/prompt_parser.py
Agent and Bridge
- Agent Orchestrator
src/magxr/agent.py - Magnification Tools
src/magxr/agent.py - WebSocket Server
src/magxr/server.py
Unity XR Runtime
- Unity WebSocket Client
unity/MagXRWebSocketClient.cs - Confirmation Canvas
unity/WorldSpaceConfirmationCanvas.cs - Magnifier Controller
unity/MagnifierController.cs
Other components
- XR User
- Gemini AI
- XR Scene
Connections 13
- XR User → Audio Capture: speaks
- Audio Capture → Speech Parsing: audio bytes
promptParser.py - Speech Parsing → Gemini AI: transcribes and parses
src/magxr/prompt_parser.py - Speech Parsing → Agent Orchestrator: structured prompt
src/magxr/agent.py - Agent Orchestrator → Magnification Tools: dispatches tools
src/magxr/agent.py - Agent Orchestrator → WebSocket Server: returns actions
src/magxr/server.py - Unity WebSocket Client → WebSocket Server: sends commands
src/magxr/server.py - WebSocket Server → Unity WebSocket Client: sends confirmation and actions
src/magxr/server.py - Unity WebSocket Client → Confirmation Canvas: dispatches messages
unity/MagXRWebSocketClient.cs - Confirmation Canvas → Unity WebSocket Client: sends confirmation
unity/WorldSpaceConfirmationCanvas.cs - Unity WebSocket Client → Magnifier Controller: forwards action payload
unity/MagXRWebSocketClient.cs - Magnifier Controller → XR Scene: changes view
- XR User → Unity WebSocket Client: issues text command