SubAgentDefinition#

Build extensions, choose hooks, and manage request-scoped state. See the guide.

class zett_agent.extensions.subagent.SubAgentDefinition(name, description, system_prompt, model, tools=(), extensions=(), reasoning_effort=ReasoningEffort.MEDIUM, max_iterations=18)[源代码]#

Configure one isolated agent exposed through the task tool.

参数:
name#

Unique lowercase profile name selected by the parent model.

Type:

str

description#

Profile purpose exposed to the parent's tool guidance.

Type:

str

system_prompt#

Instructions used only by this child agent.

Type:

str

model#

Adapter used for delegated inference; caller owns its resources.

Type:

zett_agent.model.AgentModel

tools#

Static tools explicitly granted to the child.

Type:

tuple[zett_agent.tools.base.AgentTool, ...]

extensions#

Child lifecycle extensions, including its history storage. The parent does not inject a separate persistence parameter.

Type:

tuple[zett_agent.extensions.base.AgentExtension, ...]

reasoning_effort#

Default reasoning level for delegated work.

Type:

zett_agent.model.ReasoningEffort

max_iterations#

Model-call budget per child input.

Type:

int