HomeReadTools deskOpenClaw and AgentGateway route local and cloud LLM requests from a living room
Tools·Aug 12, 2026

OpenClaw and AgentGateway route local and cloud LLM requests from a living room

An analysis of a home-grown autonomous agent setup using Google's AgentGateway and Ollama to dynamically route LLM tasks based on complexity, saving cloud token costs. The Answer Up Front For…

An analysis of a home-grown autonomous agent setup using Google's AgentGateway and Ollama to dynamically route LLM tasks based on complexity, saving cloud token costs.

The Answer Up Front

For developers running 24/7 autonomous agents at home, routing every task to frontier cloud models is an expensive waste. This architecture, combining a Raspberry Pi running OpenClaw with a Mac Mini running Google's open-source AgentGateway and Ollama, offers a blueprint for local-first routing. Use this setup if you want to offload simple coding tasks to local models like qwen2.5-coder:7b while reserving cloud APIs for complex reasoning. Skip it if you lack dedicated local hardware or require sub-100ms routing latency, as the extra proxy hop and local model cold-starts add overhead.

Methodology

This review evaluates the self-hosted LLM routing architecture described by developer Anup Sharma on May 23, 2026. The source signal details a real-world deployment running in Bangalore, India. Our analysis draws on the author's published architectural patterns, hardware specifications (Raspberry Pi and Mac Mini), and software components (OpenClaw, Google's AgentGateway, Ollama running qwen2.5-coder:7b, and a 50-line Python intent classifier). Independent performance benchmarks, long-term reliability metrics, and edge-case handling under high concurrency are not covered in this review. We treat the author's claims regarding task execution and seamless routing as unverified architectural patterns until we replicate the setup in our own test rig.

What It Does

Local orchestration via OpenClaw

The setup uses OpenClaw, an autonomous agent running 24/7 on a Raspberry Pi. It connects to Discord to receive user inputs, manages long-term memory, and coordinates tasks. The author reports using it to scrape restaurant ratings in Indiranagar, update Google Sheets, sign PDFs, and write system scripts.

Intelligent routing with AgentGateway

Instead of hitting cloud APIs directly, OpenClaw sends all requests to a single local endpoint: http://192.168.1.15:1234/v1/chat/completions. This endpoint is managed by Google's open-source AgentGateway running on a Mac Mini. The gateway handles protocol translation, authentication, and observability, acting as a unified proxy.

Intent classification in Python

A lightweight, 50-line Python router acts as the decision engine. When a request arrives, this classifier determines the task's complexity. Simple tasks, such as writing a JSON parser, are routed to Ollama running qwen2.5-coder:7b locally on the Mac Mini. Complex reasoning tasks, like comparing system architectures, are routed to external frontier models.

What's Interesting / What's Not

The most compelling aspect of this architecture is the pragmatic division of labor between local and cloud resources. Running a 24/7 agent on a Raspberry Pi is highly cost-effective, but offloading the actual execution to a nearby Mac Mini prevents the Pi from choking under LLM workloads. Using AgentGateway for protocol translation is a smart choice. It allows the agent to treat the entire cluster as a single OpenAI-compatible endpoint, removing the need to write custom API adapters for every local model update.

However, the 50-line Python intent classifier is a fragile point in the system. The author does not specify how this classifier determines intent without itself incurring LLM latency or API costs. If it uses a local regex or a tiny classification model, it will inevitably misclassify borderline tasks, sending complex reasoning to a 7B local model or wasting cloud tokens on trivial scripts. Furthermore, running this setup 24/7 in a living room introduces hardware single-points-of-failure. A power flicker in Bangalore or a local network drop will silently take down the entire agentic workflow.

Pricing

Pricing snapshot as of May 2026:

  • AgentGateway: Open-source (Apache 2.0 license), free to self-host.
  • Ollama: Open-source, free.
  • OpenClaw: Open-source, free.
  • Hardware costs: Raspberry Pi and Mac Mini represent the primary upfront capital expenditures. Cloud API costs are pay-as-you-go based on routed traffic.

Verdict

This living-room architecture is a highly practical blueprint for self-hosted agent optimization. By placing Google's AgentGateway in front of Ollama and cloud APIs, you can drastically cut token spend without sacrificing the intelligence of frontier models when they are actually needed. We recommend this setup for developers who already have idle local hardware and want to run long-running autonomous tasks. Skip it if you need a turnkey, zero-maintenance solution, as maintaining a multi-device local network requires ongoing system administration.

What We'd Test Next

In our next benchmark iteration, we want to measure the exact latency overhead introduced by the Python intent classifier and AgentGateway proxy hop. We also need to test the classification accuracy of the 50-line router: how often does it misroute tasks, and what is the cost impact of those errors? Finally, we plan to stress-test the setup under concurrent requests to see how Ollama on a Mac Mini handles queueing when OpenClaw triggers multiple parallel background tasks.

The investor read

This home-brewed setup highlights a major shift in developer behavior: the transition from cloud-only LLM usage to hybrid, local-first architectures. As open-source models like Qwen-2.5-Coder approach parity with older frontier models for specialized tasks, the economic incentive to bypass cloud APIs grows. Startups building in the AI gateway space are competing for this routing layer. For investors, this project signals that the last mile of agentic execution will likely be hybrid. Companies that can seamlessly orchestrate local-hardware execution with cloud-fallback capabilities will capture significant enterprise spend, as organizations seek to reduce their API dependency and keep sensitive data within local networks.

Pull quote: “By placing Google's AgentGateway in front of Ollama and cloud APIs, you can drastically cut token spend without sacrificing the intelligence of frontier models when they are actually needed.”

Sources · how we verified
  1. I Built an AI That Decides Which AI to Talk To — Running 24/7 From My Living Room

Every claim ties to a primary source. See our methodology.

Reported by the Riley desk on Founderr Pulse’s Tools beat. Every factual claim is tied to a primary source and linked; anything that can’t be stood up doesn’t run. Founderr (RIKHATH LLC) is the accountable publisher and corrects in place. How we work · About · File a correction.
R
Riley

The Riley desk covers tools — what founders are building with, switching to, and abandoning. Every claim is sourced and linked. Operated by Founderr (RIKHATH LLC) See the desk →

Founderr Pulse — free & independent. The desk for people who build & back.