Agent Context Protocol Upgrade: Skill Delegation and Background Tasks in Practice

    This article explains how the agent context protocol is evolving from simple tool calling into a collaboration layer, and what that shift means for engineering teams. It covers on-demand skill loading on the server side, delegating long-running work as background tasks, pausing execution for interactive confirmation before high-risk actions, and passing large files by reference instead of through the context window. It also outlines the constraints of open specifications and multi-server deployments, plus a staged adoption path: read-only first, then asynchronous, then write operations.

    1. From Tool Calling to Agent Collaboration

    Over the past two years, the de facto standard for connecting agents to external systems has converged on a unified context protocol. The problem these protocols originally solved was simple: expose external data and operations to the model in a standardized way, so the model knows which tools are available. But as business complexity grows, a structural limitation becomes visible — tool names and descriptions can express that a capability exists, but not how that capability should be used correctly.

    The upgrade described here pushes that boundary much further. An external server is no longer just a capability provider; it can act like another agent — teaching the model domain knowledge, taking on time-consuming workflows, requesting information back during execution, and exchanging files directly. In engineering terms, the interaction model moves from synchronous, single-shot, stateless request/response to a collaboration protocol that can load knowledge, delegate asynchronously, pause and resume, and carry large objects.

    In practice at Baidu AI Cloud, these capabilities typically map to general-purpose infrastructure: container platforms host the agent runtime, object storage holds large files, message queues and task scheduling services handle asynchronous execution, and logging plus monitoring and alerting provide observability. The protocol upgrade does not change the role of this infrastructure, but it does significantly change the order in which it is called.

    2. Skill-Based Knowledge Injection: Moving Best Practices from Prompts to the Server

    The traditional approach stuffs business rules, operation manuals, and multi-step procedures into the system prompt. This has three clear costs: the context window is occupied over the long term; updating knowledge requires republishing the prompt; and different users or organizations cannot be served differently.

    The skill-based approach moves that content to the external server side, published alongside the tool definitions. The core mechanism comes down to three points:

    1. On-demand loading. The model fetches the body of a skill only when it judges the skill relevant to the task, rather than injecting all knowledge up front. Context usage then scales with task complexity rather than with the total volume of knowledge.
    2. Synchronized with the server version. Skills and tools are maintained by the same party and released under the same version, avoiding drift between a client-side copy of the knowledge and actual tool behavior.
    3. Differentiated delivery. The same set of tools can return different operating guidance for different users or organizations, enabling policy isolation in a multi-tenant setup.

    A sample skill declaration structure (fields are illustrative, not a specific product interface):

    1. {
    2. "tools": [{ "name": "create_item", "description": "Create an item" }],
    3. "skills": [{
    4. "name": "storefront_layout_guide",
    5. "when_to_use": "Involves storefront page structure and theme updates",
    6. "body": "Read the existing structure first, then replace locally; overwriting the whole page is forbidden...",
    7. "scope": "tenant"
    8. }]
    9. }

    Two engineering notes: skill bodies are trusted configuration that sits outside the untrusted input boundary, but they should still be constrained in length and structure; and the quality of the when_to_use judgment directly determines loading accuracy — write it too broadly and irrelevant skills get pulled repeatedly, canceling out the context savings.

    3. Background Task Delegation: Replacing Synchronous Blocking with Asynchronous Orchestration

    Before the upgrade, the execution model was strictly serial: the model could only advance after a tool call returned. Any time-consuming operation — batch data processing, long build pipelines, multi-stage analysis — pinned the session in place.

    Background task support delegates the entire long-running execution flow to the external server, freeing the model to work on other branches and retrieve the result once the task finishes. This requires the protocol layer to fill in three things: task identifiers and status queries, result retrieval semantics, and failure and timeout handling.

    A general orchestration skeleton:

    1. handle = server.submit_task("batch_rebuild", params)
    2. # Meanwhile, keep processing other subtasks
    3. while True:
    4. st = server.task_status(handle.id)
    5. if st.state in ("succeeded", "failed", "canceled"):
    6. break
    7. do_other_work()
    8. result = server.task_result(handle.id) if st.state == "succeeded" else None

    The design priorities are idempotency and recoverability: task submission should carry an idempotency key so retries do not cause duplicate writes; the state machine should cover at least five states — queued, running, succeeded, failed, canceled; and timeouts need an explicit cancel or fallback path rather than an indefinite wait.

    4. Interactive Requests for Information: Inserting a Human Gate Before High-Risk Actions

    For an agent to reach production, the authorization problem must be solved. Interactive requests allow the server to pause mid-execution and ask the user for confirmation or additional parameters through a form or link, then resume from the interruption point once an answer arrives.

    Typical cases are destructive operations and billing actions: confirming the budget before creating a paid resource, a second confirmation before an irreversible data change, or requiring the user to type the repository name before deleting a code repository. The value of this design is not only safety — it also pulls the human-in-the-loop back inside the session instead of outside it, preserving the full context.

    The implementation should follow a least-necessary principle: request only the fields required to complete the current step; bind each request to the original task identifier and give it a validity period, so it expires rather than defaulting to approval; and log every confirmation to an audit trail for traceability.

    5. Direct File Upload: Letting Large Objects Bypass the Context Window

    Large objects such as PDFs, spreadsheets, and images are expensive and inefficient to pass through the model’s context. Direct upload lets the client write the file straight to the external server’s storage side, so the model receives only a reference identifier.

    1. Client → Object storage (direct upload, obtain file_ref)
    2. Model ↔ Server (exchange only file_ref and metadata)
    3. Server → Object storage (read according to permissions)

    Permissions and lifecycle must be defined alongside this: references need a scope and an expiration time, cross-tenant access must be explicitly validated, and objects should be reclaimed per policy once the task ends.

    6. Engineering Constraints of Open Specifications and Multi-Server Coordination

    It is worth stressing that these capabilities belong to an open protocol and its extensions, not to any single client, so compatible clients can adopt them as well. That also means engineering teams face the common problems of running multiple servers side by side: tool name collisions require namespaces; skill and tool versions need unified governance; and task and file references across servers need consistent identifier and authentication conventions.

    For the adoption path, the recommended order is read-only first, then asynchronous, then write operations: start with skill injection and direct file upload to cut context cost, then introduce background tasks to raise throughput, and only then add interactive confirmation for high-risk writes. Combined with general-purpose logging, monitoring and alerting, and permission management on Baidu AI Cloud, this evolution can be completed without sacrificing observability.