█

AI/TLDR

Invítame a un café
Invítame un café

ADK for TypeScript

El kit de desarrollo de agentes de Google para Node.js y el navegador, con herramientas tipadas y una interfaz de desarrollo

Agent Frameworks & BuildersCódigo abierto
Idioma
TypeScript
Licencia
Apache-2.0
EN BREVE

What is ADK for TypeScript?

ADK for TypeScript is El kit de desarrollo de agentes de Google para Node.js y el navegador, con herramientas tipadas y una interfaz de desarrollo. It sits in the Agent Frameworks & Builders category of the Agents & Automation tools and is open-source, written in TypeScript and licensed Apache-2.0. To get started: crear el proyecto e instalar ADK.

Resumen

ADK para TypeScript (el repositorio `google/adk-js`, publicado en npm como `@google/adk`) es la edición en TypeScript del Agent Development Kit de Google: un kit de código abierto orientado al código para crear, evaluar y desplegar agentes de IA. El comportamiento de los agentes, la orquestación y el uso de herramientas se escriben como TypeScript normal, así que un agente se puede depurar, versionar y desplegar como el resto de un proyecto, desde un asistente sencillo hasta un sistema multiagente.

Lo que distingue a esta edición es dónde se ejecuta. Está pensada para los ecosistemas de Node.js y del navegador, y distribuye módulos ESM, CommonJS y paquetes para web, así que el mismo código de agente puede ejecutarse en un servidor o directamente en el navegador. Los parámetros de las herramientas se declaran con esquemas de Zod (v3 o v4) y reciben inferencia de tipos en tiempo de compilación, lo que significa que los argumentos que el modelo pasa a una herramienta llegan ya tipados a tu manejador.

Las herramientas de desarrollo están en un paquete aparte de dependencias de desarrollo, `@google/adk-devtools`. Incluye la CLI `adk` para generar la estructura inicial del proyecto (`adk create`), hacer pruebas en local (`adk run`, `adk web`) y desplegar (`adk deploy cloud_run`), además de una interfaz de desarrollo en el navegador para chatear con un agente e inspeccionar sus eventos, estado, artefactos y evaluaciones. La edición en Python de ADK cubre las mismas ideas para proyectos en Python; esta es para equipos cuyos agentes viven en un stack de TypeScript.

Qué hace

  • Herramientas tipadas: envuelve cualquier función como un FunctionTool cuyos parámetros son un esquema de Zod v3 o v4, con inferencia de tipos en tiempo de compilación
  • Se ejecuta en Node.js o en el navegador, desde módulos ESM, CommonJS y paquetes para web
  • Herramientas integradas para Google Search, Google Maps, Vertex AI Search y el contexto de URL, además de servidores MCP mediante MCPToolset y ejecución de código
The ADK dev UI showing a looping headline workflow as a graph next to its event log, including a routing step.
A routed loop workflow in the dev UI: the graph on the left, each event and state change on the right.ADK for TypeScript README ↗
  • Orquestación multiagente: flujos secuenciales, paralelos, en bucle y enrutados, y delegación en agentes remotos mediante el protocolo A2A
  • Guías para desarrolladores sobre sesiones y ámbitos de estado, memoria entre sesiones, artefactos versionados, autenticación para APIs protegidas, planificadores y spans de telemetría
  • Paquete de herramientas de desarrollo con una CLI (adk create, run, web, deploy cloud_run) y una interfaz interactiva para probar y depurar

Primeros pasos

Sigue la guía rápida oficial de TypeScript: crea un proyecto de módulos ES, instala el SDK y las herramientas de desarrollo, define un agente con una herramienta tipada, añade una clave de API de Gemini y luego habla con él desde la terminal o la interfaz de desarrollo. La guía rápida indica como requisitos Node.js 24.13.0 y npm 11.8.0 o posterior.

Crear el proyecto e instalar ADK

Crea un directorio vacío, inicialízalo como módulo ES e instala el SDK principal y las herramientas de desarrollo (CLI e interfaz de desarrollo) como dependencia de desarrollo.

bashbash
mkdir -p my-agent/
cd my-agent/
npm init --yes
npm pkg set type="module"
npm pkg set main="agent.ts"
npm install @google/adk
npm install -D @google/adk-devtools

Define el agente en agent.ts

Un LlmAgent recibe un nombre, un modelo, una instrucción y una lista de herramientas. La herramienta aquí es un FunctionTool simulado cuyos parámetros son un esquema de Zod; exporta el agente como rootAgent para que las herramientas de desarrollo lo encuentren.

typescripttypescript
import {FunctionTool, LlmAgent} from '@google/adk';
import {z} from 'zod';

/* Mock tool implementation */
const getCurrentTime = new FunctionTool({
  name: 'get_current_time',
  description: 'Returns the current time in a specified city.',
  parameters: z.object({
    city: z.string().describe("The name of the city for which to retrieve the current time."),
  }),
  execute: ({city}) => {
    return {status: 'success', report: `The current time in ${city} is 10:30 AM`};
  },
});

export const rootAgent = new LlmAgent({
  name: 'hello_time_agent',
  model: 'gemini-flash-latest',
  description: 'Tells the current time in a specified city.',
  instruction: `You are a helpful assistant that tells the current time in a city.
                Use the 'get_current_time' tool for this purpose.`,
  tools: [getCurrentTime],
});

Añade tu clave de API de Gemini

Crea una clave en Google AI Studio y guárdala en un archivo .env junto al agente. Para usar Vertex AI en su lugar, el README indica definir GOOGLE_GENAI_USE_VERTEXAI=1, GOOGLE_CLOUD_PROJECT y GOOGLE_CLOUD_LOCATION, y autenticarte con gcloud auth application-default login.

bashbash
echo 'GEMINI_API_KEY="YOUR_API_KEY"' > .env

Chatea con el agente en la terminal

Ejecuta el archivo del agente con la CLI de las herramientas de desarrollo. El README recomienda indicar siempre el nombre del paquete: si @google/adk-devtools no está instalado, un `npx adk` sin más descarga un paquete distinto llamado adk desde el registro público.

bashbash
npx @google/adk-devtools run agent.ts
A terminal session with adk run where the agent answers what time it is in London.
The same agent in the terminal through adk run.ADK TypeScript quickstart ↗

Abre la interfaz de desarrollo

Inicia la interfaz web desde el directorio del proyecto, abre http://localhost:8000, elige tu agente en la esquina superior derecha y escribe una petición. La documentación aclara que ADK Web es solo para desarrollo y depuración, no para despliegues en producción.

bashbash
npx @google/adk-devtools web
The ADK dev UI chatting with the quickstart time agent, showing the get_current_time tool call and the invocation trace panel.
The dev UI started by adk web: the quickstart agent calls get_current_time, and the left panel lists each invocation.ADK TypeScript quickstart ↗

Commands and code are distilled from the project's own documentation — always check the repositorio oficial para lo último.

Cuándo usarlo

  • Añadir un agente a un servicio existente de Node.js o TypeScript sin cambiar a un stack de Python
  • Ejecutar un agente directamente en el navegador desde el paquete web de ADK
  • Dar a un agente con Gemini herramientas tipadas, datos de Google Search o un servidor MCP, y depurar sus llamadas a herramientas en la interfaz de desarrollo
  • Componer varios agentes en flujos secuenciales, paralelos, en bucle o enrutados, o pasar tareas a agentes remotos mediante A2A

How ADK for TypeScript compares

ADK for TypeScript alongside other open-source agent frameworks & builders tools AI/TLDR tracks, ranked by GitHub stars.

HerramientaEstrellasQué hace
DeepSeek Harness★ 289kDeepSeek AI's open-source agent harness (dsh), built on Cordis, where models, tools, skills, sessions, sandboxes, storage and the UI are all plugins composed through profiles.
AutoGPT★ 188kOne of the earliest autonomous agent projects, now a platform for building and running agents from reusable blocks and workflows.
DeerFlow★ 86kByteDance's open-source super agent harness built on LangGraph: skills, sub-agents, sandboxes, a filesystem and long-term memory for long-horizon research, coding and content tasks.
nanobot★ 50.5kLightweight self-hosted personal AI agent framework in Python, with a WebUI, terminal and chat-app channels, tools, long-term memory, MCP and scheduled automations.
LangGraph★ 45.6kA library from the LangChain team for building stateful, graph-based agent workflows with explicit control over steps, memory, and human-in-the-loop checkpoints.
Agno★ 43.3kA fast Python framework (formerly Phidata) for building agents with memory, tools, and multimodal inputs, plus a runtime for deploying them in production.
AgentGPT★ 36.3kAgentGPT lets you name a custom AI, give it a goal, and watch it plan tasks, run them, and learn from the results, all from a web browser.
ADK for TypeScript★ 1.5kEl kit de desarrollo de agentes de Google para Node.js y el navegador, con herramientas tipadas y una interfaz de desarrollo