npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nestjs-adk/google

v1.0.0

Published

Google ADK engine adapter for @nestjs-adk/core — translates decorators into native LlmAgent/FunctionTool at runtime.

Downloads

37

Readme

@nestjs-adk/google

The Google ADK engine for @nestjs-adk/core.

The core package defines how you write agents. This package makes them run. At runtime it translates your decorated NestJS classes into native objects from the Google ADK, so you get Google's production agent loop, tool calling, streaming and OpenTelemetry tracing, while your code stays pure NestJS.

Setup

npm i @nestjs-adk/core @nestjs-adk/google

Pass the engine to the module and you are done:

import { AdkModule } from "@nestjs-adk/core";
import { GoogleAdkEngine } from "@nestjs-adk/google";

AdkModule.forRoot({
	engine: GoogleAdkEngine,
	defaultModel: "gemini-2.5-flash",
})

Authentication follows the ADK rules: set GEMINI_API_KEY in the environment for the Gemini API, or use Vertex AI credentials.

The Gemini model spec

For simple cases a model string is enough. When you need Google specific options, use the Gemini class exported by this package:

import { Gemini } from "@nestjs-adk/google";

defaultModel: new Gemini("gemini-2.5-flash", {
	vertexai: true,
	project: "my-project",
	location: "us-central1",
	labels: { team: "growth" },
	cache: { content: "cachedContents/abc" },
	config: { temperature: 0.2 },
})

labels are attached to every request for billing and cost tracking on Vertex. cache points the requests at an explicit cached content entry, and the cached token count then shows up in run.usage.cachedTokens. config is a free passthrough of GenerateContentConfig, for options like temperature and thinking budgets.

Failover with ModelRouter

The ModelRouter spec from the core runs here on top of the ADK's native routed model:

defaultModel: new ModelRouter({
	targets: {
		primary: new Gemini("gemini-2.5-flash"),
		fallback: new OpenAiLike("gpt-4o-mini", { baseUrl: "https://openrouter.ai/api/v1" }),
	},
})

When the current target fails before the first chunk of the response, the router moves to the next target in order and the run continues. Every switch is emitted as a model_rerouted event and logged as a warning.

OpenAiLike targets are materialized through the adk-llm-bridge, which lets you mix Gemini with any provider that speaks the OpenAI API.

Native compaction

When an agent declares a compaction policy (context: contextPolicy({ compaction: ... })), this engine applies it with the ADK's native context compactors and an LLM summarizer. Old turns are summarized when the history passes the token threshold, and recent turns are kept whole.

Using the ADK Dev UI

Google ships a web interface for inspecting agents, called adk web. Your NestJS agents can appear there through createAdkEntry:

// adk-agents/support/agent.mjs
export const rootAgent = await createAdkEntry(AppModule, SupportAgent);

createAdkEntry boots your Nest application context, resolves the agent with full dependency injection and returns the native LlmAgent that the Dev UI consumes. You get chat, event inspection and tool call traces over your real agents. See the playground in the main repository for a complete working setup.

Learn more

The full documentation lives in @nestjs-adk/core and in the repository at github.com/gabrieljsilva/nestjs-adk.