What it does
This is the official Python library for Ollama, an app that runs AI chat models on your own computer. It lets programmers send messages to a model and get replies from inside their own Python code.
It supports streaming, where the answer appears word by word. It can also use larger models hosted on Ollama's cloud, which requires signing in or an API key.
Who it's for
Python developers who want to add local AI models to their programs.
Can I use it without coding?
Developers only. It's a code library. Ollama itself must be installed and running. New to this? Start here.
Can I run it?
- Cost
- FreeNothing to pay or sign up for.
- Runs on
- Mac, Windows, Linux
- Privacy
- Your choice: run it on your device or use an online service
- API key
- Not needed
Try it
Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?
Before you install
- Only download from the official GitHub page. Copies with similar names exist for many popular projects.
- License (MIT): Very permissive: free to use, change and share, including for business.
- More on staying safe
Where people are talking about it
- Ollama is now powered by MLX on Apple Silicon in previewHacker News · Mar 2026
- Ollama now supports AMD graphics cardsHacker News · Mar 2024