Skip to content

Repository files navigation

🦜️🔗 LangChain Cloudflare

This is a Monorepo containing LangChain packages for Cloudflare. It includes integrations between WorkersAI, AI Search, Vectorize, D1, LangChain, and LangGraph.

It contains the following packages.

  • langchain-cloudflare (PyPI)
  • langgraph-checkpoint-cloudflare-d1 (PyPI)
  • langmem-cloudflare-vectorize (PyPI)

Features

LangChain

Components

LangGraph

  • Checkpointing (BaseCheckpointSaver)
    • CloudflareD1Saver
    • AsyncCloudflareD1Saver
  • MemoryStore (BaseStore)
    • CloudflareVectorizeBaseStore

Installation

You can install the langchain-cloudflare package from PyPI.

pip install langchain-cloudflare

You can install the langgraph-checkpoint-cloudflare-d1 package from PyPI as well:

pip install langgraph-checkpoint-cloudflare-d1

And to install the langmem-cloudflare-vectorize package from PyPI:

pip install langmem-cloudflare-vectorize

Usage

See langchain-cloudflare usage , langgraph-checkpoint-cloudflare-d1 usage. and langmem-cloudflare-vectorize usage

Example notebooks

Example notebooks use a dedicated, locked environment with this checkout of langchain-cloudflare installed. From the repository root:

make notebook_sync
make notebook_check
make notebook_lab

notebook_lab loads credentials from the repo-root .env before starting JupyterLab. Open a notebook under docs/, such as ai_search.ipynb or browser_run.ipynb, and run it manually. Stop the JupyterLab process with Ctrl-C.

License

This project is licensed under the MIT License.

About

LangChain integrations for Cloudflare

Resources

Code of conduct

Contributing

Security policy

Stars

39 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages