Harness Engineering and AsyncSubAgent: A Practical Analysis of Enterprise Agent Architecture

Harness Engineering treats Agents as enterprise web services, building production-grade agent skeletons with ASGI, MCP gateways, and sandboxes.
Using an intelligent procurement assistant project as a case study, the article analyzes how the Harness architecture upgrades Agents from scripts to enterprise-grade web services. Built with Vue frontend and FastAPI backend running on ASGI, it solves async high-concurrency and streaming output, uses DeepSeek as primary model with Zhipu backup and a summary model, accesses existing ERP systems through MCP gateway for controlled access, and introduces container-based sandboxes for user isolation and Skill security.
The Architectural Starting Point for Enterprise Agents: Why Harness Engineering Is Needed
Bilibili creator "码士集团" (Code Master Group) recently showcased an intelligent procurement assistant project built on the Harness architecture. The codebase is substantial and has been fully wired up across frontend, backend, and sandbox services. According to the creator, this architecture was proposed after January 2026 and is called "驾驭工程" (Harness Engineering) in Chinese.
From the macro framework demonstrated, this project is not an isolated chatbot but a production-grade agent that must be deeply coupled with external systems. It consists of a Vue frontend (port 3000) and a FastAPI backend (port 8090). The agent itself runs within an ASGI service, with UV used as the ASGI container. The creator emphasizes that putting agents into ASGI services in enterprise production environments solves two core problems: asynchronous high-concurrency request handling and true streaming output.

The insight from this design is that an Agent is no longer a script; it needs to be deployed as a web service, expose interfaces, and handle multi-user requests as a system component. Harness plays the "steering" role here—unifying model inference, tool invocation, and external system connections into an operable engineering skeleton.
ASGI vs. WSGI: ASGI (Asynchronous Server Gateway Interface) is the asynchronous successor to WSGI in the Python web ecosystem. The core difference is native support for async coroutines and long-lived connections. WSGI uses a synchronous blocking model where one request occupies one thread until processing completes, making it difficult to support Agent scenarios with model inference that often takes tens of seconds. ASGI allows a single process to concurrently handle large numbers of requests and continuously push incremental content to clients during inference. This enables streaming output (such as character-by-character return of LLM-generated results) without workarounds like polling or WebSocket. This is the fundamental reason enterprise agents choose ASGI as their runtime container.
Harness (Harness Engineering): Harness originally refers to the reins and tack in horse harnesses, metaphorically implying control and guidance over a powerful but untamed object. In the Agent context, it refers to an engineering skeleton: model inference, tool invocation, memory management, and external system connections are orchestrated uniformly and placed within an observable, operable, and extensible framework. Unlike simply stacking prompts, Harness focuses on how to make agents run stably in real production environments, including engineering concerns such as error retry, timeout control, permission boundaries, and resource isolation.
Multi-Model Access and MCP Gateway: How Agents Communicate with Existing ERP Systems
In the project, the inference model directly calls domestic models (such as DeepSeekAd), the backup model uses Zhipu, and a summary model is also configured. This multi-model layered strategy is common in practice: the primary inference model handles complex decisions, the backup model ensures availability, and the summary model compresses context or generates interim conclusions.
More critical is integration with existing systems. The creator assumes the enterprise already has a running ERP system, and the new procurement assistant needs to read data from it. The project specifically designs access to ERP data through the MCP protocol and a gateway. This means the Agent does not directly intrude into business databases but instead performs controlled access through a protocol gateway layer—this both reduces coupling and leaves room for permissions and auditing.

The creator mentioned in the demo that many companies already had CRM, ERP, and other platforms before Agents became popular, and new agents often need to integrate with these existing systems rather than starting from scratch. This judgment is very valuable for enterprise implementation: an Agent's competitiveness lies not only in model capabilities but also in whether it can "grow" onto existing business processes at low cost.
MCP (Model Context Protocol): MCP is a protocol standard proposed and open-sourced by Anthropic, aimed at unifying the interaction between large models and external data sources and tools. Its basic model is a client-server structure: the Agent acts as a client and requests resources or invokes tools from MCP servers through standardized JSON-RPC interfaces, while servers encapsulate access logic to specific systems (such as databases, ERP, file systems). Compared to writing custom integration code for each system, MCP makes tool integration reusable and replaceable. In this project, the MCP gateway acts as an intermediary between the Agent and ERP, with the gateway uniformly executing authentication, rate limiting, and auditing. The Agent itself does not hold database credentials, thereby achieving controlled access and fault isolation at the architectural level.
Security Risks of Skills and User Isolation: Why Sandboxes Become Mandatory
The project supports a Skill mechanism. Skills may come from network downloads or be generated by large models themselves. The creator explicitly points out two types of risks: first, security risks of Skills themselves in enterprise development; second, when multiple users use the frontend simultaneously, their generated files and data need to be isolated.
The solution is to introduce sandbox services. In the demo, the creator started open-sandbox-server on a Linux server and explained that a sandbox is essentially multiple containers, thus requiring an image repository to prepare different environments for different users. After each user is assigned an independent sandbox, PPT files generated by Zhang San cannot be accessed by Li Si, naturally forming isolation.


