Class References
Function References
- text
- textOptions
- combineStrategies
- convertMessagesToModelMessages
- convertZodToJsonSchema
- createReplayStream
- embedding
- generateMessageId
- maxIterations
- messages
- modelMessageToUIMessage
- modelMessagesToUIMessages
- normalizeToUIMessage
- parsePartialJSON
- summarize
- toServerSentEventsStream
- toServerSentEventsResponse
- toolDefinition
- uiMessageToModelMessages
- realtimeToken
- untilFinishReason
Interface References
- AIAdapter
- AIAdapterConfig
- AgentLoopState
- AudioPart
- AudioVisualization
- BaseStreamChunk
- TextCompletionChunk
- TextOptions
- ChunkRecording
- ChunkStrategy
- ClientTool
- ContentPartSource
- ContentStreamChunk
- DefaultMessageMetadataByModality
- DocumentPart
- DoneStreamChunk
- EmbeddingOptions
- EmbeddingResult
- ErrorStreamChunk
- ImagePart
- InternalToolCallState
- JSONParser
- ModelMessage
- ProcessorResult
- ProcessorState
- RealtimeAdapter
- RealtimeClientOptions
- RealtimeConnection
- RealtimeMessage
- RealtimeSessionConfig
- RealtimeToken
- RealtimeTokenAdapter
- RealtimeTokenOptions
- ResponseFormat
- ServerTool
- StreamProcessorEvents
- StreamProcessorHandlers
- StreamProcessorOptions
- SummarizationOptions
- SummarizationResult
- TextPart
- ThinkingPart
- ThinkingStreamChunk
- Tool
- ToolCall
- ToolCallPart
- ToolCallStreamChunk
- ToolConfig
- ToolDefinition
- ToolDefinitionConfig
- ToolDefinitionInstance
- ToolInputAvailableStreamChunk
- ToolResultPart
- ToolResultStreamChunk
- UIMessage
- VideoPart
Type Alias References
- AgentLoopStrategy
- AnyClientTool
- TextStreamOptionsForModel
- TextStreamOptionsUnion
- ConstrainedContent
- ConstrainedModelMessage
- ContentPart
- ContentPartForModalities
- ExtractModalitiesForModel
- ExtractModelsFromAdapter
- InferToolInput
- InferToolName
- InferToolOutput
- MessagePart
- RealtimeEvent
- RealtimeMessagePart
- RealtimeMode
- RealtimeStatus
- ModalitiesArrayToUnion
- Modality
- StreamChunk
- ToolCallState
- ToolResultState
Variable References
LoadChild
type LoadChild = (subagentRunId, options?) => Promise<
| {
agent?: string;
interruptIds?: string[];
messages: (
| ModelMessage
| UIMessage)[];
parentToolCallId?: string;
pending?: (
| ModelMessage
| UIMessage)[];
}
| undefined>;Defined in: packages/ai/src/activities/chat/middleware/load-child.ts:17
Loads the stored transcript of a finished subagent run by its subagentRunId. Returns undefined for an unknown id. A persistence middleware provides it. The agent tools read it to continue a child by sessionId. When agent is set, only that agent can continue the child. A middleware that provides it must list LoadChildCapability in provides. Only then do the agent tools take sessionId.
With parentSubagentRunId, it loads a nested child: a child that the child parentSubagentRunId started. It returns undefined when that child did not start it. A loader that ignores the option fails closed for nested children.
Parameters#
subagentRunId#
string
options?#
parentSubagentRunId?#
string
Returns#
Promise< | { agent?: string; interruptIds?: string[]; messages: ( | ModelMessage | UIMessage)[]; parentToolCallId?: string; pending?: ( | ModelMessage | UIMessage)[]; } | undefined>