A local news-reading agent on Ollama that loses internet access while it thinks
- Hardware
- Mac with 16 GB RAM on macOS 26.3
- Models & engines
- qwen3-14b-local, 14.8B, Q4_K_M, 9.3 GB, served by Ollama
Part 1 ran on a Mac with 24 GB RAM using gemma4 (5 GB) - Key gotcha
- The redirect guard blocked The Register on the very first fetch, because its feed redirects to api.theregister.com; the author checked the host and added it by hand
What they built
News Scout is a local agent that reads five IT news feeds and picks the stories worth the author's time. It is part 2 of a series: part 1 was Disk Detective, a read-only agent that explained the author's Mac disk usage, and this one tests whether the same Python template carries over to a new task and whether a 14B local model is useful for it.
Because a news agent reads text written by strangers, the author attacked it with poisoned stories. What held up in the end was not a better prompt but taking the internet away from the part of the agent that reads that text.
The run is now split in two: plain code with no model fetches the allow-listed feeds to a cache file, then the model reads the cache inside a macOS Seatbelt sandbox that blocks all network traffic except the local Ollama server and blocks writes except the one report file.
Setup
- Mac with 16 GB RAM on macOS 26.3
- Python 3.9.6 (the old system Python), no dependencies
- qwen3-14b-local, 14.8B, Q4_K_M, 9.3 GB, served by Ollama
- Part 1 ran on a Mac with 24 GB RAM using gemma4 (5 GB)
How it works
- Two tools: list_feeds() returns feed names and topics only, and read_feed(feed) is the only tool that touches the internet
- The model's argument is a dict key, not a URL, so a made-up URL is refused
- The model gets a story ID, a title and 200 characters; Python keeps the full item and supplies the links at the end
- A redirect handler blocks redirects to hosts that are not on the allow list, and downloads are capped at a 20-second timeout and a 2 MB read limit
- Phase 1 FETCH runs with network on and model off; Phase 2 THINK runs with network off and model on, allowing only Ollama on 127.0.0.1:11434
Results & numbers
- The first real digest went through 50 stories from 5 feeds and picked 8
- The full two-phase run worked normally: 50 stories fetched, Qwen thinking inside the sandbox for about 4 minutes, a normal digest written
- Inside the sandbox, the local Ollama API was allowed while outside sites and a write to ~/Desktop were blocked with Operation not permitted
- On real news, the extra filters flagged no stories and cleaned no lines
Gotchas
- The redirect guard blocked The Register on the very first fetch, because its feed redirects to api.theregister.com; the author checked the host and added it by hand
- The code must call Ollama at 127.0.0.1 rather than localhost so the address matches exactly what the sandbox allows
- The model can still be misled: Qwen didn't notice the attacks, it just didn't obey them, so the author is still the final reader
- Ollama itself runs outside the sandbox with normal network access
“Don't ask whether the model will resist an attack. Ask what it can still do if it doesn't.”— MediBlackSand
Do it yourself
- Install Ollama, pull a tool-calling model and check tool calls with one raw curl before writing agent code
- Give the agent fixed tools whose arguments are keys in your own dict, never URLs
- Return only IDs, titles and short summaries to the model and keep the full items and links in your code
- Fetch the feeds with plain code first and save them to a cache file
- Run the model step under a sandbox profile that denies outbound network except 127.0.0.1:11434 and denies writes except the report file
- Read the digest yourself; the sandbox stops actions, not bad judgement
(version 1)
(allow default)
; No network, except the local Ollama server.
(deny network-outbound)
(allow network-outbound (remote ip "localhost:11434"))
; No writes in the home folder, except the one report file.
(deny file-write* (subpath (param "HOME")))
(allow file-write* (literal (param "OUT")))Similar setups
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.
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.
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.
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.