Agent Development: Infrastructure is Harder than Harness Engineering
While many teams believe prompt orchestration and harness engineering are the most challenging aspects of Agent development, production realities often reveal that infrastructure is the real bottleneck. This article explores common infrastructure pitfalls in Agent deployment, the shift towards managed platforms, the growing coupling between harnesses and specific models, multi-agent orchestration patterns, and future evolution trends. It provides practical checklists for evaluating infrastructure readiness, managed platform boundaries, and architectural choices.
1. Team Expectations vs. Reality
In discussions about Agent development, a common view is that Harness engineering is the most difficult part. Here, “Harness” refers to the toolchains, scaffolding, and prompt orchestration built around the model. Consequently, many teams spend most of their time polishing prompts, designing tool calling formats, and organizing context to squeeze out more performance from the model.
However, product and engineering leaders offer a different observation: most teams ultimately get stuck on infrastructure.
Agent prototypes often run well in demo environments but encounter common issues when deployed to production and scaled up:
- Sandbox disconnects: Unstable code execution environments cause long-running tasks to fail due to connection drops.
- Memory loss: Unreliable state persistence across sessions and tasks leads to redundant work or erratic Agent behavior.
- Asynchronous processing: Lack of reliable scheduling and recovery mechanisms for long-cycle tasks forces processes to start from scratch after a restart.
The essence of these issues aligns more closely with distributed systems engineering than model capabilities. Moving an Agent from successfully running once to stably executing numerous tasks daily naturally shifts the engineering focus to infrastructure.
Checklist Before Launch
- Timeouts and retries: Set timeouts for every external call and implement backoff strategies for retries upon failure.
- Idempotency: Ensure consistent results and no duplicate side effects when repeating the same step.
- State snapshots: Save state at critical nodes to resume from the latest snapshot during recovery.
- Task recovery: Enable tasks to be retrieved from queues or logs and resumed after a process restart.
- Permission isolation: Assign each Agent a unique identity with minimal privileges, and keep audit logs for critical operations.
2. Managed Agents: Offloading Infrastructure to the Platform
Since most teams repeatedly fall into the same traps, one approach is to sink the base components required for Agent execution into cloud platforms, provided uniformly by the platform. Three common components include:
- File system: Each Agent has a persistent cloud working directory. Task artifacts and intermediate states no longer exist solely locally, making it easier to preserve data even when sandbox connections drop.
- Skills: Domain knowledge and operational workflows are encapsulated into reusable modules. Agents load them on demand, reducing repetitive prompt writing.
- Memory mechanism: Platform-provided memory services allow context to persist across sessions, freeing developers from building their own vector databases and state synchronization pipelines.
From an architectural perspective, this is similar to the migration of traditional applications from on-premise data centers to the cloud. The pseudocode below illustrates two different layering approaches and does not correspond to any specific API:
# Self-built mode: developers are responsible for the entire infrastructure layeragent = MyAgent(sandbox_manager=..., # Self-maintainedmemory_store=..., # Self-maintainedtask_queue=..., # Self-maintained)# Managed mode: infrastructure borne by the platformagent = ManagedAgent(skills=["code_review", "data_analysis"],memory="persistent",orchestration="multi_agent",)
With less code, the components a team needs to maintain also decrease. However, the actual reduction in maintenance costs depends on team size, platform fees, and migration costs, requiring a case-by-case evaluation.
Boundaries to Evaluate Before Adopting a Managed Platform
- Data residency: Where data is stored and whether it meets business and compliance requirements.
- Permission isolation: How the platform partitions access scopes among different Agents and tenants.
- Audit logs: Whether critical operations can be recorded, exported, and used for post-mortem tracing.
- Platform lock-in: Whether skills, memory formats, and orchestration definitions can be migrated to other platforms.
3. Harness and Models Becoming Highly Coupled
A few months ago, the mainstream approach was to build a model-agnostic general Harness to allow seamless switching of underlying models. When model API behaviors were similar, abstracting a unified adaptation layer made sense.
The situation is different now. Different model labs employ varied training techniques and product philosophies, and the subtle differences between models have become a source of performance variance. As a result, an increasing number of teams are moving towards tightly coupling their Harness with a specific model, customizing tool calling, context organization, and task orchestration to leverage its unique characteristics.
This coupling trend has several direct architectural impacts:
- General abstraction layers can mask a model’s unique advantages, whereas paired design can unlock higher performance.
- The Harness is gradually becoming an amplifier for model capabilities, rather than easily replaceable peripheral scaffolding.
- During selection, both model capabilities and the maturity of the accompanying Harness must be evaluated simultaneously.
You can score items one by one during selection using the table below:
| Evaluation Dimension | Questions to Answer |
|---|---|
| Model capability | What is the accuracy and stability on the target task? |
| Harness maturity | Are there mature implementations for tool calling, context management, and error recovery? |
| Migration cost | How much code needs to change in the Harness when switching models? |
| Lock-in risk | What is the cost of exiting after binding to a specific model or platform? |
4. Multi-Agent Orchestration: Using Structure to Compensate for Single Model Limitations
The multi-agent orchestration capabilities provided by managed platforms are being used by developers to build more refined Harnesses. Three common patterns in the community each have their trade-offs:
| Pattern | Typical Approach | Suitable Tasks | Main Risks |
|---|---|---|---|
| Execution and advisory separation | One Agent executes operations while another evaluates the plan | Decisions requiring secondary validation | Increased call volume, higher latency |
| Adversarial collaboration | Generation and review Agents form a “generate, review, revise” loop | Outputs demanding high content quality | Cost control difficulty with many cycles |
| Swarm mode | Numerous lightweight Agents explore the problem space in parallel | Bug hunting, large-scale retrieval | Cumulative costs, complex result aggregation and debugging |
The commonality among these patterns is using orchestration structure to compensate for single model limitations, essentially extending Harness engineering into a new dimension. Before adoption, it is recommended to estimate call volumes and costs, and log the inputs and outputs for each Agent to facilitate subsequent debugging.
5. How Agents Will Evolve in a Year
Regarding the direction of evolution, Agents will trend towards easy deployment and out-of-the-box usability, similar to how applications transitioned from on-prem servers to cloud-native architectures.
Evolution has an order of precedence. The current focus is on properly encapsulating basic components like agent identity, sandboxes, memory, and security boundaries, because infrastructure is the prerequisite for all upper-layer capabilities.
Whether the scaffolding code and complex prompts written in projects today will be streamlined in a year depends on platform maturity and the team’s architectural choices. Teams have two alternative approaches to consider: directly adopting the capabilities provided by managed platforms, or using general components from mature cloud services, such as container hosting, object storage, message queues, and monitoring/alerting. Both approaches have their boundaries and require evaluation based on specific scenarios.
The advice for developers is straightforward: before continuing to fine-tune prompts, audit the infrastructure first, including sandbox stability, state persistence, asynchronous task recovery, and permission/identity isolation. These seemingly tedious engineering problems determine whether an Agent can move from a demo to production. By offloading general capabilities to mature cloud infrastructure, teams can reserve their energy for business logic.
