Agent Protocol Upgrades: Skill Delegation and Background Tasks
This article examines three common bottlenecks in the tool-calling paradigm for AI agents—context budget, execution timing, and the lack of procedural knowledge—and explains three general-purpose capabilities that address them: on-demand skills, delegable background tasks, and interactive information requests at key checkpoints. It also covers direct file uploads that keep large objects out of the model context, and the requirements for open specifications and multi-service coordination. Readers will find design considerations, minimal JSON examples, and practical adoption recommendations for building observable, recoverable, and auditable agent execution systems.
1. Background: Three Bottlenecks of the Tool-Calling Paradigm
In early practice connecting agents to external systems, the mainstream approach was “tool calling”: the client injects a set of tool names and descriptions into the model context, the model selects a tool and generates arguments, an external service executes it, and the result is returned. This paradigm solved the question of “what can be done,” but not “how it should be done.” A tool description can declare that it “supports creating orders,” but it cannot carry enterprise knowledge such as risk-control rules, approval sequences, or exception rollback. As business scenarios move from single-step operations to multi-step workflows, the model can only assemble the flow from ad hoc prompts, which is poor in both stability and maintainability.
Two other bottlenecks have also become apparent. The first is the context budget: the more tools there are and the longer their descriptions, the more tokens must be injected, compressing the space available to the model for reasoning and business data. The second is execution timing: synchronous calls require the model to block and wait, so a task that takes several minutes occupies the entire session, which users experience as “stuck.” Around these three points, the industry has gradually converged on three general capabilities: an on-demand skill mechanism, a delegable background task mechanism, and an interactive information request mechanism during execution. This article discusses the general design of these three capabilities from a neutral perspective and does not point to any specific vendor implementation.
2. Skills: Moving “How” from Prompts to Distributable Assets
In general terms, a skill is a structured operating guide that typically includes applicability conditions, pre-checks, step-by-step procedures, failure handling, and acceptance criteria. The difference from a tool description is that a tool description answers the boundary of a capability, while a skill answers the execution strategy. Publishing skills alongside the protocol service brings three direct benefits.
First, on-demand loading controls context cost. The client does not need to inject all skills at the start of a session; it first loads a lightweight skill index (name and a one-line purpose) and fetches the body only when a task matches. An illustrative structure:
{"skills": [{"name": "storefront_layout", "summary": "Generate storefront homepage layouts"},{"name": "data_cleanup", "summary": "Remove duplicate and missing data"}]}
Second, versions stay in sync with the service. Once a skill is updated as a server-side asset, the client does not need to install a separate plugin, which avoids the three-way split of “docs in a wiki, code in a repository, prompts in chat history.”
Third, skills can be customized per tenant. The same set of tools can serve different organizations with different operating guides, achieving “same capability, different strategy.”
From an engineering standpoint, it is advisable to define explicit metadata for each skill: applicability tags, required permissions, expected duration, and whether it is rollbackable. Without these fields, the scheduler cannot decide whether to load a skill or whether it can run in the background.
3. Background Tasks: From Synchronous Blocking to Delegable Execution
The core of the background task mechanism is splitting “one call” into three stages: submit, track, and retrieve. The client receives a handle immediately after submitting a task, the model continues with other sub-problems, and the result is obtained via callback or polling once the task completes. A minimal usable task description could be:
{"task": "nightly_report","input": {"range": "last_7_days"},"callback": "notify://session/42","ttl_seconds": 3600}
There are four design points. First, idempotency: resubmitting the same task identifier should return the same result, avoiding duplicate writes caused by retries. Second, observability: task status should include at least five states—queued, running, succeeded, failed, and cancelled—and expose progress and error codes. Third, resource isolation: long-running tasks should run in a separate execution environment so they do not compete with online sessions for resources. Fourth, timeouts and reclamation: set a time-to-live for each task and release intermediate artifacts after it expires, preventing storage and compute leaks. Hosting these tasks on general-purpose capabilities such as container platforms or function-compute services, together with a message queue for event notifications, is a common implementation pattern in the industry.
4. Interactive Information Requests: Inserting Human Confirmation at Key Checkpoints
High-risk operations cannot simply be let go. Interactive information requests allow a service to pause at a critical checkpoint, present a form or a redirect link to the user, and resume from the interruption point after collecting confirmation or authorization. Typical scenarios include creating billable resources, performing irreversible data changes, deleting code repositories, and publishing content externally.
Three points need attention in implementation. First, state persistence: the context during the pause must be written to persistent storage so execution can resume after a process restart. Second, least privilege: the request should ask only for the authorization required by the current step, avoiding a broad one-time grant. Third, audit trail: record “who approved what and when” for later traceability. An illustrative flow:
Submit task -> Validate preconditions -> Hit high-risk policy-> Pause and generate confirmation request -> User authorizes -> Resume execution -> Return result
5. Direct File Uploads: Keeping Large Objects Out of the Context Window
Large files such as PDFs, spreadsheets, and images are both expensive and inefficient if they enter the model context. The general approach is to establish a direct upload channel between the client and the protocol service: the service returns a one-time upload URL, the client writes the file to an object-storage capability, and only a reference identifier is handed to the model. The read side works the same way: after the model obtains the reference, the service parses fragments on demand. This keeps only metadata and summaries in the context, keeps cost under control, and makes virus scanning and format validation easier.
6. Open Specifications and Multi-Service Coordination
The capabilities above should be treated as open specifications and their extensions, not as private features of a single client. The criterion is simple: can the same service run in other compatible clients without code changes? When multiple services coexist, naming conflicts, permission aggregation, and call orchestration must also be addressed: prefix tools and skills with a service name, pass identity through uniformly, and set global timeouts and circuit breaking so that one slow service does not drag down the entire chain.
7. Adoption Recommendations
- Start by inventorying high-frequency multi-step flows, extracting them into skills, and filling in metadata and rollback plans.
- Convert time-consuming stages into background tasks, and connect them to a state machine and alerting.
- Enforce information requests for irreversible operations, and keep audit records.
- Route large files through direct uploads, leaving only references in the context.
- Build an evaluation set covering four paths: normal, exception, timeout, and user rejection.
In general cloud environments such as Baidu AI Cloud, these capabilities can map to standard categories including object storage, message queues, container platforms, log services, and monitoring and alerting, making it possible to build an observable, recoverable, and auditable agent execution system at relatively low adaptation cost.
