Engineering-Harness macht probabilistische Modelle mit dem Claude Agent SDK produktionsreif
Viele KI-Agenten-Demos scheitern im Produktivbetrieb. Ein Entwickler hat eine funktionierende Lösung auf Basis des Claude Agent SDK aufgebaut, deren SDK-Angaben gegen das ausgelieferte Paket verifiziert wurden.

Most AI agent demos fall apart the moment they touch production. I spent the last few weeks figuring out why — and built a working harness on top of the Claude Agent SDK to fix it.
Every layer below exists as runnable code. The SDK claims were verified against the shipped package ( claude-agent-sdk 0.2.152), not written from memory.
Models are probabilistic. Production systems are deterministic.
A 90%-accurate model wired straight into your stack breaks it one time in ten — and you hear about it from your users, not your tests.
You don't fix this with a better prompt. You fix it with a harness.
You don't try to make the model reliable. You build a system that's reliable despite the model.
The model iterates in a sandbox against a real test suite until a deterministic checker says the work is correct — and only then does anything leave the box. The model's 90% becomes the search strategy; the harness supplies the guarantee.
An agent that tried four approaches, hit the loop guard, and stopped with "I'm blocked because the test fixture doesn't exist" has not failed. That's the harness working. The real failure is merging the plausible-looking wrong answer.
Harness engineering controls an execution loop, so use the SDK that has one.
pip install claude-agent-sdk # Python 3.10+, CLI bundled Enter fullscreen mode Exit fullscreen mode query() is one-shot. ClaudeSDKClient is a live session — and the only path that supports custom tools and hooks. A self-healing loop pushes a follow-up turn into a session that still holds context, so everything real uses ClaudeSDKClient.
The jump that matters is 2 → 3. Stage 2 demos beautifully and is where most projects stall.
Runs behind FastAPI (SSE streaming) + a Streamlit console, with 13 progressive examples from bare prompting to a self-healing autonomous run.
If you're stuck at "great demo, can't ship it," the 2 → 3 jump — tool-calling to a deterministic harness — is the whole game.
Stop trying to make the model reliable. Build the system that's reliable despite it.
Code + 13 examples 👉 https://github.com/anjijava16/AgentHarness-claude-sdk