Skip to content

LangChain vs Ollama

Both are ai tools. Here is what separates them.

LangChainOllama
CategoryAIAI
Pricing modelopen-sourceopen-source
Price fromOpen sourceOpen source
Upvotes1812
What it doesThe framework most LLM applications are still assembled with.Run language models on your own machine with one command.

What LangChain is

LangChain is a set of developer tools for building applications on large language models and then watching how those applications behave once they are running. Two pieces do most of the work. LangGraph is the framework, released under the MIT licence and free to use. LangSmith is the hosted service for tracing, evaluation and monitoring, and it is what the pricing pages describe. LangGraph ships built in memory that persists conversation history, human in the loop approval steps, and token by token streaming. Those are the three parts of an agent that are tedious to build by hand: remembering earlier turns, pausing so a person can approve an action before it happens, and returning output as it is produced rather than all at once. LangSmith records what a run actually did. Tracing SDKs cover Python, TypeScript, Go and Java, and the service ingests OpenTelemetry traces and works with the OpenAI SDK, the Anthropic SDK, the Vercel AI SDK and LlamaIndex, so it is not restricted to applications built with LangGraph. Tracing runs through an asynchronous callback handler and adds no latency to the traced application. Alerts can be raised through webhooks or PagerDuty. The Developer plan is free but capped at one seat, and includes 5,000 base traces a month before pay as you go charges begin. Plus is $39 per seat per month with no cap on seat count, 10,000 base traces a month and one free small serverless deployment. Base traces are retained for 14 days, and traces upgraded to extended retention are kept for 400 days. Usage past the allowances is metered: a compute unit costs $1.50 and a storage unit costs $1.00, deployments beyond the included one bill on vCPU hours and GiB hours, and tuned evaluators cost $0.01 in compute units per evaluation run on Plus. Enterprise is custom priced and billed on an annual invoice, adding custom single sign on, attribute based and role based access control, an SLA and a named support team. It is also where deployment opens up. LangSmith can run self hosted on a customer's own Kubernetes cluster, hybrid, or on the vendor's cloud, and the bring your own cloud option supports AWS, GCP and Azure. The managed cloud stores data in the GCP us-central-1 region, which matters if there are residency requirements to satisfy. LangChain states that it does not train on customer data.

What Ollama is

Ollama runs open weight language models on your own machine, and optionally on Ollama's hosted cloud. Models are pulled down and driven from a command line interface, and the same models can be called over an HTTP API, so one installation serves both a terminal chat and an application. Installers are published for macOS, Windows and Linux, with the macOS build requiring macOS 14 Sonoma or later, and the whole thing can be installed with a single shell command that pipes the vendor's install script into sh. A model is started with ollama run, and a chat session ends by typing the bye command. The rest of the CLI covers pull, rm, ls, ps, stop, serve, signin, signout and launch. The launch command wires Ollama models into external tools including VS Code and several coding agents. Custom models are defined in a Modelfile and built with ollama create. The local API listens on port 11434 at localhost. There is also an OpenAI compatible layer that accepts the literal string ollama as the API key and covers chat completions, completions, models, embeddings and responses endpoints. That layer has gaps worth knowing about before you point an existing client at it: it does not support logprobs, logit bias or tool choice, and images must be base64 encoded rather than passed as URLs. Appending a cloud suffix to a model name runs that model on Ollama's cloud instead of locally, which requires signing in with the ollama signin command or setting an API key in the OLLAMA_API_KEY environment variable. The hosted API is reachable at ollama.com/api, and cloud models are served from the United States, Europe and Singapore. Cloud features can be turned off entirely so that an installation runs only against local models, which then work with no network connection at all. Cloud use is what the paid plans meter. The Free plan costs nothing, allows one cloud model to run at a time and permits an unlimited number of public models. Pro costs 20 USD per month or 200 USD per year, raises the limit to three cloud models at a time and permits uploading and sharing private models. Max costs 100 USD per month and allows ten cloud models at a time. Team costs 25 USD per seat per month with a five seat minimum and includes zero data retention. Enterprise pricing is quoted rather than listed. Ollama states that user data is not used to train models.

We are not affiliated with either product. Upvote counts come from the published formula and neither position was paid for.