How pratik-aher-01/persona works
Persona is a browser-native embodied interface for AI agents: people provide speech, an external agent reads the transcript and invokes WebMCP tools, and the page presents spoken/avatar responses plus structured mission progress and results. The principal path is microphone/STT through the app to the agent-facing tools, then tool effects on avatar, voice, and task state, rendered back to the person. The graph preserves documented avatar, voice, fallback, and mock-agent capabilities. Some connections rely on README descriptions because implementation excerpts are partial.
Main entry points: App.tsx Persona App · PersonaAvatarRuntime.ts VRM Runtime · registerTools.ts WebMCP Tools · AgentMissionPanel.tsx Mission Panel
Components 25
Interaction Surface
- Persona App
src/App.tsx - WebMCP Tools
src/webmcp/registerTools.ts - Conversation Agent
src/agent/ConversationAgent.ts - Mock Agent
src/dev/MockAgent.ts - Mock Console
src/dev/MockAgentConsole.tsx - Transcript UI
src/components/ConversationTranscript.tsx
Speech Session
- Turn Session
src/session/ConversationSession.ts - Speech Recognition
src/utils/stt.ts - Voice Manager
src/voice/VoiceEngine.ts - Browser TTS
src/voice/BrowserVoiceEngine.ts
Avatar Embodiment
- 3D Avatar View
src/avatar/PersonaAvatar.tsx - VRM Runtime
src/avatar/PersonaAvatarRuntime.ts - Expressions
src/avatar/expressions.ts - Gaze Tracking
src/avatar/gaze.ts - Gesture Animation
src/avatar/animation/gestures.ts - Idle Animation
src/avatar/animation/idle.ts - Humanization
src/avatar/behavior/humanizationEngine.ts - 2D Avatar
src/components/Avatar2D.tsx
Mission Workspace
- Mission Panel
src/components/AgentMissionPanel.tsx - Task Store
src/tasks/taskStore.ts - Task Models
src/tasks/taskTypes.ts - Result Card
src/components/ResultDisplayCard.tsx - Session Memory
src/memory/sessionMemory.ts
Other components
- Human
- External Agent
Connections 28
- Human → Speech Recognition: speaks to
README.md - Speech Recognition → Persona App: transcribes for
README.md - Persona App → Turn Session: coordinates turns
src/App.tsx - Persona App → Transcript UI: renders
src/App.tsx - External Agent → WebMCP Tools: calls tools
README.md - WebMCP Tools → Speech Recognition: reads transcript
README.md - WebMCP Tools → Task Store: updates tasks
src/webmcp/registerTools.ts - Task Store → Task Models: stores
src/tasks/taskStore.ts - Persona App → Mission Panel: renders
src/App.tsx - Mission Panel → Task Store: subscribes to
src/components/AgentMissionPanel.tsx - Mission Panel → Result Card: renders
src/components/AgentMissionPanel.tsx - WebMCP Tools → VRM Runtime: controls avatar
README.md - WebMCP Tools → Voice Manager: requests speech
README.md - Persona App → Voice Manager: uses
src/App.tsx - Voice Manager → Browser TTS: delegates to
src/voice/VoiceEngine.ts - Persona App → 3D Avatar View: renders
src/App.tsx - 3D Avatar View → VRM Runtime: mounts
src/avatar/PersonaAvatar.tsx - VRM Runtime → Expressions: updates
src/avatar/PersonaAvatarRuntime.ts - VRM Runtime → Gaze Tracking: updates
src/avatar/PersonaAvatarRuntime.ts - VRM Runtime → Gesture Animation: updates
src/avatar/PersonaAvatarRuntime.ts - VRM Runtime → Idle Animation: updates
src/avatar/PersonaAvatarRuntime.ts - VRM Runtime → Humanization: updates
src/avatar/PersonaAvatarRuntime.ts - Humanization → Gesture Animation: triggers
src/avatar/behavior/humanizationEngine.ts - Persona App → 2D Avatar: offers fallback
README.md - Persona App → Conversation Agent: uses
src/App.tsx - Mock Console → Mock Agent: hosts
src/dev/MockAgentConsole.tsx - Mock Agent → WebMCP Tools: exercises
src/dev/MockAgent.ts - Persona App → Mock Console: renders
src/App.tsx