Home › Docs › Adapters › Google ADK

Google ADK Adapter

agent402-google-adk

Four meta tools (find, route, call, about) as FunctionTool instances for Gemini agents on Google's Agent Development Kit.

Install

npm install agent402-google-adk @google/adk zod

Quick start

import { agent402Tools } from "agent402-google-adk";
import { LlmAgent } from "@google/adk";

const tools = await agent402Tools();   // free tier: proof-of-work, no wallet

const agent = new LlmAgent({
  name: "x402-agent",
  model: "gemini-3.6-flash",
  tools,
  instruction: "Use agent402_find to discover the right tool, then agent402_call to invoke it.",
});

Configuration

OptionTypeDescription
fetch typeof fetch A payment-wrapped fetch (@x402/fetch for x402, mppx for MPP) that agent402_call uses for wallet-only tools.
fetchImpl typeof fetch The plain fetch used for the unpaid lookups (find, route, about) and proof-of-work calls. Defaults to the global fetch.
baseUrl string Point to a self-hosted Agent402 instance.
// A payment-wrapped fetch (@x402/fetch for x402, mppx for MPP) that agent402_call uses for wallet-only tools.
agent402Tools({ fetch: payFetch })

// The plain fetch used for the unpaid lookups (find, route, about) and proof-of-work calls. Defaults to the global fetch.
agent402Tools({ fetchImpl: globalThis.fetch })

// Point to a self-hosted Agent402 instance.
agent402Tools({ baseUrl: "https://my-agent402.example.com" })

Works with

Google Agent Development Kit LlmAgent Gemini models
← All adapters Integrations overview GitHub source →