惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
N
Netflix TechBlog - Medium
宝玉的分享
宝玉的分享
Google DeepMind News
Google DeepMind News
腾讯CDC
G
Google Developers Blog
Martin Fowler
Martin Fowler
Microsoft Security Blog
Microsoft Security Blog
Recent Announcements
Recent Announcements
爱范儿
爱范儿
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
有赞技术团队
有赞技术团队
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
M
MIT News - Artificial intelligence
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
美团技术团队
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Building a Harness: From Prototype to Production
eleonorarocc · 2026-04-24 · via DEV Community

TL;DR

  • An agent doesn’t truly work because of the model, but because of the harness controlling it.
  • Moving from demo to production requires handling errors, state, memory, and observability.
  • A well-designed harness reduces model unpredictability and shifts complexity into code, making the system reliable and usable in real-world scenarios.

In article Harness Engineering: The Most Important Part of AI Agents we saw a fundamental point: the problem with agents isn't (only) the model, but the system around it.

But what does it really mean to build that system?

The moment everything breaks

There's a fairly universal phase: you've implemented a demo, it works well, the model responds, uses a tool, maybe even completes multi-step tasks, and everything looks promising.

Then you try to use it in a real-world context, and the problems emerge:

  • invalid outputs
  • incorrect API calls
  • infinite loops
  • loss of context

It's not that the model got worse—the system's complexity increased without having a harness solid enough to manage it.

The harness as a control system

It becomes clear that the harness isn't just a "container"—it's more like a control system designed to guide the model along a precise path, reducing its freedom when necessary and allowing it when useful.

This is a delicate balance: too much control means loss of flexibility; too little control means loss of reliability.

And this is where the real design work begins.

Error handling becomes the main case

In traditional software, errors are edge cases. Anyone with experience in agent-based systems knows that errors are the norm.

The key idea, however, is that a well-designed harness does not assume everything will go well—quite the opposite.

It therefore introduces mechanisms such as:

  • validating outputs before using them
  • retrying when something goes wrong
  • falling back to alternative paths
  • controlled interruption of loops

This is what makes the system usable.

State and memory: the invisible problem

Another issue that emerges very early is state management: an agent without memory is little more than a stateless function—but adding memory introduces complexity:

  • what to store
  • for how long
  • how to update the state
  • what happens when it becomes inconsistent

These decisions must be made when structuring the harness.

And it's precisely here that many subtle bugs tend to arise.

Observability: knowing what's happening

When something goes wrong (and sooner or later it will), the important question is:

"Can I understand what happened?"

Without logging and tracing, working with agents becomes almost impossible.

Because you need to see:

  • every step of the reasoning
  • every tool call
  • every output transformation

And not just for debugging, but to evolve the system.

Moving complexity to the right place

An interesting aspect is that, as you improve the harness, the system becomes more predictable—even without changing the model.

This happens because complexity is being moved out of an "opaque" component (the model) and into code that can actually be controlled.

It's a shift in strategy:

  • less blind trust in the model
  • more explicit control in the system

Which, ultimately, is software engineering.

In fact, we can say that building agents today is much closer to traditional software engineering than it might seem.

There are flows, states, error handling, integrations, observability…

The only difference is that instead of deterministic functions, there's a probabilistic model.

The harness is what holds everything together—and that's what makes the difference between something that only works in a demo and something that truly works in production.