We did pentesting running those weights locally — four DGX Sparks sitting on the desk.

Open-weight GLM-5.2 is what people put on the same benchmarks as Claude Sonnet and Opus for agentic coding. Buying the IQ only requires you sell your car — or a kidney, if the dealership already got the car — and budget for 600W of continuous power draw. No API bill. Client tokens never leave the house.

Power and throughput, honestly:

Cloud GLM works with the same harness if you don't want the Sparks. This post is about a capable model meeting a harness that never defined "done." The first serious run wrote ten evidence-backed findings files and closed zero subtasks — fifteen hours, ~300 live API calls. The model was fine. The harness wasn't. Finishing the job took reshaping the system prompts; that fix is on main at crawlsys/pentagi.

The Stack: Near-Frontier Inference Without Leaving the Building

The weights are GLM-5.2 served as the QuantTrio Int4-Int8Mix quant on a four-node DGX Spark cluster — vLLM (community DCP/MTP recipe below) behind litellm, one OpenAI-compatible URL for the agent.

Quantization, briefly. Full-precision weights for a model this size are an enormous memory footprint — more than four Sparks can hold while still leaving room for context and KV cache. Quantization stores most of those weights in fewer bits (here a mix of 4-bit and 8-bit) so the same parameters fit and move faster in memory, with a managed quality trade. You are packing a large model into the RAM you actually have, which is why the QuantTrio build shows up in every GB10 serving recipe for this class of model. Without that pack step, this class of intelligence stays in a hyperscaler.

Everything above lives on-prem: target, agent orchestration, weights, KV cache, findings. For a pentest that matters more than any leaderboard number. A cloud agent ships your scope out with every tool call — client IPs, hostnames, request/response bodies, and the exploit paths it is testing. Local weights keep that traffic on the desk.

Serving credit where it is due: the path that stayed up under tool-calling load builds on tonyd2wild's QuantTrio / MTP / 4× Spark recipe. We forked it under crawlsys/GLM-5.2-655K-MTP-4x-DGX-Spark with the extra landmines we hit (cutlass-dsl 4.6 bake, profiling-forward skip, parser flags, no-tmpfs weights) in EXTRA-NOTES.md. Tony cracked the hangs; we wrote down the bruises.

The self-hosted stack: four DGX Sparks serving GLM-5.2 to PentAGI with no data egress // on-prem — nothing leaves the rack DGX Spark #1 GB10 Grace-Blackwell DGX Spark #2 GB10 Grace-Blackwell DGX Spark #3 GB10 Grace-Blackwell DGX Spark #4 GB10 Grace-Blackwell clustered · on-prem fabric vLLM + cluster GLM-5.2 355B MoE · QuantTrio litellm one OpenAI-compat URL PentAGI generator pentester monitor reporter near-frontier inference · on-prem · zero API billing · zero data egress
Four DGX Sparks serve GLM-5.2 on-prem. vLLM (community recipe) + litellm front it; PentAGI drives the pentest. Nothing leaves the rack.

What PentAGI Is, and What Broke

If you haven't run it, PentAGI is a popular open-source autonomous-pentest system — high teens of thousands of GitHub stars, covered by Help Net Security as a multi-agent framework that plans and executes assessments in Docker. Community threads treat it as one of the more complete "simulated firm" stacks rather than a single ReAct loop. Popular, useful, praised. "Leading" is a marketing word I am not going to claim for anyone else's project.

Architecturally it is straightforward: a planner breaks an objective into subtasks, an executor and pentester run tools inside sandboxed containers, a monitor periodically checks progress, and a reporter compiles findings. Each role is a prompt template driving whatever model you wire in.

Upstream is pivoting toward a paid product — as they should; the tool is valuable. The open multi-agent pentest space is crowded for good reason. Adjacent projects I am watching (and will likely try and write up next) include PentestGPT, Strix, and CAI (Cybersecurity AI). The prompt-discipline lesson in this post is not PentAGI-specific.

Pointed at GLM-5.2, PentAGI tested beautifully. The model reasoned about attack surface, chained tool calls, and wrote genuinely good findings. What it would not do is conclude. In that fifteen-hour run it kept probing a single vector long past the point of proof, never called the hack_result tool that marks a subtask done, and so never advanced the plan or compiled the report. Ten findings on disk, zero subtasks closed, and a flow that would have run until I killed it.

The reflex diagnosis is "the model's too weak to know when it's finished." That's wrong, and the distinction is the entire point of this post.

The Diagnosis: A Capable Model With No Stopping Rule

GLM-5.2 does exactly what it's told, thoroughly, and it does not self-limit. The prompt templates were written for a model that quietly decides "I have enough, move on." GLM-5.2 never makes that call on its own, so every soft edge in the prompts turned into an infinite grind. Five specific gaps did the damage:

