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

推荐订阅源

S
Schneier on Security
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Threat Research - Cisco Blogs
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Cisco Talos Blog
Cisco Talos Blog
The Hacker News
The Hacker News
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
Security Latest
Security Latest
Know Your Adversary
Know Your Adversary
P
Palo Alto Networks Blog
C
Cisco Blogs
AWS News Blog
AWS News Blog
T
Threatpost
L
LINUX DO - 热门话题
Simon Willison's Weblog
Simon Willison's Weblog
Scott Helme
Scott Helme
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
Cyberwarzone
Cyberwarzone
P
Proofpoint News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
The Exploit Database - CXSecurity.com
The Register - Security
The Register - Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
罗磊的独立博客
云风的 BLOG
云风的 BLOG
V
Vulnerabilities – Threatpost
N
News | PayPal Newsroom
Project Zero
Project Zero
NISL@THU
NISL@THU
博客园_首页
MyScale Blog
MyScale Blog
V2EX - 技术
V2EX - 技术
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
F
Full Disclosure
T
Troy Hunt's Blog
Recorded Future
Recorded Future
N
Netflix TechBlog - Medium
P
Privacy International News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
Arctic Wolf
C
Check Point Blog
W
WeLiveSecurity
Apple Machine Learning Research
Apple Machine Learning Research
C
CERT Recently Published Vulnerability Notes

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 Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
AI Harness Engineering: The Missing Layer Behind Reliable LLM Applications
Lightning De · 2026-05-06 · via DEV Community

Large language models often get most of the attention in AI discussions. New releases, benchmark scores, and reasoning capabilities dominate headlines. Yet when companies try to turn AI demos into dependable products, the biggest challenge usually comes from elsewhere.

The real difference between an impressive prototype and a production-ready AI system is often the infrastructure surrounding the model. That surrounding layer is known as the AI harness.

Many AI projects fail not because the models are weak, but because the systems controlling them are unstable, inconsistent, or impossible to scale safely. As AI agents become more common in software engineering, automation, customer support, and research workflows, harness engineering is quickly becoming one of the most important areas in modern AI development.

What Is AI Harness Engineering?

A language model alone only generates tokens. It does not manage workflows, remember long-term context, decide when to retry failed actions, or verify whether its output is correct.

That responsibility belongs to the harness.

An AI harness acts as the operational layer around the model. It controls how information is retrieved, which tools are accessible, how memory is maintained, how agent loops execute, and what validation checks happen before results reach users.

A simple way to think about it is:

AI Agent = Model + Harness

The model contributes reasoning ability.
The harness provides structure, reliability, and execution control.

Two teams can deploy the same LLM and still achieve completely different outcomes depending on how their harness is designed. In many real-world deployments, improving the surrounding system produces better results than simply upgrading to a larger model.

Why Harness Design Matters More Than Ever

Over the last few years, leading AI models have become increasingly competitive with one another. The performance gap between providers is smaller than it once was.

Because of that, engineering teams are focusing more on system architecture rather than solely chasing stronger models.

A poorly designed harness can create issues like:

  • Inconsistent outputs
  • Failed tool execution
  • Context loss
  • Unsafe actions
  • Hallucinated responses
  • Infinite agent loops
  • Slow performance
  • Difficult debugging

A strong harness solves these problems through structured orchestration and evaluation layers.

This shift explains why AI infrastructure tools, orchestration frameworks, evaluation systems, and agent runtimes have become central to LLMOps and production AI engineering.

The Core Responsibilities of an AI Harness

Although implementations vary, most production-grade harnesses manage several common areas.

Context Management

LLMs can only reason using the information placed inside their context window.

Since context size is always limited, the harness decides:

  • What information should be included
  • What can be compressed
  • What should be retrieved dynamically
  • Which data sources are most relevant

This process becomes especially important in RAG systems, coding agents, and enterprise AI applications connected to large knowledge bases.

Tool Execution

Without tools, models can only generate text.

With tools, they can interact with the outside world.

Modern harnesses often connect LLMs to:

  • APIs
  • File systems
  • Databases
  • Search engines
  • Browsers
  • Code execution environments
  • External SaaS platforms

Tool access transforms AI from a conversational assistant into an actionable system.

Persistent Memory

Production AI systems usually need memory beyond a single prompt.

Harnesses manage:

  • Session memory
  • Vector databases
  • User preferences
  • Long-term state
  • Historical interactions

This enables continuity across conversations and workflows.

Agent Control Loops

A single prompt-response interaction is not enough for complex tasks.

Harnesses create iterative execution loops where the system:

  1. Receives a goal
  2. Generates an action
  3. Uses tools if needed
  4. Evaluates results
  5. Retries or continues
  6. Stops once objectives are completed

This loop architecture powers autonomous coding agents, research assistants, and workflow automation systems.

Safety and Guardrails

Production AI systems cannot operate without constraints.

Harness layers commonly enforce:

  • Permission boundaries
  • Output validation
  • Tool restrictions
  • Rate limiting
  • Input filtering
  • Security checks

Without these controls, autonomous agents can become unpredictable or unsafe.

Observability and Evaluation

Reliable AI products require measurement.

Harnesses collect metrics such as:

  • Latency
  • Pass rates
  • Failure traces
  • Token usage
  • Evaluation scores
  • Regression tracking

These metrics help teams improve systems over time and catch failures before users experience them.

Major Categories of AI Harnesses

AI harnesses now exist across several specialized categories.

1. Coding Harnesses

Coding harnesses are designed for software development workflows.

These systems typically:

  • Read repositories
  • Edit files
  • Execute shell commands
  • Run tests
  • Retry failed implementations
  • Validate outputs automatically

Popular examples include:

  • Claude Code
  • OpenAI Codex CLI
  • OpenClaw
  • Hermes Agent

The real value of these tools is not only code generation. Their strength comes from iterative execution loops combined with automated validation systems.

A coding agent connected to the testing infrastructure can repeatedly improve outputs until constraints pass successfully.

2. Agent Frameworks

Agent frameworks help developers build LLM-powered applications without creating orchestration systems from scratch.

Common capabilities include:

  • Prompt templates
  • Tool abstractions
  • Memory systems
  • Multi-agent orchestration
  • State management
  • Retrieval pipelines

Well-known frameworks include:

  • LangChain
  • LlamaIndex
  • CrewAI
  • LangGraph

LangChain

lang

LangChain remains one of the most widely adopted AI orchestration frameworks because of its extensive integrations and large ecosystem.

It works especially well for teams building general-purpose AI applications that interact with multiple external services.

LlamaIndex

lama
LlamaIndex focuses heavily on retrieval-augmented generation workflows.

If document retrieval quality is the central requirement, many teams prefer it over broader orchestration frameworks.

CrewAI

crew

CrewAI introduces role-based multi-agent systems where each agent has defined responsibilities and tool access.

This approach makes complex workflows easier to structure and understand.

Workflow and Automation Harnesses

Not every AI system revolves around autonomous agents.

Some applications need structured workflow execution instead.

Workflow harnesses prioritize process orchestration, scheduling, branching logic, retries, and integration pipelines.

Common tools include:

  • n8n
  • Prefect
  • Apache Airflow

n8n

n8n
n8n has evolved from a general automation platform into a powerful AI workflow orchestration tool.

It supports:

  • AI agent nodes
  • LangChain integration
  • Human approval flows
  • MCP connectivity
  • Large integration ecosystems

Its self-hosted nature also appeals to teams focused on privacy and infrastructure control.

Prefect and Airflow

Airflow
These platforms are often preferred by data engineering teams handling:

  • ETL pipelines
  • Scheduled processing
  • Data workflows
  • Python-native orchestration

In these environments, the LLM becomes one step within a larger operational pipeline.

Standalone and Host Harnesses

Some harnesses focus on model routing and provider abstraction.

Instead of rewriting applications for every model vendor, these systems create a unified control layer above multiple providers.

One widely discussed example is:

  • OpenRouter

This type of infrastructure helps teams:

  • Switch providers easily
  • Improve failover handling
  • Reduce vendor lock-in
  • Optimize cost and latency

As AI ecosystems continue expanding, routing layers are becoming increasingly important.

Evaluation Harnesses and Quality Gates

Evaluation infrastructure is one of the most overlooked parts of AI engineering.

Many teams build agents before building systems that measure whether those agents actually work reliably.

Evaluation harnesses solve this problem.

Popular tools include:

  • Promptfoo
  • DeepEval
  • LangSmith
  • Braintrust

These platforms help teams:

  • Track regressions
  • Create benchmark datasets
  • Run automated evaluations
  • Monitor production quality
  • Gate deployments in CI/CD pipelines

For many organizations, adding evaluation systems early provides more long-term value than adopting additional agent complexity.

Domain-Specific Harnesses

Some AI harnesses are optimized for specific workflows instead of general orchestration.

Creative Workflows

Creative AI harnesses support for media production, storytelling, and content generation.

Examples include:

  • Descript
  • VidMuse
  • novelcrafter
  • CoffeeCat AI Image Generator

Productivity Workflows

Productivity-focused harnesses emphasize automation and task execution.

Examples include:

  • Mira
  • extra.email

Entertainment and Roleplay

Interactive conversational systems use specialized harnesses designed for immersive experiences.

Examples include:

  • Janitor AI
  • ISEKAI ZERO
  • SillyTavern
  • HammerAI

A Simple AI Harness Example in Python

Below is a lightweight example showing how a basic evaluation harness works using Python.

from dataclasses import dataclass
from time import perf_counter
from typing import Callable, Dict, List


@dataclass
class EvalCase:
    name: str
    prompt: str
    must_include: str


class LLMHarness:
    def __init__(self, llm: Callable[[str], str]) -> None:
        self.llm = llm

    def run(self, cases: List[EvalCase]) -> Dict[str, float]:
        if not cases:
            raise ValueError("cases must not be empty")

        passed = 0
        latencies_ms = []

        for case in cases:
            start = perf_counter()
            output = self.llm(case.prompt)
            latencies_ms.append((perf_counter() - start) * 1000)

            if case.must_include.lower() in output.lower():
                passed += 1

        pass_rate = passed / len(cases)
        sorted_lat = sorted(latencies_ms)
        p95_index = max(0, int(len(sorted_lat) * 0.95) - 1)
        p95_ms = sorted_lat[p95_index]

        return {
            "pass_rate": pass_rate,
            "p95_ms": p95_ms
        }


def fake_llm(prompt: str) -> str:
    db = {
        "capital of france": "The capital of France is Paris.",
        "2 + 2": "2 + 2 equals 4.",
        "hello": "Hello!"
    }

    return db.get(prompt.strip().lower(), "I do not know.")


if __name__ == "__main__":
    cases = [
        EvalCase("geo", "capital of france", "Paris"),
        EvalCase("math", "2 + 2", "4"),
        EvalCase("greeting", "hello", "hello")
    ]

    harness = LLMHarness(fake_llm)
    metrics = harness.run(cases)

    print(f"pass_rate={metrics['pass_rate']:.2f}")
    print(f"p95_ms={metrics['p95_ms']:.3f}")

    assert metrics["pass_rate"] >= 0.95

Enter fullscreen mode Exit fullscreen mode

Save the file as harness.py and run:

python harness.py

Enter fullscreen mode Exit fullscreen mode

This simple implementation demonstrates several important concepts:

  • Evaluation datasets
  • Latency tracking
  • Quality scoring
  • Regression gates
  • CI-friendly validation

Real production harnesses extend this pattern with repositories, APIs, external tools, retries, and observability systems.

How to Select the Right AI Harness

Choosing a harness becomes easier when you focus on the actual problem you are solving.

For Coding Agents

Use coding harnesses when your goal involves:

  • Repository modification
  • Automated testing
  • Developer workflows
  • Iterative software generation

Strong validation systems matter more than raw model size in these environments.

For LLM Applications

If you are building:

  • Chatbots
  • AI assistants
  • RAG systems
  • Multi-agent workflows

Then agent frameworks like LangChain, CrewAI, or LlamaIndex are often the right starting point.

For Business Automation

Workflow orchestrators work best for:

  • CRM pipelines
  • Approval systems
  • Ticket routing
  • ETL processes
  • Enterprise integrations

Visual orchestration platforms such as n8n are especially useful for rapid automation development.

For Quality and Reliability

Every production AI system eventually needs an evaluation infrastructure.

Without evaluations, teams usually discover failures from users instead of automated testing systems.

That becomes expensive very quickly.

Conclusion

AI models may power the intelligence of modern applications, but harness engineering is what makes those systems dependable in real environments.

As models become increasingly interchangeable, competitive advantage is shifting toward orchestration quality, evaluation systems, workflow control, memory handling, and operational reliability.

The companies building reliable AI products are rarely succeeding because they chose a slightly better model. More often, they succeed because they have built stronger infrastructure around the model.

For most teams, the best starting point is surprisingly simple:

  • One agent framework
  • One execution layer
  • One evaluation system

That foundation is usually enough to move from experimental demos to AI applications that can actually survive production workloads.

AI Harness Engineering: The Layer That Makes Your LLM Applications Actually Work

A practical guide to AI harness engineering in 2026 covering coding agents, agent frameworks, workflow orchestration, and evaluation tools. Learn how LangChain, LangGraph, CrewAI, Promptfoo, and Claude Code fit into the harness picture.

favicon pinggy.io