OMA Multi-Agent Orchestrator
first-fluke/oh-my-agent
Splits a complex feature into prioritized tasks, spawns specialist CLI subagents in parallel, tracks them through shared memory and verifies each result.
Delegate work from one AG2 beta Agent to another. An agent skill from ag2ai/build-with-ag2.
$ npx skills add ag2ai/build-with-ag2 --skill ag2-subagent-delegation -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ag2ai/build-with-ag2 ag2-subagent-delegation --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ag2ai/build-with-ag2.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/ag2-subagent-delegation .claude/skills/ag2-subagent-delegation && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "ag2-subagent-delegation" agent skill from https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-subagent-delegation into .claude/skills/ag2-subagent-delegation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ag2-subagent-delegation", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-subagent-delegationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ag2ai/build-with-ag2 --skill ag2-subagent-delegation -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ag2ai/build-with-ag2 ag2-subagent-delegation --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ag2ai/build-with-ag2.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/ag2-subagent-delegation .agents/skills/ag2-subagent-delegation && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ag2-subagent-delegation" agent skill from https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-subagent-delegation into .agents/skills/ag2-subagent-delegation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ag2-subagent-delegation", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ag2ai/build-with-ag2 --skill ag2-subagent-delegation -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ag2ai/build-with-ag2 ag2-subagent-delegation --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ag2ai/build-with-ag2.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/ag2-subagent-delegation .cursor/skills/ag2-subagent-delegation && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "ag2-subagent-delegation" agent skill from https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-subagent-delegation into .cursor/skills/ag2-subagent-delegation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ag2-subagent-delegation", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ag2ai/build-with-ag2.git --path .agents/skills/ag2-subagent-delegation--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ag2ai/build-with-ag2 --skill ag2-subagent-delegation -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ag2ai/build-with-ag2 ag2-subagent-delegation --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ag2ai/build-with-ag2.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/ag2-subagent-delegation .gemini/skills/ag2-subagent-delegation && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "ag2-subagent-delegation" agent skill from https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-subagent-delegation into .gemini/skills/ag2-subagent-delegation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ag2-subagent-delegation", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ag2ai/build-with-ag2 ag2-subagent-delegationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ag2ai/build-with-ag2 --skill ag2-subagent-delegation -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ag2ai/build-with-ag2.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/ag2-subagent-delegation .github/skills/ag2-subagent-delegation && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "ag2-subagent-delegation" agent skill from https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-subagent-delegation into .github/skills/ag2-subagent-delegation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ag2-subagent-delegation", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ag2ai/build-with-ag2 --skill ag2-subagent-delegation -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ag2ai/build-with-ag2 ag2-subagent-delegation --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ag2ai/build-with-ag2.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/ag2-subagent-delegation .opencode/skills/ag2-subagent-delegation && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "ag2-subagent-delegation" agent skill from https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-subagent-delegation into .opencode/skills/ag2-subagent-delegation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ag2-subagent-delegation", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
ag2-subagent-delegationDelegate work from one AG2 beta Agent to another. An agent skill from ag2ai/build-with-ag2.
Ag2 Subagent Delegation is an agent skill from ag2ai/build-with-ag2. Delegate work from one AG2 beta Agent to another. Two patterns — auto-injected runsubtask / runsubtasks(parallel=True) (opt in via tasks=TaskConfig(...)) for self-delegation and parallel fan-out, and Agent.astool() 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 persistentstream for sub-task history.
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including assets (for example `assets/research_squad.py`).
It sits in Agent Workflows, covering Task breakdown and Subagents. The repository describes itself as: Sample code and application showcases to get you going with AG2 (formally AutoGen). The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 29eeac3. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (Python), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Ag2 Subagent Delegation loads about 2.3k tokens when it runs. Until then it costs about 123 tokens; SKILL.md has 680 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ag2ai/build-with-ag2 at commit 29eeac3, republished under its Apache-2.0 licence (© ag2ai). 680 words, ~2,267 tokens.
.claude/skills/ag2-subagent-delegation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.| Pattern | Reach for it when | API |
|---|---|---|
Auto-injected run_subtask / run_subtasks | Lightweight self-delegation, dynamic fan-out, parallel sub-questions | tasks=TaskConfig(...) on the parent |
Agent.as_tool() | Distinct named delegates the LLM should reason about ("call the researcher", "call the writer") | Wrap a child Agent as a tool on the parent |
The two compose — a coordinator can have both.
run_subtasksSubtask tools are off by default (tasks=False). Opt in with tasks=TaskConfig(...) and the agent gains:
run_subtask(task: str) — one isolated sub-task agent.run_subtasks(tasks: list[str], parallel: bool = True) — fan out multiple in one tool call (default concurrent).from autogen.beta import Agent, TaskConfig
from autogen.beta.config import GeminiConfig
config = GeminiConfig(model="gemini-3-flash-preview")
coordinator = Agent(
"coordinator",
prompt=(
"You answer multi-part questions by dispatching run_subtasks "
"with parallel=True. Use one tool call with every sub-question "
"packed into the 'tasks' list."
),
config=config,
tasks=TaskConfig(), # opt in
)
reply = await coordinator.ask(
"In one run_subtasks call, answer: "
"(a) tallest waterfall, (b) Eiffel Tower year, (c) boiling point of nitrogen."
)TaskConfig controls how the sub-task agents are built:
@dataclass
class TaskConfig:
config: ModelConfig | None = None # falls back to parent's config
prompt: str = "You are a task agent..."
include_tools: Iterable[str] | None = None # None = inherit all parent tools
exclude_tools: Iterable[str] = ()
extra_tools: Iterable[Callable | Tool] = ()Common shape — cheaper model for sub-tasks, narrow tool surface:
TaskConfig(
config=worker_config, # smaller model
prompt="You are a focused worker; one step only.",
include_tools=["search", "fetch_url"], # don't expose `summarize` to children
)Sub-task agents are built with tasks=False — they never gain run_subtask tools themselves. Recursive delegation is structurally impossible; no depth limit needed.
Agent.as_tool()Expose a whole agent as a tool the LLM can name and call:
from autogen.beta import Agent
from autogen.beta.config import AnthropicConfig
config = AnthropicConfig(model="claude-sonnet-4-6")
researcher = Agent("researcher", prompt="Provide concise factual findings.", config=config, tools=[search_tool])
writer = Agent("writer", prompt="Turn research into clear prose.", config=config)
coordinator = Agent(
"coordinator",
prompt="First delegate research, then pass findings to the writer.",
config=config,
tools=[
researcher.as_tool(description="Research a topic and return findings."),
writer.as_tool(description="Write an article. Pass research notes in the context parameter."),
],
)The coordinator's LLM sees task_researcher and task_writer. Each call has two parameters:
objective (required) — what the sub-task should do.context (optional) — relevant info the parent wants to share.as_tool() accepts:
| Parameter | Description |
|---|---|
description | Tool description shown to the LLM (required) |
name | Override the default task_{agent.name} |
stream | StreamFactory for custom sub-task streams (see below) |
middleware | ToolMiddleware callables (e.g. approval_required) |
For more control, use subagent_tool() directly:
from autogen.beta.tools.subagents import subagent_tool
coordinator = Agent("coordinator", config=config, tools=[
subagent_tool(researcher, description="Research a topic."),
])as_tool()If you want a named self-delegate (sub_task instead of generic run_subtask), give an agent its own tool:
analyst = Agent(
"analyst",
prompt=(
"You have search and sub_task tools. "
"Only use sub_task when the task has clearly independent parts."
),
config=config,
tools=[search_tool],
)
analyst.add_tool(
analyst.as_tool(
description="Break work into a focused sub-task for independent analysis.",
name="sub_task",
)
)Self-delegation via as_tool() can recurse — the child has the same sub_task tool, so without a guard the LLM may chain calls indefinitely.
The simplest safe pattern is to prefer the auto-injected run_subtask / run_subtasks path for self-delegation. Sub-tasks spawned that way are constructed with tasks=False, so they have no run_subtask tools and recursion is structurally impossible.
If you genuinely need recursive as_tool() self-delegation, write a tool middleware that increments a depth counter in context.dependencies and short-circuits past a threshold. The subagents module exports subagent_tool, persistent_stream, and StreamFactory from autogen.beta.tools.subagents — verify the current public surface there before relying on a built-in depth-limiting helper.
By default, each sub-task gets a fresh MemoryStream — its history is isolated and starts empty. Context flow:
| What | Behaviour | Why |
|---|---|---|
| Dependencies | Copied (top-level shallow) | Isolated; treat dependencies as read-only inside subtasks |
| Variables | Copied; synced back on success | Concurrent-safe — sibling subtasks won't race-clobber a shared dict |
| History | Fresh stream | Clean context; relevant info passes via the context tool parameter |
| Tools | Inherited from parent (filtered by TaskConfig) | Sub-tasks need real capabilities to do work |
persistent_stream()When a sub-agent benefits from seeing its prior calls (e.g. avoid repeating searches), give it a stream that persists across invocations within the parent context:
from autogen.beta.tools.subagents import persistent_stream
researcher.as_tool(
description="Research a topic",
stream=persistent_stream(),
)Stores stream id in context.dependencies keyed by f"ag:{agent.name}:stream" and reuses the parent stream's storage backend.
from autogen.beta import Agent, Context
from autogen.beta.streams.redis import RedisStream
def make_redis_stream(agent: Agent, ctx: Context) -> RedisStream:
return RedisStream(MY_REDIS_URL, prefix=f"ag2:sub:{agent.name}")
researcher.as_tool(description="Research a topic", stream=make_redis_stream)assets/research_squad.py (mirrors code_examples/05) — covers both run_subtasks(parallel=True) and Agent.as_tool(), with TaskStarted / TaskCompleted lifecycle events.website/docs/beta/task_delegation.mdx.tasks= constructor knob (with KnowledgeConfig, etc.): website/docs/beta/agent_harness.mdx.tasks=False is the default. No TaskConfig, no run_subtask tools.run_subtask — they can't. Sub-tasks themselves have tasks=False. If you need deeper trees, use Agent.as_tool() self-delegation with a manual depth-counter middleware (see "Recursion safety" above).dependencies as scoped per sub-task — only the top-level dict is copied. Mutable values inside it are still shared by reference. Treat dependencies as read-only inside sub-tasks.description= on as_tool() — the LLM doesn't know when to call it. Required parameter.run_subtasks(parallel=False) when work is concurrent — defaults to True for a reason; only set False when later tasks depend on earlier results.task_{agent.name} collisions — pass name= to override if you want shorter names or distinct delegates of the same agent.© ag2ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (assets) in .agents/skills/ag2-subagent-delegation of ag2ai/build-with-ag2.
Open the folder on GitHubat commit 29eeac3
Ag2 Subagent Delegation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Ag2 Subagent Delegation this skillag2ai/build-with-ag2 | 252 | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| OMA Multi-Agent Orchestratorfirst-fluke/oh-my-agent | 1.3k | — | ~3.1k | Automated safety check: Pass | MIT | |
| Swarm Parallel Dispatchlangchain-ai/langchain-skills | 1.3k | — | ~3k | Automated safety check: Pass | MIT | |
| Cursor Orchestratecursor/plugins | 11k | — | ~1.1k | Automated safety check: Pass | None | |
| Launching Agent Teamslexler/skill-factory | 239 | — | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| Agents Project Coordinatorasgeirtj/system_prompts_leaks | 69k | — | ~2.9k | Automated safety check: Pass | CC0-1.0 |
first-fluke/oh-my-agent
Splits a complex feature into prioritized tasks, spawns specialist CLI subagents in parallel, tracks them through shared memory and verifies each result.
langchain-ai/langchain-skills
Fans a list of independent items out to subagents in parallel, merges the results back into a table and supports retrying only the rows that failed.
cursor/plugins
Splits a large goal into a tree of parallel Cursor cloud agents, with planners, workers and verifiers coordinated by a script and reporting through structured handoffs.
lexler/skill-factory
Plans and launches Claude Code agent teams with distinct roles, right-sized tasks and detailed spawn prompts, and says when subagents or worktrees fit better.
asgeirtj/system_prompts_leaks
Runs a goal as a project in which the agent coordinates separate agent threads, judging when to split the work, and interviews you first when nothing can be verified.
vlinx-io/VelaTerm
Explicitly spawn a standalone child session under the current vlx-term session, passing the task in as its first message (mirrors spawntask).
ag2ai/build-with-ag2
Add a custom Python tool to an AG2 beta Agent using the @tool decorator.
ag2ai/build-with-ag2
Intercept the AG2 beta agent loop with BaseMiddleware — wrap full turns (onturn), each LLM call (onllmcall), each tool execution (ontoolexecution), or each human-input request (onhumaninput).
ag2ai/build-with-ag2
Wire AG2 beta's shipped tools into an Agent — both provider-native server-side tools (web search, web fetch, code execution, MCP, image generation, memory) and locally-executed common toolkits…
ag2ai/build-with-ag2
Persist agent state across runs, shape what the LLM sees per turn, and cap history to fit a context window.
ag2ai/build-with-ag2
Monitor an AG2 beta agent's stream — log events, detect repeated tool calls, track token spend, build trigger-driven observers, route observer alerts to the model, and halt on FATAL conditions.
ag2ai/build-with-ag2
Build a minimal AG2 beta Agent end to end — pick a model provider, set a prompt, call agent.ask(), then continue the conversation with reply.ask() (multi-turn).
Categories
Delegate work from one AG2 beta Agent to another. An agent skill from ag2ai/build-with-ag2. Ag2 Subagent Delegation is an agent skill from ag2ai/build-with-ag2. Delegate work from one AG2 beta Agent to another.
Ag2 Subagent Delegation fits situations like: one coordinator should spawn sub-tasks; fan out concurrent work; hand off to a specialist agent.
Run `npx skills add ag2ai/build-with-ag2 --skill ag2-subagent-delegation -a claude-code`. Or copy the skill folder (.agents/skills/ag2-subagent-delegation in ag2ai/build-with-ag2) into .claude/skills/ag2-subagent-delegation in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ag2ai/build-with-ag2 --skill ag2-subagent-delegation -a codex`. Or copy the skill folder (.agents/skills/ag2-subagent-delegation in ag2ai/build-with-ag2) into .agents/skills/ag2-subagent-delegation in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ag2ai/build-with-ag2 --skill ag2-subagent-delegation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ag2-subagent-delegation, .gemini/skills/ag2-subagent-delegation, .github/skills/ag2-subagent-delegation and .opencode/skills/ag2-subagent-delegation in your project.
Going by SKILL.md and its folder, Ag2 Subagent Delegation needs Python for the scripts in its folder. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Ag2 Subagent Delegation is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Ag2 Subagent Delegation: OMA Multi-Agent Orchestrator (first-fluke/oh-my-agent, 1.3k stars), Swarm Parallel Dispatch (langchain-ai/langchain-skills, 1.3k stars), Cursor Orchestrate (cursor/plugins, 11k stars) and Launching Agent Teams (lexler/skill-factory, 239 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ag2ai (a GitHub organization) maintains it in ag2ai/build-with-ag2, which has 252 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on September 6, 2026.
Source: ag2ai/build-with-ag2 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.