Sign inSign up

seiggy/lucia-agenthost

By seiggy

โ€ขUpdated 8 days ago

Lucia is an open-source, privacy-focused AI assistant for Home Assistant users.

Buildkit cache
Image
Internet of things
Machine learning & AI
Web servers
0

10K+

seiggy/lucia-agenthost repository overview

โ Lucia โ€” Autonomous Home Assistant AI

.NET Agent Framework License Home Assistant

Lucia (pronounced LOO-sha) is an open-source, privacy-focused AI assistant that serves as a complete replacement for Amazon Alexa and Google Home. Built on the Microsoft Agent Frameworkโ  with a multi-agent architecture, Lucia provides autonomous whole-home automation management through deep integration with Home Assistant.

โ ๐ŸŽฏ Key Features

  • ๐Ÿค– Multi-Agent Orchestration โ€” Router, dispatcher, and result aggregator coordinate specialized agents using the A2A protocol
  • ๐Ÿง  Semantic Understanding โ€” Natural language processing using embeddings and semantic search
  • ๐Ÿ”’ Privacy First โ€” Fully local operation with optional cloud LLM support
  • ๐Ÿ  Deep Home Assistant Integration โ€” Native integration via custom component with conversation API and JSON-RPC
  • ๐Ÿ“Š Management Dashboard โ€” React-based dashboard with 20+ pages for agent management, traces, and configuration
  • ๐Ÿง™ Guided Setup Wizard โ€” Multi-step onboarding with AI provider configuration and connectivity tests
  • ๐Ÿ“ฆ Kubernetes Ready โ€” Cloud-native deployment with .NET Aspire, Helm charts, and K8s manifests
  • ๐Ÿ”Œ Extensible โ€” Script-based plugin system and runtime agent builder with MCP tool integration
โ Supported Inference Platforms
PlatformStatus
Azure OpenAI / AI Foundryโœ… Supported
OpenAIโœ… Supported
Ollamaโœ… Supported
Anthropic (Claude)โœ… Supported
Google Geminiโœ… Supported
Azure AI Inferenceโœ… Supported
OpenAI-compatible (Open Router, etc.)โœ… Supported

โ ๐Ÿš€ Quick Start

โ Prerequisites
  • Dockerโ  and Docker Compose
  • Home Assistant instance (2024.12 or later)
  • An LLM provider API key (Azure AI Foundry, OpenAI, Ollama, etc.)
โ Installation
  1. Create a docker-compose.yml:

    services:
      lucia-redis:
        image: redis:8.2-alpine
        container_name: lucia-redis
        networks: [lucia-network]
        ports: ["127.0.0.1:6379:6379"]
        command: >
          redis-server --appendonly yes
          --maxmemory 256mb --maxmemory-policy allkeys-lru
        volumes: [lucia-redis-data:/data]
        healthcheck:
          test: ["CMD", "redis-cli", "PING"]
          interval: 30s
          timeout: 10s
          retries: 3
        restart: unless-stopped
    
      lucia-mongo:
        image: mongo:8.0
        container_name: lucia-mongo
        networks: [lucia-network]
        ports: ["127.0.0.1:27017:27017"]
        volumes: [lucia-mongo-data:/data/db]
        healthcheck:
          test: ["CMD", "mongosh", "--eval", "db.runCommand('ping').ok"]
          interval: 30s
          timeout: 10s
          retries: 3
        restart: unless-stopped
    
      lucia:
        image: seiggy/lucia-agenthost:latest
        container_name: lucia
        depends_on:
          lucia-redis: { condition: service_healthy }
          lucia-mongo: { condition: service_healthy }
        networks: [lucia-network]
        ports: ["7233:8080"]
        environment:
          - ASPNETCORE_ENVIRONMENT=Production
          - ASPNETCORE_URLS=http://+:8080
          - ConnectionStrings__luciatraces=mongodb://lucia-mongo:27017/luciatraces
          - ConnectionStrings__luciaconfig=mongodb://lucia-mongo:27017/luciaconfig
          - ConnectionStrings__luciatasks=mongodb://lucia-mongo:27017/luciatasks
          - ConnectionStrings__redis=lucia-redis:6379
        healthcheck:
          test: ["CMD-SHELL", "wget -qO- http://localhost:8080/health || exit 1"]
          interval: 30s
          timeout: 10s
          retries: 3
        restart: unless-stopped
    
    networks:
      lucia-network:
        driver: bridge
    
    volumes:
      lucia-redis-data:
      lucia-mongo-data:
    
  2. Start the stack:

    docker compose up -d
    
  3. Open the Dashboard at http://localhost:7233 โ€” the setup wizard will guide you through configuration.

โ ๐Ÿณ Image Variants

Image TagGPUSizeUse Case
seiggy/lucia-agenthost:latestNone~250MBBase orchestration (no voice)
seiggy/lucia-agenthost:voiceNVIDIA CUDA 12.8~3GBVoice + NVIDIA GPU acceleration
seiggy/lucia-agenthost:voice-cpuNone~3GBVoice with CPU-only inference
seiggy/lucia-agenthost:ha-monoNone~350MBHome Assistant add-on (mono-container)

To use voice variants, change the image in your docker-compose.yml:

# NVIDIA GPU (requires nvidia-container-toolkit)
image: seiggy/lucia-agenthost:voice

# CPU only (no GPU requirements)
image: seiggy/lucia-agenthost:voice-cpu

AMD ROCm: Not published to Docker Hub (~25GB). Build locally: docker build -t lucia:voice-rocm -f infra/docker/Dockerfile.voice-rocm .

โ ๐Ÿ  Home Assistant Add-on (Mono-Container)

The ha-mono variant runs with no external dependencies โ€” no Redis, no MongoDB. Uses in-memory caching and SQLite for persistence.

