GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • ADK for TypeScript: API Reference

This view

  • Original page
  • New address

GeezerVison is showing adk.dev — Event | ADK for TypeScript: API Reference - v2.5.0

  • Event

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 {
    "[EVENT_SIGNATURE_SYMBOL]"?: true;
    actions: EventActions;
    author?: string;
    branch?: string;
    citationMetadata?: CitationMetadata;
    content?: Content;
    customMetadata?: { [key: string]: unknown };
    errorCode?: string;
    errorMessage?: string;
    finishReason?: FinishReason;
    goAway?: LiveServerGoAway;
    groundingMetadata?: GroundingMetadata;
    id: string;
    inputTranscription?: Transcription;
    interactionId?: string;
    interrupted?: boolean;
    invocationId: string;
    isolationScope?: string;
    liveSessionId?: string;
    liveSessionResumptionUpdate?: LiveServerSessionResumptionUpdate;
    longRunningToolIds?: string[];
    modelVersion?: string;
    nodeInfo?: NodeInfo;
    output?: unknown;
    outputTranscription?: Transcription;
    partial?: boolean;
    route?: Route;
    timestamp: number;
    turnComplete?: boolean;
    usageMetadata?: GenerateContentResponseUsageMetadata;
}

Hierarchy (View Summary)

  • LlmResponse
    • Event
      • CompactedEvent
      • NodeErrorEvent
  • Defined in core/src/events/event.ts:74

Properties

Optional Readonly[EVENT_SIGNATURE_SYMBOL]

"[EVENT_SIGNATURE_SYMBOL]"?: true

Signature brand identifying this object as an ADK Event.

Set by createEvent and checked by isEvent. Optional because events are also reconstructed from storage/session payloads, where the (non-serializable) brand is absent.

  • Defined in core/src/events/event.ts:82

actions

actions: EventActions

The actions taken by the agent.

  • Defined in core/src/events/event.ts:105

Optionalauthor

author?: string

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

  • Defined in core/src/events/event.ts:100

Optionalbranch

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 core/src/events/event.ts:122

OptionalcitationMetadata

citationMetadata?: CitationMetadata

The citation metadata of the response.

Inherited from LlmResponse.citationMetadata

  • Defined in core/src/models/llm_response.ts:37

Optionalcontent

content?: Content

The content of the response.

Inherited from LlmResponse.content

  • Defined in core/src/models/llm_response.ts:27

OptionalcustomMetadata

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 core/src/models/llm_response.ts:72

OptionalerrorCode

errorCode?: string

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

Inherited from LlmResponse.errorCode

  • Defined in core/src/models/llm_response.ts:54

OptionalerrorMessage

errorMessage?: string

Error message if the response is an error.

Inherited from LlmResponse.errorMessage

  • Defined in core/src/models/llm_response.ts:59

OptionalfinishReason

finishReason?: FinishReason

The finish reason of the response.

Inherited from LlmResponse.finishReason

  • Defined in core/src/models/llm_response.ts:82

OptionalgoAway

goAway?: LiveServerGoAway

Server-side signal that the live connection will be closed soon. The caller should reconnect using the latest session resumption handle.

Inherited from LlmResponse.goAway

  • Defined in core/src/models/llm_response.ts:93

OptionalgroundingMetadata

groundingMetadata?: GroundingMetadata

The grounding metadata of the response.

Inherited from LlmResponse.groundingMetadata

  • Defined in core/src/models/llm_response.ts:32

id

id: string

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

  • Defined in core/src/events/event.ts:88

OptionalinputTranscription

inputTranscription?: Transcription

Audio transcription of user input.

Inherited from LlmResponse.inputTranscription

  • Defined in core/src/models/llm_response.ts:98

OptionalinteractionId

interactionId?: string

The interaction ID returned by the model, if any.

Inherited from LlmResponse.interactionId

  • Defined in core/src/models/llm_response.ts:108

Optionalinterrupted

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 core/src/models/llm_response.ts:65

invocationId

invocationId: string

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

  • Defined in core/src/events/event.ts:94

OptionalisolationScope

isolationScope?: string

Workflow: scope tag used to isolate multi-agent conversations so peer scopes don't see each other's events. Mirrors Python Event.isolation_scope.

  • Defined in core/src/events/event.ts:155

OptionalliveSessionId

liveSessionId?: string

The session ID of the Live session.

Inherited from LlmResponse.liveSessionId

  • Defined in core/src/models/llm_response.ts:114

OptionalliveSessionResumptionUpdate

liveSessionResumptionUpdate?: LiveServerSessionResumptionUpdate

The session resumption update of the LlmResponse

Inherited from LlmResponse.liveSessionResumptionUpdate

  • Defined in core/src/models/llm_response.ts:87

OptionallongRunningToolIds

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 core/src/events/event.ts:112

OptionalmodelVersion

modelVersion?: string

The model version used to generate the response.

Inherited from LlmResponse.modelVersion

  • Defined in core/src/models/llm_response.ts:111

OptionalnodeInfo

nodeInfo?: NodeInfo

Workflow: provenance of the emitting node. Mirrors Python Event.node_info.

  • Defined in core/src/events/event.ts:148

Optionaloutput

output?: unknown

Workflow: the structured output produced by the emitting node, if any.

First-class field mirroring google/adk-python Event.output. Used by the workflow engine to carry a node's return value alongside its content.

  • Defined in core/src/events/event.ts:135

OptionaloutputTranscription

outputTranscription?: Transcription

Audio transcription of model output.

Inherited from LlmResponse.outputTranscription

  • Defined in core/src/models/llm_response.ts:103

Optionalpartial

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 core/src/models/llm_response.ts:43

Optionalroute

route?: Route

Workflow: the route key(s) emitted by a routing node, used by the graph to select the matching outgoing edge(s). A single value fires one branch; an array fires every branch whose route matches any listed value (multi-route dispatch). Mirrors Python Event.route.

  • Defined in core/src/events/event.ts:143

timestamp

timestamp: number

The timestamp of the event.

  • Defined in core/src/events/event.ts:127

OptionalturnComplete

turnComplete?: boolean

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

Inherited from LlmResponse.turnComplete

  • Defined in core/src/models/llm_response.ts:49

OptionalusageMetadata

usageMetadata?: GenerateContentResponseUsageMetadata

The usage metadata of the LlmResponse.

Inherited from LlmResponse.usageMetadata

  • Defined in core/src/models/llm_response.ts:77
Properties
[EVENT_SIGNATURE_SYMBOL]actionsauthorbranchcitationMetadatacontentcustomMetadataerrorCodeerrorMessagefinishReasongoAwaygroundingMetadataidinputTranscriptioninteractionIdinterruptedinvocationIdisolationScopeliveSessionIdliveSessionResumptionUpdatelongRunningToolIdsmodelVersionnodeInfooutputoutputTranscriptionpartialroutetimestampturnCompleteusageMetadata
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.