Ensure child run

ensureChildAgentRun(input: EnsureChildAgentRunInput!): EnsureChildAgentRunResult!

Arguments

ArgumentTypeRequired
inputEnsureChildAgentRunInput!Yes

Input fields

input

EnsureChildAgentRunInput

FieldTypeRequiredDescription
parentRunIdID!YesRun that delegates the work; the caller must hold its current execution credential.
toolCallIdString!YesTool call in the parent run that starts the child; the pair identifies the child run.
requestJSON!YesChild agent and the input to start it with.

Response

Returns EnsureChildAgentRunResult!. Open the type for its fields and nested types.

FieldTypeDescription
childConversationIdID!Task conversation the child run belongs to.
childRunIdID!Child run ID.
childMessageIdID!Message that starts the child run.
agentIdString!Agent that runs the child.
duplicateBoolean!True when the child already existed and was returned instead of created.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation EnsureChildAgentRun($input: EnsureChildAgentRunInput!) {
  ensureChildAgentRun(input: $input) {
    agentId
    childConversationId
    childMessageId
    childRunId
    duplicate
  }
}
json
{
  "input": {
    "parentRunId": "00000000-0000-4000-8000-000000000001",
    "toolCallId": "example",
    "request": {}
  }
}