Zero Labs
Industry News / AI

Running an AI Agent Harness and 30Billion Parameter Mixture-of-Experts Model for Agentic Coding

Source · Towards AI By Robert David Hernandez

From the publisher’s feed, collected in the ZeroLabs newsroom.

Serving a 30Billion parameter AI Model inference endpoint for an AI Agent Harness using a low cost edge device. No NVIDIA GPU? No Problem!AI Agents have changed daily software development. At the office, developers now have access to private frontier AI Models and a private frontier AI Agent Harness right in our IDEs.Laying around the garage I had a node with 32GB of RAM and a Ryzen 9 3900X. As my own M3 MacBook Air only has 24GB of RAM, I decided it would be interesting to look at serving a 30-billion parameter model over a network link for Agentic AI coding.Here, I share how to build an Agentic AI coding setup using an edge device, NVIDIA GPU not required.Jump to watching the AI AgentAI Models & AI Agent HarnessWe will use two components, the AI Model which makes the decision, and the AI Agent Harness which executes model decisions, handles the agent loop and interacts with toolsFig. 1: High Level Architecture Diagram — a request flow, illustrating how an AI Agent triggers a POST to the AI Model w/ chunked JSON token streaming responseAI Agent Harness: ClineVersion v4.1.19 Github Repo License: Open Source, Apache 2.0An AI harness is the software wrapper around a raw AI model. It manages the agent loop, tool execution, safety checks, and user approvals.I chose Cline because it provides both Model Context Protocol (MCP) and native tool use. Cline can read and write files, run terminal commands, use a browser, and can interact with natural conversation. Crucially, it offers human-in-the-loop safety guardrails via a strict Plan-and-Act loop, requiring explicit approval before taking destructive actions.AI Model: Qwen 3 Coder (30B)Model: qwen-3-coder:30b Ollama Library License: Open Weight, Apache 2.0After evaluating several models, I selected the Qwen 3 Coder 30B Mixture of Experts (MoE) model. It is optimized specifically for advanced code generation and agentic tool use, supporting a native context length of 256K tokens.Running this model in the standard Q4_K_M quantization requires ~18.6GB of RAM. Given our 32GB of physical RAM, that leaves enough headroom for our context windows and operating system without thrashing the disk for swap memory.The “Why”When embarking on a new engineering project we begin by documenting the problem space before mapping out the solution space.The ProblemWe want to run a capable AI Agent harness with as close to $0 incremental spend as possible. We don’t need cloud-scale deep research features, just a local coding agent.Our problem space consists of: Cost, Data Privacy, Memory and Compute Resources.Cost (Cloud Inference):Claude Code Pro costs $20/moAn NVIDIA H100 on Lamba Labs costs $3-$4 per hour ($120/mo at 10 hours / week)GPU and RAM prices are at all time highs as of this writing (Sept 2026).Resources: Our 24GB M3 MacBook Air cannot load models large enough to be useful, though it has plenty of compute — loading a 9B model causes noticeable stutterData Privacy: Depending on cloud AI Model providers requires sending data to third party companiesThe SolutionWe address with three architectural choices:Leverage readily available lab hardware: $0 incremental capital expenditure.Select an open-weight MoE model for coding: Run locally with an open-source model runtime (Ollama) and bypass the need for an expensive NVIDIA GPU.Use an open-source AI Agent Harness (Cline): Run it directly inside VSCode on a development laptop.Thus we optimize cost control, avoid vendor lock-in and enable self-hosting & fine-tuning.Token Cost Efficiency Gains vs Renting H100Because we must read the entire set of model weights from RAM for each token generated, token generation speed is strictly bounded by memory bandwidth:Given our garage node’s RAM is rated for 3200 MT/s with a 16-byte bus width, our theoretical bandwidth of 51.2GB/s. Netting us a modest ~2.75 tokens per second — not blazing fast but a great start for $0 incremental spend.System SpecificationsFig. 5: Garage Memory specificationsCost vs Performance ComparisonFig. 6: Comparing token generation cost of our garage system vs a cloud H100Key Takeaways:The Ryzen 9 CPU punches above its weight in cost efficiency: Even though slower interactively, the Ryzen 9 beats a H100 in token-per-dollar efficiency.The H100 trades economy for raw speed: While the H100 generates text lightning-fast, each token is at a premium cloud markup.Efficiency — Performance TradeoffsWe Gain: Lower Token Generation Costs, $0 capital expenditure.We Trade: Higher Token Generation Latency. Memory bandwidth will be our systems bottleneck.Note: While in Production, we would select higher throughput for customers. In our garage lab, we optimize for cost-efficient experimentation.Requirements & SetupSoftware RequirementsServer Node:Model Version: qwen-3-coder:30bOllama Version (win-11): 0.34.2Available TCP Port 11434 for OllamaClient Node:Cline Version: v4.1.19VSCode Version: `1.138.0 600Fig. 2: High Level Physical Architecture Diagram: Hosting the qwen-3-coder:30b model on our server node and running our AI Agent Harness on our client node.Network ConfigurationFig. 3: Network Diagram — Garage LabNote: While our garage network has a DNS service, we won’t dive into DNS configuration here.Our garage network has a 1Gbps link, which can comfortably handle the kilobyte-scale bandwidth required for only a small number of tokens per second.Configure Ollama Node: We begin by configuring the OLLAMA_HOST="0.0.0.0:11434" environment variable on the server. Ollama reads this value on startup binds to all network interfaces on the server node, allowing the client node to connect.Firewall Rules: Configure an inbound firewall rule on the server node for TCP Port 11434 to allow incoming connections on out garage subnet.Running The AI Agent HarnessTo test the system, we prompt Cline with a complete, multi-step agentic coding task:“Create a python hello world project using uv it should use fastapi and serve its responses on ‘/api/v1/hello’, it should have a docker container with an alpine base and use uvicorn, include unit tests and Kustomize files.”Immediately the model weights begin streaming into memory, we see usage rise and stabilize around 80%.Fig. 6: Model weights loading into memoryWatching the agent work in real time:Fig. 7: Agent executing terminal commands, creating files, and writing code (edited for brevity)Our agent successfully navigates the plan-and-act loop, writing our containerized FastAPI. Running GET /api/v1/hello receives a 200 OK:Fig. 8: Our FastAPI programGoing FurtherAs our token generation is memory bandwidth bound and our PCIe bus has plenty of room to spare. Quickly improving performance of this system means acquiring GPU hardware resources. An RTX 4090 with 24GB of VRAM would be a great next step. Meanwhile for no incremental spend qwen-3-coder:30b and cline present a fun weekend project.About the AuthorRobert David Hernandez is a Software Engineer based in the San Francisco Bay Area. Currently a member of TikTok’s Traffic Infrastructure Global Engineering team and previously, Microsoft. He holds an M.S. in Computer Science from the University of Illinois Chicago.Connect on LinkedIn| GitHubRunning an AI Agent Harness and 30Billion Parameter Mixture-of-Experts Model for Agentic Coding was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.