DEV Community

Lunran
Lunran

Posted on

Turning GitHub Copilot CLI into an AI Agent via ACP

I wanted an AI agent that could check the news, emails, and my calendar. While OpenClaw is currently popular, dealing with its security and permission requirements can be a hassle.

By operating the familiar GitHub Copilot CLI through scheduled execution scripts or Discord, I was able to achieve what I wanted. Receiving execution results periodically is convenient, but being able to ask follow-up questions or give instructions for deeper dives directly is even better.

GitHub Repository: Lunran/acp-client

Step 1: Launch GitHub Copilot CLI as an ACP Server

First, start the GitHub Copilot CLI as an ACP server.

copilot --acp --port 8100
Enter fullscreen mode Exit fullscreen mode

Running it within a sandbox can improve safety.

Reference: https://zenn.dev/lunran/scraps/5105de92cb9687

docker ps -a --format '{{.Names}}' | grep -q "^copilot-acp-container\$" || \
docker start -ai copilot-acp-container || \
docker run -it \
  --name copilot-acp-container \
  -p 8100:8100 \
  -v $(pwd):/workspace \
  -v ./.copilot:/home/agent/.copilot \
  -e GITHUB_TOKEN=$GITHUB_TOKEN \
  copilot-sandbox \
  copilot --acp --port 8100 --autopilot --yolo --model gpt-5-mini
Enter fullscreen mode Exit fullscreen mode

The ACP server seems to expect coding tools as clients, but by following the protocol, you can connect it to any tool.

Copilot CLI ACP server - GitHub Docs

Step 2: Configure Discord and Start the ACP Client

Next, configure the Discord settings and start the ACP client.

git clone https://github.com/Lunran/acp-client.git
cd acp-client
cp .env.example .env
Enter fullscreen mode Exit fullscreen mode

Enter your Discord settings in the .env file.

uv sync
uv run python main.py
Enter fullscreen mode Exit fullscreen mode

Note: Although a model is specified when starting the ACP server, for some reason the default model (Claude Sonnet 4.6) often ends up being used. Therefore, the client includes a process to explicitly set the model during startup.

Top comments (0)