Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@agentick/google

Package Overview
Dependencies
Maintainers
2
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentick/google

Google AI adapter for Agentick

latest
Source
npmnpm
Version
0.14.68
Version published
Maintainers
2
Created
Source

@agentick/google

Google AI / Vertex AI adapter for Agentick.

Installation

pnpm add @agentick/google

Usage

import { google } from "@agentick/google";
import { createApp } from "@agentick/core";

// Google AI Studio
const model = google({
  apiKey: process.env.GOOGLE_API_KEY,
  model: "gemini-2.0-flash",
});

// Use with createApp
const app = createApp(MyAgent, { model });
const session = await app.session();
await session.run({ messages: [{ role: "user", content: [{ type: "text", text: "Hello!" }] }] });

// Or use as JSX component
function MyAgent() {
  return (
    <model temperature={0.7}>
      <System>You are helpful.</System>
      <Timeline />
    </model>
  );
}

// Or call directly
const result = await model.generate({
  messages: [{ role: "user", content: "Hello!" }],
});

Vertex AI

const model = google({
  vertexai: true,
  project: process.env.GCP_PROJECT_ID,
  location: "us-central1",
  model: "gemini-2.0-flash",
  googleAuthOptions: {
    credentials: JSON.parse(process.env.GCP_CREDENTIALS),
  },
});

JSX Component Pattern

import { GoogleModel } from "@agentick/google";

function MyAgent() {
  return (
    <GoogleModel apiKey={process.env.GOOGLE_API_KEY} model="gemini-2.0-flash" temperature={0.7}>
      <System>You are helpful.</System>
      <Timeline />
    </GoogleModel>
  );
}

Configuration

OptionTypeDescription
modelstringModel name (e.g., gemini-2.0-flash)
apiKeystring?Google AI Studio API key
vertexaiboolean?Use Vertex AI instead
projectstring?GCP project ID (Vertex)
locationstring?GCP region (Vertex)
googleAuthOptionsobject?Auth options (Vertex)
temperaturenumber?Sampling temperature
maxTokensnumber?Maximum tokens to generate

Exports

  • google(config) - Factory function returning ModelClass
  • createGoogleModel(config) - Same as google()
  • GoogleModel - JSX component for declarative usage

Keywords

adapter

FAQs

Package last updated on 19 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts