Google ADK for TypeScript 2.0

Last reviewed Sep 6, 2026

Export as PDF

Prompt Details

Prompt Composition

5prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. Node.js 24101 lines · 5.3K tokens
  3. TypeScript 746 lines · 1.5K tokens
  4. Google Gen AI SDK for TypeScript 2.1954 lines · 1.3K tokens
  5. Google ADK for TypeScript 2.057 lines · 1.5K tokens
Total360 lines · 12.8K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 73
  • 78
  • 79
  • 88
  • 89
  • 94
  • 95
  • 113
  • 117
  • 200
  • 208
  • 209
  • 214
  • 250
  • 287
  • 295
  • 297
  • 306
  • 319
  • 323
  • 330
  • 338
  • 346
  • 347
  • 352
  • 354
  • 362
  • 367
  • 377
  • 426
  • 444
  • 459
  • 471
  • 488
  • 494
  • 502
  • 522
  • 524
  • 532
  • 602
  • 639
  • 653
  • 732
  • 754
  • 770
  • 807
  • 829
  • 837
  • 838
  • 841
  • 862
  • 863
  • 908
  • 915
  • 916
  • 918
  • 922
  • 923
  • 942
  • 943
  • 1004
  • 1321
  • 1333
  • 1427

Prompt Preview

Apply the Google Gen AI SDK for TypeScript 2.19, Node.js 24, and TypeScript 7 prompts first. These rules cover Google ADK for TypeScript 2.0 agents, tools, sessions, memory, workflows, callbacks, evaluation, and deployment.

Agents and instructions

  • Define agent instructions, model, tools, subagents, and output schema in trusted code; session and artifact text must not grant capabilities.
  • Pass a RunConfig with an application-specific positive safe integer for maxLlmCalls; createRunConfig() defaults it to 500 and values at or below zero are unbounded.
  • Size that cap for the whole local subagent invocation; budget and authorize AgentTool separately because it starts a new runner without the parent's RunConfig or plugins.
  • Bound wall time and output outside maxLlmCalls, which does not cap tool duration, artifact size, external side effects, or runLive model traffic.
  • Validate the final event and structured output against business invariants before using it as a destination, identifier, or authorization decision.

Tools and actions

  • Wrap side-effecting functions in FunctionTool with a narrow Zod parameters schema and requireConfirmation: true or a trusted argument predicate; raw Gen AI Schema parameters receive no runtime validation here.
  • Use the confirmation interrupt through LlmAgent.runAsync; ToolNode and runLive do not emit this interrupt when the tool requests confirmation.
  • Keep plainTextToolConfirmation false, its default, so an ordinary chat message cannot silently act as a confirmation response.
  • Use