Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 2 KB

File metadata and controls

54 lines (39 loc) · 2 KB

Gemini Enterprise Agent Platform SDK for Node.js quickstart

The Agent Platform SDK for Node.js lets you use the Gemini API to build AI-powered features and applications. Both TypeScript and JavaScript are supported.

For the latest list of available Gemini models on Agent Platform, see the Model information page in Agent Platform documentation.

Before you begin

  1. Make sure your node.js version is 20 or above.

  2. Select or create a Google Cloud project.

  3. Enable billing for your project.

  4. Enable the Agent Platform API.

  5. Install the gcloud CLI.

  6. Initialize the gcloud CLI.

  7. Create local authentication credentials for your user account:

    gcloud auth application-default login

A list of accepted authentication options are listed in GoogleAuthOptions interface of google-auth-library-node.js GitHub repo.

Install the SDK

Install the Agent Platform SDK for Node.js by running the following command:

npm install @google-cloud/agentplatform

Instantiate the Agent Platform client

First, import the Client class:

import { Client } from '@google-cloud/agentplatform';

Then instantiate a client:

const client: Client = new Client({
  project: 'my-cloud-project',
  location: 'my-cloud-location',
});

License

The contents of this repository are licensed under the Apache License, version 2.0.