langchain-cerebras
An integration package connecting Cerebras and LangChain
Decision gist · record as of 2026-08-14
Yes, if you have access to Cerebras Cloud and want to use Cerebras inference within LangChain. Low install friction, active maintenance, no known vulnerabilities, and permissive MIT license make it a straightforward addition. Not applicable if you don't have a Cerebras API key or prefer other inference providers.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a valid CEREBRAS_API_KEY environment variable set from cloud.cerebras.ai; Python 3.11 or 3.12.
- Low install friction with a pure-Python wheel.
- Active maintenance with recent commits; last release 263 days ago suggests regular updates.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions—standard permissive terms suitable for most projects.
last release 2025-11-24 (263 days) · last repo commit 2026-07-15 · 7 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 136,420 downloads/mo, #11,397 on PyPI
Alternatives
Verify before relying
pip install langchain-cerebras
from langchain_cerebras import ChatCerebras
from langchain_core.prompts import ChatPromptTemplate
chat = ChatCerebras(model="llama-3.3-70b")
prompt = ChatPromptTemplate.from_messages([("system", "You are helpful."), ("human", "Hello")])
chain = prompt | chat
chain.invoke({"text": "example"})- Which Cerebras models are available through the API beyond llama-3.3-70b.
- Pricing and rate limits for Cerebras Cloud inference.
- Whether streaming or async chat methods are supported.
- Performance benchmarks compared to other LangChain inference providers.
What it is and what it does
langchain-cerebras is a LangChain integration package that connects Cerebras' AI inference services to the LangChain framework. It exposes Cerebras' WSE-3 processor-powered models through a ChatCerebras class that implements the standard LangChain chat model interface, allowing developers to use Cerebras as an inference backend in LangChain chains and applications.
The package requires an API key from Cerebras Cloud and handles authentication and communication with Cerebras' inference endpoints. It depends on langchain-core for the base chat model interface and langchain-openai for underlying request handling. Developers can compose Cerebras chat models with LangChain prompts, chains, and agents using the standard LangChain pipe syntax, making it straightforward to swap Cerebras in for other LLM providers.
Use it for
- Build LangChain applications that use Cerebras' inference for high-throughput generative AI workloads.
- Integrate Cerebras models into multi-step LangChain chains and agents without provider-specific code.
- Prototype and deploy chat applications leveraging Cerebras' WSE-3 performance for faster inference.
- Replace other LangChain inference providers with Cerebras by swapping the model class in existing chains.
- Access large open-source models like Llama through Cerebras' managed inference service via LangChain.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you have access to Cerebras Cloud and want to use Cerebras inference within LangChain.
Low install friction, active maintenance, no known vulnerabilities, and permissive MIT license make it a straightforward addition. Not applicable if you don't have a Cerebras API key or prefer other inference providers.
Install
langchain-cerebras on PyPI
Before you install
Low install friction with a pure-Python wheel. Active maintenance with recent commits; last release 263 days ago suggests regular updates. Depends on langchain-core and langchain-openai, both established LangChain packages.
Requires a valid CEREBRAS_API_KEY environment variable set from cloud.cerebras.ai; Python 3.11 or 3.12.
License in practice
MIT license permits commercial and private use with minimal restrictions—standard permissive terms suitable for most projects.
Quickstart
pip install langchain-cerebras
from langchain_cerebras import ChatCerebras
from langchain_core.prompts import ChatPromptTemplate
chat = ChatCerebras(model="llama-3.3-70b")
prompt = ChatPromptTemplate.from_messages([("system", "You are helpful."), ("human", "Hello")])
chain = prompt | chat
chain.invoke({"text": "example"})
Verify before relying
- Which Cerebras models are available through the API beyond llama-3.3-70b.
- Pricing and rate limits for Cerebras Cloud inference.
- Whether streaming or async chat methods are supported.
- Performance benchmarks compared to other LangChain inference providers.
Package facts
| License | MIT permissive |
| Python support | Capped below the current Python release <3.13,>=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packageslangchain-corelangchain-openai |
| Maintenance | Actively maintained 263 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 136,420 / month, #11,397 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12 |
Evidence: langchain_cerebras-0.8.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “cerebras langchain integration”
- langchain-cerebrasIntegrates Cerebras AI inference services with LangChain, enabling…
- cerebras-cloud-sdkProvides a Python client library for accessing the Cerebras Cloud…
- livekit-plugins-openaiIntegrates OpenAI's Realtime, Responses, LLM, TTS, and STT APIs into…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also cerebras-cloud-sdk · langchain-groq · langchain-redis · langchain-cohere · langchain-weaviate · langchain-google-genai · langchain-databricks · langchain-azure-ai · langchain-fireworks · langchain-nvidia-ai-endpoints