Skip to main content

Signature

PromptDefinition (first pass)

Subagent Semantics

SubagentToolConfig defines behavior on the relationship between this prompt and a callable dual_ai agent.
  • non-resumable subagents behave like direct tool calls
  • resumable subagents are lifecycle-managed by runtime tools
  • initial payload/name mappings are controlled by init*Property options
  • immediate: true runs the child immediately when the prompt activates
  • immediate: { ... } makes the relationship explicit: nameEnv and descriptionEnv are the only envs exposed to the internal bootstrap model, while scopedEnv is copied to the child thread but remains runtime-only
For resumable subagents, runtime tools are injected:
  • subagent_create
  • subagent_message
subagent_create requires a non-empty name argument for the spawned child instance. subagent_create.arguments is shaped from the prompt schema on the child side selected by resumable.receives_messages. AgentBuilder persists those values with the child thread, exposes them to both child sides as ThreadState.arguments, and makes top-level keys available to prompt variable interpolation.

Example: orchestrator with resumable non-blocking subagent

Attachment Mapping Notes

When initAttachmentsProperty is used for subagents:
  • source attachment paths are validated in parent thread
  • files are copied parent -> child filesystem
  • child receives rewritten destination-local paths