How utkarsh56016/kira-hypragent works
Kira HyprAgent is a local-first Linux desktop assistant. CLI requests travel over a Unix socket to the daemon and then into ContextEngine, which routes deterministic desktop or sysadmin actions, retrieves RAG context, or uses local LLM and optional cloud fallback. Voice input follows a separate wake-word → transcription → context → speech-output loop. The graph preserves the documented dashboard and retrieval capabilities; unsampled subsystem connections are omitted where the excerpts and index do not establish them.
Main entry points: context_engine.py Context engine · daemon.py Socket daemon · pipeline.py Voice pipeline · base_plugin.py Command plugin API
Components 27
Assistant runtime
- CLI client
src/cli.py - Socket daemon
src/daemon.py - Configuration
src/config.py - Context engine
src/context/context_engine.py - Intent router
src/context/router.py - System state
src/context/state_gatherer.py - Input sanitizer
src/context/sanitizer.py - Ollama client
src/llm.py - Gemini fallback
src/context/cloud_fallback.py
Desktop and system commands
- Command plugin API
src/commands/base_plugin.py - Desktop commands
src/commands/dms_plugin.py - Hyprland adapter
src/commands/hyprland/hyprctl.py - Niri adapter
src/commands/niri/niri_control.py - Sysadmin safety
src/commands/sys_admin_plugin.py
Voice interaction
- Voice pipeline
src/voice/pipeline.py - Wake detection
src/voice/wake/openwakeword.py - Speech transcription
src/voice/stt/faster_whisper.py - Speech synthesis
src/voice/tts/piper.py - Wake suppression
src/voice/output_gate.py
Knowledge retrieval
- Hybrid retrieval
src/rag/hybrid.py - Vector retrieval
src/rag/vector.py - Hierarchical retrieval
src/rag/parent_child.py - Graph retrieval
src/rag/graph.py - RAG indexer
src/rag/indexer.py - RAG dashboard
src/rag/dashboard.py
Other components
- User
- Ollama service
Connections 34
- User → CLI client: submits request
README.md - CLI client → Socket daemon: sends socket request
README.md - Socket daemon → Configuration: loads settings
src/daemon.py - Socket daemon → Context engine: dispatches request
src/daemon.py - Socket daemon → Hyprland adapter: selects adapter
src/daemon.py - Socket daemon → Niri adapter: selects adapter
src/daemon.py - Socket daemon → Voice pipeline: starts pipeline
src/daemon.py - Context engine → Intent router: classifies intent
src/context/context_engine.py - Context engine → System state: gathers state
src/context/context_engine.py - Context engine → Input sanitizer: sanitizes input
src/context/context_engine.py - Context engine → Gemini fallback: falls back
src/context/context_engine.py - Context engine → Sysadmin safety: checks privileged action
src/context/context_engine.py - Context engine → Desktop commands: dispatches command
src/context/context_engine.py - Context engine → Hybrid retrieval: retrieves context
src/context/context_engine.py - Socket daemon → Ollama client: configures client
src/daemon.py - Ollama client → Ollama service: requests generation
src/llm.py - Command plugin API → Desktop commands: defines interface
src/commands/dms_plugin.py - Command plugin API → Hyprland adapter: defines interface
src/commands/hyprland/hyprctl.py - Command plugin API → Niri adapter: defines interface
src/commands/niri/niri_control.py - Command plugin API → Sysadmin safety: defines interface
src/commands/sys_admin_plugin.py - Voice pipeline → Wake detection: starts listener
src/daemon.py - Voice pipeline → Speech transcription: starts transcriber
src/daemon.py - Voice pipeline → Speech synthesis: starts synthesizer
src/daemon.py - Voice pipeline → Context engine: processes speech
src/voice/pipeline.py - Voice pipeline → Wake suppression: marks interaction
src/voice/pipeline.py - Wake detection → Wake suppression: checks suppression
src/voice/wake/openwakeword.py - Speech synthesis → Wake suppression: marks playback
src/voice/tts/piper.py - Hybrid retrieval → Vector retrieval: retrieves vectors
src/rag/hybrid.py - Hybrid retrieval → Hierarchical retrieval: retrieves config
src/rag/hybrid.py - Hybrid retrieval → Graph retrieval: retrieves dependencies
src/rag/hybrid.py - RAG indexer → Hierarchical retrieval: builds chunks
src/rag/indexer.py - RAG indexer → Vector retrieval: indexes vectors
src/rag/indexer.py - RAG indexer → Graph retrieval: builds graph
src/rag/indexer.py - User → RAG dashboard: views retrieval
README.md