# 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#