# Interface Event

Represents an event in a conversation between agents and users.

It is used to store the content of the conversation, as well as the actions taken by the agents like function calls, etc.

interface Event {
actions: EventActions;
author?: string;
branch?: string;
citationMetadata?: CitationMetadata;
content?: Content;
customMetadata?: { [key: string]: unknown };
errorCode?: string;
errorMessage?: string;
finishReason?: FinishReason;
groundingMetadata?: GroundingMetadata;
id: string;
inputTranscription?: Transcription;
interrupted?: boolean;
invocationId: string;
liveSessionResumptionUpdate?: LiveServerSessionResumptionUpdate;
longRunningToolIds?: string[];
outputTranscription?: Transcription;
partial?: boolean;
timestamp: number;
turnComplete?: boolean;
usageMetadata?: GenerateContentResponseUsageMetadata;
}

#### Hierarchy (View Summary)

- LlmResponse
  - Event

- Defined in events/event.ts:20

## Properties

### actions

actions: EventActions

The actions taken by the agent.

- Defined in events/event.ts:42

### `Optional` author

author?: string

"user" or the name of the agent, indicating who appended the event to the session.

- Defined in events/event.ts:37

### `Optional` branch

branch?: string

The branch of the event. The format is like agent_1.agent_2.agent_3, where agent_1 is the parent of agent_2, and agent_2 is the parent of agent_3.

Branch is used when multiple sub-agent shouldn't see their peer agents' conversation history.

- Defined in events/event.ts:59

### `Optional` citationMetadata

citationMetadata?: CitationMetadata

The citation metadata of the response.

Inherited from LlmResponse.citationMetadata

- Defined in models/llm_response.ts:36

### `Optional` content

content?: Content

The content of the response.

Inherited from LlmResponse.content

- Defined in models/llm_response.ts:26

### `Optional` customMetadata

customMetadata?: { [key: string]: unknown }

The custom metadata of the LlmResponse. An optional key-value pair to label an LlmResponse. NOTE: the entire object must be JSON serializable.

Inherited from LlmResponse.customMetadata

- Defined in models/llm_response.ts:71

### `Optional` errorCode

errorCode?: string

Error code if the response is an error. Code varies by model.

Inherited from LlmResponse.errorCode

- Defined in models/llm_response.ts:53

### `Optional` errorMessage

errorMessage?: string

Error message if the response is an error.

Inherited from LlmResponse.errorMessage

- Defined in models/llm_response.ts:58

### `Optional` finishReason

finishReason?: FinishReason

The finish reason of the response.

Inherited from LlmResponse.finishReason

- Defined in models/llm_response.ts:81

### `Optional` groundingMetadata

groundingMetadata?: GroundingMetadata

The grounding metadata of the response.

Inherited from LlmResponse.groundingMetadata

- Defined in models/llm_response.ts:31

### id

id: string

The unique identifier of the event. Do not assign the ID. It will be assigned by the session.

- Defined in events/event.ts:25

### `Optional` inputTranscription

inputTranscription?: Transcription

Audio transcription of user input.

Inherited from LlmResponse.inputTranscription

- Defined in models/llm_response.ts:91

### `Optional` interrupted

interrupted?: boolean

Flag indicating that LLM was interrupted when generating the content. Usually it's due to user interruption during a bidi streaming.

Inherited from LlmResponse.interrupted

- Defined in models/llm_response.ts:64

### invocationId

invocationId: string

The invocation ID of the event. Should be non-empty before appending to a session.

- Defined in events/event.ts:31

### `Optional` liveSessionResumptionUpdate

liveSessionResumptionUpdate?: LiveServerSessionResumptionUpdate

The session resumption update of the LlmResponse

Inherited from LlmResponse.liveSessionResumptionUpdate

- Defined in models/llm_response.ts:86

### `Optional` longRunningToolIds

longRunningToolIds?: string[]

Set of ids of the long running function calls. Agent client will know from this field about which function call is long running. Only valid for function call event

- Defined in events/event.ts:49

### `Optional` outputTranscription

outputTranscription?: Transcription

Audio transcription of model output.

Inherited from LlmResponse.outputTranscription

- Defined in models/llm_response.ts:96

### `Optional` partial

partial?: boolean

Indicates whether the text content is part of a unfinished text stream. Only used for streaming mode and when the content is plain text.

Inherited from LlmResponse.partial

- Defined in models/llm_response.ts:42

### timestamp

timestamp: number

The timestamp of the event.

- Defined in events/event.ts:64

### `Optional` turnComplete

turnComplete?: boolean

Indicates whether the response from the model is complete. Only used for streaming mode.

Inherited from LlmResponse.turnComplete

- Defined in models/llm_response.ts:48

### `Optional` usageMetadata

usageMetadata?: GenerateContentResponseUsageMetadata

The usage metadata of the LlmResponse.

Inherited from LlmResponse.usageMetadata

- Defined in models/llm_response.ts:76