Expose one child Agent as an attached Effect AI Tool. The nonempty application
name is preserved as both Tool name and delegation identity; no prefix is required.
Parameters and result projections default to the child's input and result envelope.
Throws when the name is empty. Nested Tool visibility follows the effective inherited grant.
make("summarize",{
description?:string|undefined
Model-visible description of the delegated capability.
description:"Summarize a support case in three sentences.",
Validate an agent ID and return a shallowly frozen, model-agnostic definition.
make("support",{
DefinitionOptions<String,String,"Use summarize to prepare a concise case summary, then answer the user.",Toolkit<{ readonlysummarize:Tool<"summarize", { readonly parameters:String; readonlysuccess: Struct<...>; readonlyfailure: SubagentToolFailure<...>; readonlyfailureMode: "error"; },AgentSpawner|...1more...|SubagentDurability>; }>,undefined,undefined,undefined>.input: Schema.String
input:
importSchema
Schema.
constString:Schema.String
Type-level representation of
String
.
Schema for string values. Validates that the input is typeof"string".
@category ― models
@since ― 4.0.0
@category ― schemas
@since ― 4.0.0
String,
DefinitionOptions<String,String,"Use summarize to prepare a concise case summary, then answer the user.",Toolkit<{ readonlysummarize:Tool<"summarize", { readonly parameters:String; readonlysuccess: Struct<...>; readonlyfailure: SubagentToolFailure<...>; readonlyfailureMode: "error"; },AgentSpawner|...1more...|SubagentDurability>; }>,undefined,undefined,undefined>.output: Schema.String
output:
importSchema
Schema.
constString:Schema.String
Type-level representation of
String
.
Schema for string values. Validates that the input is typeof"string".
@category ― models
@since ― 4.0.0
@category ― schemas
@since ― 4.0.0
String,
DefinitionOptions<String,String,"Use summarize to prepare a concise case summary, then answer the user.",Toolkit<{ readonlysummarize:Tool<"summarize", { readonly parameters:String; readonlysuccess: Struct<...>; readonlyfailure: SubagentToolFailure<...>; readonlyfailureMode: "error"; },AgentSpawner|...1more...|SubagentDurability>; }>,undefined,undefined,undefined>.instructions: "Use summarize to prepare a concise case summary, then answer the user."
instructions:"Use summarize to prepare a concise case summary, then answer the user.",
DefinitionOptions<String,String,"Use summarize to prepare a concise case summary, then answer the user.",Toolkit<{ readonlysummarize:Tool<"summarize", { readonly parameters:String; readonlysuccess: Struct<...>; readonlyfailure: SubagentToolFailure<...>; readonlyfailureMode: "error"; },AgentSpawner|...1more...|SubagentDurability>; }>,undefined,undefined,undefined>.toolkit: Toolkit.Toolkit<{
This is the primary constructor for creating toolkits. It accepts multiple
tools and organizes them into a toolkit that can be provided to AI language
models.
The real Effect AI Tool to include in the parent Toolkit (SUB-001).
tool),
});
The parent calls summarize like any other tool. The child gets that call’s input, runs with its
own instructions and conversation, and returns { output, budgetExhausted }. Its intermediate
history stays out of the parent’s context. Each agent can use its own model and toolkit.
Subagent.layer(delegation) requires a model: supply it with Layer.provide(model) or provide
it around the parent program. An AutoModel selects from
each new child’s delegated task automatically. A shared selection store retains the child’s
choice for follow-ups; sibling threads select independently.
This defines the agents. Choose how to run them below.
Continues; receives declared updates and a completion report
The user should keep chatting while work runs
Both attached forms use Summarize.tool. Durable execution comes from the host you run them on.
For background work, expose start and follow-up tools instead:
Derive selected background Tools directly from a child Agent, using its ID as the delegation
name and its input/output Schemas as the default contract. Pass an explicit Subagent.make
declaration to customize the name, projections, grants, or policy bounds.
The model-agnostic child Agent Definition this delegation targets (SUB-002).
target,{
start:true
start:true,
followUp:true
followUp:true,
reportToParent:true
reportToParent:true,
});
Give the parent background.toolkit and provide background.layer for its handlers. The
background guide shows how findings become new input to the parent.
Attached children can run concurrently, but the parent’s next model call waits for the batch to
settle. A durable parent releases its execution slot while waiting and recovers the same child
after a restart. Aborting the parent propagates cancellation to attached children.
Background workers keep running after the parent finishes or aborts. Follow-ups continue the
same child thread. Durable hosts recover their accepted work and pending report delivery.
All three forms enforce permissions and budgets. Parent tools are not inherited. See the
subagent reference for projections, nested delegation, and limits, or
durability for recovery of uncertain external actions.