SmartChain is a Home Assistant custom integration that provides an intelligent voice/conversation assistant powered by multiple LLM providers through LangChain. It also ships a sidebar panel for camera image analysis.
Supported providers:
- GigaChat (Sber) — Russian-focused LLM with vision support
- YandexGPT — Yandex Cloud LLM
- OpenAI — GPT-4.1, GPT-4o, o3, o4-mini
- Ollama — local models (Llama, Qwen, Gemma, T-Pro, DeepSeek, Home-3B)
- DeepSeek — cheapest cloud provider (V3, R1)
- Anthropic — Claude (Sonnet, Haiku, Opus)
Conversation
- 6 LLM providers — cloud and local, switch without losing configuration
- Multiple agents — different models and prompts per provider (sub-entries)
- Streaming responses — real-time token-by-token output
- Device control — Assist API (tool calling): lights, switches, locks, climate
- Multi-agent — task delegation between agents
- State history — LLM analyzes past events and trends
- MCP servers — connect external tools via Model Context Protocol
- Vision — camera image analysis via multimodal models
- Skill system — loadable YAML files with additional knowledge
- Prompt caching — token savings on repeated requests
- Chat history — multi-turn conversations with context
- Jinja2 templates — customizable system prompt with device context
Services
smartchain.ask— send a message to LLM from automations (Telegram, Slack, etc.)smartchain.analyze_image— camera snapshot → multimodal LLM → response- AI Task entity — structured data generation for automations
SmartChain AI Panel
- Sidebar panel with a camera analysis tab
- Pick any HA camera, ask the LLM a natural-language question about the snapshot
- Result is mirrored to the
smartchain_image_analyzedevent andsensor.smartchain_last_analysis
Note: The YAML automation/script/scene/blueprint generation feature was removed in v4.0.0. See CHANGELOG.md for migration details.
- Home Assistant 2024.12.0+
- HACS installed
- Add this repository as a custom HACS repository:
https://github.com/dzerik/ha-smartchain - Search for "SmartChain" in HACS
- Install and restart Home Assistant
Settings > Devices & Services > Add Integration > SmartChain
| Provider | What you need |
|---|---|
| GigaChat | Auth credentials from developers.sber.ru |
| YandexGPT | API Key + Folder ID from Yandex Cloud |
| OpenAI | API key from platform.openai.com |
| Ollama | Base URL (default: http://localhost:11434) |
| DeepSeek | API key from platform.deepseek.com |
| Anthropic | API key from console.anthropic.com |
- Model — select from list or type custom model name
- Assist API — enable device control via LLM tool calling
- System Prompt — customize the assistant's behavior
- State History Tool — enable past event analysis
Settings > Voice Assistants > Add — select your SmartChain entity as the conversation agent.
Click SmartChain AI in the Home Assistant sidebar to open the camera analysis panel.
Full user guide with all features: docs/USER_GUIDE.md
Topics:
- Multiple agents and multi-agent delegation
- Device control (Assist API)
- State history tool
- MCP servers
- Vision (camera image analysis)
- Skill system (YAML)
- SmartChain AI Panel (camera analysis)
smartchain.askservice (Telegram, Slack)smartchain.analyze_imageservice- AI Task for automations
- System prompt customization
- Parameter and model reference
MIT
