Subagent Recipes¶
Standard subagent recipes for common default rosters.
Factories, not module-level constants: a SubAgentSpec wraps an
LLMAgentBuilder recipe, which needs an LLM — there is no zero-config
answer the way DEFAULT_TOOLS is for tools. Roster is general +
explore, the intersection of the subagent rosters shipped by other
harnesses (a full-tools generalist and a read-only, cheap-to-run lookup
agent).
general_subagent
¶
Return a general-purpose subagent spec.
Equipped with DEFAULT_TOOLS. Suited to open-ended, multi-step,
context-heavy side work — the same profile as the coordinator minus
the dispatch tool (depth 1) and a disposable per-dispatch context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
llm
|
LLM
|
Backbone LLM for the subagent. |
required |
name
|
str
|
Registry key / dispatch enum value.
Defaults to |
GENERAL_NAME
|
max_steps
|
int
|
Cap on steps per dispatch. Defaults
to |
GENERAL_MAX_STEPS
|
memories
|
list[Memory] | None
|
Memory backends for the subagent. Defaults to None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
SubAgentSpec |
SubAgentSpec
|
A spec wrapping a |
Source code in src/llm_agents_from_scratch/subagents/recipes.py
explore_subagent
¶
Return a read-only, lookup-tuned subagent spec.
Equipped with only ReadFileTool — read-only by construction:
the tool subset itself is the permission boundary, no separate
permission system required. A cheap, fast option for lookups,
well suited to a smaller model than the coordinator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
llm
|
LLM
|
Backbone LLM for the subagent. |
required |
name
|
str
|
Registry key / dispatch enum value.
Defaults to |
EXPLORE_NAME
|
max_steps
|
int
|
Cap on steps per dispatch. Lower
than |
EXPLORE_MAX_STEPS
|
memories
|
list[Memory] | None
|
Memory backends for the subagent. Defaults to None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
SubAgentSpec |
SubAgentSpec
|
A spec wrapping a |