Claude

Claude on AWS Bedrock examples for runs, storage, images, knowledge, structured output, tools, and adaptive thinking.

ExampleDescription
Claude BasicRun Claude on AWS Bedrock through the aws.Claude model class in sync, async, and streaming modes.
DBStore session history for Claude on Bedrock in Postgres with add_history_to_context.
AWS Image AgentDescribe an image URL with Claude on Bedrock and enrich it with web search.
KnowledgeAttach a PgVector knowledge base of recipes to Claude running on Bedrock.
Claude Structured OutputGenerate a typed MovieScript from Claude on Bedrock with a Pydantic output schema.
Claude Tool UseCall web search tools from Claude on Bedrock in sync, streaming, and async modes.
AWS Bedrock Claude Adaptive ThinkingConfigure Claude 4.6 adaptive thinking with effort levels on AWS Bedrock.
AWS Append Trailing User MessageAppend trailing user messages when Claude 4.6+ ends with an assistant response.