Open History to see the last commit
1---
2id: SubagentHandleData
3title: SubagentHandleData
4---
5
6Defined in: [packages/ai/src/types.ts:635](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L635)
7
8One child invocation as the client sees it. AG-UI `SubagentInfo` names the
9child; the other AG-UI fields come from its `SUBAGENT_STARTED`,
10`SUBAGENT_FINISHED` and `SUBAGENT_ERROR` events. `id` is the AG-UI
11`subagentRunId`. `status`, `parentRunId` and `messages` are client state the
12spec does not model.
13
14## Extends
15
16- `SubagentInfo`.`Pick`\<`AGUISubagentStartedEvent`, `"parentSubagentRunId"` \| `"parentToolCallId"` \| `"metadata"`\>
17
18## Properties
19
20### error?
21
22```ts
23optional error?: Pick<SubagentErrorEvent, "message" | "code">;
24```
25
26Defined in: [packages/ai/src/types.ts:649](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L649)
27
28***
29
30### id
31
32```ts
33id: string;
34```
35
36Defined in: [packages/ai/src/types.ts:642](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L642)
37
38***
39
40### interruptIds?
41
42```ts
43optional interruptIds?: string[];
44```
45
46Defined in: [packages/ai/src/types.ts:647](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L647)
47
48Interrupts this child raised, while `status` is `'suspended'`.
49
50***
51
52### messages
53
54```ts
55messages: UIMessage<unknown>[];
56```
57
58Defined in: [packages/ai/src/types.ts:648](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L648)
59
60***
61
62### parentRunId?
63
64```ts
65optional parentRunId?: string;
66```
67
68Defined in: [packages/ai/src/types.ts:645](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L645)
69
70The parent chat run that started this child.
71
72***
73
74### status
75
76```ts
77status: SubagentStatus;
78```
79
80Defined in: [packages/ai/src/types.ts:643](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L643)