Delegate to subagents
A subagent is an agent the main agent can call like a tool. Delegating a self-contained subtask keeps its intermediate work out of the main conversation: only the subagent’s final answer comes back. Strands harness gives you two ways to add one, your own specialist agents and a built-in general-purpose delegate.
Add your own specialist agents
Section titled “Add your own specialist agents”Pass tools your own Agent instances wrapped with as_tool() / asTool(). Each is a tool named after the
agent’s name, so give each a clear name and description that tells the model when to
reach for it:
from strands import Agentfrom strands_harness import create_harness
researcher = Agent( name="researcher", description="Researches a topic and returns a concise, sourced summary.", system_prompt="Research the given topic and return a concise, sourced summary.",)agent = create_harness(tools=[researcher.as_tool()])import { Agent } from '@strands-agents/sdk'import { createHarness } from '@strands-agents/harness'
const researcher = new Agent({ name: 'researcher', description: 'Researches a topic and returns a concise, sourced summary.', systemPrompt: 'Research the given topic and return a concise, sourced summary.',})const agent = await createHarness({ tools: [researcher.asTool()] })Each call runs from the subagent’s construction-time baseline, a fresh conversation, so a specialist does not accumulate state between calls. The subagent’s name must be unique across the tool set, the same rule as any tool.
The built-in generalist
Section titled “The built-in generalist”Strands harness enables one built-in subagent, generalist, exposed to the agent as a tool. It is a
full Strands harness agent that inherits the parent’s configuration (model, thinking, caching,
context management, built-in tools, plugins, subagents, interventions, and sandbox) but
runs with a generic role prompt instead of your instructions. It starts from a blank
conversation, so the model must put everything the subtask needs into the call, and it
returns a single self-contained answer.
Reach for it when a subtask would otherwise flood the main context: searching many files,
a multi-step change, or open-ended exploration where you only need the conclusion. Because
the generalist inherits interventions and the sandbox, a delegate cannot become an
approval or isolation bypass.
Select or disable built-in subagents
Section titled “Select or disable built-in subagents”The subagent tool is on by default. Set it to False / false in builtin_tools to turn
it off:
from strands_harness import create_harness
agent = create_harness(builtin_tools={"subagent": False}) # no generalist delegateimport { createHarness } from '@strands-agents/harness'
const agent = await createHarness({ builtinTools: { subagent: false } })# pip install strands-agentsfrom strands import Agent
# The generalist is Strands harness-specific; raw Strands Harness SDK has none to disable.agent = Agent()// npm install @strands-agents/sdkimport { Agent } from '@strands-agents/sdk'
// The generalist is Strands harness-specific; raw Strands Harness SDK has none to disable.const agent = new Agent()For the full option list, see the configuration reference.