Open History to see the last commit
1---
2id: SubagentHandleData
3title: SubagentHandleData
4---
5
6Defined in: [packages/ai/src/types.ts:502](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L502)
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:516](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L516)
27
28***
29
30### id
31
32```ts
33id: string;
34```
35
36Defined in: [packages/ai/src/types.ts:509](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L509)
37
38***
39
40### interruptIds?
41
42```ts
43optional interruptIds?: string[];
44```
45
46Defined in: [packages/ai/src/types.ts:514](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L514)
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:515](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L515)
59
60***
61
62### parentRunId?
63
64```ts
65optional parentRunId?: string;
66```
67
68Defined in: [packages/ai/src/types.ts:512](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L512)
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:510](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L510)