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
- ApprovalRequestedStreamChunk
- 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
- StreamChunkType
- ToolCallState
- ToolResultState
Variable References
SubagentRunInput
Defined in: packages/ai/src/activities/chat/agents/define-agent.ts:20
What the library knows about a child run before run starts. TInput is the agent's inputSchema.
Type Parameters#
TInput#
TInput extends SchemaInput | undefined = any
Properties#
abortSignal?#
optional abortSignal?: AbortSignal;Defined in: packages/ai/src/activities/chat/agents/define-agent.ts:29
input#
input: TInput extends SchemaInput ? InferSchemaType<TInput> : undefined;Defined in: packages/ai/src/activities/chat/agents/define-agent.ts:27
The input the parent model or the router gave this child, checked against inputSchema. undefined when the agent has no inputSchema.
messages#
messages: (
| UIMessage<unknown>
| ModelMessage<
| string
| ContentPart<unknown, unknown, unknown, unknown, unknown>[]
| null>)[];Defined in: packages/ai/src/activities/chat/agents/define-agent.ts:28
parentRunId#
parentRunId: string;Defined in: packages/ai/src/activities/chat/agents/define-agent.ts:38
The run this child run continues. It is the parent chat run on the first run, and the interrupted parent run on a resume. Pass it to the child chat().
parentSubagentRunId?#
optional parentSubagentRunId?: string;Defined in: packages/ai/src/activities/chat/agents/define-agent.ts:48
The subagentRunId of the child that started this one, for a nested child.
resume?#
optional resume?: RunAgentResumeItem[];Defined in: packages/ai/src/activities/chat/agents/define-agent.ts:40
Answers to this child's interrupts. Pass it to the child chat().
runId#
runId: string;Defined in: packages/ai/src/activities/chat/agents/define-agent.ts:32
Run id for the child chat().
subagentRunId#
subagentRunId: string;Defined in: packages/ai/src/activities/chat/agents/define-agent.ts:46
The child's AG-UI run id. Stays the same when an interrupted child continues. Pass it to the child chat() so its middleware sees ctx.subagentRunId.
threadId#
threadId: string;Defined in: packages/ai/src/activities/chat/agents/define-agent.ts:30