GitHub Copilot CLI now supports custom agents, defined as Markdown files with YAML frontmatter stored in the `.github/agents` directory of any repository. Each agent profile specifies a model, such as GPT-4.1, a set of permitted tools from a list including `runCommands`, `runTests`, `edit/editFiles`, and `web/fetch`, plus explicit guardrails and role definitions. The result is a named, invocable agent that behaves identically every time it runs, from any terminal, on any machine with access to that repo.
The mechanism matters as much as the concept. You invoke a custom agent in the CLI using the `/agent` slash command, select your profile, and Copilot executes the encoded workflow. Because the profile is version-controlled alongside your code, it goes through the same review process as any other file. The example in the article, an Accessibility Expert agent aligned to WCAG 2.1/2.2 across A, AA, and AAA conformance levels, illustrates how team-specific standards get baked into repeatable execution rather than re-explained in each prompt.
The full article is worth reading for the setup walkthrough and the breakdown of which workflow categories benefit most from this pattern. The real question it raises, but does not fully answer, is governance: who owns the agent profile when standards change, and how do you audit what an agent actually did versus what its profile said it would do.
[READ ORIGINAL →]