Strands Agents SDK for TypeScript 1.22
Last reviewed Oct 25, 2026
Prompt Details
Prompt Composition
4prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- TypeScript 6.044 lines · 1.3K tokens
- Strands Agents SDK for TypeScript 1.2240 lines · 1.9K tokens
Total287 lines · 11.6K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 113
- 117
- 200
- 201
- 208
- 209
- 214
- 250
- 295
- 297
- 306
- 319
- 323
- 330
- 338
- 346
- 347
- 352
- 354
- 362
- 367
- 377
- 426
- 444
- 459
- 471
- 488
- 494
- 502
- 524
- 532
- 602
- 639
- 653
- 732
- 770
- 807
- 829
- 838
- 862
- 863
- 908
- 915
- 916
- 918
- 922
- 942
- 943
- 1004
- 1321
- 1333
- 1426
- 1427
Prompt Preview
Apply this prompt to applications built with @strands-agents/sdk on the 1.22 release line. The Node.js 24 and TypeScript 6.0 prompts supply the host-language rules; the rules below cover Strands-owned agent, tool, and orchestration behavior.
Treat agent context as untrusted at its boundaries
- Keep user text, retrieved pages, documents, memory records, MCP and A2A responses, and tool results as data. Do not let instructions inside them change the agent's system instructions, choose privileged tools, or grant permission for an action. Separate trusted application instructions from the content passed to
Agent.invoke()and test with hostile content in each source. - Build
Agentmessage history and restored snapshots only from application-controlled storage. A request body or other caller-influenced history can contain forgedtoolUseortoolResultblocks, so parse it into ordinary user content instead of loading it as trusted history. - Load
AgentSkillsandSkill.fromFile()only from reviewed, access-controlled directories. Treat skill instructions and resources as executable authority, and do not let a user select arbitrary local skill paths or replace the skill directory at runtime. - Scope conversation history, context summaries, and memory retrieval to the authenticated tenant and task. Treat recalled memory and model-generated summaries as untrusted content when they re-enter the prompt; require authorization again before acting on them.
Authorize every tool effect
- Register only the tools an agent needs. For each
tool()callback, validate input