Google ADK for TypeScript 2.0
Last reviewed Sep 6, 2026
Prompt Details
Prompt Composition
5prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- TypeScript 746 lines · 1.5K tokens
- Google Gen AI SDK for TypeScript 2.1954 lines · 1.3K tokens
- 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
RunConfigwith an application-specific positive safe integer formaxLlmCalls;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
AgentToolseparately because it starts a new runner without the parent'sRunConfigor plugins. - Bound wall time and output outside
maxLlmCalls, which does not cap tool duration, artifact size, external side effects, orrunLivemodel 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
FunctionToolwith a narrow Zodparametersschema andrequireConfirmation: trueor a trusted argument predicate; raw Gen AISchemaparameters receive no runtime validation here. - Use the confirmation interrupt through
LlmAgent.runAsync;ToolNodeandrunLivedo not emit this interrupt when the tool requests confirmation. - Keep
plainTextToolConfirmationfalse, its default, so an ordinary chat message cannot silently act as a confirmation response. - Use