axonpush
TypeScript SDKIntegrations

Google ADK

axonPushADKCallbacks returns the before/after agent, model, and tool hooks that the Google Agent Development Kit expects.

axonPushADKCallbacks(config) returns an object with the six hooks the Google Agent Development Kit calls around agents, models, and tools. Wire it into your agent’s callback configuration and each hook publishes one axonpush event.

Tested against the public Google ADK preview (@google/adk ^0.1). The ADK hook surface is still moving; this integration tracks the before/after agent, model, and tool trio, which has been stable since the developer preview.

Install

npm install @axonpush/sdk @google/adk

Wire up the callbacks

import { AxonPush, axonPushADKCallbacks } from "@axonpush/sdk";

const client = new AxonPush();
const callbacks = axonPushADKCallbacks({
  client,
  channelId: process.env.AXONPUSH_CHANNEL_ID!,
  agentId: "adk-agent",
});

const agent = new Agent({
  name: "assistant",
  model: "gemini-2.0-flash",
  tools: [webSearch, codeExecution],
  callbacks,
});

The returned object is a plain bundle of six functions, so if the ADK version you are on names its callback config differently, destructure and attach the hooks individually rather than passing the bundle whole.

agentId defaults to "google-adk".

What gets emitted

HookIdentifieraxonpush eventTypePayload
beforeAgent(agent)agent.startagent.startagent_name
afterAgent(agent, output)agent.endagent.endagent_name, truncated output
beforeModel(model, params)llm.startagent.startmodel, truncated params
afterModel(model, response)llm.endagent.endmodel, truncated response
beforeTool(tool, input)tool.{name}.startagent.tool_call.starttool_name, truncated input
afterTool(tool, output)tool.{name}.endagent.tool_call.endtool_name, truncated output

The model name is read from model.modelId, falling back to model.name, then "unknown". Agent and tool names fall back to "unknown" the same way, so a malformed hook argument degrades into a readable event rather than an exception.

Every truncated field is JSON-serialised and cut at 500 characters, then run through the client’s redactor, under the default metadata_only capture mode, params, input, output, and response are replaced before transport. All events carry metadata.framework: "google-adk" and share one trace for the life of the callback bundle.