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.jsonusing 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-toolsdependency. - π¬ 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-nodefor 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