Answer: You create a custom agent by defining it in a Markdown file with an .agent.md extension, either yourself or from within the CLI by entering /agent in interactive mode and pressing N to create a new agent, choosing to place it in the repository (.github/agents/) or your home directory (~/.copilot/agents/). You can have Copilot generate the agent profile from a description or create it manually by entering a name, description, instructions, and tool access, then restart the CLI to load it. Status: Confirmed Entry: tool/github-copilot/agents-and-automation/create-custom-agent-cli Revision: 3 Digest: sha256:2b4563238c6261af (changes whenever the content changes) Timeline: Created: 2026-11-13T03:24:05Z Last changed: 2026-11-20T13:02:20Z (example file name: — → security-expert.agent.md) Last verified: 2026-11-20T13:02:20Z Next check: 2026-11-21T13:02:20Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of file extension | .agent.md | [1] | 2026-11-20 CLI command | /agent | [1] | 2026-11-20 project location | .github/agents/ | [1] | 2026-11-20 user location | ~/.copilot/agents/ | [1] | 2026-11-20 example file name | security-expert.agent.md | [1] | 2026-11-20 default tool access | all tools | [1] | 2026-11-20 Sources: [1] GitHub. "Creating and using custom agents for GitHub Copilot CLI - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli Role: primary. Accessed: 2026-11-20T13:02:20Z Quote: "Each custom agent is defined by a Markdown file with an .agent.md extension." (Supports: file extension) Quote: "In interactive mode, enter /agent ." (Supports: CLI command) Quote: "Project ( .github/agents/ )" (Supports: project location) Quote: "User ( ~/.copilot/agents/ )" (Supports: user location) Quote: "the agent file will be named security-expert.agent.md ." (Supports: example file name) Quote: "By default, custom agents have access to all tools." (Supports: default tool access) Snapshot SHA-256: 64a3c0d142ad21c0f69aeb3d4dabc247cb63928c3610eb4c7280fd6d95e45519 (captured 2026-11-19T12:56:07Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-19T12:56:07Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:02:20Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:02:20Z Last attempt: 2026-11-20T13:02:20Z Notes and limitations: Extracted automatically from a single official source (section "Creating a custom agent"). Related: https://latestn.com/tool/github-copilot/agents-and-automation/create-custom-agent-profile How do I create a custom agent profile in GitHub Copilot in my IDE? https://latestn.com/tool/github-copilot/agents-and-automation/create-custom-agent-profile-2 How do I create a custom agent profile for GitHub Copilot cloud agent in a repository? https://latestn.com/tool/github-copilot/agents-and-automation/create-custom-agents How do I create and use custom agents in GitHub Copilot CLI? https://latestn.com/tool/github-copilot/agents-and-automation/create-automation-2 How do I create an automation with Copilot cloud agent in GitHub Copilot? https://latestn.com/tool/github-copilot/agents-and-automation/create-cloud-agent-automations How do I create automations with the GitHub Copilot cloud agent? https://latestn.com/tool/github-copilot/agents-and-automation/create-cloud-session How do I create a GitHub Copilot cloud session in TypeScript, Python, Go, .NET, Java, or Rust? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T13:02:20Z | changed | example file name: — → security-expert.agent.md | [1] 2026-11-20T13:02:20Z | changed | user location: — → ~/.copilot/agents/ | [1] 2026-11-20T13:02:20Z | changed | project location: — → .github/agents/ | [1] 2026-11-20T13:02:20Z | changed | final step: Restart the CLI → — | [1] 2026-11-20T13:02:20Z | changed | example agent file name: security-expert.agent.md → — | [1] 2026-11-20T13:02:20Z | changed | user agents directory: ~/.copilot/agents/ → — | [1] 2026-11-20T13:02:20Z | changed | project agents directory: .github/agents/ → — | [1] 2026-11-20T13:02:20Z | changed | create new agent key: N → — | [1] 2026-11-17T13:18:31Z | changed | default tool access: — → all tools | [1] 2026-11-17T13:18:31Z | changed | user agents directory: — → ~/.copilot/agents/ | [1] 2026-11-17T13:18:31Z | changed | project agents directory: — → .github/agents/ | [1] 2026-11-17T13:18:31Z | changed | final step: Restart the CLI to load your new custom agent. → Restart the CLI | [1] 2026-11-17T13:18:31Z | changed | user location: ~/.copilot/agents/ → — | [1] 2026-11-17T13:18:31Z | changed | project location: .github/agents/ → — | [1] 2026-11-13T03:24:05Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/agents-and-automation/create-custom-agent-cli/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/create-custom-agent-cli POST: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/create-custom-agent-cli with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/create-custom-agent-cli?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I create a custom agent for GitHub Copilot CLI? Revision 3, last verified 2026-11-20T13:02:20Z. https://latestn.com/tool/github-copilot/agents-and-automation/create-custom-agent-cli (accessed 2026-11-21T09:54:15Z). @misc{LatestN_tool_github_copilot_agents_and_automation_create_custom_agent_cli_r3, title = {How do I create a custom agent for GitHub Copilot CLI?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/agents-and-automation/create-custom-agent-cli}}, note = {Revision 3; digest sha256:2b4563238c6261af; last verified 2026-11-20T13:02:20Z; accessed 2026-11-21T09:54:15Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/agents-and-automation/create-custom-agent-cli