What Are Prompts?
Prompts define:- system instructions (
prompt) - model (
model) - available tools (
tools) - optional context controls and validation
agents/prompts/.
Basic Example
Tool Types in tools
tools accepts multiple forms:
stringcallable nameSubpromptConfigfor prompt-tool optionsPromptToolConfigfor tool-level optionsSubagentToolConfigfordual_aisubagent relationships
Subagent Tool Configuration
UseSubagentToolConfig to define parent -> child behavior:
Important Fields
blocking: wait for child completion or return immediatelyresumable: persistent child instances with message routinginitUserMessageProperty: map args to child initial messageinitAttachmentsProperty: map args to child initial attachment pathsinitAgentNameProperty: map args to child thread display name
Resumable Runtime Tools
When a prompt has resumable subagent configs, AgentBuilder injects runtime tools:subagent_createsubagent_message
Context and Validation
Useful options:includeChatincludePastToolstoolChoicerequiredSchemareasoninghooks
Best Practices
- Keep orchestrator prompts focused on delegation + synthesis
- Put strict production/QA logic into the child
dual_aiagent - Use explicit
init*Propertymappings for predictable payloads - Set reasonable
maxInstanceson resumable children