Using a passkey as the "yes" for anything my AI agent spends

Disclosure: this comes from a project I built (Auth Your Agent; the client side is MIT and free).

I let an AI agent run errands on websites for me. Getting it signed in was never the worrying part. What worried me was what it does once it's in. So anything that costs money or can't be undone waits for me to confirm with a passkey on my phone.

Some choices I'd like opinions on:

  • A password can never approve these. It has to be a fresh passkey assertion, and each approval works once.
  • The shop writes the text I approve ("Pay $45.00 at Lamp Shop for Brass lighthouse lamp"), not the agent, so the agent can't describe one purchase and make another.
  • I approve a sign-in once for a period I choose, from an hour to 30 days, but payments ask every time.
  • For a scheduled run (say, posting at 3 a.m.), the agent sends a plan first, and one passkey approval covers the steps I tick, each with its exact text. That approval needs the passkey. Signing in with Google can't approve a plan, because it would approve every step.

Here's a real agent checkout on a demo shop, 24 seconds from Buy to Paid (31-second video): https://authyouragent.com/static/video/demo-shop-checkout.mp4

Two things I'm unsure about. Is a passkey prompt on every payment too much friction? And if you have synced passkeys on several devices, should any of them be able to approve, or only the phone that registered?

reddit.com
u/kjames2001 — 9 days ago

The Daily Tech Prophet

Hi everyone, I have been getting great inspirations from this sub, so I thought I'll give something back.

I love tech new, especially from reddit, so asked my hermes agent to push me daily tech news from reddit every day, but sometimes I'm just too lazy to read them. Then I got an idea to make the feed more interesting. So I asked my agent to build me the daily tech prophet newspaper.

**The Daily Tech Prophet** — a self-contained pipeline that turns Reddit's hottest posts from your favourite subreddits into a **Harry Potter–style daily newspaper** (multi-page HTML artifact), delivered as a link to any messaging platform.

- **How it works:** one combined multi-sub RSS fetch → LLM curation to a 10–15 pick digest → renderer + media localizer → artifact server URL, all chained in a single Hermes cron job that delivers the edition as a plain-text message.

- **Zero pip dependencies** — Python 3 stdlib only (Pillow only if you regenerate the newsprint textures).

- **Built to survive Reddit's throttling, and all media downloaded at fetch time so editions never hotlink Reddit's CDNs. Videos are also cached and the newspaper displays videos looped.

- **Force-dark-proof rendering** and scroll-stable pagination, so it reads cleanly in Telegram, Discord, and WeChat in-app browsers.

- **Agent make recommendations on projects/integrations you might be interested on last page.

Repo (MIT, open source): https://github.com/kjames2001/daily-tech-prophet

