[KongchangAI]
· 3 min read· 1,521 words

AI Agent Deployment: Three Things Developers Should Do

AI Agent Deployment: Three Things Developers Should Do

Multi-agent deployment should first fill in human baselines, limit single-agent hard boundaries, build a controlled modification loop, and release based on cost.

The article points out that multi-agent architectures consume about 15x the tokens of normal conversations, making them pure loss without a clear quality gain, so developers should first replicate a controlled loop rather than rushing to build an agent swarm. The author gives three actions with the highest ROI: first, fill in a human baseline for existing processes, recording processing minutes, review share, error rate, external side effects, and per-task cost, to decide whether to use a deterministic workflow, a single agent, or a supervisor-executor pattern; second, limit the first version to a bounded single agent with at most 5 categories of read-only tools, 12 calls, and 2 self-corrections, plus timeouts, checkpoints, and handoff to a human when limits are exceeded, with tool interfaces using JSON schema typed contracts and registering risk, idempotency, and approval requirements; third, make automated modification a controlled loop, generating patches and then running tests, static analysis, and CodeQL, only creating reviewable PRs, and evaluating both end-to-end success rate and step-level metrics. The release criterion is that the cost per successful task is at least 50% lower than manual work or the old process.

Title

AI Agent Deployment: Three Things Developers Should Do

Meta Description

AI Agent deployment doesn't require rushing into multi-agent systems. This article outlines an actionable deployment path and engineering acceptance thresholds for developers, covering human baselines, bounded single-agent scope, and a controlled code-modification loop.

Article Content

Multi-agent systems are hot, but few projects actually deliver business results. Anthropic's public data shows that a multi-agent architecture consumes roughly 15x the tokens of a normal conversation. Without a clear quality gain, that extra invocation cost is pure loss. For developers, rather than rushing to build an agent swarm, it's better to first replicate a controlled loop: prove the business result first, then expand the scope of autonomy. The following three actions offer the highest return on investment right now.

Action One: Fill In a Human Baseline for Existing Processes

The principle for choosing a scenario is high frequency, judgeable, and containing at least one real tool action. Record manual processing minutes, anti-power ratio (share of human review), error rate, external side effects, and cost per successful task as the baseline.

This way developers and budget owners can tell who should use an agent

With a baseline, the judgment becomes simple: for field changes or report tasks with clear rules and fixed sequences, use deterministic workflows first; only enable an agent when steps vary with input; consider a supervisor-executor pattern only for tasks that can run in parallel and be independently verified. This way developers and budget owners can distinguish who should use an agent and who should keep using scripts, avoiding wrapping a simple if-else into an expensive agent.

Action Two: Limit the First Version to a Bounded Single Agent

The scope of the first version must be narrowed: at most 5 categories of read-only tools, at most 12 tool calls per run, at most 2 self-corrections, plus timeouts, checkpoints at each step, and handoff to a human when limits are exceeded. These hard boundaries aren't conservatism—they make failures predictable.

Don't just expose free-text functions

Change tool interfaces into typed contracts; don't just expose free-text functions. Use JSON schema with additionalProperties: false, and register risk, timeout, retry, idempotency, and approval requirements. This way developers and platform teams only need to change interfaces, budgets, and states, and can debug within the boundaries. With at most 12 tool calls per run, set budget alerts at 50%, 75%, and 90%. According to engineering acceptance thresholds, schema validity should be ≥98%, retry rate ≤5%, and infinite loops should be 0.

JSON Schema and additionalProperties: false

JSON Schema is a standard for describing and validating JSON data structures. It can declare which fields an interface accepts, each field's type, whether it's required, its value range, and more. In tool-calling scenarios, the parameters generated by the model are essentially structured data. Constraining them with a schema is equivalent to adding a machine-verifiable contract to the model's output. additionalProperties: false is a key switch: it forbids extra fields not declared in the schema from appearing in the object. By default, JSON Schema allows additional properties, so the model might "casually" insert misspelled or fabricated parameter names, and if downstream services parse loosely, they could be silently accepted, leading to side effects that are hard to troubleshoot. With this option enabled, any out-of-bounds field is rejected at the validation stage, exposing errors at the entry point rather than letting them erupt deep in business logic. This is also the core reason the article emphasizes "typed contracts" rather than free-text functions—verifiable, rejectable, reproducible.

Idempotency

