Skip to main content

Build Your First TypeScript AI Agent with Google ADK

Google for DevelopersDecember 17, 202515 min13,207 views
23 connections·40 entities in this video→

Introduction to TypeScript ADK

  • πŸš€ The TypeScript ADK is an open-source, modular framework designed to simplify the development and deployment of AI agents for TypeScript and JavaScript developers.
  • πŸ’‘ It addresses the complexity of building agents from scratch, managing state, memory, tool calls, and control flow.

Core Concepts and Agent Types

  • 🧩 The fundamental concept is the agent, with three main categories: LLM-based agents (for reasoning and tool calls), workflow agents (for deterministic logic), and custom agents (for custom logic).
  • πŸ› οΈ These agent types can be composed together for more advanced scenarios.

Running Your First Agent

  • πŸ’» To get started, include the ADK dependency in your package.json using MPM or YARN.
  • πŸ§ͺ The ADK includes a dev UI for prototyping and debugging agents with a visual interface, accessible by adding the @google/agent-framework-dev-tools dependency.
  • πŸ’¬ Programmatically running an agent involves a runner (coordinator) and a session (conversation state), often within a loop to handle user input and agent responses.
  • ⚑ Agents can be executed directly from TypeScript source files using ts-node for quick iteration.

Integrating Tools with Agents

  • 🌐 Agents can interact with the external world through tools, as LLMs cannot natively browse the internet or query databases.
  • πŸ“ž Tools leverage LLM function calling capabilities, allowing agents to determine when an external action is needed, select a registered tool, and pass arguments.
  • 🧩 The ADK abstracts the execution loop for tools, providing a clean interface for defining them.
  • πŸ”§ Typescript ADK supports function tools (wrapping your code), built-in tools (like Google Search), and third-party tools.

Advanced Agent Architectures

  • 🀝 Multi-agent systems allow multiple agents to collaborate, supported by protocols like MCP and A2A.
  • πŸ”— A pattern ADK enables is using one agent as a tool for another, facilitating hierarchical or collaborative systems.
  • πŸ”„ Workflow agents (sequential, parallel, loop) are essential for orchestrating complex multi-agent flows, making execution more deterministic.

Context and State Management

  • 🧠 Conversational context is managed through sessions, state, and memory.
  • πŸ†” Sessions manage multiple conversations, storing history, shared state, and interaction events.
  • πŸ“ State acts as a temporary scratchpad for conversation-specific data, requiring serializable values.
  • 🎯 Initial state can be specified when creating a session, and agent instructions can access this state using templating syntax for greater generalization.
Knowledge graph40 entities Β· 23 connections

How they connect

An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.

Hover Β· drag to explore
40 entities
Chapters7 moments

Key Moments

Transcript58 segments

Full Transcript

Topics14 themes

What’s Discussed

Agent Development Kit (ADK)TypeScriptJavaScriptAI AgentsLLM AgentsWorkflow AgentsCustom AgentsToolsFunction CallingMulti-agent SystemsSession ManagementState ManagementDev UIGoogle Cloud
Smart Objects40 Β· 23 links
ProductsΒ· 14
ConceptsΒ· 24
CompaniesΒ· 2