Integrations
Ollama’s value is often as a local model backend for other tools. This chapter covers sibling courses on this site, editors, and the Docker hostname mistake everyone hits once.
Which interface to expose
The interactive menu and ollama launch can configure Claude Code, OpenClaw, VS Code, OpenCode, Codex, and more. See integrations and the CLI.
Dify: model provider
In Dify, add Ollama as a model provider. Point API Base at your daemon (http://localhost:11434 for local debugging—match Dify’s current form) and use names from ollama ls. Configure chat and embedding models separately so knowledge retrieval can follow the Embeddings path.
If Dify runs in Docker and Ollama is on the host, do not put localhost inside the container (that is the container itself). Use host.docker.internal in the next section.
LangChain
Two usual routes:
langchain-ollama(ChatOllama/OllamaEmbeddings) on the native protocol.ChatOpenAIwithbase_url="http://localhost:11434/v1"and any placeholderapi_key.
Agents: LangChain Quick Start. RAG: RAG. If your installed integration accepts ollama:gemma4-style provider strings, use whatever that package documents.
Hermes and OpenClaw
Self-hosted agents can treat Ollama as a local (or Cloud) backend without sending keys to a third-party chat vendor:
- Hermes tutorial — OpenAI-compatible base URL or the official notes (Hermes integration)
- OpenClaw tutorial —
openclaw.jsoncan target local Ollama (OpenClaw integration)
Launch tools in the menu and ollama launch write the URL and model the other app expects. If that still fails, curl /v1/chat/completions to separate “agent misconfigured” from “Ollama is not listening.”
Cursor: custom OpenAI-compatible base URL
In Cursor model settings, add an OpenAI compatible (or equivalent custom API) entry:
Start a chat locked to that model and confirm it is local (ollama ps should move). Context length follows Ollama defaults or Modelfile num_ctx—the compatibility layer does not magically unlock 128k.
Docker networking: host.docker.internal
Anti-pattern: http://localhost:11434 from a Dify / LangServe container. That hits the container’s own port 11434, not your GPU box.
When Ollama itself is in Docker:
GPU / ROCm flags: Installation and Docker. To share on a LAN, set OLLAMA_HOST and use a firewall—do not publish 11434 to the public internet bare.
Other editors and agents
VS Code, JetBrains, Continue, Cline, Zed, and similar tools usually accept an OpenAI-compatible URL. Same rules: v1 base + real model name + pull first. ollama launch vscode reduces hand-editing.
How Library tags relate to HF pages and GGUF names: Hugging Face.
Integration checklist
- On the host:
curl http://localhost:11434/api/tagslists models - Compatibility:
POST /v1/chat/completionsreturnschoices[0].message - From the app container:
curl http://host.docker.internal:11434/api/tags - Names in Dify / Cursor / the agent match
ollama lsexactly