Open History to see the last commit
1---
2id: CustomEvent
3title: CustomEvent
4---
5
6Defined in: [packages/ai/src/types.ts:1414](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1414)
7
8Custom event for extensibility.
9
10@ag-ui/core provides: `name`, `value`, `subagentRunId?`
11
12## Extends
13
14- `Omit`\<`AGUICustomEvent`, `"type"`\>
15
16## Extended by
17
18- [`StructuredOutputCompleteEvent`](StructuredOutputCompleteEvent.md)
19- [`StructuredOutputStartEvent`](StructuredOutputStartEvent.md)
20- [`ApprovalRequestedEvent`](ApprovalRequestedEvent.md)
21- [`ToolInputAvailableEvent`](ToolInputAvailableEvent.md)
22- [`UIResourceEvent`](UIResourceEvent.md)
23- [`SandboxFileCustomEvent`](SandboxFileCustomEvent.md)
24- [`SandboxFileDiffEvent`](SandboxFileDiffEvent.md)
25- [`FileChangedEvent`](FileChangedEvent.md)
26- [`SessionIdEvent`](SessionIdEvent.md)
27- [`CodeModeExecutionStartedEvent`](CodeModeExecutionStartedEvent.md)
28- [`CodeModeConsoleEvent`](CodeModeConsoleEvent.md)
29- [`CodeModeExternalCallEvent`](CodeModeExternalCallEvent.md)
30- [`CodeModeExternalResultEvent`](CodeModeExternalResultEvent.md)
31- [`CodeModeExternalErrorEvent`](CodeModeExternalErrorEvent.md)
32- [`CodeModeSnippetCallEvent`](CodeModeSnippetCallEvent.md)
33- [`CodeModeSnippetResultEvent`](CodeModeSnippetResultEvent.md)
34- [`CodeModeSnippetErrorEvent`](CodeModeSnippetErrorEvent.md)
35- [`SnippetRegisteredEvent`](SnippetRegisteredEvent.md)
36
37## Properties
38
39### metadata?
40
41```ts
42optional metadata?: Record<string, any>;
43```
44
45Defined in: [packages/ai/src/types.ts:1416](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1416)
46
47Extra information attached to this event.
48
49#### Overrides
50
51```ts
52Omit.metadata
53```
54
55***
56
57### type
58
59```ts
60type: "CUSTOM";
61```
62
63Defined in: [packages/ai/src/types.ts:1415](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1415)