Agent Context Protocol Upgrade: Skills and Background Tasks in Practice

    This article explains how upgrading an agent context protocol with on-demand skills, background task delegation, and interactive elicitation solves common enterprise agent failures such as missing workflows, context bloat, and version drift. It covers the core design of skill packages, layered customization, task lifecycle patterns, structured input collection, and a reference architecture with governance practices for building more reliable agent-to-system collaboration.

    Agent Context Protocol Upgrade: Skills and Background Tasks in Practice

    1. The Starting Problem: Tool Descriptions Are Not Methods

    In enterprise agent deployments, a recurring structural conflict is that the context protocol solves the “connection” problem but not the “methodology” problem. In the traditional model, external services expose a set of tools through the protocol, each with a name, parameter schema, and short description. The model can infer “what I can do” from this, but it struggles to determine “how this should be done in a specific business scenario.”

    This leads to three typical failure modes:

    1. Missing procedures: The model knows there are query and write interfaces, but not what to validate first, what to submit next, or how to roll back on failure.
    2. Context bloat: To compensate for the missing methodology, developers stuff all operation manuals into the system prompt at once. Token costs rise quickly, and most of that content is irrelevant in a single session.
    3. Version drift: After business rules change, prompts scattered across different business teams’ repositories cannot evolve consistently with the server side, resulting in “one capability, multiple descriptions.”

    The core idea of the upgrade can be summarized in two sentences: treat the “method of doing things” as a first-class citizen in the protocol; and change “execution” from synchronous blocking to delegable background activity.

    2. Skill-Based Knowledge Injection: Making the Protocol Carry Methodology

    2.1 Basic Model

    A Skill is essentially a structured knowledge package released with the server. It typically includes applicable scenario descriptions, domain terminology and constraints, best practices, multi-step workflows, exception handling strategies, and optional templates and validation rules. It is exposed by the server alongside tool declarations, but the two have different responsibilities: tools describe “capability boundaries,” while skills describe “how to use them.”

    The key design principle is on-demand loading. The protocol does not inject the full text of all skills into the context. Instead, it first provides a lightweight skill list (name and intent summary), and the model requests the full content only when it judges it relevant. This directly reduces wasted context usage and frees the skill library size from the limits of the context window.

    1. {
    2. "skills": [
    3. { "name": "storefront_layout", "summary": "Online storefront homepage layout and update rules", "load": "on_demand" },
    4. { "name": "tenant_onboarding", "summary": "New tenant configuration onboarding flow", "load": "on_demand" }
    5. ],
    6. "tools": [
    7. { "name": "update_page", "schema": { "page_id": "string", "blocks": "array" } }
    8. ]
    9. }

    2.2 Layering and Customization

    In practice, a three-layer skill structure is recommended:

    • Common layer: Industry-standard practices and compliance boundaries, shared across all tenants;
    • Organization layer: A company’s internal terminology, approval chains, and data definitions;
    • User layer: Individual preferences and historical habits.

    Because skills are synchronized with the server, users do not need to install plugins separately or modify local configurations, which addresses long-tail version management. In multi-tenant scenarios, the server resolves a skill view based on identity, achieving “one capability, different guidance.”

    2.3 Engineering Considerations

    • Skill text should use short, step-based sentences rather than long narrative paragraphs, making it easier for the model to extract constraints accurately;
    • Annotate each step with preconditions and failure fallbacks to reduce the risk of irreversible operations;
    • Maintain a compatibility matrix between skills and tool versions to prevent methods from calling nonexistent parameters;
    • Explicitly declare in skills that high-risk actions require human confirmation.

    3. Background Task Delegation: From Synchronous Blocking to Asynchronous Orchestration

    3.1 What Fundamentally Changes

    Before the upgrade, the model had to wait for a tool call to return before continuing reasoning, and long-running tasks would stall the session. The Tasks mechanism returns the execution lifecycle to the server: after submitting a task, the model receives a handle, can continue working on other sub-problems, and can query status or receive a completion notification at the appropriate time.

    1. Submit task -> return task_id
    2. Process other subtasks in parallel
    3. Poll/callback -> status: running | succeeded | failed
    4. Retrieve result -> merge into the main flow

    3.2 Implementation Patterns

    • Outsourcing long flows: Report generation, batch data repair, and multi-environment inspections are handed to background execution;
    • Sub-agent orchestration: The main agent handles task decomposition and result arbitration, while sub-flows run independently on the server;
    • Failure isolation: A single background task failure does not block the main chain and can be retried or degraded;
    • Observability: Tasks need status, progress, logs, and termination capabilities to support troubleshooting.

    It is worth noting that asynchronous does not mean out of control. Tasks should have timeouts, idempotency keys, and concurrency limits, and write operations should retain a compensation path.

    4. Interactive Elicitation: Filling in Missing Parameters

    In real business scenarios, the model often lacks key inputs. Interactive elicitation allows the server to ask the user structured questions midway through execution, rather than having the model guess or fail outright. Its engineering value lies in making “uncertainty” explicit and forming an auditable input chain.

    1. { "type": "elicit", "fields": [
    2. { "name": "region", "required": true, "hint": "Target deployment region" },
    3. { "name": "confirm_write", "type": "boolean", "default": false }
    4. ] }

    Combined with file upload capabilities, the agent can receive design drafts, configuration packages, or data samples as context, closing the loop of “review materials, ask questions, execute tasks.”

    5. Reference Architecture and Governance Recommendations

    A robust implementation typically consists of five parts: a protocol adaptation layer responsible for the skill list and tool routing; a skill repository handling layered management and version release; a task runtime providing queues, concurrency, and retries; an interaction gateway handling elicitation and file exchange; and an observability and audit system covering logging services, monitoring alerts, and trace tracking. On the storage side, object storage can carry large files, message queues can decouple tasks, and container platforms can support runtime elastic scaling.

    For governance, three red lines are recommended: skill changes require review and canary rollout; write operations require confirmation by default; and all background tasks must retain input and output snapshots to meet compliance traceability. If an enterprise already uses relevant general capabilities from Baidu AI Cloud, the layering above can be mapped directly onto existing storage, queue, container, and monitoring categories, reducing duplicate construction.

    6. Conclusion

    The real significance of this upgrade is moving the relationship between agents and external systems from “invocation” to “collaboration”: capabilities can be taught, tasks can be entrusted, and information can flow in both directions. For developers, the most worthwhile investment next is not piling on more tools, but distilling business methodology into versionable skills and transforming long-running flows into governable background tasks.