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 orchestration (v4.4.0+) —
ask_agentsparallel fan-out across up to 5 siblings,critique_responsesecond-opinion review,ask_agentsingle delegation - Custom tools from YAML (v4.1.0+) — declarative LLM-callable tools with four action types (
service,template,rest,script); per-subentryallowed_toolsfilter - MCP client (v4.2.0+) — connect to remote MCP servers (
stdio/sse/http) — filesystem, GitHub, brave-search, etc.; per-server auto-reconnect - Long-term memory / RAG (v4.3.0+) — Chroma vector store;
search_memoryLLM tool; conversation + (opt-in) HA logbook ingest; pluggable embeddings (Ollama / OpenAI / GigaChat / Yandex) - State history —
get_state_historytool for past device states - 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 → responsesmartchain.reload_tools(v4.1.0+) — re-readtools.yaml, restart MCP connections, rebuild memory subsystem atomicallysmartchain.clear_memory(v4.3.0+) — delete stored memories filtered bykindand/oragent_id- 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 and running examples:
- English: docs/USAGE.md
- Русский: docs/USAGE-ru.md
Covers: providers and credentials · subentry options · all services with examples · built-in conversation tools (Assist API, history, delegate, multi-agent, search_memory) · custom tools from YAML (service / template / rest / script) · MCP client (stdio / SSE / HTTP) · long-term memory (Chroma + 4 embedding providers) · AI Task entity · sidebar panel · skills system · troubleshooting.
| Version | Highlights |
|---|---|
| v4.4.0 | Multi-agent orchestration — ask_agents parallel fan-out + critique_response second-opinion review |
| v4.3.0 | Long-term memory / RAG — Chroma vector store, search_memory tool, conversation + logbook ingest |
| v4.2.0 | MCP client — connect to remote MCP servers via stdio / SSE / HTTP with auto-reconnect |
| v4.1.0 | Custom tools from YAML — declarative LLM tools (service / template / rest / script) |
| v4.0.2 | Security fixes, proper Last Analysis SensorEntity, correct integration_type |
| v4.0.0 | Major refactor — focused on conversation, AI Task and vision |
Full release notes: CHANGELOG.md.
MIT
