How capsize-games/airunner works
AI Runner is a local-first desktop companion and AI-art workspace backed by a headless service daemon. The primary flow is user conversation through the GUI and daemon to the LLM runtime, with streamed responses returned to the client; companion memory, RAG, and voice are adjacent stages. A separate canvas workflow covers image generation and editing. The README documents additional capabilities such as safety, environmental awareness, and model downloads. Those branches are represented at directory level where source was not sampled; edges are limited to documented package links and sampled calls.
Main entry points: airunner Desktop GUI · server.py HTTP API · llm_services.py LLM client · llm_stream_routes.py LLM streaming
Components 22
Desktop client
- Desktop GUI
src/airunner - LLM client
src/airunner/components/llm/api/llm_services.py - Document routing
src/airunner/components/llm/utils/document_query_routing.py - Daemon client
services/src/airunner_services/daemon_client/gui_daemon_client.py
Daemon and API
- HTTP API
services/src/airunner_services/api/server.py - LLM streaming
services/src/airunner_services/api/routes/llm_stream_routes.py - Model controls
services/src/airunner_services/api/routes/llm_model_routes.py - LLM runtime boundary
services/src/airunner_services/api/routes/llm_runtime.py - Generation worker
services/src/airunner_services/workers/llm_generate_worker.py - Art API
services/src/airunner_services/api/routes/art.py
AI capabilities
- LLM model manager
services/src/airunner_services/model_management/llm_model_manager.py - Companion agents
services/src/airunner_services/agents - Speech services
services/src/airunner_services/api/services/tts_services.py - Image generation
services/src/airunner_services/art/managers/stablediffusion/image_generation.py - Safety filters
services/src/airunner_services/content_safety - Model downloads
services/src/airunner_services/bin - Local weather
services/src/airunner_services/api/routes/geolocation.py
Local state
- Conversation history
services/src/airunner_services/conversations/conversation_history_manager.py - Local database
services/src/airunner_services/database
Other components
- User
- Weather provider
- Model sources
Connections 21
- User → Desktop GUI: interacts
- Desktop GUI → LLM client: submits chat
- LLM client → Daemon client: forwards requests
- Daemon client → HTTP API: calls daemon
- HTTP API → LLM streaming: dispatches stream
- LLM streaming → LLM runtime boundary: resolves client
- LLM streaming → LLM runtime boundary: streams request
- HTTP API → Model controls: dispatches model
- Model controls → LLM runtime boundary: runs actions
- Generation worker → LLM model manager: handles request
- LLM client → Desktop GUI: emits response
- Document routing → LLM client: routes prompt
- Desktop GUI → Art API: requests art
- Art API → Image generation: generates image
- Generation worker → Conversation history: loads history
- Conversation history → Local database: reads and writes
- Model controls → Local database: persists selection
- Desktop GUI → Speech services: uses speech
- HTTP API → Safety filters: applies filtering
- Model downloads → Model sources: downloads models
- Local weather → Weather provider: queries weather