Skip to content

Document engine agent field for custom Copilot agent configuration#13786

Merged
pelikhan merged 3 commits intomainfrom
copilot/update-engines-documentation
Feb 4, 2026
Merged

Document engine agent field for custom Copilot agent configuration#13786
pelikhan merged 3 commits intomainfrom
copilot/update-engines-documentation

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

The agent field in engine configuration was undocumented. Users need to know how to reference custom agent files when using the Copilot engine.

Changes

  • Extended engine configuration example: Added agent field to YAML showing custom agent identifier syntax
  • Custom Agent Configuration subsection: Documents agent file reference semantics and naming convention

Usage

engine:
  id: copilot
  agent: technical-doc-writer  # References .github/agents/technical-doc-writer.agent.md

Agent field value maps to .github/agents/{value}.agent.md without extension.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Update the engines documentation with how to specify the "agent" field for copilot.

engine:
  id: copilot
  agent: agent-id

Custom agent used: technical-doc-writer
AI technical documentation writer for GitHub Actions library using GitHub Docs voice


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@pelikhan
Copy link
Contributor

pelikhan commented Feb 4, 2026

@copilot update also this file to the new format: https://github.github.com/gh-aw/reference/custom-agents/

Copilot AI and others added 2 commits February 4, 2026 20:58
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update engines documentation for specifying agent field Document engine agent field for custom Copilot agent configuration Feb 4, 2026
Copilot AI requested a review from pelikhan February 4, 2026 21:01
@pelikhan pelikhan marked this pull request as ready for review February 4, 2026 21:05
Copilot AI review requested due to automatic review settings February 4, 2026 21:05
@pelikhan pelikhan merged commit 1b9eecd into main Feb 4, 2026
1 of 2 checks passed
@pelikhan pelikhan deleted the copilot/update-engines-documentation branch February 4, 2026 21:05
Copilot stopped work on behalf of pelikhan due to an error February 4, 2026 21:05
Copilot AI requested a review from pelikhan February 4, 2026 21:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR documents the previously undocumented agent field in the Copilot engine configuration, enabling users to reference custom agent files. The PR also includes several workflow configuration updates and a cleanup of the agent factory status table.

Changes:

  • Added documentation for the engine.agent field with examples showing how to reference custom agent files
  • Added a "Custom Agent Configuration" subsection explaining the agent field semantics and file naming convention
  • Removed "Test YAML Import" workflow entry from the agent factory status table (workflow no longer exists)

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

