langchain-ollama
An integration package connecting Ollama and LangChain
Decision gist · record as of 2026-08-14
Yes. This is a lightweight, actively maintained integration with no security issues, permissive licensing, and strong community backing. Install it if you want to use Ollama models within LangChain applications. The only prerequisite is having Ollama itself installed and running separately.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Ollama must be installed and running as a service on your system or network before the integration can connect to it.
- Low friction install with just two runtime dependencies.
- Actively maintained with recent releases; repo shows strong community engagement and no archived status.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
last release 2026-04-07 (129 days) · last repo commit 2026-08-14 · 144,266 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,121,125 downloads/mo, #2,743 on PyPI
Alternatives
Verify before relying
pip install langchain-ollama
from langchain_ollama import OllamaLLM
llm = OllamaLLM(model="llama2")
response = llm.invoke("What is machine learning?")- Whether Ollama must be installed and running separately as a system service or daemon
- Specific Ollama versions or model formats supported by this integration
- Performance characteristics or latency overhead of the LangChain-Ollama bridge
What it is and what it does
This package is a LangChain integration that bridges your Python application to Ollama, a tool for running large language models locally. Instead of calling a remote API, you use LangChain's standard interfaces to interact with models running on your own machine or network via Ollama. It depends on langchain-core for the framework abstractions and ollama for the underlying model communication.
The integration lets you build LangChain applications—chains, agents, RAG systems—that use locally-hosted models rather than cloud-based APIs. This is useful when you need privacy, want to avoid API costs, or prefer to run models on your own hardware. The package is actively maintained, supports Python 3.10 through 3.14, and carries no known security vulnerabilities.
Use it for
- Build a RAG pipeline that retrieves documents and generates answers using a locally-run model without cloud API calls.
- Create a chatbot or agent that uses Ollama models through LangChain's standard chat and tool-calling interfaces.
- Prototype LangChain applications offline or in air-gapped environments where cloud API access is unavailable.
- Run inference on sensitive data using local models to avoid sending data to external services.
- Experiment with different open-source models through Ollama while keeping the same LangChain application code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is a lightweight, actively maintained integration with no security issues, permissive licensing, and strong community backing. Install it if you want to use Ollama models within LangChain applications. The only prerequisite is having Ollama itself installed and running separately.
Install
langchain-ollama on PyPI
Before you install
Low friction install with just two runtime dependencies. Actively maintained with recent releases; repo shows strong community engagement and no archived status.
Ollama must be installed and running as a service on your system or network before the integration can connect to it.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
Quickstart
pip install langchain-ollama
from langchain_ollama import OllamaLLM
llm = OllamaLLM(model="llama2")
response = llm.invoke("What is machine learning?")
Verify before relying
- Whether Ollama must be installed and running separately as a system service or daemon
- Specific Ollama versions or model formats supported by this integration
- Performance characteristics or latency overhead of the LangChain-Ollama bridge
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0.0,>=3.10.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packageslangchain-coreollama |
| Maintenance | Actively maintained 129 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,121,125 / month, #2,743 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Artificial Intelligence |
Evidence: langchain_ollama-1.1.0-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 › “langchain ollama integration”
- langchain-ollamaConnects LangChain applications to Ollama, enabling use of…
- npmainpmai provides a Python interface to access open-source LLMs like…
- ipex-llmAccelerates large language model inference on Intel hardware (GPU,…
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 langchain-huggingface · langchain-mistralai · langchain-perplexity · langchain-aws · langchain-xai · langchain-openai · langchain-community · langchain-deepseek · langchain-groq · langchain-text-splitters