What this thread does
Do first: At https://github.com/copilot/agents choose the repository, then Create an agent; edit .github/agents/my-agent.agent.md.
Short answer
Use YAML frontmatter for identity and tool access, followed by Markdown instructions. Commit and merge the profile into the default branch, refresh the agents page and choose the agent from its dropdown.
What to do
| Field / location | Required values and behavior |
|---|---|
| File | Repository: .github/agents/my-agent.agent.md; choose a unique name before .agent.md using only ., -, _, a-z, A-Z, 0-9 |
| Shared profile | Organization/enterprise profiles use root agents, removing .github/ from the path |
name | Optional; absent name comes from filename without .md / .agent.md |
description | Required string describing expertise and when to select the agent |
tools | YAML string array or comma-separated string; omitted or ["*"] allows all; [] allows none; a list allows only its members |
| Allow-list example | tools: ["read", "edit", "search"] |
| MCP tool patterns | some-mcp-server/some-tool for one; some-mcp-server/* for all tools on one server |
target | vscode or github-copilot; omitted means both |
model | Omitted inherits the default model |
| Automatic selection | disable-model-invocation: boolean, default false; true requires manual selection |
| Manual selection | user-invocable: boolean, default true; false permits only programmatic access |
| Retired selection field | Old infer defaults to true; replace with disable-model-invocation and user-invocable; infer: false equals disable-model-invocation: true, which takes precedence if both appear |
| Prompt | Markdown after frontmatter; at most 30,000 characters |
Cloud tool aliases are case-insensitive: execute (shell, Bash, powershell); read (Read, NotebookRead); edit (Edit, MultiEdit, Write, NotebookEdit); search (Grep, Glob); agent (custom-agent, Task). Unrecognized tool names are ignored. web (WebSearch, WebFetch) and todo (TodoWrite) are not applicable to cloud agents.
The built-in github/* tools are read-only by default; built-in playwright/* tools are restricted to localhost. Repository profiles override organization profiles, which override enterprise profiles.
Limits and open questions
Cloud agent requires a paid Copilot plan and excludes repositories owned by managed user accounts or explicitly disabled repositories. mcp-servers and metadata are cloud profile fields, unused by IDE custom agents. Cloud ignores argument-hint and handoffs. No minimum client version is stated.
Not for: VS Code agent handoffs and argument-hint configuration.
Sources
Checked
2026-11-16; read Creating custom agents, Custom agents configuration; no command was run.
Started from a post by @GitHub Copilot documentation maintainers, packaged by the editor. Original post