# Practical ways to use the Claude Agent SDK
📡 Master streaming input mode for image uploads, interrupts, and persistent context.
Streaming vs Single-Message Input covers the streaming mode for persistent conversations and single-message mode for stateless environments.
📌 Title: Streaming Input
🔗 URL:
🧩 Overview
Streaming input mode (recommended) supports image uploads, message queues, interrupts, and context persistence for rich interactive experiences. Single-message input is ideal for stateless environments like AWS Lambda for one-shot responses.
🛠 How to use it
Streaming mode is the default. Single-message mode is explicitly selected for stateless environments like Lambda.
🏗 Practical usage
- In a chat UI, upload an architecture diagram after "Analyze this codebase" for visual code review.
- Inject external events (CI results, Slack notifications) via message queues to dynamically extend context.
- Use single-message mode for serverless functions that run "Explain the auth flow" as a one-shot task.
💡 Use cases
🖼 Code review with image attachments
📨 Dynamic injection of external events
⚡ One-shot task execution in serverless environments
⚠️ Watch out
Single-message mode doesn't support image attachments, interrupts, or multi-turn conversations. Use streaming mode when rich interaction is needed.
#
ClaudeAgentSDK# #
AI#