How kiramayatu/open-llm-vtuber-hana works
Open-LLM-VTuber is a voice-interactive AI companion with a Live2D avatar. Its main interaction path runs from a web/desktop client through server routes and conversation handling, using configured speech recognition and an agent/LLM before producing spoken, avatar-aware output. Chat history, MCP tools, and artifact workspaces provide supporting capabilities. The graph combines sampled source references with README-documented features; several provider implementations and client details are not shown, so their internal wiring is not expanded.
Main entry points: service_context.py Service context · routes.py API routes · conversation_handler.py Conversation handler · tts_manager.py Speech output
Components 21
Client and server
- Web client
web_tool/main.js - HTTP server
src/open_llm_vtuber/server.py - API routes
src/open_llm_vtuber/routes.py - WebSocket handler
src/open_llm_vtuber/websocket_handler.py - Configuration
src/open_llm_vtuber/config_manager/main.py
Conversation and agents
- Service context
src/open_llm_vtuber/service_context.py - Conversation handler
src/open_llm_vtuber/conversations/conversation_handler.py - Persona prompts
prompts/prompt_loader.py - Agent factory
src/open_llm_vtuber/agent/agent_factory.py - Memory agent
src/open_llm_vtuber/agent/agents/basic_memory_agent.py - LLM factory
src/open_llm_vtuber/agent/stateless_llm_factory.py
Speech and avatar
- Speech recognition
src/open_llm_vtuber/asr - Voice activity detection
src/open_llm_vtuber/vad - Speech output
src/open_llm_vtuber/conversations/tts_manager.py - TTS providers
src/open_llm_vtuber/tts/tts_factory.py - Live2D avatar
src/open_llm_vtuber/live2d_model.py
Tools and persistence
- Chat history
src/open_llm_vtuber/chat_history_manager.py - MCP tools
src/open_llm_vtuber/mcpp/tool_executor.py - Artifact workspace
src/open_llm_vtuber/artifacts/manager.py
Other components
- User
- LLM provider
Connections 24
- User → Web client: interacts
README.md - Web client → HTTP server: sends requests
- HTTP server → API routes: mounts routes
src/open_llm_vtuber/server.py - HTTP server → Service context: initializes
src/open_llm_vtuber/server.py - API routes → WebSocket handler: routes messages
src/open_llm_vtuber/routes.py - API routes → Service context: uses services
src/open_llm_vtuber/routes.py - API routes → Artifact workspace: manages artifacts
src/open_llm_vtuber/routes.py - Configuration → Service context: configures
- WebSocket handler → Conversation handler: dispatches conversation
- Service context → Agent factory: creates agent
src/open_llm_vtuber/service_context.py - Service context → Speech recognition: initializes speech recognition
src/open_llm_vtuber/service_context.py - Service context → Voice activity detection: initializes voice detection
src/open_llm_vtuber/service_context.py - Service context → TTS providers: initializes speech output
src/open_llm_vtuber/service_context.py - Service context → MCP tools: initializes tools
src/open_llm_vtuber/service_context.py - Conversation handler → Chat history: uses chat history
src/open_llm_vtuber/conversations/conversation_handler.py - Conversation handler → Persona prompts: loads prompts
src/open_llm_vtuber/conversations/conversation_handler.py - Conversation handler → Speech output: generates spoken replies
- Agent factory → Memory agent: creates agent
src/open_llm_vtuber/agent/agent_factory.py - Agent factory → LLM factory: creates LLM
src/open_llm_vtuber/agent/agent_factory.py - Memory agent → LLM factory: uses LLM
- LLM factory → LLM provider: selects provider
src/open_llm_vtuber/agent/stateless_llm_factory.py - Speech output → TTS providers: uses TTS engine
- Speech output → Live2D avatar: prepares avatar payload
src/open_llm_vtuber/conversations/tts_manager.py - Speech output → Web client: sends audio payload