Integration to bring GitHub Copilot AI capabilities to Home Assistant using the GitHub Copilot SDK.
This integration provides a conversation agent powered by the GitHub Copilot SDK and Copilot CLI, enabling voice assistants and AI-powered tasks similar to OpenAI, Claude, and Gemini integrations.
- 🤖 Conversation Agent - Use GitHub Copilot as an AI conversation agent
- 🎤 Voice Assistant Support - Works with Home Assistant's voice pipeline
- 🔧 Configurable Models - Support for GPT-4o, GPT-4o-mini, GPT-4, GPT-4 Turbo, GPT-3.5 Turbo, o3-mini, o1, o1-mini, Claude 3.5 Sonnet, and Claude 3.7 Sonnet
- 💬 Context Preservation - Maintains conversation history within sessions via the SDK
⚠️ Copilot CLI Required - The GitHub Copilot SDK uses the Copilot CLI for authentication and runtime
- Open HACS in Home Assistant
- Go to "Integrations"
- Click the "+" button
- Search for "GitHub Copilot"
- Click "Install"
- Restart Home Assistant
- Copy the
custom_components/github_copilotdirectory to your Home Assistantcustom_componentsdirectory - Restart Home Assistant
- Go to Settings → Devices & Services
- Click Add Integration
- Search for GitHub Copilot
- Enter your GitHub token for Copilot SDK authentication
- Configure optional settings:
- Model: Select from GPT-4o (default), GPT-4o-mini, GPT-4, GPT-4 Turbo, GPT-3.5 Turbo, o3-mini, o1, o1-mini, Claude 3.5 Sonnet, or Claude 3.7 Sonnet
To use this integration, you need a GitHub personal access token that can authenticate the Copilot SDK:
- Ensure you have an active GitHub Copilot subscription
- Install the GitHub Copilot CLI and sign in, or provide a PAT token for the SDK.
- Generate a PAT token from your GitHub developer settings.
- Make sure to add the necessary permissions to the token. (e.g., Copilot requests)
- Keep the token secure
Once configured, you can:
- Select GitHub Copilot as a conversation agent in voice assistants
- Use it in automations via the
conversation.processservice - Chat with it through the Home Assistant UI
automation:
- alias: "Morning briefing with Copilot"
trigger:
- platform: time
at: "07:00:00"
action:
- service: conversation.process
data:
text: "Good morning! What should I know today?"
agent_id: conversation.github_copilotFor detailed documentation, see agents.md
This error indicates the GitHub Copilot CLI is not properly installed or configured:
- Install the Copilot CLI: Visit https://docs.github.com/copilot/cli for installation instructions
- Ensure CLI is in PATH: Run
which copilotorcopilot --versionto verify installation (or setCOPILOT_CLI_PATHto the binary) - Authenticate the CLI: Run
copilot auth loginto authenticate with your GitHub account - Check Copilot subscription: Ensure you have an active GitHub Copilot subscription
The Copilot CLI must be available inside the Home Assistant Core container, not only the SSH/Terminal add-on. Typical steps:
- Open the Advanced SSH & Web Terminal add-on and enter the Core container:
docker exec -it homeassistant /bin/sh # or /bin/bash if available
- Install the Copilot CLI inside this container following the official docs: https://docs.github.com/copilot/cli. Use a package manager appropriate for your base OS (e.g.,
apkon Alpine,apton Debian/Ubuntu) to install prerequisites, then place thecopilotbinary in PATH. Example for Alpine/amd64:For Debian/Ubuntu containers, adapt by installing dependencies withapk add --no-cache curl ca-certificates curl -L https://github.com/github/copilot-cli/releases/latest/download/copilot-linux-amd64 -o /usr/local/bin/copilot chmod +x /usr/local/bin/copilot copilot --version
apt-getand downloading the matchingcopilotbinary for your architecture. - Authenticate the Copilot CLI in that same shell:
copilot auth login
- Persist authentication by moving the Copilot CLI config into
/configand pointing the CLI to it:mkdir -p /config/.gh_config mv /root/.config/gh/* /config/.gh_config/ 2>/dev/null || true export GH_CONFIG_DIR=/config/.gh_config
- Make the install persistent across restarts with a shell command + automation (adapt the install command for your base OS/architecture):
If the CLI binary lives outside PATH, set
# configuration.yaml (automation can live in automations.yaml if you split config) shell_command: install_copilot_cli: "apk add --no-cache curl ca-certificates && curl -L https://github.com/github/copilot-cli/releases/latest/download/copilot-linux-amd64 -o /usr/local/bin/copilot && chmod +x /usr/local/bin/copilot" automation: - alias: "Ensure Copilot CLI on boot" id: ensure_copilot_cli trigger: - platform: homeassistant event: start action: - service: shell_command.install_copilot_cli
COPILOT_CLI_PATHto its location in your environment.
- Verify your GitHub token is valid and has Copilot permissions
- Ensure your GitHub Copilot subscription is active
- Try regenerating your personal access token
- Check your internet connectivity
- Verify the Copilot CLI is running:
copilot --version - Check Home Assistant logs for detailed error messages
- Try using a faster model (e.g., GPT-3.5 Turbo or GPT-4o-mini)
- Check your network latency
- Reduce concurrent requests
For more help, see the agents.md documentation or open an issue.
Contributions are welcome! See CONTRIBUTING.md for guidelines.
This project is licensed under the GNU GPLv3 - see the LICENSE file for details. Some source code was originally licensed under the MIT license.
This integration depends on the GitHub Copilot SDK, which is licensed under the MIT License:
MIT License
Copyright GitHub, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- Built on Home Assistant's conversation framework
- Based on the integration blueprint by @ludeeus
Note: This integration is not officially affiliated with GitHub or Microsoft.
Original MIT license from integration blueprint by @ludeeus
MIT License
Copyright (c) 2019 - 2025 Joakim Sørensen @ludeeus
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.