Agent Protocol Upgrade: Background Tasks and On-Demand Skill Loading

    This article explains the latest upgrade to the Model Context Protocol (MCP), which shifts agents from function-level tool calls to collaboration-level delegation. It covers on-demand skill loading, asynchronous background task delegation, interactive elicitation for human-in-the-loop control, and direct file uploads that bypass the model context window. For each capability, it outlines the engineering value, design principles, and practical implementation guidance, along with a suggested adoption path for teams moving agent systems from demos to production.

    1. From Tool Calls to Agent Collaboration: A Capability Leap at the Protocol Layer

    Over the past two years, the Model Context Protocol (MCP) has gradually become a common standard for connecting agents to external data and systems. In its early stage, the protocol solved a core problem of visibility: letting a model know what capabilities an external service offers and exposing interface descriptions in a structured way. As business complexity grows, however, knowing what can be done is not enough. The model also needs to know what should be done in a specific scenario.

    The latest round of protocol upgrades targets exactly this gap and can be summarized along three main lines:

    • On-demand loading of Skills, synchronized from the server side.
    • Asynchronous delegation and background execution of Tasks.
    • Interactive Elicitation that keeps a human in the loop.

    File upload support is also in progress, with the goal of letting binary and structured files move between services without passing through the model’s context window.

    All three lines point in the same direction: the relationship between an agent and external services is moving from function-level invocation to collaboration-level delegation. Developers need to rethink how they design capability packaging, state management, and permission boundaries.

    2. On-Demand Skill Loading: Turning Domain Knowledge into Distributable Assets

    Traditional tool descriptions can only express interface signatures and semantics. They cannot carry industry best practices, validation rules, or multi-step workflows. The Skills mechanism lets developers ship explanatory content alongside their tools, including domain knowledge, operating conventions, and workflow orchestration, and to provide differentiated guidance for different user groups or organizations.

    The engineering value shows up in three areas:

    • Context economy: the model loads a skill only when it decides the skill is needed, instead of stuffing all domain knowledge into the context at once. This significantly reduces token usage and noise.
    • Version consistency: skills are synchronized from the server, so clients do not need separate installation or upgrades. This reduces compatibility problems caused by client capability drift.
    • Multi-tenant customization: the same set of tools can carry different skill packages, delivering one interface with different business rules.

    An illustrative skill declaration structure (pseudocode, showing organization only):

    1. {
    2. "tools": [{ "name": "catalog.update_price", "schema": {} }],
    3. "skills": [{
    4. "id": "pricing-governance",
    5. "when_to_use": "Bulk price adjustments and promotion stacking",
    6. "steps": ["Validate cost floor", "Calculate regional tax rate", "Generate change preview", "Submit for approval"],
    7. "constraints": ["Single change must not exceed threshold", "Second confirmation required"]
    8. }]
    9. }

    Practical advice: keep skill content decidable, meaning every step has clear inputs, outputs, and failure handling. Avoid vague collections of general experience, which the model cannot execute reliably.

    3. Background Task Delegation: Breaking the Synchronous Blocking Model

    Under synchronous invocation, the main flow can only wait while a tool call is unfinished. For long-running statistics, batch builds, and multi-stage analysis, this causes obvious throughput loss. The Tasks mechanism lets an agent delegate time-consuming operations, or even a complete sub-flow, to background execution on the server. The main flow keeps working on other things and collects the result once the task finishes.

    A typical state transition looks like this:

    1. submit -> queued -> running -> succeeded / failed / canceled

    Key points for implementation:

    1. Idempotent submission: submit tasks with an idempotency key generated by the client to avoid duplicate execution on retries.
    2. Result retrieval: prefer callbacks or event notifications, with polling using backoff as the fallback. Polling needs an upper bound and a timeout.
    3. Resource isolation: set concurrency limits, queue priorities, and timeout termination policies for background tasks so long-running jobs do not crowd out online request resources.
    4. Observability: carry the task identifier through logs, metrics, and distributed tracing to make it easy to locate where a task is stuck.

    Illustrative call (pseudocode):

    1. task = server.tasks.submit(tool="report.build", args=payload, idem_key=uid)
    2. while not task.done():
    3. sleep(backoff(task.attempt))
    4. result = task.result() # Raises a structured error on failure

    4. Interactive Elicitation: Making Human-in-the-Loop a First-Class Citizen

    High-risk operations need human confirmation, such as creating billing resources, performing irreversible data changes, or deleting code repositories. Interactive elicitation lets the server pause during execution, ask the user for input or authorization through a form or link, and then resume from the interruption point.

    Recommended design principles:

    • Minimum necessary: request only the fields required for the current step, and avoid popping up a long form all at once.
    • Sufficient context: state the target of the operation, the scope of impact, and whether it is irreversible, so the user can make an informed decision.
    • Timeout and fallback: give each elicitation a validity period. On timeout, either deny and roll back, or suspend and wait for a human. Never default to allowing the operation.
    • Re-validate input: values returned by the user must go through server-side validation again, especially in cases that require typing a resource name a second time to confirm deletion.
    1. {
    2. "type": "elicitation",
    3. "form": [{ "field": "repo_name", "label": "Enter the repository name to delete" }],
    4. "on_timeout": "deny"
    5. }

    5. Direct File Upload and a Leaner Context

    File upload support sends payloads such as PDFs, spreadsheets, and images directly to the server instead of through the model context. This brings two benefits: large content no longer consumes the context budget, and the exposure surface for sensitive data is reduced. The common pattern is for the client to first obtain upload credentials, write the file to object storage, and then hand a file reference identifier to the server. The server extracts a summary on demand and returns it.

    1. client -> request upload credentials -> upload directly to object storage -> submit file reference -> server parses -> return structured summary

    6. Open Specification and Adoption Pace

    These capabilities belong to an open protocol specification and its extensions, not to any single client, and compatible clients can adopt them as well. For teams, a three-step adoption pace is suggested: first validate skill loading and task delegation in low-risk read-only scenarios; then introduce elicitation to cover write operations; finally connect the file path and complete auditing. If you run on a container platform or a message queue, you can use the task queue, monitoring and alerting, and logging services as the infrastructure foundation, and combine them with general cloud service offerings such as Baidu AI Cloud to handle resource orchestration and observability.

    Overall, this upgrade fills in four elements: knowledge, execution, confirmation, and files. That moves agent systems from demos toward something that can be operated in production. The focus for developers should shift from the number of interfaces to the quality of capability packaging, asynchronous governance, and permission design.