Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

SubagentHandleData.md

80 lines1.8 KB

Defined in: packages/ai/src/types.ts:502

One child invocation as the client sees it. AG-UI SubagentInfo names the child; the other AG-UI fields come from its SUBAGENT_STARTED, SUBAGENT_FINISHED and SUBAGENT_ERROR events. id is the AG-UI subagentRunId. status, parentRunId and messages are client state the spec does not model.

Extends

  • SubagentInfo.Pick<AGUISubagentStartedEvent, "parentSubagentRunId" | "parentToolCallId" | "metadata">

Properties

error?

optional error?: Pick<SubagentErrorEvent, "message" | "code">;

Defined in: packages/ai/src/types.ts:516


id

id: string;

Defined in: packages/ai/src/types.ts:509


interruptIds?

optional interruptIds?: string[];

Defined in: packages/ai/src/types.ts:514

Interrupts this child raised, while status is 'suspended'.


messages

messages: UIMessage<unknown>[];

Defined in: packages/ai/src/types.ts:515


parentRunId?

optional parentRunId?: string;

Defined in: packages/ai/src/types.ts:512

The parent chat run that started this child.


status

status: SubagentStatus;

Defined in: packages/ai/src/types.ts:510