docker run -d \
  --name lucia \
  --network host \
  -v lucia-data:/data \
  -v lucia-models:/app/models \
  lucia:ha
โ Volumes
Mount PointPurposeRequired
/dataSQLite database โ€” all config, traces, tasksYes
/app/modelsWyoming voice models (STT, VAD, wake word)Recommended
/app/pluginsScript pluginsOptional
โ Ports
PortProtocolPurpose
8099HTTPWeb dashboard and REST API
10400TCPWyoming voice protocol

โ โš™๏ธ Environment Variables

โ Connection Strings (Standard Image)
VariablePurpose
ConnectionStrings__luciatracesMongoDB connection for traces
ConnectionStrings__luciaconfigMongoDB connection for configuration
ConnectionStrings__luciatasksMongoDB connection for tasks
ConnectionStrings__redisRedis connection string
โ Data Provider Configuration
VariableDefaultDescription
DataProvider__CacheInMemoryCache backend (InMemory or Redis)
DataProvider__StoreSQLitePersistence backend (SQLite or MongoDB)
DataProvider__SqlitePath/data/lucia.dbSQLite database file path
ConfigurationCacheStoreUse Case
DefaultRedisMongoDBFull deployment with dedicated infrastructure
LightweightInMemorySQLiteHA add-on, single-container, resource-constrained
HybridInMemoryMongoDBReduce infra while keeping durable document store
โ Headless Setup

Skip the setup wizard by providing all required values via environment variables:

VariablePurpose
DASHBOARD_API_KEYDashboard login key (e.g. lk_...)
HOMEASSISTANT__BASEURLHome Assistant URL (e.g. http://homeassistant.local:8123)
HOMEASSISTANT__ACCESSTOKENLong-lived access token from HA
LUCIA_HA_API_KEYOptional: API key for the HA integration
MUSICASSISTANT__INTEGRATIONIDOptional: HA Music Assistant config entry ID
โ Tool Registration
VariablePurpose
SEARXNG_URLGeneral Agent gets web_search tool (SearXNG instance URL)
METAMCP_URLSeed MetaMCP as an MCP tool server
METAMCP_API_KEYOptional: Bearer token for MetaMCP
โ Home Assistant Connection
VariableDefaultDescription
HomeAssistant__BaseUrlโ€”HA instance URL
HomeAssistant__AccessTokenโ€”HA long-lived access token

โ ๐Ÿ—๏ธ Architecture

Home Assistant โ†” Lucia Custom Component โ†” JSON-RPC โ†” AgentHost
                                                      โ”œโ”€โ”€ Orchestrator (Router โ†’ Dispatch โ†’ Aggregator)
                                                      โ”‚   โ”œโ”€โ”€ LightAgent
                                                      โ”‚   โ”œโ”€โ”€ ClimateAgent
                                                      โ”‚   โ”œโ”€โ”€ SceneAgent
                                                      โ”‚   โ”œโ”€โ”€ ListsAgent
                                                      โ”‚   โ””โ”€โ”€ GeneralAgent
                                                      โ”œโ”€โ”€ A2AHost (MusicAgent, TimerAgent)
                                                      โ”œโ”€โ”€ MongoDB (traces, config, tasks)
                                                      โ”œโ”€โ”€ Redis (session cache)
                                                      โ””โ”€โ”€ React Dashboard

โ ๐Ÿšข Deployment Modes

ModeValueDescription
Standalone (default)standaloneAll agents embedded in AgentHost. Single container + Redis + MongoDB (or zero-dependency with HA image).
MeshmeshAgents run as separate A2A containers. For Kubernetes or multi-node.
environment:
  - Deployment__Mode=mesh

โš ๏ธ Single-Instance Constraint: AgentHost must run as a single instance โ€” no horizontal scaling via replicas. In-memory stores hold active alarms and timers.

โ Kubernetes
# Using manifests
kubectl apply -f infra/kubernetes/manifests/

# Using Helm
helm install lucia infra/kubernetes/helm/lucia-helm \
  --namespace lucia --create-namespace

โ ๐Ÿ  Home Assistant Integration

  1. HACS (Recommended): HACS โ†’ Custom repositories โ†’ Add https://github.com/seiggy/lucia-dotnet โ†’ Download "Lucia" โ†’ Restart HA โ†’ Add Integration
  2. Manual: Copy custom_components/lucia to your HA config โ†’ Restart โ†’ Add Integration

After installing:

  1. Settings โ†’ Devices & Services โ†’ Add Integration โ†’ Lucia
  2. Enter Agent Repository URL and API Key
  3. Select agent in dropdown
  4. Set as conversation agent under Settings โ†’ Voice Assistants โ†’ Assist

โ ๐Ÿ“Š Monitoring

Lucia includes OpenTelemetry instrumentation:

  • Traces โ€” Distributed tracing across orchestrator, agents, and HA API calls
  • Metrics โ€” Request rates, agent execution duration, LLM token usage
  • Logs โ€” Structured logging with correlation IDs

Export to Prometheus, Grafana, Jaeger, or any OTLP-compatible backend.

โ ๐Ÿ”ง Building from Source

git clone https://github.com/seiggy/lucia-dotnet.git
cd lucia-dotnet/infra/docker
docker compose up -d

Or build the image directly:

docker build -t lucia:latest -f infra/docker/Dockerfile .

โ ๐Ÿ“„ License

MIT License โ€” see LICENSEโ .

โ ๐Ÿ“ž Support


Built with โค๏ธ for the Home Assistant community

GitHub Repositoryโ  ยท Full Documentationโ 

Tag summary

Content type

Image

Digest

sha256:ca2df6484โ€ฆ

Size

3.9 GB

Last updated

8 days ago

docker pull seiggy/lucia-agenthost