When to Use Sub-Agents
Sub-agents are useful when:| Use case | Example |
|---|---|
| Specialized expertise | A general support agent delegates billing questions to a Billing Agent |
| Reusable workflows | Several parent workflows call the same Refund Specialist Agent |
| Safer tool access | Only a dedicated agent can use sensitive account or billing tools |
| Clear handoffs | A triage agent gathers context, then delegates a narrow task to another agent |
How Agents Can Invoke Sub-Agents
Duckie supports sub-agent calls from autonomous agents and workflows.From an Autonomous Agent
An autonomous agent can call other agents as tools when those agents are enabled in Callable agents. To configure this:- Open Build > Agents.
- Open the autonomous agent that will call other agents.
- In Callable agents, choose None, All, or specific agents.
- Save the agent.
Agent descriptions matter for delegation. The calling agent uses the target agent’s name and description to decide which sub-agent is appropriate.
From a Workflow
Workflows can invoke an agent from a Tool node by selecting an agent in the Agents tab. To add an Agent action:- Open a workflow in the builder.
- Add a Tool node.
- Open the tool selector and choose Agents.
- Select an active agent.
- Configure the Agent action inputs.
Child Agent Inputs
Every child agent run must receive at least one of:- Instructions - the task or instruction for the child agent
- Conversation history - the parent run’s customer-visible messages
| Input combination | What the child receives |
|---|---|
| Instructions only | The delegated instructions become the child run’s message |
| Conversation history and instructions | The parent conversation is copied first, then the delegated instructions are appended |
| Conversation history only | The copied parent conversation becomes the child run input |
Conversation History
Use conversation history when the child agent needs prior customer messages to complete the task. Workflow Agent actions include conversation history by default. Turn conversation history off when the delegated instructions contain all required context and the child agent should not reason over the full parent conversation.Additional Context
Additional context is available on workflow Agent actions. It is a list, so you can pass more than one context item. Use additional context for structured handoff details such as:- An order lookup result
- A policy excerpt
- A customer segment or plan
- A value generated by an earlier workflow node
additional_context. Child runs also inherit the parent run metadata.
What the Parent Receives
The parent receives a compact result from the child run. The child run’s full transcript and steps stay available on the child run.| Caller | Parent-facing output |
|---|---|
| Autonomous agent | A tool result with success, child_run_id, status, and compact_result |
| Workflow Agent action | A node output with status, resolutionSummary, resolutionType, subRunId, agentId, startWithType, and waitingForInput when relevant |
Customer-Visible Responses
Responder tools still send customer-visible messages. If a child agent uses a responder, Duckie also copies the child-authored response into the parent run messages so the parent run transcript stays complete. Use Send result to calling agent for internal parent-facing output. Use a responder only when the child agent should send a customer-visible response.Best Practices
- Give each sub-agent a clear job boundary.
- Keep agent names and descriptions specific enough for another agent to choose correctly.
- Pass focused instructions, even when including conversation history.
- Include conversation history only when the child needs it.
- Use additional context as a short list of relevant facts, not as a dump of every previous node output.
- Test parent and child behavior together in the playground.
Next Steps
Autonomous Agents
Configure agents that can delegate work at run time
Creating Workflows
Add Agent actions to deterministic workflows
Agent Configuration
Review agent settings and access control
Playground
Test sub-agent handoffs before deployment