# langchain_aws

> Python package

📖 [View in docs](https://reference.langchain.com/python/langchain-aws)

## Classes

- [`ContentHandlerBase`](https://reference.langchain.com/python/langchain-aws/utils/ContentHandlerBase)
- [`AnthropicTool`](https://reference.langchain.com/python/langchain-aws/function_calling/AnthropicTool)
- [`FunctionDescription`](https://reference.langchain.com/python/langchain-aws/function_calling/FunctionDescription)
- [`ToolDescription`](https://reference.langchain.com/python/langchain-aws/function_calling/ToolDescription)
- [`ToolsOutputParser`](https://reference.langchain.com/python/langchain-aws/function_calling/ToolsOutputParser)
- [`NeptuneRdfGraph`](https://reference.langchain.com/python/langchain-aws/graphs/neptune_rdf_graph/NeptuneRdfGraph)
- [`NeptuneQueryException`](https://reference.langchain.com/python/langchain-aws/graphs/neptune_graph/NeptuneQueryException)
- [`BaseNeptuneGraph`](https://reference.langchain.com/python/langchain-aws/graphs/neptune_graph/BaseNeptuneGraph)
- [`NeptuneAnalyticsGraph`](https://reference.langchain.com/python/langchain-aws/graphs/neptune_graph/NeptuneAnalyticsGraph)
- [`NeptuneGraph`](https://reference.langchain.com/python/langchain-aws/graphs/neptune_graph/NeptuneGraph)
- [`BedrockPromptCachingMiddleware`](https://reference.langchain.com/python/langchain-aws/middleware/prompt_caching/BedrockPromptCachingMiddleware)
- [`BedrockEmbeddings`](https://reference.langchain.com/python/langchain-aws/embeddings/bedrock/BedrockEmbeddings)
- [`InMemoryDBFilterOperator`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/filters/InMemoryDBFilterOperator)
- [`InMemoryDBFilter`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/filters/InMemoryDBFilter)
- [`InMemoryDBFilterField`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/filters/InMemoryDBFilterField)
- [`InMemoryDBTag`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/filters/InMemoryDBTag)
- [`InMemoryDBNum`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/filters/InMemoryDBNum)
- [`InMemoryDBText`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/filters/InMemoryDBText)
- [`InMemoryDBFilterExpression`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/filters/InMemoryDBFilterExpression)
- [`InMemoryVectorStore`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/base/InMemoryVectorStore)
- [`InMemoryVectorStoreRetriever`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/base/InMemoryVectorStoreRetriever)
- [`InMemorySemanticCache`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/cache/InMemorySemanticCache)
- [`InMemoryDBDistanceMetric`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/schema/InMemoryDBDistanceMetric)
- [`InMemoryDBField`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/schema/InMemoryDBField)
- [`TextFieldSchema`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/schema/TextFieldSchema)
- [`TagFieldSchema`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/schema/TagFieldSchema)
- [`NumericFieldSchema`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/schema/NumericFieldSchema)
- [`InMemoryDBVectorField`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/schema/InMemoryDBVectorField)
- [`FlatVectorField`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/schema/FlatVectorField)
- [`HNSWVectorField`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/schema/HNSWVectorField)
- [`InMemoryDBModel`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/schema/InMemoryDBModel)
- [`AmazonS3Vectors`](https://reference.langchain.com/python/langchain-aws/vectorstores/s3_vectors/base/AmazonS3Vectors)
- [`LineIterator`](https://reference.langchain.com/python/langchain-aws/llms/sagemaker_endpoint/LineIterator)
- [`LLMContentHandler`](https://reference.langchain.com/python/langchain-aws/llms/sagemaker_endpoint/LLMContentHandler)
- [`SagemakerEndpoint`](https://reference.langchain.com/python/langchain-aws/llms/sagemaker_endpoint/SagemakerEndpoint)
- [`AnthropicTool`](https://reference.langchain.com/python/langchain-aws/llms/bedrock/AnthropicTool)
- [`LLMInputOutputAdapter`](https://reference.langchain.com/python/langchain-aws/llms/bedrock/LLMInputOutputAdapter)
- [`BedrockBase`](https://reference.langchain.com/python/langchain-aws/llms/bedrock/BedrockBase)
- [`BedrockLLM`](https://reference.langchain.com/python/langchain-aws/llms/bedrock/BedrockLLM)
- [`AmazonS3VectorsRetriever`](https://reference.langchain.com/python/langchain-aws/retrievers/s3_vectors/AmazonS3VectorsRetriever)
- [`Highlight`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/Highlight)
- [`TextWithHighLights`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/TextWithHighLights)
- [`AdditionalResultAttributeValue`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/AdditionalResultAttributeValue)
- [`AdditionalResultAttribute`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/AdditionalResultAttribute)
- [`DocumentAttributeValue`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/DocumentAttributeValue)
- [`DocumentAttribute`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/DocumentAttribute)
- [`ResultItem`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/ResultItem)
- [`QueryResultItem`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/QueryResultItem)
- [`RetrieveResultItem`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/RetrieveResultItem)
- [`QueryResult`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/QueryResult)
- [`RetrieveResult`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/RetrieveResult)
- [`AmazonKendraRetriever`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/AmazonKendraRetriever)
- [`SearchFilter`](https://reference.langchain.com/python/langchain-aws/retrievers/bedrock/SearchFilter)
- [`VectorSearchConfig`](https://reference.langchain.com/python/langchain-aws/retrievers/bedrock/VectorSearchConfig)
- [`RetrievalConfig`](https://reference.langchain.com/python/langchain-aws/retrievers/bedrock/RetrievalConfig)
- [`AmazonKnowledgeBasesRetriever`](https://reference.langchain.com/python/langchain-aws/retrievers/bedrock/AmazonKnowledgeBasesRetriever)
- [`ChatLineIterator`](https://reference.langchain.com/python/langchain-aws/chat_models/sagemaker_endpoint/ChatLineIterator)
- [`ChatModelContentHandler`](https://reference.langchain.com/python/langchain-aws/chat_models/sagemaker_endpoint/ChatModelContentHandler)
- [`ChatSagemakerEndpoint`](https://reference.langchain.com/python/langchain-aws/chat_models/sagemaker_endpoint/ChatSagemakerEndpoint)
- [`ChatBedrockConverse`](https://reference.langchain.com/python/langchain-aws/chat_models/bedrock_converse/ChatBedrockConverse)
- [`ChatPromptAdapter`](https://reference.langchain.com/python/langchain-aws/chat_models/bedrock/ChatPromptAdapter)
- [`ChatBedrock`](https://reference.langchain.com/python/langchain-aws/chat_models/bedrock/ChatBedrock)
- [`ChatAnthropicBedrock`](https://reference.langchain.com/python/langchain-aws/chat_models/anthropic/ChatAnthropicBedrock)
- [`BedrockRerank`](https://reference.langchain.com/python/langchain-aws/document_compressors/rerank/BedrockRerank)
- [`BedrockAgentsRunnable`](https://reference.langchain.com/python/langchain-aws/agents/base/BedrockAgentsRunnable)
- [`BedrockInlineAgentsRunnable`](https://reference.langchain.com/python/langchain-aws/agents/base/BedrockInlineAgentsRunnable)
- [`BedrockAgentFinish`](https://reference.langchain.com/python/langchain-aws/agents/types/BedrockAgentFinish)
- [`BedrockAgentAction`](https://reference.langchain.com/python/langchain-aws/agents/types/BedrockAgentAction)
- [`GuardrailConfiguration`](https://reference.langchain.com/python/langchain-aws/agents/types/GuardrailConfiguration)
- [`KnowledgebaseConfiguration`](https://reference.langchain.com/python/langchain-aws/agents/types/KnowledgebaseConfiguration)
- [`InlineAgentConfiguration`](https://reference.langchain.com/python/langchain-aws/agents/types/InlineAgentConfiguration)
- [`AmazonQ`](https://reference.langchain.com/python/langchain-aws/runnables/q_business/AmazonQ)
- [`NavigateToolInput`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/NavigateToolInput)
- [`ClickToolInput`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ClickToolInput)
- [`GetElementsToolInput`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/GetElementsToolInput)
- [`ExtractTextToolInput`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ExtractTextToolInput)
- [`ExtractHyperlinksToolInput`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ExtractHyperlinksToolInput)
- [`NavigateBackToolInput`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/NavigateBackToolInput)
- [`CurrentWebPageToolInput`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/CurrentWebPageToolInput)
- [`TypeTextInput`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/TypeTextInput)
- [`ScreenshotInput`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ScreenshotInput)
- [`ScrollInput`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ScrollInput)
- [`WaitForElementInput`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/WaitForElementInput)
- [`ThreadAwareBaseTool`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ThreadAwareBaseTool)
- [`ThreadAwareNavigateTool`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ThreadAwareNavigateTool)
- [`ThreadAwareClickTool`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ThreadAwareClickTool)
- [`ThreadAwareNavigateBackTool`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ThreadAwareNavigateBackTool)
- [`ThreadAwareExtractTextTool`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ThreadAwareExtractTextTool)
- [`ThreadAwareExtractHyperlinksTool`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ThreadAwareExtractHyperlinksTool)
- [`ThreadAwareGetElementsTool`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ThreadAwareGetElementsTool)
- [`ThreadAwareCurrentWebPageTool`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ThreadAwareCurrentWebPageTool)
- [`ThreadAwareTypeTool`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ThreadAwareTypeTool)
- [`ThreadAwareScreenshotTool`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ThreadAwareScreenshotTool)
- [`ThreadAwareScrollTool`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ThreadAwareScrollTool)
- [`ThreadAwareWaitForElementTool`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/ThreadAwareWaitForElementTool)
- [`NovaSystemTool`](https://reference.langchain.com/python/langchain-aws/tools/nova_tools/NovaSystemTool)
- [`NovaGroundingTool`](https://reference.langchain.com/python/langchain-aws/tools/nova_tools/NovaGroundingTool)
- [`NovaCodeInterpreterTool`](https://reference.langchain.com/python/langchain-aws/tools/nova_tools/NovaCodeInterpreterTool)
- [`ExecuteCodeInput`](https://reference.langchain.com/python/langchain-aws/tools/code_interpreter_toolkit/ExecuteCodeInput)
- [`ExecuteCommandInput`](https://reference.langchain.com/python/langchain-aws/tools/code_interpreter_toolkit/ExecuteCommandInput)
- [`ReadFilesInput`](https://reference.langchain.com/python/langchain-aws/tools/code_interpreter_toolkit/ReadFilesInput)
- [`WriteFilesInput`](https://reference.langchain.com/python/langchain-aws/tools/code_interpreter_toolkit/WriteFilesInput)
- [`ListFilesInput`](https://reference.langchain.com/python/langchain-aws/tools/code_interpreter_toolkit/ListFilesInput)
- [`DeleteFilesInput`](https://reference.langchain.com/python/langchain-aws/tools/code_interpreter_toolkit/DeleteFilesInput)
- [`UploadFileInput`](https://reference.langchain.com/python/langchain-aws/tools/code_interpreter_toolkit/UploadFileInput)
- [`InstallPackagesInput`](https://reference.langchain.com/python/langchain-aws/tools/code_interpreter_toolkit/InstallPackagesInput)
- [`CodeInterpreterToolkit`](https://reference.langchain.com/python/langchain-aws/tools/code_interpreter_toolkit/CodeInterpreterToolkit)
- [`BrowserSessionManager`](https://reference.langchain.com/python/langchain-aws/tools/browser_session_manager/BrowserSessionManager)
- [`BrowserToolkit`](https://reference.langchain.com/python/langchain-aws/tools/browser_toolkit/BrowserToolkit)

## Functions

- [`setup_logging()`](https://reference.langchain.com/python/langchain-aws/setup_logging)
- [`enforce_stop_tokens()`](https://reference.langchain.com/python/langchain-aws/utils/enforce_stop_tokens)
- [`anthropic_tokens_supported()`](https://reference.langchain.com/python/langchain-aws/utils/anthropic_tokens_supported)
- [`count_tokens_api_supported_for_model()`](https://reference.langchain.com/python/langchain-aws/utils/count_tokens_api_supported_for_model)
- [`get_num_tokens_anthropic()`](https://reference.langchain.com/python/langchain-aws/utils/get_num_tokens_anthropic)
- [`get_token_ids_anthropic()`](https://reference.langchain.com/python/langchain-aws/utils/get_token_ids_anthropic)
- [`create_aws_client()`](https://reference.langchain.com/python/langchain-aws/utils/create_aws_client)
- [`thinking_in_params()`](https://reference.langchain.com/python/langchain-aws/utils/thinking_in_params)
- [`trim_message_whitespace()`](https://reference.langchain.com/python/langchain-aws/utils/trim_message_whitespace)
- [`get_system_message()`](https://reference.langchain.com/python/langchain-aws/function_calling/get_system_message)
- [`convert_to_anthropic_tool()`](https://reference.langchain.com/python/langchain-aws/function_calling/convert_to_anthropic_tool)
- [`check_operator_misuse()`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/filters/check_operator_misuse)
- [`check_index_exists()`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/base/check_index_exists)
- [`read_schema()`](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/schema/read_schema)
- [`enforce_stop_tokens()`](https://reference.langchain.com/python/langchain-aws/llms/sagemaker_endpoint/enforce_stop_tokens)
- [`extract_tool_calls()`](https://reference.langchain.com/python/langchain-aws/llms/bedrock/extract_tool_calls)
- [`clean_excerpt()`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/clean_excerpt)
- [`combined_text()`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/combined_text)
- [`convert_messages_to_prompt_llama()`](https://reference.langchain.com/python/langchain-aws/chat_models/bedrock/convert_messages_to_prompt_llama)
- [`convert_messages_to_prompt_llama3()`](https://reference.langchain.com/python/langchain-aws/chat_models/bedrock/convert_messages_to_prompt_llama3)
- [`convert_messages_to_prompt_llama4()`](https://reference.langchain.com/python/langchain-aws/chat_models/bedrock/convert_messages_to_prompt_llama4)
- [`convert_messages_to_prompt_anthropic()`](https://reference.langchain.com/python/langchain-aws/chat_models/bedrock/convert_messages_to_prompt_anthropic)
- [`convert_messages_to_prompt_mistral()`](https://reference.langchain.com/python/langchain-aws/chat_models/bedrock/convert_messages_to_prompt_mistral)
- [`convert_messages_to_prompt_deepseek()`](https://reference.langchain.com/python/langchain-aws/chat_models/bedrock/convert_messages_to_prompt_deepseek)
- [`convert_messages_to_prompt_writer()`](https://reference.langchain.com/python/langchain-aws/chat_models/bedrock/convert_messages_to_prompt_writer)
- [`convert_messages_to_prompt_openai()`](https://reference.langchain.com/python/langchain-aws/chat_models/bedrock/convert_messages_to_prompt_openai)
- [`get_boto_session()`](https://reference.langchain.com/python/langchain-aws/agents/utils/get_boto_session)
- [`parse_agent_response()`](https://reference.langchain.com/python/langchain-aws/agents/utils/parse_agent_response)
- [`trim_query()`](https://reference.langchain.com/python/langchain-aws/chains/graph_qa/neptune_cypher/trim_query)
- [`extract_cypher()`](https://reference.langchain.com/python/langchain-aws/chains/graph_qa/neptune_cypher/extract_cypher)
- [`use_simple_prompt()`](https://reference.langchain.com/python/langchain-aws/chains/graph_qa/neptune_cypher/use_simple_prompt)
- [`get_prompt()`](https://reference.langchain.com/python/langchain-aws/chains/graph_qa/neptune_cypher/get_prompt)
- [`create_neptune_opencypher_qa_chain()`](https://reference.langchain.com/python/langchain-aws/chains/graph_qa/neptune_cypher/create_neptune_opencypher_qa_chain)
- [`extract_sparql()`](https://reference.langchain.com/python/langchain-aws/chains/graph_qa/neptune_sparql/extract_sparql)
- [`get_prompt()`](https://reference.langchain.com/python/langchain-aws/chains/graph_qa/neptune_sparql/get_prompt)
- [`create_neptune_sparql_qa_chain()`](https://reference.langchain.com/python/langchain-aws/chains/graph_qa/neptune_sparql/create_neptune_sparql_qa_chain)
- [`create_thread_aware_tools()`](https://reference.langchain.com/python/langchain-aws/tools/browser_tools/create_thread_aware_tools)
- [`aget_current_page()`](https://reference.langchain.com/python/langchain-aws/tools/utils/aget_current_page)
- [`get_current_page()`](https://reference.langchain.com/python/langchain-aws/tools/utils/get_current_page)
- [`create_code_interpreter_toolkit()`](https://reference.langchain.com/python/langchain-aws/tools/code_interpreter_toolkit/create_code_interpreter_toolkit)
- [`create_browser_toolkit()`](https://reference.langchain.com/python/langchain-aws/tools/browser_toolkit/create_browser_toolkit)

## Types

- [`MediaInput`](https://reference.langchain.com/python/langchain-aws/embeddings/bedrock/MediaInput)
- [`DocumentAttributeValueType`](https://reference.langchain.com/python/langchain-aws/retrievers/kendra/DocumentAttributeValueType)
- [`FilterValue`](https://reference.langchain.com/python/langchain-aws/retrievers/bedrock/FilterValue)
- [`OutputType`](https://reference.langchain.com/python/langchain-aws/agents/types/OutputType)
