Summary
When using the GitHub Copilot SDK with:
createSession({
enableConfigDiscovery: true
})
workspace Skills and MCP configurations can be discovered automatically.
However, custom agents defined under: .github/agents/*.agent.md are not discovered or loaded by the SDK.
Context
It is currently possible to support these agents manually by:
- globbing .github/agents/**/*.agent.md
- parsing YAML frontmatter
- mapping fields to customAgents
- passing them into createSession(...)
While this works, it introduces extra implementation that wouldn't be necessary if agent discovery was handled by enableConfigDiscovery.
Feature Request
Extend enableConfigDiscovery to also discover agents defined in: .github/agents/*.agent.md and automatically register them as SDK customAgents during session creation. This would make it easier to:
- reuse agents authored for VS Code Copilot Agent Mode
- share the same agent definitions between IDE and SDK usage
- avoid implementing custom .agent.md loaders in applications
Having this handled by config discovery would make integrating multi-agent workflows via the SDK much simpler.
Thanks for considering this!
Summary
When using the GitHub Copilot SDK with:
workspace Skills and MCP configurations can be discovered automatically.
However, custom agents defined under: .github/agents/*.agent.md are not discovered or loaded by the SDK.
Context
It is currently possible to support these agents manually by:
While this works, it introduces extra implementation that wouldn't be necessary if agent discovery was handled by enableConfigDiscovery.
Feature Request
Extend enableConfigDiscovery to also discover agents defined in: .github/agents/*.agent.md and automatically register them as SDK customAgents during session creation. This would make it easier to:
Having this handled by config discovery would make integrating multi-agent workflows via the SDK much simpler.
Thanks for considering this!