From an engineering perspective, this layer of design converges two problems—"untrusted code execution" and "multi-tenant data boundaries"—into the container layer for resolution, rather than patching at the application layer. For any Agent product that needs to be opened to multiple users, the sandbox is not optional but infrastructure.
Sandbox and Container Isolation: A sandbox is a restricted execution environment that limits files, networks, and system resources accessible to processes through operating system-level isolation mechanisms (such as Linux namespaces and cgroups, or stricter gVisor and Firecracker microVMs). In Agent scenarios, Skills may be third-party downloaded code or scripts generated on the fly by large models, with unpredictable behavior. Executing them directly in the host environment is equivalent to handing server control to untrusted input. Containerized sandboxes allocate independent instances for each user or task, both blocking the impact of malicious code on the host and other tenants and ensuring environment consistency through image mechanisms. open-sandbox-server is a service component that provides sandbox lifecycle management on top of container orchestration.
External Toolchain: Supplier Websites, Crawlers, and Image Repositories
As an intelligent procurement assistant, the Agent needs to be associated with suppliers, possibly accessing information such as quotation pages on supplier websites through Skills or web crawlers. The creator lists the image repository separately because sandbox containers need to specify different images by user or scenario, and environment differences require preparation at the image level in advance.
This detail reflects the typical external dependency structure of enterprise agents: model layer, protocol gateway layer, sandbox execution layer, image and resource layer, plus frontend access layer. If any layer is missing, the Agent remains at the demo stage.
Extended Thoughts on AsyncSubAgent and Harness Architecture
The original video title mentions AsyncSubAgent, but the demo content mainly revolves around the overall Harness framework and does not delve into implementation details of asynchronous sub-agent collaboration. From the available information, it is reasonable to infer: when the main Agent needs to simultaneously handle model calls, MCP data reading, sandbox tasks, and external crawling, asynchronous sub-agents are a natural choice for splitting long tasks and avoiding blocking. ASGI's asynchronous capabilities provide the runtime foundation for this.
It should be noted that the specific mechanisms of AsyncSubAgent are not elaborated in this material, and readers can follow the creator's subsequent updates. Based on the architecture presented, the core proposition of Harness Engineering is clear: build agents as enterprise systems, use ASGI to solve servitization, use MCP to solve system integration, use sandboxes to solve security and isolation, and use multi-model layering to solve availability. This combination is closer to production reality than merely discussing prompt techniques.
At the end of the video, the creator stated that the next lesson will explain project functionality and code structure details, and mentioned that this project is part of his course content. For developers who want to replicate similar architectures, priority should be given to understanding the two enterprise-level differences: sandboxes and MCP gateways.
AsyncSubAgent (Asynchronous Sub-Agent): This concept refers to agent instances derived from a main Agent that asynchronously execute specific subtasks in the background. The main Agent splits long-running or parallelizable components (such as batch retrieval of supplier quotations or invoking sandboxes one by one to generate documents) into subtasks and dispatches them to sub-agents, while continuing to respond to users or coordinate globally. After subtasks complete, results are aggregated through messages or callbacks. Its value lies in shortening end-to-end response time, avoiding single-point blocking, and enabling each subtask to have independent context and tool permissions. Implementation typically relies on asynchronous task queues or coroutine scheduling, which naturally fits with ASGI's event loop. The cost is introducing distributed coordination problems such as state synchronization, result aggregation, and failure retry, which require unified design at the architectural level.
One-line Summary
Harness Engineering treats Agents as enterprise web services, building production-grade agent skeletons with ASGI, MCP gateways, and sandboxes.
Paragraph Summary
Using an intelligent procurement assistant project showcased by a Bilibili creator as a case study, this article analyzes how the Harness architecture upgrades Agents from scripts to enterprise-grade web services. The project consists of a Vue frontend and FastAPI backend, with the agent running in an ASGI service, solving asynchronous high-concurrency and streaming output problems. The inference model uses a layered strategy with DeepSeek as primary, Zhipu as backup, and a summary model configured. It accesses existing ERP systems in a controlled manner through the MCP protocol and gateway, avoiding direct intrusion into databases. To address untrusted Skill sources and multi-user data isolation requirements, a container-based sandbox service is introduced, allocating independent environments for each user. The article also outlines the layered dependencies of the external toolchain and makes reasonable inferences about AsyncSubAgent, which is not elaborated in the material, pointing out that its asynchronous approach to splitting long tasks echoes the ASGI runtime.
Related articles

AI and Humans Team Up to Prove the Riemann Hypothesis, Shaking the Mathematical World in 48 Hours
Anthropic mathematician and Claude AI claim to have proven the Riemann Hypothesis, with 17.4 million lines of Lean code formally verified within 48 hours. A hastily assembled pure-human proof falls short. The event sparks fierce debate over whether a machine-verifiable proof equals a human-understandable one.

Android's New Voice Broadcast Feature: Auracast Makes Noisy Places More Accessible
Google expands Android support for Auracast, letting users listen directly to voice broadcasts in public places like airports and stations, improving accessibility in noisy environments and enabling audio from muted TVs.

Jensen Huang's 12-Hour Closed-Door Hearing: Acknowledges Chips Flowed to China
NVIDIA CEO Jensen Huang acknowledged in a 12-hour closed-door hearing that chips flowed to China, with testimony also touching on JD Vance pressuring the board to reinstate him.