The GitHub adapter lets you interact with Archon directly from GitHub issues and pull requests. When you @mention the bot in a comment, Archon clones the repository (if needed), loads project-specific commands, and responds in the same thread — all without leaving GitHub. This page covers generating a webhook secret, exposing your server for local development, configuring the webhook, setting environment variables, and understanding how conversation IDs and event handling work.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/coleam00/Archon/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Archon server running — see Quickstart
- A GitHub repository with issues enabled
GH_TOKENorGITHUB_TOKENset (for cloning private repos and posting comments)- A publicly reachable URL for the webhook (or a tunnel for local development)
How conversation IDs work
Each GitHub issue or pull request maps to a single Archon conversation. The conversation ID uses the formatowner/repo#number — for example, coleam00/Archon#42. This means:
- All comments on an issue share one conversation and full context is preserved across multiple @mentions
- A PR and its linked issue each have their own conversation ID
- Archon automatically clones the repository on the first @mention and reuses the existing clone on subsequent ones
Setup
Generate a webhook secret
The secret is used to verify that webhook payloads come from GitHub (HMAC SHA-256 signature). Generate one with:Save the output — you need it in steps 3 and 4.
- Linux / macOS
- Windows (PowerShell)
Expose your server (local development only)
GitHub must be able to reach your server over HTTPS. For local development, use a tunnel.Keep this terminal open while testing. Free tier URLs change on restart.For production deployments, use your server’s public domain — no tunnel needed.
- ngrok (free tier)
- Cloudflare Tunnel (persistent)
Add the webhook to your repository
Go to your repository’s webhook settings:Click Add webhook and fill in:
Click Add webhook. GitHub sends a ping — a green checkmark confirms delivery.
| Field | Value |
|---|---|
| Payload URL | https://<your-domain>/webhooks/github |
| Content type | application/json |
| Secret | The value from step 1 |
| SSL verification | Enabled (recommended) |
| Events | Issues, Issue comments, Pull requests |
Set environment variables
WEBHOOK_SECRET must match exactly what you entered in the GitHub webhook configuration. GH_TOKEN and GITHUB_TOKEN are both read — set either one (or both to the same value).Usage
Trigger Archon by @mentioning it in an issue or PR comment:First mention behavior
On the first @mention in a repository, Archon:- Clones the repository to
~/.archon/workspaces/owner/repo/source/ - Loads commands from
.archon/commands/if present - Injects full issue or PR context (title, description, labels, status) for the AI assistant
Subsequent mentions
All follow-up @mentions in the same issue or PR resume the existing conversation with full context preserved across comments.Supported events
| GitHub event | What Archon does |
|---|---|
issue_comment.created with @mention | Processes the comment as a message |
issues.closed | Cleans up the associated worktree environment |
pull_request.closed / .merged | Cleans up the associated worktree environment |
issues.opened | Ignored (descriptions are not treated as commands) |
pull_request.opened | Ignored (descriptions are not treated as commands) |
Restricting access (optional)
To limit which GitHub users can trigger webhook processing:200 OK to GitHub but does not process the event. When empty or unset, all users can trigger the bot.
Custom bot mention name (optional)
By default Archon responds to@archon. To use a different name (for example if your bot account has a different username):
@mybot in comments triggers Archon instead of @archon.
Adding more repositories
Once your server is running with aWEBHOOK_SECRET, add more repositories by creating a webhook in each one pointing to the same server URL with the same secret.
Via GitHub CLI:
Security
- Archon verifies every incoming webhook using HMAC SHA-256 (
X-Hub-Signature-256header) and timing-safe comparison — payloads with invalid signatures are dropped silently - Bot comments include a hidden HTML marker (
<!-- archon-bot-response -->) to prevent self-triggering loops - Never commit
WEBHOOK_SECRETorGH_TOKENto version control
Further reading
Configuration reference
Full list of environment variables and config options.
Approval nodes
Add human review gates to your GitHub-triggered workflows.
Deployment
Run Archon with Docker for a production-ready public endpoint.
Architecture
Understand how the GitHub adapter fits into the broader system.