agents-sdk
Warn
Audited by Gen Agent Trust Hub on Jul 21, 2026
Risk Level: MEDIUMREMOTE_CODE_EXECUTIONPROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
- [DYNAMIC_EXECUTION]: The skill documentation (references/codemode.md) describes an experimental feature named 'Code Mode' that enables the AI to generate and execute JavaScript code at runtime to orchestrate multi-tool workflows.
- Evidence: 'Code Mode generates executable JavaScript instead of making individual tool calls.'
- Evidence: 'LLM generates code that orchestrates multiple tools.'
- Risk: Dynamic execution of non-static code generated by an LLM based on user prompts introduces risks of unintended side effects or malicious logic execution within the worker environment.
- [INDIRECT_PROMPT_INJECTION]: The skill provides patterns for processing external, untrusted data which creates a vulnerability surface for indirect prompt injection.
- Ingestion points: Incoming emails handled via 'onEmail' (references/email.md) and user chat messages processed by 'AIChatAgent' (references/streaming-chat.md).
- Boundary markers: The provided examples do not demonstrate the use of delimiters or explicit instructions for the AI to ignore embedded directives in external content.
- Capability inventory: The agent classes described have extensive capabilities, including direct SQLite access via the 'sql' API, task scheduling, and invoking RPC methods (SKILL.md).
- Sanitization: There is no evidence of content sanitization or validation of raw email bodies or chat payloads before they are incorporated into the AI's context.
- [EXTERNAL_DOWNLOADS]: The skill instructs the agent to retrieve documentation from an external repository to ensure up-to-date SDK knowledge.
- Source: 'https://github.com/cloudflare/agents/tree/main/docs'
- Purpose: Fetching documentation for implementation topics like state management, routing, and workflows.
- Context: The reference targets the official documentation of a well-known service (Cloudflare).
Audit Metadata