-
Notifications
You must be signed in to change notification settings - Fork 0
Add token configuration and workflow creation documentation for agentic workflows #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pelikhan
merged 7 commits into
main
from
copilot/update-readme-configure-agentic-workflows
Dec 20, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e85c5cf
Initial plan
Copilot cf1f5a5
Add comprehensive token configuration instructions to README
Copilot 82c5204
Clarify workflow file format and add note about activation context
Copilot 3a2f246
Address code review nitpicks for improved clarity
Copilot 5a3291c
Address feedback: use GitHub web UI for secrets, reorder steps, remov…
Copilot 1f45b88
Remove example workflow and next steps sections, add workflow creatio…
Copilot 344a114
Remove Token Types and Permissions section
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,84 @@ | ||
| # agentics-template | ||
| A template to get started with GitHub Agentic Workflows | ||
|
|
||
| ## Getting Started | ||
|
|
||
| This repository is a template for creating GitHub Agentic Workflows. Agentic workflows allow you to use AI agents (like GitHub Copilot) to automate tasks in your repository. | ||
|
|
||
| ## Configuring Tokens for Agentic Workflows | ||
|
|
||
| GitHub Agentic Workflows require specific tokens to authenticate with various services. GitHub Actions always provides `GITHUB_TOKEN` automatically, but for advanced features like Copilot workflows, you'll need to configure additional tokens. | ||
|
|
||
| ### Quick Start: Tokens You Need to Configure | ||
|
|
||
| Create these repository secrets based on what features you need: | ||
|
|
||
| | When you need this... | Secret to create | Notes | | ||
| |----------------------|------------------|-------| | ||
| | Cross-repo operations / remote GitHub tools | `GH_AW_GITHUB_TOKEN` | PAT or app token with cross-repo access | | ||
| | Copilot workflows (CLI, engine, agent tasks, etc.) | `COPILOT_GITHUB_TOKEN` | Needs Copilot Requests permission and repo access | | ||
| | Assigning agents/bots to issues or pull requests | `GH_AW_AGENT_TOKEN` | Used by `assign-to-agent` and Copilot assignee/reviewer flows | | ||
| | Any GitHub Projects v2 operations | `GH_AW_PROJECT_GITHUB_TOKEN` | **Required** for `update-project`. Default `GITHUB_TOKEN` cannot access Projects v2 API | | ||
| | Isolating MCP server permissions (advanced optional) | `GH_AW_GITHUB_MCP_SERVER_TOKEN` | Only if you want MCP to use a different token than other jobs | | ||
|
|
||
| ### Step-by-Step: Configuring Tokens for Copilot | ||
|
|
||
| Follow these steps to set up GitHub Copilot in your agentic workflows: | ||
|
|
||
| #### 1. Create a Personal Access Token for Copilot | ||
|
|
||
| 1. Go to [GitHub Personal Access Tokens settings](https://github.com/settings/personal-access-tokens/new) | ||
| 2. Configure the token: | ||
| - **Resource owner**: Your user account (not organization) | ||
| - **Repository access**: "Public repositories" or select specific repos | ||
| - **Permissions**: Select "Copilot Requests" (required) | ||
| 3. Generate the token and copy it | ||
|
|
||
| #### 2. Set the Copilot Token as a Repository Secret | ||
|
|
||
| Add the token as a repository secret using the GitHub website: | ||
|
|
||
| 1. Go to your repository on GitHub | ||
| 2. Click **Settings** > **Secrets and variables** > **Actions** | ||
| 3. Click **New repository secret** | ||
| 4. Set the name to `COPILOT_GITHUB_TOKEN` | ||
| 5. Paste your Personal Access Token in the **Secret** field | ||
| 6. Click **Add secret** | ||
|
|
||
| #### 3. (Optional) Configure Additional Tokens | ||
|
|
||
| If you need additional capabilities, add these tokens as repository secrets following the same steps above: | ||
|
|
||
| - **For cross-repository operations**: Create a secret named `GH_AW_GITHUB_TOKEN` | ||
| - **For agent assignment operations**: Create a secret named `GH_AW_AGENT_TOKEN` | ||
| - **For GitHub Projects v2 operations**: Create a secret named `GH_AW_PROJECT_GITHUB_TOKEN` | ||
|
|
||
| ## Creating Workflows | ||
|
|
||
| ### Using the Create Agentic Workflow Agent | ||
|
|
||
| The easiest way to create a new agentic workflow is to use the built-in custom agent: | ||
|
|
||
| 1. Go to your repository on GitHub | ||
| 2. Click on the **Actions** tab | ||
| 3. Click **Create new agentic task** | ||
| 4. In the agent selection, choose **create-agentic-workflow** | ||
| 5. Describe what you want your workflow to do (e.g., "Create a workflow that triages new issues and adds labels") | ||
| 6. The agent will generate the workflow file for you | ||
|
|
||
| ### Debugging and Improving Workflows | ||
|
|
||
| If you encounter issues with a workflow or want to improve it: | ||
|
|
||
| 1. Go to your repository on GitHub | ||
| 2. Click on the **Actions** tab | ||
| 3. Click **Create new agentic task** | ||
| 4. In the agent selection, choose **debug-agentic-workflow** | ||
| 5. Provide the GitHub URL to your failed workflow run (e.g., `https://github.com/owner/repo/actions/runs/12345`) | ||
| 6. The agent will analyze the logs and suggest fixes or improvements | ||
|
|
||
| ## Additional Resources | ||
|
|
||
| - [GitHub Agentic Workflows Documentation](https://githubnext.github.io/gh-aw/) | ||
| - [Token Reference](https://github.com/githubnext/gh-aw/blob/main/docs/src/content/docs/reference/tokens.md) | ||
| - [CLI Documentation](https://githubnext.github.io/gh-aw/setup/cli/) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot add a section that tells the user how to use the "create new agentic task", select the "create-agentic-workflow" custom agent and ask to create a new workflow. Also add section on how to use the debug-agentic-workflow + github url to improve debug agents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added "Creating Workflows" section with create-agentic-workflow agent instructions and "Debugging and Improving Workflows" section with debug-agentic-workflow + GitHub URL instructions in commit 1f45b88