Skip to main content

Interface: SpawnAgentSegment

Defined in: packages/core/src/stream-segments/types.ts:90

Deprecated

Use ToolCallSegment with name='spawn_agent' instead. Kept for v1 backward compatibility.

Extends

Properties

agentId?

optional agentId?: string

Defined in: packages/core/src/stream-segments/types.ts:20

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

Inherited from

BaseSegment.agentId


agentName?

optional agentName?: string

Defined in: packages/core/src/stream-segments/types.ts:22

Display name of the agent

Inherited from

BaseSegment.agentName


agentType

agentType: string

Defined in: packages/core/src/stream-segments/types.ts:98

Agent type: "Task" (has write tools) or "Explore" (read-only tools)


avatarEmoji?

optional avatarEmoji?: string

Defined in: packages/core/src/stream-segments/types.ts:24

Avatar emoji for display

Inherited from

BaseSegment.avatarEmoji


childSegments

childSegments: StreamSegment[]

Defined in: packages/core/src/stream-segments/types.ts:100

Child agent segments - rendered with same UI as parent chat


currentIteration

currentIteration: number

Defined in: packages/core/src/stream-segments/types.ts:102

Current iteration count


error?

optional error?: string

Defined in: packages/core/src/stream-segments/types.ts:110

Error message if failed


goal

goal: string

Defined in: packages/core/src/stream-segments/types.ts:96

Goal passed to spawn_agent


id

id: string

Defined in: packages/core/src/stream-segments/types.ts:16

Unique identifier for React keys

Inherited from

BaseSegment.id


maxIterations

maxIterations: number

Defined in: packages/core/src/stream-segments/types.ts:104

Max iterations allowed


name?

optional name?: string

Defined in: packages/core/src/stream-segments/types.ts:94

Display name for this agent (set by parent)


result?

optional result?: unknown

Defined in: packages/core/src/stream-segments/types.ts:108

Final result when complete


status

status: "completed" | "running" | "failed"

Defined in: packages/core/src/stream-segments/types.ts:112

Status for display


timestamp

timestamp: number

Defined in: packages/core/src/stream-segments/types.ts:18

Timestamp for ordering

Inherited from

BaseSegment.timestamp


tokensUsed

tokensUsed: number

Defined in: packages/core/src/stream-segments/types.ts:106

Tokens used so far


toolCallId

toolCallId: string

Defined in: packages/core/src/stream-segments/types.ts:92


type

type: "spawn_agent"

Defined in: packages/core/src/stream-segments/types.ts:91