LangChain AWS

Official LangChain integrations for Amazon Bedrock, SageMaker, and other AWS services.

SDK
PyPI
v1.7.2
342stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
62/100Good
Development Activity52
Maintenance48
Community60
Maturity48
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
82/100Excellent
Architecture84
Code Quality84
Innovation74
Learning Curve78

LangChain AWS is the official package of LangChain integrations for Amazon Web Services. It bundles chat models and LLMs for Amazon Bedrock and SageMaker, Bedrock and other AWS embeddings, retrievers (including Bedrock Knowledge Bases and Kendra), vector stores, agents, and utilities, so LangChain and LangGraph applications can use AWS-hosted models and data services through a consistent interface.

Built on langchain-core and boto3, it assumes standard AWS credential configuration and exposes provider-specific classes such as ChatBedrock and BedrockEmbeddings alongside AWS retriever and vector-store integrations, letting teams build generative-AI applications entirely on AWS infrastructure.

What You Get

  • ChatBedrock, ChatBedrockConverse, and SageMaker chat/LLM classes for AWS-hosted models
  • BedrockEmbeddings and related embedding integrations
  • Retrievers for Amazon Bedrock Knowledge Bases and Kendra, plus vector-store integrations
  • Agents, tools, document compressors, and utilities built for the AWS ecosystem

Common Use Cases

  • Calling Amazon Bedrock foundation models from LangChain chains and agents
  • Building RAG pipelines backed by Bedrock Knowledge Bases or Amazon Kendra
  • Generating embeddings and running vector search on AWS-managed services

Under The Hood

Architecture - The langchain_aws package (in libs/aws of a dedicated monorepo) is organized by integration type: chat_models, llms, embeddings, retrievers, vectorstores, agents, chains, tools, middleware, runnables, document_compressors, graphs and utilities. Each subpackage adapts an AWS service to the corresponding langchain-core base class - for example ChatBedrock/ChatBedrockConverse wrap the Bedrock runtime via boto3, and retrievers wrap Bedrock Knowledge Bases and Kendra. A function_calling.py module normalizes tool-calling across model families.

Tech Stack - Pure Python built with the standard LangChain toolchain, depending on langchain-core, boto3, pydantic v2 and numpy, with optional extras for Anthropic-on-Bedrock, Valkey, Nova Sonic and browser tools. Packaged for PyPI while versioned inside the monorepo.

Code Quality - The repo is actively maintained with strong CI, a large tests suite (unit and integration), TESTING.md guidance, and snapshot testing via syrupy. Integrations consistently subclass langchain-core abstractions, keeping behavior aligned with the wider ecosystem.

API Design - Ergonomics match the rest of LangChain: import a provider class (e.g. ChatBedrock, BedrockEmbeddings), rely on ambient AWS credentials, and use the standard runnable interface for invocation, streaming and tool calls. The main learning curve is AWS-side (IAM, Bedrock model access) rather than the library itself.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search