agent-sdk / Exports / IAgentDefinition
Interface: IAgentDefinition
Definition of an agent that can be spawned as a subagent.
Built-in agents and custom (user-defined) agents share this shape. Optional fields inherit from the parent session when omitted.
Table of contents
Properties
Properties
name
• name: string
Unique name used to reference the agent (e.g., 'Explore', 'Plan').
Defined in
agent-sdk/src/agents/agent-definition-types.ts:9
description
• description: string
Human-readable description of the agent's purpose.
Defined in
agent-sdk/src/agents/agent-definition-types.ts:12
systemPrompt
• systemPrompt: string
Markdown body content used as the agent's system prompt.
Defined in
agent-sdk/src/agents/agent-definition-types.ts:15
model
• Optional model: string
Model override (e.g., 'claude-haiku-4-5', 'sonnet', 'opus'). Inherits parent model when omitted.
Defined in
agent-sdk/src/agents/agent-definition-types.ts:18
maxTurns
• Optional maxTurns: number
Maximum number of agentic turns the subagent may execute.
Defined in
agent-sdk/src/agents/agent-definition-types.ts:21
tools
• Optional tools: string[]
Allowlist of tool names. Only these tools are available when set.
Defined in
agent-sdk/src/agents/agent-definition-types.ts:24
disallowedTools
• Optional disallowedTools: string[]
Denylist of tool names. These tools are removed from the inherited set.