Google Agent Development Kit for Java 1.13
Last reviewed Oct 25, 2026
Prompt Details
Prompt Composition
2prompts
- Java 25113 lines · 2.8K tokens
- 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
LlmAgentinstructions 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
ConfigAgentUtilsand tool resolution before loading configuration supplied outside the agent's directory; a warning is not a containment boundary. - Restrict
LocalSkillSourceto 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
LlmAgenttransfer 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
LlmAgentinstructions andincludeContentssettings before sending session history, memory, or artifacts to a model; include only content the current principal may disclose.
Tool authorization and confirmation
- In every
FunctionToolor other effectfulBaseTool, authorize the current principal,