Who it is forA backend developer prototyping an AI feature without API costs.
The problemCloud APIs cost money during development.
The outcomeYour code calling a local model.
What you need first
- macOS, Windows, Linux or Docker
- Enough RAM or VRAM for the model you pick
Steps
- Start Ollama and pull a model
- Test with curl against http://localhost:11434/api/chat
- Install
pip install ollamaornpm i ollama - Call chat with your model and messages
Prompt for your agent
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.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for ollama/ollama and "Call a local model from Python or JavaScript"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer