Ag2 Subagent Delegation

Delegate work from one AG2 beta `Agent` to another. Two patterns — auto-injected `run_subtask` / `run_subtasks(parallel=True)` (opt in via `tasks=TaskConfig(...)`) for self-delegation and parallel fan-out, and `Agent.as_tool()` for named delegates between distinct agents. Use when one coordinator should spawn sub-tasks, fan out concurrent work, or hand off to a specialist agent. Covers context flow, recursion safety, and `persistent_stream` for sub-task history.

ag2ai Updated

File contents

ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-subagent-delegation commit d6a58a3d34

Frequently asked questions

npx skillmds@latest add ag2ai/ag2-subagent-delegation-2