.praisonai/agents/*.md files into composable delegation targets your running agent can hand sub-tasks to, all from the CLI.
This is CLI-first delegation of named user agents — distinct from the SDK-level Subagent Tool and Subagent Delegation. No Python required: define agents as one-file Markdown definitions and expose them with a single flag.
Quick Start
Create two named agents
Add agent definitions under
.praisonai/agents/. Each file’s name is the agent name..praisonai/agents/researcher.md
.praisonai/agents/summariser.md
How It Works
The primary agent callsspawn_subagent(agent_name="researcher", ...); a resolver builds that named agent from its Markdown definition and runs the sub-task under its own model, tools, and permissions.
| Piece | Role |
|---|---|
--subagents a,b,c | Explicit allow-list of delegatable agent names |
mode: subagent | Frontmatter marker that opts an agent in when no allow-list is given |
| Resolver | Builds the named agent from its definition and runs it |
| Fallback | Unresolvable names use the generic spawn path instead |
Two Ways to Opt In
Expose agents either explicitly from the CLI or by marking the definition file.--subagents researcher,summariser— an explicit allow-list that wins over any marker. Opt any named agent in without editing it.mode: subagent— a frontmatter marker exposing that agent whenever no allow-list is passed.
mode: subagent is a delegatability marker, not a permission mode. It is ignored by the permission engine, so it never restricts what the agent can do — for that, use a permission block or a permission mode like plan or read-only.Fallback Behaviour
When the model targets a name that isn’t a delegatable agent, the tool uses the generic spawn path instead of failing.spawn_subagent(agent_name="explorer") and explorer isn’t in the allow-list, a generic subagent handles the task — see Subagent Tool. Delegation to named agents is fully backward-compatible: with no --subagents and no mode: subagent markers, runs behave exactly as before.
Common Patterns
Compose named agents into small pipelines from the CLI.Best Practices
Give each agent a clear goal
Give each agent a clear goal
The
goal (or role) becomes the description the primary model sees when routing. One sharp sentence per agent helps it pick the right delegate.Remember mode: subagent is a marker, not a permission
Remember mode: subagent is a marker, not a permission
It only makes an agent delegatable. Scope what a delegate can do with a
permission block or a permission mode (plan, read-only, review) in its frontmatter.Let delegates keep their own model and tools
Let delegates keep their own model and tools
Each named agent runs under its own definition, so a cheap model can handle research while a stronger one writes — no extra wiring needed.
Related
Subagent Tool
The SDK-level tool that powers spawning and the generic fallback path.
Subagent Delegation
Programmatic delegation with scoped permissions and concurrency control.

