
I tested privacy-aware routing with 4 AI agents: 2 stayed local, 2 went to Claude: Trooper
4 agents, mixed routing: some cloud, some local
Been experimenting with per-request privacy routing in Trooper. Wanted to see if it actually works when you need some requests to stay local but don't want to give up Claude for everything else.
Ran 4 agents. Two asked about public stuff (OAuth vulnerabilities, Redis vs Memcached). Two handled internal data (API keys, customer names).
Agent 1 - Claude:
"Top 3 OAuth2 vulnerabilities?"Public knowledge, let Claude handle it.
Agent 2 - Qwen (local):
"Format this: api_key=sk-prod-xxxx, vault_url=https://vault.acme.io"Has credentials. Stays on my machine.
Agent 3 - Claude:
"Redis or Memcached for sessions?"
General question, use cloud.
Agent 4 - Qwen (local):
"Summarize: 47 tickets. 3 had PII (Alice Johnson, Bob Chen, Maria Garcia)"Customer names. Can't send that to Anthropic.
Everything worked. Cloud agents took 2-4 seconds. Local ones were faster (1-2s). The credentials and customer names never hit the network.
Why bother
I don't want my entire coding session local. Qwen is good but Claude is better for complex stuff.
I just want specific messages to stay on my hardware when they contain:
- Internal service URLs
- API keys or tokens
- Customer data
- Anything I wouldn't put in a blog post
The per-request control is the point. Not "all local" or "all cloud" — mix them based on what you're asking.
How it's different from my last post
Last time I showed what happens when Claude quota runs out. Trooper falls back to Ollama automatically.
This is proactive. You tell it "keep this one local" before sending. Different problem.
Both use the same context system so the local model knows what happened in the cloud part of the conversation.
What doesn't work great
Qwen isn't Claude. It's fast and fine for formatting/parsing/summarization. But if you need deep reasoning, route to Claude.
You need Ollama running. I use qwen2.5:3b (2GB, fast enough) or 7b if I want better quality.
Repo: https://github.com/shouvik12/trooper
Still iterating on this. Let me know if you hit edge cases or have ideas for better routing heuristics.