From one-off prompts to workflows: How to use custom agents in GitHub Copilot CLI
Summary
The GitHub Copilot CLI now supports custom agents, introduced on June 9, 2026, enabling developers to transform one-off terminal prompts into repeatable, reviewable workflows. These agents are defined via Markdown files, called agent profiles, which reside in a repository's ".github/agents" directory. This allows teams to encode their specific stack, tools, and operational standards, ensuring consistent behavior across development tasks. Agent profiles specify the agent's role, accessible tools, and guardrails, supporting version control and sharing. The article illustrates practical applications, including agents for security audits, Infrastructure-as-Code compliance, release documentation, and incident response. While off-the-shelf agents offer quick starts, custom agents provide tailored integration with unique team conventions and internal tooling, enhancing workflow continuity from CLI to IDE and GitHub.
Key takeaway
For DevOps Engineers aiming to standardize and automate complex terminal-based workflows, custom agents in GitHub Copilot CLI offer a powerful solution. You should define agent profiles in Markdown within your repositories to encode team-specific tools, standards, and guardrails. This approach ensures consistent execution of tasks like security audits or IaC compliance, reducing manual errors and improving reviewability across your development lifecycle. Start by converting a frequently repeated task into a custom agent.
Key insights
Custom agents in GitHub Copilot CLI standardize development workflows by encoding team-specific context into reusable, version-controlled automation.
Principles
- Encode team context into reusable workflows.
- Define agent behavior with Markdown profiles.
- Version control agents like other code.
Method
To create a custom agent: invoke Copilot CLI with "/agent", then create a Markdown agent profile in ".github/agents/" defining its role, tools, and guardrails.
In practice
- Automate security audits with team-specific checks.
- Enforce IaC compliance against organizational policies.
- Draft release notes and update CHANGELOG.md.
Topics
- GitHub Copilot CLI
- Custom Agents
- Workflow Automation
- DevOps Tools
- Infrastructure as Code
- Security Audits
- Incident Response
Code references
Best for: Software Engineer, AI Engineer, DevOps Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by The GitHub Blog.