Idempotency means that executing the same operation once produces the same effect as executing it multiple times. In systems where agents retry tool calls, this is the first line of defense against duplicate side effects: if a call to "create a ticket" or "initiate a refund" is retried due to a timeout, a non-idempotent interface will create two records or deduct two payments, while an idempotent interface (for example, carrying a client-generated unique request ID that the server uses for deduplication) will only take effect once. The article requires registering risk, timeout, retry, idempotency, and approval requirements for each tool precisely because retry strategy and idempotency must be designed as a pair—setting retries without ensuring idempotency is equivalent to amplifying network jitter into a business incident. For read-only tools, idempotency naturally holds; for write operations, a deduplication key must be explicitly implemented at the interface layer and marked in the contract, so upper-layer orchestration can determine which steps can be safely replayed.

Action Three: Make Automated Modification a Controlled Loop

Locate alerts and files, generate patches, re-run unit tests and static analysis and CodeQL, and after validation passes, only create a reviewable PR—never directly modify the main branch.

Action Three: Make Automated Modification

The key insight here is: final success may mask erroneous steps, so don't just look at the answer. Evaluate end-to-end success rate, step pass rate, tool selection accuracy, and parameter accuracy simultaneously; for code tasks, independent re-verification is the standard.

For code tasks, independent re-verification is the standard

Advance the upper limit through offline replay, shadow runs, low-risk automated execution, and high-risk HITL restricted autonomy. First run 50 real tasks without writing to external systems; payments, deletions, outbound sends, and deployments must require human approval. This way code reviewers and security owners get a rejectable PR with validation records.

CodeQL and Static Analysis

CodeQL is a semantic code analysis engine provided by GitHub. It compiles source code into a queryable database, then uses a SQL-like query language to search for vulnerability patterns, such as taint flowing from untrusted input to dangerous functions (injection, path traversal, etc.). Unlike traditional pattern-matching linters, CodeQL performs analysis at the data-flow and control-flow level, capable of finding deep defects across functions and files, but at a higher runtime cost. Putting it into the agent's automated modification loop matters because it fills in the security dimension that unit tests can't cover: tests verify "whether functionality works as expected," while CodeQL verifies "whether new dangerous paths have been introduced." Together with static analysis, they form the validation gate, and only when all pass is a PR allowed to be generated. Note that such tools produce false positives, so the gate should be designed to "block and hand off to human review" rather than unconditionally block, otherwise it will slow down the flow of low-risk changes.

HITL (Human-in-the-Loop)

HITL means retaining human judgment and approval at key nodes in an automated process, so the system gains efficiency without losing controllability. The article treats "high-risk HITL restricted autonomy" as the final tier in advancing autonomy levels. Its meaning is: for irreversible or high-impact actions such as payments, deletions, outbound sends, and deployments, the agent can prepare a plan and generate instructions to be executed, but actual execution must be confirmed by a human. The opposite is a "shadow run"—the agent reasons and calls as usual, but outputs are only recorded, not applied, to accumulate evaluation data on the real distribution under zero-risk conditions. The design points of HITL are approval granularity and context: the approver shouldn't get just an "approve/reject" button, but should also see the agent's reasoning trace, the tools called, parameters, and expected side effects—otherwise the human step degenerates into a formal rubber stamp. The progressive sequence of offline replay, shadow runs, low-risk automated execution, and high-risk HITL is essentially trading gradually expanding authorization for gradually accumulated trust.

Release Criteria: Cost and Human Approval

Before controlled production, the cost per successful task must also be at least 50% lower than manual work or the old process; otherwise, don't release. Today, the first thing to do is fill in a human baseline for existing processes and use it to decide whether to adopt an Agent system. If the baseline is unclear, the scope of autonomy is out of the question.

One-line Summary

Multi-agent deployment should first fill in human baselines, limit single-agent hard boundaries, build a controlled modification loop, and release based on cost.

Paragraph Summary

The article points out that multi-agent architectures consume about 15x the tokens of normal conversations, making them pure loss without a clear quality gain, so developers should first replicate a controlled loop rather than rushing to build an agent swarm. The author gives three actions with the highest ROI: first, fill in a human baseline for existing processes, recording processing minutes, review share, error rate, external side effects, and per-task cost, to decide whether to use a deterministic workflow, a single agent, or a supervisor-executor pattern; second, limit the first version to a bounded single agent with at most 5 categories of read-only tools, 12 calls, and 2 self-corrections, plus timeouts, checkpoints, and handoff to a human when limits are exceeded, with tool interfaces using JSON schema typed contracts and registering risk, idempotency, and approval requirements; third, make automated modification a controlled loop, generating patches and then running tests, static analysis, and CodeQL, only creating reviewable PRs, and evaluating both end-to-end success rate and step-level metrics. The release criterion is that the cost per successful task is at least 50% lower than manual work or the old process.

#AI Agent deployment#multi-agent systems#single-agent boundaries#JSON schema#idempotency#CodeQL#HITL#human baseline
Share:

Related articles