Built with [Hermes Agent](https://github.com/NousResearch/hermes-agent).

u/kjames2001 — 28 days ago

[UPDATE] Hermes Router Proxy — Now with a TRACER surrogate (94% local classification) + two cascade-killing bugs squashed

Update: TRACER surrogate + two bug fixes that stopped the cascade from imploding

Original post

Recap: Hermes Router Proxy is a single-file Python server that sits between your OpenAI-compatible client and your model providers. It classifies every prompt as "simple" or "complex" and routes accordingly — simple stuff like "ok", "thanks", or "make that darker" goes to a cheap/fast model (e.g. deepseek-v4-flash), while real work like "implement a binary search tree" goes to a smarter one (e.g. deepseek-v4-pro). It has multi-tier fallback cascading, per-model circuit breakers, automatic key rotation on rate limits, and a transparent SSE proxy that survives mid-stream failures. It was built for my Hermes agent setup running on a Proxmox homelab in Botswana, but it works with anything that speaks the OpenAI API format.


The original router used a small LLM (qwen2.5:3b) for every classification — ~200ms and an Ollama call per new conversation. It worked, but using an LLM to save LLM calls is circular. Then someone pointed me at TRACER by adrida (arXiv). Their idea: train a cheap surrogate, gate it with confidence, only call the teacher model when unsure. That was the missing piece.

I didn't implement full TRACER (they replace entire LLM responses — I only replace the routing decision). But the surrogate + confidence gate pattern is straight from them.

What's actually running now:

  • Sentence embeddings surrogate (all-MiniLM-L6-v2 + logistic regression). Classifies prompts in ~1ms locally. Only falls back to qwen2.5:3b when confidence is below threshold.
  • Weekly auto-refit. Cron job runs every Saturday at 3am — re-trains the surrogate on production traces, restarts the service, smoke-tests. Zero maintenance.
  • Classifier report endpoint (/classifier/report). Coverage metrics, confidence distribution, drift timeline. Also works as ?format=html.
  • Real traces, not synthetic. 11 production traces so far (just deployed). CV accuracy 1.0 with 100% coverage on that tiny set — meaningless number, ask me again when there's 200+.

Two bugs that took way too long to find:

  1. Circuit breakers were per-host, not per-model. deepseek-v4-pro returned 503 on ollama.com → circuit opened for the entire host → glm-5.1 on the same host got blocked too, even though it was fine. One bad model could kill every tier. Fix: circuit keys now include model name (https_ollama_com_v1__deepseek-v4-pro). Each model gets its own circuit.

  2. Streaming had no 503 retry. Non-streaming retried 503 with exponential backoff (2s/4s/8s). Streaming didn't — one 503 and it immediately cascaded to the next tier. Three 503s in a row exhausted everything. Fix: streaming now does the same retry loop, including resuming the SSE stream if retry succeeds.

Both bugs together meant a single overloaded model could burn through all fallback tiers in seconds. The router looked broken but the cascade logic was actually correct — it just had nothing left to fall back to.

What's still rough:

  • 11 traces is nothing. Real accuracy numbers need weeks of data.
  • The simple/complex binary split works for coding agents. Probably breaks for anything more nuanced.
  • Embedding model adds ~6-7s to cold start on CPU. Fine for 24/7 homelab, annoying otherwise.

Repo: github.com/kjames2001/hermes-router-proxy

Credit: the surrogate + acceptor gate pattern is straight from TRACER. If you're doing LLM routing, their paper is worth reading.

reddit.com
u/kjames2001 — 5 months ago
▲ 22 r/ollama

Just received refund from ollama for the caching issue hitting session/weekly limits too fast!

Just received this from ollama:

Hi there,

Earlier this week some users reported hitting session limits much faster than expected on their Ollama subscription. We investigated and discovered a caching issue in our model hosting that caused session and weekly limits to be consumed too quickly, especially for DeepSeek-V4-Pro.

I'm sorry this happened. Your account was one of those affected, and I've issued you a refund for the last month of your subscription.

The team is working hard to make sure this doesn't happen again in the future. Please reach out to me anytime with feedback.

Best,

Jeff Ollama

reddit.com
u/kjames2001 — 5 months ago

I built an LLM router-proxy that saves me ~60% on API costs by routing simple questions to cheap models

I run a homelab with a bunch of self-hosted stuff — Home Assistant, Docker services, an AI agent that helps manage it all. The agent makes a lot of API calls. Some are genuinely hard (debug a crashing container, write a deployment script). Most are… not. "What time is it?" "Thanks." "Turn on the lights."

I was burning expensive model credits on messages that a $0.15/million token model could handle in its sleep.

So I built a proxy. It sits between my AI agent and the cloud APIs. Before every request, a cheap local model (qwen2.5:3b running on Ollama) reads the message and goes "simple" or "complex." Simple stuff goes to a fast/cheap model. Hard stuff goes to the expensive one. ~200ms overhead per classification, and it only classifies the first message in a conversation — follow-ups reuse the cached tier.

It also does some things I didn't originally plan but turned out to be necessary once this thing was running 24/7:

Fallback cascade. Primary model errors out? It tries fallback1. That fails too? fallback2. If all three are down, you get a real error instead of a silent hang. Each tier has its own API key and can rotate to an alternate key on rate limits — so a single 429 doesn't kill the whole chain.

Circuit breakers. After N consecutive failures from an endpoint, the circuit opens and that endpoint gets skipped entirely for a configurable timeout. Stops the proxy from hammering a dead backend.

Metrics. Prometheus-compatible endpoint with counters for requests by tier, classifier latency, cache hits, 429s, fallback usage, open circuits. I wired it into my monitoring dashboard so I can see when something's degrading before I feel it.

Hot reload. POST /reload swaps the config without restarting. Useful when a provider goes down and I want to route around it without dropping sessions.

JSON logging. LOG_FORMAT=json and suddenly all my router logs are parseable by Loki.

The whole thing is about 900 lines of Python (FastAPI + httpx), OpenAI API-compatible so it drops in front of anything that speaks that format. MIT licensed.

Repo: github.com/kjames2001/hermes-router-proxy

Genuinely curious if anyone else has built something similar. I know there are commercial products in this space, but I wanted something I could run locally, configure with a YAML file, and not think about. The circuit breaker + multi-tier fallback stuff especially — I feel like that's table stakes for anything you're going to actually depend on, but most self-hosted proxies seem to skip it.

Happy to answer questions. The code is rough in places (this started as a weekend hack and… stayed that way), but it's been running in production for a week without issues.

u/kjames2001 — 5 months ago