Interface: ToolCallSegment
Defined in: packages/core/src/stream-segments/types.ts:34
One tool call through its whole lifecycle.
Extends
Properties
agentId?
optionalagentId?:string
Defined in: packages/core/src/stream-segments/types.ts:14
Set in group chat.
Inherited from
agentName?
optionalagentName?:string
Defined in: packages/core/src/stream-segments/types.ts:15
Inherited from
approvalId?
optionalapprovalId?:string
Defined in: packages/core/src/stream-segments/types.ts:62
AI SDK approval id, set while status is awaiting_approval.
Pass this back in the resume call's approvalResponses entry.
args?
optionalargs?:unknown
Defined in: packages/core/src/stream-segments/types.ts:44
avatarEmoji?
optionalavatarEmoji?:string
Defined in: packages/core/src/stream-segments/types.ts:16
Inherited from
childSegments?
optionalchildSegments?:StreamSegment[]
Defined in: packages/core/src/stream-segments/types.ts:71
Segments of an agent the tool ran (a subagent, a pipeline).
display?
optionaldisplay?:ToolCallDisplay
Defined in: packages/core/src/stream-segments/types.ts:43
The display the tool declares, resolved for this call. Renderers pick a
card by display.kind and fall back to a generic one without it.
error?
optionalerror?:string
Defined in: packages/core/src/stream-segments/types.ts:50
id
id:
string
Defined in: packages/core/src/stream-segments/types.ts:10
Inherited from
interruptId?
optionalinterruptId?:string
Defined in: packages/core/src/stream-segments/types.ts:67
Baleybots interrupt id, set while status is awaiting_interrupt
(mid-execute askHuman). Resume via ProcessOptions.interruptResponses.
interruptSpec?
optionalinterruptSpec?:unknown
Defined in: packages/core/src/stream-segments/types.ts:69
What the UI renders while awaiting_interrupt.
modelOutput?
optionalmodelOutput?:unknown
Defined in: packages/core/src/stream-segments/types.ts:84
What the result was sent to the model as, when that is not result itself: an AI SDK tool-result output carrying Anthropic tool references (reference-only, its words stashed beside them). Resent as it was.
name
name:
string
Defined in: packages/core/src/stream-segments/types.ts:38
producer?
optionalproducer?:object
Defined in: packages/core/src/stream-segments/types.ts:78
The provider and model that made the call.
model
model:
string
provider
provider:
string
providerMetadata?
optionalproviderMetadata?:Record<string,unknown>
Defined in: packages/core/src/stream-segments/types.ts:76
The provider's metadata on the call (Anthropic: caller), resent with it
when the turn is rebuilt — only to the same producer.
rawArgs?
optionalrawArgs?:string
Defined in: packages/core/src/stream-segments/types.ts:46
The arguments' JSON text as streamed, unparsed.
result?
optionalresult?:unknown
Defined in: packages/core/src/stream-segments/types.ts:49
status
status:
"awaiting_interrupt"|"completed"|"failed"|"running"|"awaiting_approval"
Defined in: packages/core/src/stream-segments/types.ts:57
Status for display. awaiting_approval means the tool is gated by
requiresApproval and the loop is paused pending a user decision — the
UI should render an approve/reject prompt and resume via
ProcessOptions.approvalResponses (see approvalId).
step?
optionalstep?:number
Defined in: packages/core/src/stream-segments/types.ts:24
The model step (0-based, within its turn) that produced this segment.
History stamps it when the step finishes, so a turn is rebuilt for the
next request one step at a time, in the order it was sent (see
deriveAPIMessages). Absent on segments stored without it, which are
rebuilt as one assistant message per turn.
Inherited from
streamingOutput?
optionalstreamingOutput?:string
Defined in: packages/core/src/stream-segments/types.ts:48
Output the tool streamed before its result.
timestamp
timestamp:
number
Defined in: packages/core/src/stream-segments/types.ts:12
Epoch milliseconds.
Inherited from
toolCallId
toolCallId:
string
Defined in: packages/core/src/stream-segments/types.ts:37
Provider-assigned.
type
type:
"tool_call"
Defined in: packages/core/src/stream-segments/types.ts:35