Skip to main content

Interface: ToolCallSegment

Defined in: core/dist/types/stream-segments/types.d.ts:33

Tool call segment (covers full lifecycle)

Extends

Properties

agentId?

optional agentId?: string

Defined in: core/dist/types/stream-segments/types.d.ts:18

Agent that produced this segment (populated in group chat contexts)

Inherited from

BaseSegment.agentId


agentName?

optional agentName?: string

Defined in: core/dist/types/stream-segments/types.d.ts:20

Display name of the agent

Inherited from

BaseSegment.agentName


approvalId?

optional approvalId?: string

Defined in: core/dist/types/stream-segments/types.d.ts:60

AI SDK approval id, set while status is awaiting_approval. Pass this back in the resume call's approvalResponses entry.


args?

optional args?: unknown

Defined in: core/dist/types/stream-segments/types.d.ts:40

Parsed arguments passed to the tool


avatarEmoji?

optional avatarEmoji?: string

Defined in: core/dist/types/stream-segments/types.d.ts:22

Avatar emoji for display

Inherited from

BaseSegment.avatarEmoji


childSegments?

optional childSegments?: StreamSegment[]

Defined in: core/dist/types/stream-segments/types.d.ts:69

Child segments for recursive tool calls (spawn_agent, pipelines, etc.)


error?

optional error?: string

Defined in: core/dist/types/stream-segments/types.d.ts:48

Error message if the tool call failed


id

id: string

Defined in: core/dist/types/stream-segments/types.d.ts:14

Unique identifier for React keys

Inherited from

BaseSegment.id


interruptId?

optional interruptId?: string

Defined in: core/dist/types/stream-segments/types.d.ts:65

Baleybots interrupt id, set while status is awaiting_interrupt (mid-execute askHuman). Resume via ProcessOptions.interruptResponses.


interruptSpec?

optional interruptSpec?: unknown

Defined in: core/dist/types/stream-segments/types.d.ts:67

Spec for UI rendering while awaiting_interrupt


name

name: string

Defined in: core/dist/types/stream-segments/types.d.ts:38

Tool function name (e.g. 'spawn_agent', 'search')


rawArgs?

optional rawArgs?: string

Defined in: core/dist/types/stream-segments/types.d.ts:42

Raw JSON arguments as streamed (unparsed)


result?

optional result?: unknown

Defined in: core/dist/types/stream-segments/types.d.ts:46

Return value from the tool execution


status

status: "awaiting_interrupt" | "completed" | "running" | "failed" | "awaiting_approval"

Defined in: core/dist/types/stream-segments/types.d.ts:55

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).


streamingOutput?

optional streamingOutput?: string

Defined in: core/dist/types/stream-segments/types.d.ts:44

Live streamed output chunks before final result


timestamp

timestamp: number

Defined in: core/dist/types/stream-segments/types.d.ts:16

Timestamp for ordering

Inherited from

BaseSegment.timestamp


toolCallId

toolCallId: string

Defined in: core/dist/types/stream-segments/types.d.ts:36

Provider-assigned identifier for this tool call


type

type: "tool_call"

Defined in: core/dist/types/stream-segments/types.d.ts:34