Setup Guide Beginner
This guide walks you through enabling GitHub Copilot Coding Agent for your organization, configuring your repositories, setting up the environment file, and running your first autonomous task assignment.
Prerequisites
Before you can use the Coding Agent, make sure you have the following in place:
| Requirement | Details |
|---|---|
| GitHub Plan | Copilot Enterprise or Copilot Business subscription is required. The Coding Agent is not available on free or individual plans. |
| Organization Access | You need organization owner or admin permissions to enable the Coding Agent feature. |
| Repository Access | The repository must be part of the organization with Copilot enabled. Both public and private repositories are supported. |
| GitHub Actions | GitHub Actions must be enabled for the repository, as the agent uses Actions for CI validation. |
Enabling Copilot Coding Agent for Your Organization
Follow these steps to enable the Coding Agent at the organization level:
-
Navigate to Organization Settings
Go to your organization's GitHub page, click Settings in the top navigation bar.
-
Open Copilot Settings
In the left sidebar, click Copilot, then select Policies from the submenu.
-
Enable the Coding Agent
Find the "Copilot Coding Agent" section and toggle it to Enabled. You can choose to enable it for all repositories or select specific ones.
-
Configure Permissions
Set which members of the organization can assign issues to Copilot. Options include all members, specific teams, or only organization owners.
-
Save Changes
Click Save to apply the settings. The Coding Agent will be available in the selected repositories within a few minutes.
github.com/orgs/{your-org}/settings/copilot/policies # Look for: # Copilot Coding Agent → Enabled # Allowed repositories → All / Selected # Allowed members → All / Specific teams
Repository Configuration
Each repository needs some basic configuration for the Coding Agent to work effectively:
-
Enable Copilot for the repository
Go to the repository's Settings → Copilot and ensure Copilot access is enabled.
-
Ensure GitHub Actions is active
The agent relies on GitHub Actions to run tests and validate its changes. Check Settings → Actions → General and confirm Actions are allowed.
-
Set up branch protection (recommended)
Configure branch protection rules on your default branch to require PR reviews and passing status checks before merging. This ensures agent-generated PRs go through the same quality gates as human PRs.
Setting Up copilot-setup-steps.yml
The copilot-setup-steps.yml file tells the Coding Agent how to set up the development environment. It is a GitHub Actions workflow file that runs before the agent starts working on code. Place it in the .github/ directory of your repository.
name: "Copilot Setup Steps" on: workflow_dispatch jobs: setup: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - name: Install dependencies run: npm ci - name: Build project run: npm run build
Here is an example for a Python project:
name: "Copilot Setup Steps" on: workflow_dispatch jobs: setup: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.12' cache: 'pip' - name: Install dependencies run: | pip install -r requirements.txt pip install -r requirements-dev.txt - name: Run migrations run: python manage.py migrate --settings=config.test
Configuring Allowed Tools and Permissions
You can control which tools and actions the Coding Agent is allowed to use within your repository:
| Permission | Default | Description |
|---|---|---|
| File read/write | Enabled | Allows the agent to read and modify files in the repository |
| Shell commands | Enabled | Allows running build, test, and lint commands |
| Git operations | Enabled | Allows creating branches, commits, and pull requests |
| Network access | Restricted | Firewalled by default; only GitHub and configured package registries are accessible |
| Secrets access | Disabled | Repository secrets are not exposed to the agent by default; must be explicitly allowed |
Setting Up CI/CD Integration
The Coding Agent validates its changes by running your CI pipeline. For best results, ensure your CI workflow is configured to run on pull requests:
name: CI on: pull_request: branches: [main] push: branches: [main] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '20' - run: npm ci - run: npm test - run: npm run lint
Testing Your First Assignment
Now that everything is configured, let's test the setup with a simple task:
-
Create a simple issue
Create a new issue with a well-defined, low-risk task. For example: "Add a
getVersion()function tosrc/utils.tsthat returns the version frompackage.json." -
Assign it to Copilot
In the issue's right sidebar, click Assignees and select Copilot from the list. Alternatively, comment
@copiloton the issue. -
Monitor progress
Watch the issue for status updates. The agent will post comments showing its progress: reading the codebase, making changes, running tests.
-
Review the pull request
Once the agent finishes, it will open a PR linked to the issue. Review the code changes, run additional checks if needed, and provide feedback.
-
Iterate or merge
If the changes look good, approve and merge. If you need adjustments, leave review comments and the agent will attempt to address them.
Try It Yourself
Pick a small, well-defined task in one of your repositories and assign it to Copilot. Start with something simple like adding a utility function, fixing a typo, or adding a missing test case. This will help you validate your setup and understand the agent's workflow.
Lilly Tech Systems