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
- 🐳 Add-on Support - Run the Copilot CLI as a Home Assistant add-on instead of installing it locally
- 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
Installing the Copilot CLI inside the Home Assistant Core container can be difficult on Home Assistant OS. The included GitHub Copilot Bridge add-on solves this by running the CLI in a dedicated container that the integration connects to over the internal network.
- In Home Assistant, go to Settings → Add-ons → Add-on Store
- Click the ⋮ menu (top-right) and choose Repositories
- Add this repository URL:
https://github.com/tserra30/Github-Copilot-SDK-integration - Find GitHub Copilot Bridge in the store and click Install
- Go to the add-on's Configuration tab and set your GitHub token:
github_token: "ghp_yourTokenHere"
- Start the add-on
- Check the Log tab to confirm it started successfully
The integration needs to know the URL of the running add-on. Within Home Assistant's internal network the add-on is reachable via its hostname, which you can find in the add-on Info tab (shown next to "Hostname"). The URL will be:
http://<hostname>:8000
For example: http://a1b2c3d4_github_copilot_bridge:8000
- Go to Settings → Devices & Services
- Click Add Integration
- Search for GitHub Copilot
- Fill in the configuration:
- GitHub Token – Your GitHub personal access token with Copilot permissions
- 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
- Copilot CLI URL (add-on) (optional) – URL of the GitHub Copilot Bridge add-on (e.g.
http://a1b2c3d4_github_copilot_bridge:8000). Leave empty to use a locally installed Copilot CLI.
Tip for Home Assistant OS users: Install the GitHub Copilot Bridge add-on (see above) and enter its URL in the "Copilot CLI URL" field. This is the easiest way to get the integration working without manually installing the CLI in the Core container.
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
- Generate a PAT token from your GitHub developer settings
- Add the necessary permissions (e.g., Copilot requests)
- Keep the token secure — never share it publicly
Warning — token used in two places
If you are using the GitHub Copilot Bridge add-on, you must configure the same GitHub token in both:
- The GitHub Copilot Bridge add-on Configuration tab, and
- The GitHub Copilot integration setup in Home Assistant.
When you rotate, change, or revoke the token you must update it in both places. If the two values get out of sync you will see authentication or connection errors until both are updated to the same valid token.
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 setup and usage guidance, use this README. For contributing and development details, see CONTRIBUTING.md.
This error means the GitHub Copilot CLI is not reachable. There are two ways to fix it:
Option A – Use the GitHub Copilot Bridge add-on (recommended for Home Assistant OS)
- Install the add-on as described in the GitHub Copilot Bridge Add-on section
- Make sure the add-on is running and the Log tab shows no errors
- Enter the add-on URL (e.g.
http://a1b2c3d4_github_copilot_bridge:8000) in the Copilot CLI URL field during integration setup
Option B – Install the CLI locally inside the Core container
- 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
Easiest approach: Install the GitHub Copilot Bridge add-on from this repository (see above). The steps below are only needed if you prefer to install the CLI manually.
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. You can place the
copilotbinary at/config/copilotor/config/bin/copilotto persist across updates (these paths are automatically discovered by the integration), or in a standard location like/usr/local/bin/copilot. Example for Alpine/amd64:apk add --no-cache curl ca-certificates # Option 1: Place at /config/bin/copilot (persists across updates, automatically discovered) mkdir -p /config/bin curl -L https://github.com/github/copilot-cli/releases/latest/download/copilot-linux-amd64 -o /config/bin/copilot chmod +x /config/bin/copilot /config/bin/copilot --version # Option 2: Place at /usr/local/bin/copilot (requires reinstall on updates) 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
For Debian/Ubuntu containers, adapt by installing dependencies with
apt-getand downloading the matchingcopilotbinary for your architecture. -
Authenticate the Copilot CLI in that same shell:
# If you installed in /config/bin: /config/bin/copilot auth login # If you installed in a PATH location like /usr/local/bin: 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
-
Optional: If you used Option 2 (installing in
/usr/local/bin), you can make the install persistent across restarts with a shell command + automation (adapt the install command for your base OS/architecture):# 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
Note: If you used Option 1 (
/config/bin), this automation is not needed as the binary already persists across updates.If the CLI binary lives outside PATH and outside the auto-discovered locations (
/config/copilot,/config/bin/copilot,~/.local/bin/copilot,/usr/local/bin/copilot,/usr/bin/copilot), setCOPILOT_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, 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.