TypeScriptADK-TS
Deploy

Deploy to Vertex AI Agent Engine

Deploy and scale your agents using Google Cloud's fully managed Agent Engine service

Feature Coming Soon

Agent Engine deployment is currently being developed for @iqai/adk. The examples below show the planned API, but the deployment functionality is not yet available.

What is Agent Engine?

Agent Engine is Google Cloud's fully managed service for deploying and scaling AI agents. It provides auto-scaling, session management, and integrated monitoring for production agent applications.

Current Status

While full Agent Engine deployment is in development, @iqai/adk currently provides:

Vertex AI Session Service

You can already use Vertex AI's session management capabilities:

import { VertexAiSessionService } from "@iqai/adk";

// Initialize Vertex AI Session Service
const sessionService = new VertexAiSessionService({
  project: "your-project-id",
  location: "us-central1",
  agentEngineId: "your-agent-engine-id"
});

// Create and manage sessions
const session = await sessionService.createSession("my-app", "user-123");

Planned Features

The complete Agent Engine integration will include:

Install Dependencies

npm install @iqai/adk
yarn add @iqai/adk
pnpm add @iqai/adk

Make sure you have Node.js version 22.0.0 or higher installed.

Initialize Agent Engine Connection

// Planned API - not yet implemented
import { AgentEngine } from "@iqai/adk";

const PROJECT_ID = "your-project-id";
const LOCATION = "us-central1";

// Initialize Agent Engine
const agentEngine = new AgentEngine({
  project: PROJECT_ID,
  location: LOCATION,
});

Agent Creation (Planned)

Define your agent with tools and functionality:

import { LlmAgent, FunctionTool } from "@iqai/adk";

// Define tool functions
function getWeather(params: { city: string }): object {
  const { city } = params;
  return {
    status: "success",
    report: `The weather in ${city} is sunny with a temperature of 25°C.`
  };
}

// Create tools
const weatherTool = new FunctionTool(getWeather, {
  name: "get_weather",
  description: "Get the current weather for a specific city"
});

// Create the agent
const rootAgent = new LlmAgent({
  name: "weather_agent",
  description: "An agent that can get weather information for cities",
  model: "gemini-2.0-flash",
  instruction: "You can help users get weather information for different cities.",
  tools: [weatherTool]
});

Deployment (Planned)

The planned deployment API will look like:

// Planned API - not yet implemented
import { AgentEngine } from "@iqai/adk";

// Deploy your agent to Agent Engine
const deployment = await AgentEngine.deploy({
  agent: rootAgent,
  project: "your-project-id",
  location: "us-central1",
  dependencies: [
    "@iqai/adk"
  ]
});

console.log(`Agent deployed: ${deployment.endpoint}`);

Manual Deployment Alternative

For now, you can manually deploy your agents using the existing Vertex AI integration:

import {
  LlmAgent,
  VertexAiSessionService,
  Runner,
  FunctionTool
} from "@iqai/adk";

// Create weather tool
function getWeather(params: { city: string }) {
  const { city } = params;
  return {
    status: "success",
    report: `The weather in ${city} is sunny with a temperature of 25°C.`
  };
}

const weatherTool = new FunctionTool(getWeather, {
  name: "get_weather",
  description: "Get the current weather for a specific city"
});

// Create your agent
const agent = new LlmAgent({
  name: "weather_agent",
  description: "An agent that can get weather information for cities",
  model: "gemini-2.0-flash",
  instruction: "Help users get weather information.",
  tools: [weatherTool]
});

// Use Vertex AI session service
const sessionService = new VertexAiSessionService({
  project: "your-project-id",
  location: "us-central1"
});

// Create runner
const runner = new Runner({
  appName: "weather-app",
  agent,
  sessionService
});

// Handle requests (integrate with your web framework)
async function handleRequest(userId: string, message: string) {
  const session = await sessionService.createSession("weather-app", userId);

  for await (const event of runner.runAsync({
    userId,
    sessionId: session.id,
    newMessage: { parts: [{ text: message }] }
  })) {
    if (event.isFinalResponse()) {
      return event.content?.parts?.[0]?.text;
    }
  }
}

What's Coming

The Agent Engine deployment will provide:

  • One-command deployment: npx @iqai/adk deploy agent-engine
  • Auto-scaling: Automatic scaling based on demand
  • Session management: Built-in session and state management
  • Monitoring: Integrated logging and monitoring
  • Security: Managed authentication and authorization

Resources