Skip to main content
weave / WeaveAdkPlugin ADK plugin that emits runner invocations, agent runs, model calls and tool executions as GenAI-semconv OTel spans on Weave’s agents pipeline. Implements the full BasePlugin surface structurally. ADK’s PluginManager invokes every callback, so all are present even where a callback is a no-op. ADK treats any non-undefined return as a short-circuit, so every callback swallows its own errors and returns undefined.

Implements

  • BasePlugin

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new WeaveAdkPlugin(): WeaveAdkPlugin

Returns

WeaveAdkPlugin

Properties

name

Readonly name: "weave"

Implementation of

AdkBasePlugin.name

Defined in

src/integrations/googleAdk.ts:590

Methods

afterAgentCallback

afterAgentCallback(params): Promise<undefined>

Parameters

NameType
paramsObject
params.agentBaseAgent
params.callbackContextContext

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.afterAgentCallback

Defined in

src/integrations/googleAdk.ts:779

afterContextCompaction

afterContextCompaction(_params): Promise<undefined>

Parameters

NameType
_paramsunknown

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.afterContextCompaction

Defined in

src/integrations/googleAdk.ts:997

afterModelCallback

afterModelCallback(params): Promise<undefined>

Parameters

NameType
paramsObject
params.callbackContextContext
params.llmResponseLlmResponse

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.afterModelCallback

Defined in

src/integrations/googleAdk.ts:841

afterRunCallback

afterRunCallback(params): Promise<undefined>

Parameters

NameType
paramsObject
params.invocationContextInvocationContext

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.afterRunCallback

Defined in

src/integrations/googleAdk.ts:713

afterToolCallback

afterToolCallback(params): Promise<undefined>

Parameters

NameType
paramsObject
params.resultnull | Record<string, unknown>
params.toolBaseTool
params.toolArgsRecord<string, unknown>
params.toolContextContext

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.afterToolCallback

Defined in

src/integrations/googleAdk.ts:965

beforeAgentCallback

beforeAgentCallback(params): Promise<undefined>

Parameters

NameType
paramsObject
params.agentBaseAgent
params.callbackContextContext

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.beforeAgentCallback

Defined in

src/integrations/googleAdk.ts:765

beforeContextCompaction

beforeContextCompaction(_params): Promise<undefined>

Parameters

NameType
_paramsunknown

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.beforeContextCompaction

Defined in

src/integrations/googleAdk.ts:993

beforeModelCallback

beforeModelCallback(params): Promise<undefined>

Parameters

NameType
paramsObject
params.callbackContextContext
params.llmRequestLlmRequest

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.beforeModelCallback

Defined in

src/integrations/googleAdk.ts:804

beforeRunCallback

beforeRunCallback(params): Promise<undefined>

Parameters

NameType
paramsObject
params.invocationContextInvocationContext

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.beforeRunCallback

Defined in

src/integrations/googleAdk.ts:621

beforeToolCallback

beforeToolCallback(params): Promise<undefined>

Parameters

NameType
paramsObject
params.toolBaseTool
params.toolArgsRecord<string, unknown>
params.toolContextContext

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.beforeToolCallback

Defined in

src/integrations/googleAdk.ts:918

beforeToolSelection

beforeToolSelection(_params): Promise<undefined>

Parameters

NameType
_paramsunknown

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.beforeToolSelection

Defined in

src/integrations/googleAdk.ts:914

finishInterruptedInvocation

finishInterruptedInvocation(invocationId): void Finalizes a run that never reached afterRunCallback. ADK only dispatches afterRunCallback after the event loop drains normally, so a consumer that breaks out of runAsync early — or an aborted run — leaves the invocation (and its spans) open. The auto-instrument runner wrapper calls this from a finally to close them as interrupted. Idempotent: a no-op once the run has already finished (the common, fully-consumed case).

Parameters

NameType
invocationIdstring

Returns

void

Defined in

src/integrations/googleAdk.ts:732

onEventCallback

onEventCallback(params): Promise<undefined>

Parameters

NameType
paramsObject
params.eventEvent
params.invocationContextInvocationContext

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.onEventCallback

Defined in

src/integrations/googleAdk.ts:693

onModelErrorCallback

onModelErrorCallback(params): Promise<undefined>

Parameters

NameType
paramsObject
params.callbackContextContext
params.errorError
params.llmRequestLlmRequest

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.onModelErrorCallback

Defined in

src/integrations/googleAdk.ts:884

onToolErrorCallback

onToolErrorCallback(params): Promise<undefined>

Parameters

NameType
paramsObject
params.errorError
params.toolBaseTool
params.toolArgsRecord<string, unknown>
params.toolContextContext

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.onToolErrorCallback

Defined in

src/integrations/googleAdk.ts:977

onUserMessageCallback

onUserMessageCallback(_params): Promise<undefined>

Parameters

NameType
_paramsObject
_params.invocationContextInvocationContext
_params.userMessageContent

Returns

Promise<undefined>

Implementation of

AdkBasePlugin.onUserMessageCallback

Defined in

src/integrations/googleAdk.ts:614