n8n-nodes-github-copilot-agent-tool
v0.1.1
Published
GitHub Copilot nodes for n8n with AI Agent Tool support — access GPT-4, Claude, Gemini and more using your Copilot subscription
Maintainers
Readme
n8n-nodes-github-copilot-agent-tool
GitHub Copilot nodes for n8n with AI Agent Tool support. Access GPT-4, Claude, Gemini and more using your existing Copilot subscription.
Nodes
| Node | Description |
|---|---|
| GitHub Copilot Agent Tool ⭐ | AI-agent-ready tool with dynamic model selection, structured output, and automatic fallback |
| GitHub Copilot Chat API | Direct chat completions + model listing |
| GitHub Copilot Chat Model | Multi-turn chat with full tool/function-calling |
| GitHub Copilot Embeddings | Text embeddings for semantic search and RAG |
| GitHub Copilot OpenAI | Full OpenAI-compatible surface with tool support |
| GitHub Copilot CLI | Shell command suggestions via gh copilot CLI |
| GitHub Copilot Auth Helper | Browser-based OAuth Device Flow authentication |
| GitHub Copilot Test | Credential verification and diagnostics |
Installation
Via n8n UI: Settings → Community Nodes → Install → n8n-nodes-github-copilot-agent-tool
Or with npm:
npm install n8n-nodes-github-copilot-agent-toolAuthentication
Option A — GitHub Copilot CLI (local n8n)
gh auth login
gh auth token # copy this tokenPaste the token into the GitHub Copilot API credential in n8n.
Option B — OAuth Device Flow (hosted n8n)
- Add a GitHub Copilot Auth Helper node → Start Device Flow
- Visit the URL shown and enter the user code
- Add a second Auth Helper node → Poll for Token
- Use the returned
access_tokenin the GitHub Copilot API credential
GitHub Copilot Agent Tool
Drop this node into any AI Agent workflow as a tool.
Key parameters
| Parameter | Default | Description |
|---|---|---|
| Model | claude-sonnet-4-5 | AI model — supports expression bindings |
| Prompt / Query | — | User message |
| System Prompt | helpful assistant | System instructions |
| Temperature | 1 | 0 = deterministic, 2 = creative |
| Max Tokens | 2048 | Response length cap |
| Agent Mode | false | Adds concise/structured instructions to system prompt |
| Fallback Model | — | Model to use if primary returns 404 |
| On Error | return | return structured error object or throw |
Dynamic model selection
={{ $json.preferred_model || "claude-sonnet-4-5" }}Structured output
{
"success": true,
"model_used": "claude-sonnet-4-5",
"response": "Here is the answer...",
"tokens_used": 342,
"latency_ms": 1204,
"metadata": {
"stop_reason": "stop",
"finish_details": {},
"request_id": "chatcmpl-abc123"
}
}Error codes
| Code | Trigger |
|---|---|
| INVALID_CREDENTIALS | 401 / 403 — bad or expired token |
| UNSUPPORTED_MODEL | 404 — model not found |
| RATE_LIMITED | 429 — quota exceeded |
| CONTEXT_LENGTH_EXCEEDED | 400 — prompt too long |
| NETWORK_ERROR | ECONNREFUSED / ETIMEDOUT |
| UNKNOWN | Other errors |
Supported Models
gpt-4 · gpt-4-turbo · gpt-4o · gpt-3.5-turbo · claude-sonnet-4-5 · claude-sonnet-4 · claude-3-opus · claude-3-sonnet · gemini-1.5-pro · gemini-1.5-flash · o1-preview · o1-mini · Custom
License
MIT — see LICENSE