File Description
docs/src/content/docs/reference/engines.md Adds documentation for the agent field in engine configuration, including examples and explanation of the .agent.md naming convention
docs/src/content/docs/agent-factory-status.mdx Removes obsolete "Test YAML Import" workflow entry from the status table
.github/workflows/*.lock.yml (multiple files) Adds IP address 172.30.0.1 to firewall allowed domains lists across multiple workflow lock files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

set -o pipefail
mkdir -p "$CODEX_HOME/logs"
sudo -E awf --enable-chroot --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains '*.githubusercontent.com,*.jsr.io,api.npms.io,api.openai.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,bun.sh,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,deb.nodesource.com,deno.land,get.pnpm.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,jsr.io,keyserver.ubuntu.com,lfs.github.com,nodejs.org,npm.pkg.github.com,npmjs.com,npmjs.org,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,openai.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.bower.io,registry.npmjs.com,registry.npmjs.org,registry.yarnpkg.com,repo.yarnpkg.com,s.symcb.com,s.symcd.com,security.ubuntu.com,skimdb.npmjs.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.npmjs.com,www.npmjs.org,yarnpkg.com' --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.13.4 --skip-pull --agent-image act \
sudo -E awf --enable-chroot --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains '*.githubusercontent.com,*.jsr.io,172.30.0.1,api.npms.io,api.openai.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,bun.sh,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,deb.nodesource.com,deno.land,get.pnpm.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,jsr.io,keyserver.ubuntu.com,lfs.github.com,nodejs.org,npm.pkg.github.com,npmjs.com,npmjs.org,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,openai.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.bower.io,registry.npmjs.com,registry.npmjs.org,registry.yarnpkg.com,repo.yarnpkg.com,s.symcb.com,s.symcd.com,security.ubuntu.com,skimdb.npmjs.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.npmjs.com,www.npmjs.org,yarnpkg.com' --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.13.4 --skip-pull --agent-image act \
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change adds the IP address 172.30.0.1 to the allowed domains list, which appears unrelated to documenting the agent field for Copilot engine configuration. The PR description makes no mention of this firewall configuration change. Similar changes appear in multiple workflow lock files throughout this PR.

This type of infrastructure change should typically be in a separate PR with its own description explaining:

  • Why this IP address needs to be allowed
  • What service or component uses this address
  • Whether this is a temporary or permanent change
  • Security implications of allowing this IP

Mixing documentation updates with infrastructure changes makes the PR harder to review and understand.

Suggested change
sudo -E awf --enable-chroot --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains '*.githubusercontent.com,*.jsr.io,172.30.0.1,api.npms.io,api.openai.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,bun.sh,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,deb.nodesource.com,deno.land,get.pnpm.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,jsr.io,keyserver.ubuntu.com,lfs.github.com,nodejs.org,npm.pkg.github.com,npmjs.com,npmjs.org,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,openai.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.bower.io,registry.npmjs.com,registry.npmjs.org,registry.yarnpkg.com,repo.yarnpkg.com,s.symcb.com,s.symcd.com,security.ubuntu.com,skimdb.npmjs.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.npmjs.com,www.npmjs.org,yarnpkg.com' --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.13.4 --skip-pull --agent-image act \
sudo -E awf --enable-chroot --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains '*.githubusercontent.com,*.jsr.io,api.npms.io,api.openai.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,bun.sh,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,deb.nodesource.com,deno.land,get.pnpm.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,jsr.io,keyserver.ubuntu.com,lfs.github.com,nodejs.org,npm.pkg.github.com,npmjs.com,npmjs.org,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,openai.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.bower.io,registry.npmjs.com,registry.npmjs.org,registry.yarnpkg.com,repo.yarnpkg.com,s.symcb.com,s.symcd.com,security.ubuntu.com,skimdb.npmjs.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.npmjs.com,www.npmjs.org,yarnpkg.com' --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.13.4 --skip-pull --agent-image act \

Copilot uses AI. Check for mistakes.
The `agent` field value should match the agent file name without the `.agent.md` extension. For example, `agent: technical-doc-writer` references `.github/agents/technical-doc-writer.agent.md`.

Custom agent files define specialized behaviors, tool access, and instructions tailored to specific tasks. See [Custom Agents](/gh-aw/reference/custom-agents/) for details on creating and configuring custom agents.

Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation added here doesn't clarify the relationship between the agent field and the imports field for agent files. Looking at existing workflows like glossary-maintainer.md and hourly-ci-cleaner.md, both the engine.agent field AND the imports field are used together:

engine:
  id: copilot
  agent: technical-doc-writer
imports:
  - ../agents/technical-doc-writer.agent.md

The documentation should explain:

  1. Whether the agent field requires a corresponding import, or if it automatically locates and loads the agent file
  2. If both are required, why both mechanisms are needed
  3. If only one is needed, which one should be used

Without this clarification, users may be confused about whether they need just the agent field, just the imports field, or both.

Suggested change
#### Relationship between `agent` and `imports`
- The `engine.agent` field tells the engine *which agent ID to run as*. It does **not** by itself import or load the contents of the agent markdown file.
- To make the agent file’s configuration (tools, instructions, frontmatter, etc.) available to the workflow, you must also list it under `imports`, for example:
```yaml wrap
engine:
id: copilot
agent: technical-doc-writer
imports:
- ../agents/technical-doc-writer.agent.md

In practice:

  • Use imports to load the agent definition file so its configuration becomes part of the workflow.
  • Use engine.agent to select which imported agent the engine should execute with.

Most workflows that use a custom agent will specify both: imports to load the agent file and engine.agent to choose that agent at runtime.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants