跪拜 Guibai
← All articles
Frontend · Architecture · Artificial Intelligence

The Agent Is the Interface: Why Harness Engineering Matters More Than the Model

By 老王以为 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

The same underlying model produces mediocre or stunning products depending entirely on interface design and harness engineering. Expanding an agent's observation and action spaces—adding tools and data sources—improves capability faster than waiting for a stronger model, making interface-boundary expansion the highest-leverage engineering decision.

Summary

Modern AI agents combine a decision engine (LLM), an information horizon (context), and an execution channel (tools) into a system that thinks, acts, and observes in a ReAct loop. The loop's trajectory—a structured log of every thought, action, and observation—is the system's most valuable asset for debugging, optimization, and training. Claude Code and Perplexity illustrate how different agent types weight these three components differently: coding agents lean on decision-engine and execution-channel synergy, while research agents depend on information-horizon depth.

The real competitive moat is not the model but the harness engineering wrapped around it—context management, tool orchestration, error recovery, and observability. As models grow more autonomous under the "Model as Agent" trend, the harness becomes more critical, not less, because a model that can call `delete_database` on its own needs stronger guardrails. The evolution from prompt engineering through context, harness, loop, and graph engineering is additive, not sequential; each layer builds on the last.

Security is an architectural concern spanning five layers—model, context, tools, collaboration, and society—and requires layered guardrails on the input, execution, and output sides. The core design principle is to match complexity to the bottleneck: start with a prompt, escalate to a workflow, and introduce autonomous behavior only when proven necessary.

Takeaways
An agent is defined by three components: a decision engine (LLM) that plans, an information horizon (context) that supplies what it can see, and an execution channel (tools) that determines what it can change.
The ReAct loop alternates thought, action, and observation; the trajectory it produces is simultaneously a debug log, optimization material, and training dataset.
Removing tool-result feedback causes infinite loops; removing the thought step degrades decision quality; removing historical trajectory destroys multi-step capability.
Tools come in four forms: predefined APIs, on-demand skills, dynamically generated code, and sub-agent delegation.
Claude Code succeeds through synergistic design of its three components, not by using the strongest model; Perplexity's moat is its information-horizon engineering.
An agent's observation space and action space define its capability boundary, and expanding that interface is faster than retraining a model.
Harness engineering—context management, tool orchestration, constraints, and observability—is the majority of production agent code and grows more important as models become more autonomous.
Agent engineering paradigms evolved additively: prompt → context → harness → loop → graph; each addresses a different bottleneck.
Start with prompt optimization, escalate to deterministic workflows, and introduce autonomous agents only when necessary; complexity has a real cost.
Layered guardrails on input, execution, and output sides are essential; a single guardrail will almost certainly be bypassed by prompt injection attacks.
Human-in-the-loop is the last line of defense for high-risk operations, low-confidence decisions, and compliance-mandated reviews.
Conclusions

Calling an agent 'a smarter chatbot' misses the point entirely—the real shift is from single-turn Q&A to a system that maintains a structured, cumulative memory of its own actions and uses it to converge on a goal.

The trajectory is undervalued as a first-class asset. It is not just a log; it is the raw material for reinforcement learning, knowledge-base construction, and behavioral pattern mining that can feed back into model improvement.

The 'Model as Agent' trend does not make framework engineers obsolete—it shifts their work from writing orchestration logic to designing the constraints, guardrails, and context architectures that keep an autonomous model from doing damage.

Tool design is API design for a non-deterministic consumer. A model that picks the wrong tool is usually not 'stupid'; the tool's description was ambiguous, its responsibility was overloaded, or its failure mode was uninformative.

The five-paradigm evolution is a diagnostic framework, not a maturity ladder. A team stuck on prompt engineering for a task that needs a graph of collaborating agents is misapplying complexity just as much as a team that builds an autonomous agent for a simple approval workflow.

Security in agent systems is fundamentally different from traditional application security because the attack surface includes the model's own reasoning chain—an attacker can inject instructions through any data source that eventually lands in the context window.

Concepts & terms
ReAct Loop
A reasoning-and-acting cycle where the model alternates between Thought (what to do next), Action (calling a tool with parameters), and Observation (processing the tool's result), repeating until the task is complete.
Trajectory
The chronologically ordered, structured log of every user message, model thought, tool call, and tool result across an agent's entire execution. It serves as debug record, optimization input, and training data.
Harness Engineering
The engineering layer built around an LLM that handles context management, tool orchestration, error recovery, security constraints, and observability—the 'horse tack' that makes a powerful but unruly model controllable.
Observation Space
The complete set of information an agent can perceive at any decision point, bounded by what data sources and sensors are connected. Expanding it is a fast path to improving agent capability.
Action Space
The complete set of actions an agent can execute, bounded by what tools, APIs, and code interpreters are available. A wider action space enables more complex task completion.
Model as Agent
A paradigm where tool-calling decision strategies are internalized into the model's native capabilities through reinforcement learning, so the model decides when and how to use tools without external orchestration logic.
Prompt Injection
An attack where malicious instructions are embedded in external data (web pages, documents, order notes) that an agent reads into its context, causing it to execute unintended actions.
Ablation Study
A diagnostic method that removes one component of a system at a time to observe how it breaks, revealing each component's function. Applied to agents, it shows that feedback enables loop convergence and trajectory enables multi-step reasoning.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