# AI use cases for Ollama (ollama/ollama)

Repo: [ollama/ollama](https://github.com/ollama/ollama) | Use cases: 3 | Page: https://dedupedai.com/use-cases/ollama-ollama/

Ollama runs open models such as Gemma, Qwen, DeepSeek, Kimi and gpt-oss locally or in the cloud, with a CLI, a local REST API and official Python and JavaScript libraries.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Run an open model on your machine in one command: https://dedupedai.com/use-cases/ollama-ollama/run-open-model-locally-one-command/
- Call a local model from Python or JavaScript: https://dedupedai.com/use-cases/ollama-ollama/call-local-model-from-python-or-js/
- Launch a coding agent backed by Ollama: https://dedupedai.com/use-cases/ollama-ollama/launch-coding-agent-on-ollama/

## How to run a local LLM with Ollama in one command

Repo: [ollama/ollama](https://github.com/ollama/ollama) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Install Ollama and chat with a model like Gemma from the terminal.

**Who it is for:** A developer who wants to try open models privately.

**The problem:** Setting up local inference is usually fiddly.

**The outcome:** A local model answering in your terminal.

### Steps

1. Install with `curl -fsSL https://ollama.com/install.sh | sh` (or `irm https://ollama.com/install.ps1 | iex` on Windows)
2. Run `ollama run gemma4`
3. Chat in the terminal
4. Try other models from the library

### Prompt to paste into your agent

```text
Install ollama/ollama, run `ollama run gemma4`, and ask <question>. Confirm the answer was generated locally.
```

### Caveat

Model download size and speed depend on the model and your hardware.

Risk, remote script: The Linux and macOS install pipes a script into sh; the manual download is an alternative.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ollama-ollama/run-open-model-locally-one-command/

## Ollama API: call a local model from Python or JavaScript

Repo: [ollama/ollama](https://github.com/ollama/ollama) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Use the REST API on port 11434 or the official libraries in your app.

**Who it is for:** A backend developer prototyping an AI feature without API costs.

**The problem:** Cloud APIs cost money during development.

**The outcome:** Your code calling a local model.

### Steps

1. Start Ollama and pull a model
2. Test with curl against http://localhost:11434/api/chat
3. Install `pip install ollama` or `npm i ollama`
4. Call chat with your model and messages

### Prompt to paste into your agent

```text
Using the ollama Python library, send <prompt> to gemma4 and print the reply. Confirm the request went to localhost:11434.
```

### Caveat

The API listens on localhost by default.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ollama-ollama/call-local-model-from-python-or-js/

## How to use Claude Code with Ollama (ollama launch claude)

Repo: [ollama/ollama](https://github.com/ollama/ollama) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Use Ollama launch to start tools like Claude Code configured for Ollama models.

**Who it is for:** A developer who wants to try a coding agent on open models.

**The problem:** Wiring agents to local models by hand is error-prone.

**The outcome:** A coding agent session running through Ollama.

### Steps

1. Install Ollama
2. Run `ollama launch claude`
3. Pick a model when prompted
4. Work in your repo

### Prompt to paste into your agent

```text
Run `ollama launch claude` and complete <small coding task> using an Ollama model. Report which model was used.
```

### Caveat

Small local models are much weaker at agentic coding than frontier models.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ollama-ollama/launch-coding-agent-on-ollama/
