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
SubagentBudget
Defined in: packages/ai/src/activities/chat/agents/limits.ts:17
The shared budget of one subagent tree.
Properties#
deadline#
readonly deadline: number | undefined;Defined in: packages/ai/src/activities/chat/agents/limits.ts:24
Epoch ms after which this run's children must stop, if any.
depth#
readonly depth: number;Defined in: packages/ai/src/activities/chat/agents/limits.ts:21
The depth of the run that owns this budget view.
limits#
readonly limits: SubagentLimits;Defined in: packages/ai/src/activities/chat/agents/limits.ts:19
Accessors#
calls#
Get Signature#
get calls(): number;Defined in: packages/ai/src/activities/chat/agents/limits.ts:33
How many children the tree started so far.
Returns#
number
Methods#
child()#
child(deadline?): SubagentBudget;Defined in: packages/ai/src/activities/chat/agents/limits.ts:72
The budget a child's own subagents use: one level deeper, same counters.
Parameters#
deadline?#
number
Returns#
SubagentBudget
childTimeout()#
childTimeout(now?): number | undefined;Defined in: packages/ai/src/activities/chat/agents/limits.ts:63
Milliseconds a child started now may run, or undefined for no limit.
Parameters#
now?#
number = ...
Returns#
number | undefined
release()#
release(): void;Defined in: packages/ai/src/activities/chat/agents/limits.ts:58
Undo one reserve. A background start that throws never began.
Returns#
void
reserve()#
reserve(active): string | undefined;Defined in: packages/ai/src/activities/chat/agents/limits.ts:42
Reserve one child spawn. Returns the refusal message the model sees, or undefined when the child may start. active is how many children this run has running now.
Parameters#
active#
number
Returns#
string | undefined
root()#
static root(limits?): SubagentBudget;Defined in: packages/ai/src/activities/chat/agents/limits.ts:28
A budget for a root run.
Parameters#
limits?#
SubagentLimits = {}
Returns#
SubagentBudget