None of these is a model deficiency. Every one is a missing instruction. The harness was written against an assumption the model doesn't satisfy.

The Fix: Curate the Prompts to Stop and Decide

One rule for every change: test until you can make the CONFIRMED / NOT-CONFIRMED decision, then stop. Decisiveness, not exhaustiveness. State the stopping rule instead of assuming the model carries it. That turned into four edits in backend/pkg/templates/prompts/:

Write it down. Literally — the diffs are the product: FORK-NOTES.md on main.

Before and after curated prompts: the loop that never closed versus the loop that stops and decides Before finished subtasks: 0 test test test never calls hack_result · never yields · never reports After finished subtasks: advancing test verdict confirmed / not write finding hack_result close + yield next subtask atomic vector same model, same hardware — the only change is the stopping rule, stated instead of assumed
The money diagram. Before: test → test → test → forever, zero closed. After: test → verdict → write finding → hack_result → yield → next atomic subtask.

The Payoff

Same model, same cluster, curated prompts, clean start. This time the flow closed subtasks, advanced through every vector in the plan, and reached its report. Given distinct multi-class auth tokens (admin, limited, multi-org), it confirmed issues the first run never proved: unauthenticated PII via long-lived share tokens, a missing rate limit and permission gate on an MCP-style endpoint, and a latent stored-XSS path that stayed NOT-CONFIRMED as a primary exploit but was real code-level risk. Intelligence was never the missing piece. Permission to stop and decide was.

// sample findings (anonymized report)

I published a fully anonymized, styled report of the engagement as an unlisted page — no client name, no real hostnames, no personal data. Use it as the "what did it actually find?" companion to this post.

Read the sample report →

Highlights from the closed run:

High — portal share tokens return full PII without auth or rate limits (details). One working token proved the class; the sufficiency rule stopped the forty-token guessing spiral.

Medium — MCP-style endpoint: no rate limit, no permission gate (details). 20/20 rapid requests all 200; a zero-permission principal still got through.

Positive results count too — cross-tenant IDOR primary path blocked by server-derived org; RS256/JWKS held against forgery; upload MIME/size bounds enforced at presign (details).

Favorite ops detail: mid-engagement I had to move the Sparks. Full tilt they run hot enough that you want gloves if you're carrying one more than half a minute, and my teenage son had a fair point that parking four of them in his closet to spread household power load was a bad roommate move. Working data lived on a persistent volume, so nothing was lost — once GLM-5.2 came back up the flow auto-resumed. You can pick the inference cluster up mid-pentest and put it somewhere with better airflow. Try that with a cloud dependency.

Where each curated prompt lives in the PentAGI multi-agent flow // where the curation lives generator atomic subtasks one vector each pentester close-out + yield report-first monitor closure bias terminate decisively reporter compiles findings once, at close evidence-sufficiency: one working PoC = CONFIRMED · blocked primary path = NOT-CONFIRMED · then stop all edits: backend/pkg/templates/prompts/ on crawlsys/pentagi main
Each curated prompt maps to one agent role. The evidence-sufficiency rule ties them together: prove it once, make the call, move on.

The Bigger Point

Near-frontier inference at home is no longer a demo. Serving a model people compare to Sonnet and Opus off four GB10s would have read as fantasy a year ago. The bottleneck moved off the silicon and into the harness. The limits live in the orchestration prompts, not the wafer fab.

If you are building agentic systems on capable local models — or on cloud GLM with the same harness — and the agent will not finish, do not reach for a bigger model first. Check whether you ever told it what "done" looks like. A model that does exactly what you ask will grind forever if you never wrote the stopping condition down. Write it down.

One caveat: upstream PentAGI has slowed down — last commit about six weeks before the fork — which is part of why forking made sense, especially as they move toward paid offerings. And one of these fixes really belongs in the source, not the prompt layer. Making hack_result a hard turn-terminator is a change to the tool-execution loop; papering over it with prompt language works, but the durable fix lives in code. That one I'd like to send upstream if the project picks back up.

Curated prompts: crawlsys/pentagi main — star it if it saves you a fifteen-hour non-closing run. Serving recipe (Tony's base + the landmines we hit): crawlsys/GLM-5.2-655K-MTP-4x-DGX-Spark. I am on GitHub, X, and LinkedIn if you want the follow-ups when I run Strix / CAI / PentestGPT through the same stop-and-decide lens.

Related Posts

This is the second time PentAGI has shown up here on local hardware. Turning Honeypot Noise into PentAGI Investigations wires an FTP honeypot into bounded PentAGI flows backed by a smaller Qwen3-Coder model on a single RTX 5090 — the low-cost, high-volume end of the same idea. Stop Burning Frontier Tokens on Routine Inference covers the general principle: keep the routine work on hardware you own, and spend real money only on the part of the job that needs it.