copilot-sdk icon indicating copy to clipboard operation
copilot-sdk copied to clipboard

Sub agents capability

Open RollsChris opened this issue 9 months ago • 5 comments

Hi, I'm unsure how to handle sub agents with the sdk.

I want full control of the sub agents, I want to create a agent tree and to be able to click on a agent and see its prompt, thinking etc, like you would if you view the root agent.

Can anyone please point me in the right direction?

At the moment I have to tell the agent to use a tool to spawn a subagent but I'm worried I'm re-inventing the wheel

Thanks 🙏

RollsChris avatar Mar 01 '26 09:03 RollsChris

Thanks for opening this issue, @RollsChris!

I've labeled this as a question and needs-info to help route it appropriately.

To better assist you, could you provide a bit more detail:

  1. Which SDK are you using? (Node.js/TypeScript, Python, Go, or .NET)
  2. What do you mean by "agent tree"? Are you looking to create hierarchical agents where one agent can spawn child agents?
  3. What UI/interface are you building? You mention wanting to "click on an agent and see its prompt, thinking etc" — are you building a custom UI, or using an existing one?

Related issue: You might also want to check out #301 which discusses native sub-agent support. Currently, the SDK doesn't have built-in sub-agent orchestration, so your tool-based approach may indeed be the right path for now. More context on your use case will help determine if there's a better pattern you could use.

AI generated by Issue Triage Agent

github-actions[bot] avatar Mar 01 '26 09:03 github-actions[bot]

I'm using the .net sdk, and I mean the CLI can spawn agents/background tasks. I want to hook into that or at least know what I can do with is from the sdk. I'm just building a simple blazor app to visualize the process.

Thanks

RollsChris avatar Mar 01 '26 09:03 RollsChris

Ran into the same challenge building multi-agent systems. The visibility into sub-agent state is the hard part.

We took a different route: instead of nesting agents inside one SDK, we let each agent run independently (can be different models, different tools) and coordinate through a shared message bus. Each agent's actions get logged to a receipt file so you can trace the full execution tree after the fact.

It is not the same as the real-time inspector view you are describing, but the tradeoff is that it works across different SDKs and models. If you are building in .NET specifically, you might find it useful as the coordination layer between your agents.

https://github.com/ThinkOffApp/ide-agent-kit

ThinkOffApp avatar Mar 01 '26 15:03 ThinkOffApp

We've implemented multi-agent sub-agent orchestration in IDE Agent Kit v0.4.0 using ACP (Agent Client Protocol). It handles session lifecycle (spawn/send/status/close), token-gated auth, agent allowlists, and receipt logging across IDEs. Works with Claude Code, Codex, Cursor, and any ACP-compatible harness. Install: clawhub install ide-agent-kit

ThinkOffApp avatar Mar 02 '26 13:03 ThinkOffApp

Closing this as a dupe for #301. On the roadmap for public preview.

patniko avatar Mar 03 '26 20:03 patniko