Local AI use cases with Python

Python is the most common glue language for local AI tools; many projects here are a single Python script that talks to Ollama's local HTTP API.

44 real examples, each linked to its original source.

A local prompt-injection filter on CPU in front of email-reading agents

After an intruder put a miner on his agent server, a developer trained a small multilingual classifier that checks every email offline before his agents read it, and blocks obvious prompt-injection attempts.

DEV Community (Evgenii Arsentev) · 2026-12-02

Cutting a local Qwen coding agent's wait on a 16GB Mac with a memory hook

A developer running a coding agent on qwen3.5:9b through Ollama replaced its always-loaded memory index with a hook that attaches only relevant memory lines, and cut median answer time from 90.4s to 56.4s.

DEV Community (JustJinoIT) · 2026-12-02

A read-only Gemma 4 agent on Ollama that explains what fills a Mac's disk

A sysadmin's one-file Python agent lets Gemma 4 on Ollama dig through his home folder and write a Markdown report on disk usage, while code and a four-line macOS sandbox-exec profile make sure it can only look.

DEV Community (MediBlackSand) · 2026-11-30

Finding why a local Ollama RAG bot ignored its instructions: silent num_ctx truncation

A developer's local RAG bot on llama3.1:8b skipped citations and guessed answers because Ollama silently cut prompts to a 2048-token window; in a 500-question test 312 prompts were truncated, and setting num_ctx to 8192 lifted grounded accuracy from 61% to 84%.

DEV Community (jidonglab) · 2026-11-30

A private OpenAI-compatible LLM API on an AMD GPU with llama.cpp

A Vietnamese developer's notes on building llama.cpp for AMD cards, choosing between Vulkan and ROCm, and running llama-server as a locked-down systemd service that existing OpenAI SDK code can call.

DEV Community (EME GUG) · 2026-11-27

A mock-interview coach where a local 4B model must quote you to mark you down

Yuva Kunaal built Local AI Interviewer, an open-source app that runs mock interviews on your own computer with qwen3.5:4b through Ollama and only reports a mistake when the model can quote it from your answer.

DEV Community (Yuva Kunaal) · 2026-11-26

PatchPal TinyAgent: a coding agent on a 4B model and a 6GB laptop GPU

WiseProbe adapted its PatchPal coding agent to run Gemma 4 E4B or Qwen3.5 4B through Ollama on a 6GB RTX A1000, using handoff-note compaction and capped file reads to work inside a 16K or 32K window.

WiseProbe Blog · 2026-11-25

Checking who can reach a local Ollama and no-auth MCP stack

A developer audited their Mac's local AI stack and found an unauthenticated MCP search server open on the LAN address and a loopback-only Ollama still answering every Podman container.

DEV Community (Nerav Doshi) · 2026-11-24

Hearth: a household assistant on Ollama, and proving nothing leaves the house

Hearth answers family questions from manuals and papers with citations, handles voice, notes and reminders, and runs on one home computer; its builders tested small models, prompt injection, and three ways of proving no data leaves.

DEV Community (WeekendAiProjects) · 2026-11-23

Echo: a self-hosted, CPU-only voice cloning studio with a 3D avatar

A developer built a Docker-based voice studio that reads text back in a cloned voice from a few seconds of audio using Coqui TTS on CPU, with a lip-synced 3D avatar and voice samples that never leave the machine.

DEV Community (jbcanillo) · 2026-11-22

Breaking re-ranker ties with Gemma's own token probabilities on a Mac mini

A developer testing a local retrieval setup on an M4 Mac mini fixed tied re-ranker scores from gemma3:12b by reading the model's digit probabilities from Ollama, getting the right article first on 11 of 12 questions.

DEV Community (Nerav Doshi) · 2026-11-22

A CPU-only PDF assistant that cites the page and refuses to guess

A cloud engineer built a question-answering service over technical PDF manuals that runs entirely on a standard Linux server with no GPU, using Ollama with qwen2.5:3b, and answers only from the documents with file and page citations.

DEV Community (Sujith Ravikumar) · 2026-11-21

A local contract and invoice agent whose citations are checked by code

Gonzalo Blasco built a laptop-only agent that answers questions about contracts and invoices and only accepts a citation if its quote literally appears in the retrieved chunk; Gemma 4 12B got 18 of 18 of his test questions right.

DEV Community (Gonzalo Blasco) · 2026-11-21

A Meshtastic station that sends an honest automatic receipt when nobody answers

A Meshtastic user built a Python monitor that waits 90 seconds for a human to answer a radio check and, if nobody does, sends a clearly labeled automatic receipt, with a small Qwen3 model on Ollama only classifying messages.

X (@thatsatechnique) · 2026-11-20

Private Garmin training briefings on a 16 GB MacBook Air with a local Qwen3 4B

Garmin Insights is a macOS app that writes a morning training briefing from your Garmin and Strong data with a local Qwen3 4B in Ollama, measured on a 16 GB MacBook Air M3.

vashqu on GitHub · 2026-11-19

