Skip to main content
agentscope-extensions-model-ollama integrates locally hosted Ollama models. It is useful for local development, private deployments, and offline model serving.

Add the dependency

ModelRegistry

Use the ollama:<model> id. OLLAMA_BASE_URL is optional and defaults to the local Ollama endpoint when omitted.

Explicit builder

Use the builder when you need a non-default Ollama endpoint, formatter, transport, proxy, or Ollama options:

Spring Boot

Spring Boot applications can use the Ollama starter:
Configure the local Ollama model with agentscope.model.provider=ollama. The base URL is optional and defaults to http://localhost:11434:
Full builder options, formatters, credentials, and registry context details are covered in Model.