Google Agent Development Kit for Java 1.13

Last reviewed Oct 25, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Java 25113 lines · 2.8K tokens
  2. Google Agent Development Kit for Java 1.1347 lines · 1.9K tokens
Total160 lines · 4.7K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 78
  • 79
  • 88
  • 89
  • 95
  • 117
  • 190
  • 201
  • 208
  • 209
  • 214
  • 294
  • 295
  • 297
  • 306
  • 323
  • 327
  • 338
  • 347
  • 362
  • 367
  • 378
  • 427
  • 470
  • 471
  • 488
  • 494
  • 502
  • 532
  • 611
  • 639
  • 653
  • 681
  • 732
  • 770
  • 772
  • 776
  • 789
  • 807
  • 829
  • 841
  • 862
  • 863
  • 915
  • 916
  • 918
  • 922
  • 942
  • 1333
  • 1426
  • 1427

Prompt Preview

Apply these rules to Java ADK agents, tools, runners, sessions, workflows, and exposed services. Treat model output, retrieved content, skills, MCP results, A2A peers, and persisted state as untrusted input to the next step.

Instructions and agent construction

  • Keep trusted LlmAgent instructions and tool policy in reviewed code. Treat values interpolated from state or artifacts into instructions as data; never let those values rewrite roles, tool permissions, or system policy.
  • Accept agent configuration, class names, tool definitions, and local skill directories only from trusted deployment sources. Review ConfigAgentUtils and tool resolution before loading configuration supplied outside the agent's directory; a warning is not a containment boundary.
  • Restrict LocalSkillSource to a trusted, non-writable tree. Check resolved skill and resource paths, including symlinks, against the approved root before reading; its lexical normalization does not establish real-path containment.
  • Register only the tools an agent needs, with narrow descriptions and input schemas. Treat LlmAgent transfer targets and sub-agent descriptions as capabilities exposed to the model; disable parent or peer transfers where the workflow does not require them.
  • Review dynamic LlmAgent instructions and includeContents settings before sending session history, memory, or artifacts to a model; include only content the current principal may disclose.

Tool authorization and confirmation

  • In every FunctionTool or other effectful BaseTool, authorize the current principal,