Turning 2,654 phone gallery photos into 512 searchable notes with local OCR and Ollama

JustJinoIT sorted years of snapped book pages, slides and documents into knowledge notes on a MacBook, keeping every photo on the laptop and blocking any photo with ID or account numbers.

JustJinoIT on DEV · 2026-11-18

MapNet: permission-aware local RAG over your folders on a CPU laptop with Ollama

Gal built MapNet, an MIT research prototype that keeps a live map of folders, files and sections so a small Ollama model only reads the few passages it needs, and published where it loses to embedding everything.

Gal on X · 2026-11-15

Snakkie: a website chat penguin served by llama.cpp and SearXNG on a no-GPU Xeon VM

Dennis Hilk moved his site mascot Snakkie from canned answers to a Qwen3 1.7B model running in llama.cpp on his old Xeon server, with SearXNG for web lookups.

Dennis Hilk · 2026-11-15

Local support-ticket triage with Ollama decision models: 59 of 60 answers right on a CPU laptop

Varun Chopra tested three Ollama decision models on 20 hand-labeled support tickets on a 16 GB, no-GPU Linux machine and wrote down every command, number and mistake.

Varun Chopra on X · 2026-11-13

Company Brain: a private consultancy RAG on a 16 GB MacBook Air M4 with Ollama and Open WebUI

Ángeles Hernández Acosta’s KeepCoding final project runs Qwen3.5-4B via Ollama on a 16 GB MacBook Air M4, answers only from local documents with citations, and scored 16/22 on a locked final exam run on 6 November 2026.

GitHub · 2026-11-06

Hymnix: a Windows desktop gateway that shares your local Ollama models with friends over an optional tunnel

Carris Flynn’s Hymnix wraps Ollama in an OpenAI-compatible Windows gateway with a live request console, idle VRAM unload, and an optional Cloudflare or ngrok tunnel so invited people can use your GPU from elsewhere.

Carris Flynn (Hymnix) · 2026-11-05

Local AI Starter: a one-click Mac wizard that installs llama.cpp, Qwen3, and OpenCode in one folder

Kirill Lukyanov built an MIT-licensed double-click wizard that sizes a Mac’s RAM, downloads a pinned llama.cpp build plus a Qwen model and OpenCode, proves the model answers, then opens a sandboxed coding agent and browser chat.

Kirill Lukyanov (DEV.to / klukyanov.ru) · 2026-11-05

Local AI: a one-click Windows app that picks a model for your PC and sets up Ollama for friends

Tired of setting up local LLMs for friends, a developer built a free MIT-licensed Windows app that detects your GPU and RAM, installs Ollama without admin rights, pulls a fitting model and opens a private chat.

Oleg Che (DEV Community) · 2026-11-04

A Baroque music events calendar fed by a local Qwen agent on a home llama.cpp server

A data scientist serves small models with llama.cpp from a 16 GB RTX 4060 Ti box on his home network, and a LangChain agent on it finds upcoming concerts for his wife's Bavarian Baroque events calendar.

Andreas Kaempf (FastDataScience.eu) · 2026-11-04

NVIDIA's Nemotron 3.5 Transcribe pruned to 12 GB with MLX to run fully on a 24 GB Mac mini

Michael Chen cut a 67.5 GB speech-recognition model to 12.07 GB by pruning half its experts and quantizing in MLX, so it transcribes offline on a 24 GB M4 Mac mini, and published the accuracy cost.

Michael Chen (Hugging Face) · 2026-11-03

rip: a local Gemma 2 2B writes epitaphs and revival ideas for your abandoned side projects

A Hacktoberfest CLI scans your folders for dormant projects and has Gemma 2 2B on Ollama write a witty obituary and a suggestion to revive each one, sending only metadata, never code.

razorbill (DEV Community) · 2026-11-03

All of Hacker News in 5.3 GB, searched by meaning on a laptop CPU with EmbeddingGemma 2

DavidMC packed all 49.3M Hacker News stories and comments into one 5.34 GB file that runs semantic and keyword search offline on a laptop, embedded entirely on the laptop's integrated GPU.

DavidMC (Google AI Developers Forum) · 2026-11-02

Haunted Inbox: a local Gemma 4 E2B finds the forgotten accounts in 12 years of email

Niraj Khetre built Haunted Inbox, which reads only email envelopes on his laptop, has Gemma 4 E2B in Ollama spot sign-up accounts, and lets plain code report breaches, saved cards and delete links.

Niraj Khetre (DEV Community) · 2026-11-01

Death Diary: switching off a local Gemma 3 1B's neurons night by night on a plain CPU

Toyyib Olamilekan had Gemma 3 1B write a diary entry each night on his CPU while he zeroed out more of its neurons, measuring what it forgot and when, then restored the weights so it could read its own decline.

Toyyib Olamilekan (DEV Community) · 2026-10-31

Link Séance: a local Gemma 3 writes grounded epitaphs for the dead links in your bookmarks

Abdul AmberNeel built a command-line tool that checks every link in a bookmarks file, finds the last living Wayback Machine snapshot of dead ones, and has a local Gemma 3 write a two-sentence epitaph only from what the archive kept.

Abdul AmberNeel (DEV Community) · 2026-10-31

Séance: local Whisper and Gemma 4 turn a grandmother's Malayalam voice notes into a searchable family archive

Clivin John built Séance, which transcribes and translates his grandmother's voice notes on his laptop, has Gemma 4 write memory cards, and answers questions only with her exact, verified words.

Clivin John (DEV Community) · 2026-10-31

Legacy Code Necromancer: a local Gemma 3 audit for old repos

Waleed Shamhan built a pure-Python CLI that scrubs secrets from old code, sends it only to a local Gemma 3 in Ollama for an audit, and keeps every raw reply so a human can check each finding.

Waleed Shamhan (DEV Community) · 2026-10-30

Haunted Haiku: a local Gemma 3 poet that also designs the card

E. Smith built a small Dash app where a local Gemma 3 in Ollama writes an eerie haiku and picks its colours and emoji in one JSON reply, so the poem and its picture work with Wi-Fi off.

E. Smith (DEV Community) · 2026-10-30

GitSéance: local Gemma 2B explains deleted code from git history and refuses to guess

Francisco Grandón built GitSéance, a Python tool that mines a repo's deleted functions from git log and has gemma2:2b in Ollama write a grounded epitaph for each, skipping the model entirely when the commit message is too vague.

Francisco Grandón (DEV Community) · 2026-10-28

Receipt Box: Gemma 3 4B in Ollama sorts a freelancer's receipts and VAT on the laptop

E. Smith built Receipt Box, a receipt and invoice sorter for freelancers where Gemma 3 4B with vision, running in Ollama on the user's own machine, reads vendor, date, total, VAT, currency and category from photos and PDFs.

E. Smith (DEV Community) · 2026-10-28

Memoria: local Whisper and Gemma 3 4B turn a family voice memo into a keepsake

Jeffrey Turov built Memoria, an oral-history archivist that transcribes a family voice memo with Whisper and has Gemma 3 4B in llama.cpp pull out people, places, themes, verified quotes and follow-up questions, all on a local CPU.

Jeffrey Turov (DEV Community) · 2026-10-27

Paper to Portfolio: local Gemma 4 reads an old share certificate, Python does the maths

Rahul Kumar built Paper to Portfolio, which uses gemma4:e4b in Ollama on a CPU-only laptop to read an old Indian share certificate and pick out bonuses, splits and mergers from pasted filings, while plain Python checks every quote and does all the arithmetic.

Rahul Kumar (DEV Community) · 2026-10-27

Morning Sloth: Gemma 4 on an Arduino UNO Q triages Gmail overnight and shows one LED face

Muhammad Murtuza Hussain runs Gemma 4 E2B in llama.cpp on an Arduino UNO Q's own CPU to read his Gmail overnight and show whether anything needs him as a sloth face on the board's LED matrix.

Muhammad Murtuza Hussain (DEV Community) · 2026-10-26

Couch Commander: an offline voice remote for YouTube that understands Pidgin

Benny built Couch Commander, which chains openWakeWord, Whisper and Gemma 4 E2B in Ollama on a Mac so spoken commands in English or Nigerian Pidgin control YouTube in Chrome with no internet.

Benny (DEV Community) · 2026-10-26

Fine-tuning a 32B model on a 6 GB laptop GPU by streaming weights from disk

A developer posting as mycute fine-tunes a 32B NF4 model on an RTX 3050 Laptop with 6 GB of VRAM by streaming one transformer block at a time from an NVMe SSD, and documents three measurement mistakes they corrected.

mycute (DEV Community) · 2026-10-26

Availazy: Gemma 4 E2B turns a week of volunteer chat messages into an availability sheet

Bipul Chamoli built Availazy, a local review tool where Gemma 4 E2B in Ollama copies the availability words from volunteer chat messages, plain Python works out the dates, and the coordinator accepts or rejects each suggestion.

Bipul Chamoli (DEV Community) · 2026-10-26

Quiet Catchup: a local Qwen3 4B group-chat summary that links every point to its source

Kartikey Tiwari built Quiet Catchup, a small local web app where you paste group-chat messages and Qwen3 4B via Ollama returns a short summary, decisions and open requests, each linked to the messages it cites.

Kartikey Tiwari (DEV Community) · 2026-10-25

Morning Digest: a local Gemma 3 agent that summarizes overnight Telegram group chats

Waleed Shamhan, a student in Yemen, built Morning Digest, a single Python script that reads a Telegram Desktop export and uses Gemma 3 via Ollama to write a short Arabic digest of the last 12 hours of group chats.

Waleed Shamhan (DEV Community) · 2026-10-25

FollowUp Local: Gemma 3 on a laptop explains why a sales chat went quiet

FollowUp Local is a one-file Python tool for people who sell through chat: paste a customer conversation and Gemma 3 via Ollama names the stage it stalled at, the real concern, a quoted line of evidence and a draft follow-up.

dongwei-polyred (DEV Community) · 2026-10-25