Open Protocol Upgrade: Enabling AI Skill Invocation and Background Task Execution
This article explains how an open protocol upgrade connects model reasoning with actions in external systems through discoverable skills and asynchronous background tasks. It covers skill registration, task lifecycle orchestration, capability negotiation, a recommended architecture, key engineering practices, security and audit governance, and practical adoption guidance for building reusable, observable, and controllable AI task execution platforms.
1. Background: From “Answering” to “Executing”
In the past, model applications were mainly focused on dialogue, question answering, and content generation. To become a usable agent, a system must not only understand user intent but also connect to external data, invoke business capabilities, execute long-running tasks, and track, audit, and roll back the execution process. The core value of an open protocol upgrade is to connect “model reasoning” with “actions in external systems”: on one hand, agents can discover and invoke professional skills on demand; on the other hand, long-running tasks can be executed asynchronously in the background, overcoming the limits of single-request duration, connection stability, and interaction experience.
From a technical evolution perspective, the initial focus of these protocols was to unify access to external data and systems and reduce integration costs across different clients and capability services. As agent applications moved deeper into business workflows, the protocol layer expanded to cover skill descriptions, task lifecycles, status notifications, and extension capability negotiation. It is important to emphasize that such capabilities should be implemented through open specifications and their extensions rather than being exclusive to a single model or client. As long as a capability server follows a compatible specification, it can be reused by multiple compatible clients, avoiding duplicate development and ecosystem fragmentation.
2. Upgrade Highlights: Skill Invocation, Background Tasks, and Open Interoperability
2.1 Professional Skill Registration and On-Demand Discovery
A professional skill is not a simple function list. It is a capability unit with semantics, constraints, and governance information. A usable skill description typically includes the capability name and description, input/output schema constraints, version number, permission scopes, whether it produces side effects, timeout, whether background execution is supported, idempotency requirements, and error code conventions. When planning a task, the client first reads the capability list and then selects an appropriate skill based on user intent. At runtime, it can also discover new skills on demand to reduce context usage.
Three design considerations matter. First, skill granularity should be appropriate: overly fine-grained skills lead to long invocation chains, while overly coarse-grained skills weaken permission control and reusability. Second, inputs and outputs must be verifiable so that parameters generated by the model do not pass directly into business systems. Third, versioning and compatibility strategy should be designed upfront: new fields should remain backward compatible, and breaking changes should be released through new versions of the capability.
2.2 Unified Orchestration of Synchronous Calls and Background Tasks
Short tasks are suitable for synchronous calls: the client submits parameters, and the server returns the result immediately after computation. Long tasks are better suited for background execution: the client submits a task and receives a task handle, then obtains progress and results through status queries, event streams, or callbacks. The background task model needs a clear lifecycle, such as submitted, running, succeeded, failed, cancelled, and expired, and should support cancellation, timeout, retry, and result retention policies.
Background execution is not simply putting requests into a queue; it is a complete task governance problem. The system needs to handle idempotent submission, duplicate callbacks, task recovery, concurrency limits, failure retries, and dead-letter handling. For write operations, human confirmation or approval steps should also be introduced to ensure that agents do not modify critical business data without authorization.
2.3 Open Specifications and Multi-Client Interoperability
Open protocols usually evolve through a “core specification + optional extensions” model. The core specification ensures consistency of basic invocation and status semantics, while extensions are used for enhanced scenarios such as skill discovery, background tasks, and event notifications. Clients and servers should negotiate capabilities: both sides declare supported versions and extensions, and fallback strategies should be used when capabilities are missing, such as degrading background tasks to polling or degrading complex output to a summary result.
The direct benefit of this design is that a capability server is implemented once and can run across multiple compatible clients. Enterprises can also connect different agent applications under the same governance framework, reducing lock-in risk and improving portability.
3. Recommended Architecture and Execution Flow
A practical agent task platform typically includes the following roles:
- Agent orchestration layer: responsible for intent understanding, task planning, skill selection, and result integration.
- Protocol gateway: responsible for identity authentication, permission checks, parameter validation, routing, rate limiting, auditing, and compatibility negotiation.
- Capability service layer: encapsulates business systems, data sources, and professional tools, and provides standardized skills.
- Task scheduler and queue: handles background tasks and controls concurrency, retries, and timeouts.
- Result and event storage: stores task status, event records, and final artifacts.
- Monitoring and audit layer: records invocation chains, metrics, logs, and security events.
A typical flow is as follows: the user states a goal, the orchestration layer generates a plan and discovers skills; the gateway validates permissions and parameters and then submits the task; short tasks return synchronously, while long tasks enter the background queue; the client obtains status through event streams or polling; after the task completes, the result is returned to the agent after sanitization and format validation; the entire process is written to audit records.
4. Key Engineering Practices for Background Tasks
The following illustrative pseudocode focuses on the protocol interaction pattern rather than a specific API implementation.
Capability description (illustrative)capability = {name: "report generation",version: "1.0",input_schema: {...},output_schema: {...},side_effect: "write",supports_background: true,idempotency_required: true,permission_scopes: ["report:generate", "object-storage:write"]}Submit a background task (illustrative)task = protocol_gateway.submit(capability = "report generation",parameters = {...},idempotency_key = request_unique_id,callback_policy = "event_stream")while task.status is not terminal:event = task.read_event(timeout = 30s)handle(event)if task.status == "success":result = task.read_result()else:execute retry or fallback strategy
Implementation should focus on the following considerations:
- Idempotency: The submission interface must support idempotency keys to avoid duplicate execution caused by network retries; write operations should persist idempotency records on the business side.
- Status persistence: Task status should be stored in reliable storage and recoverable after service restarts; event streams should be replayable or support resumable reads.
- Timeout and cancellation: Each skill declares its maximum execution duration, and the gateway sets an overall timeout; cancellation should be propagated to the execution unit and temporary resources should be cleaned up.
- Retry strategy: Only retryable errors should be retried with exponential backoff, and write-operation retries must be combined with idempotency and human confirmation.
- Backpressure and quotas: Set concurrency and quotas by user, application, and skill dimension to prevent long-running tasks from exhausting resources.
- Result management: Large results should be stored in general object storage or a result service, and the protocol should only pass references, summaries, and expiration times.
5. Security, Permissions, and Audit Governance
Skill invocation means that models can affect real systems, so security boundaries must be designed upfront. The first principle is least privilege: each skill is bound to explicit permission scopes, the gateway authorizes based on user identity, application identity, and task context, and sensitive operations require secondary confirmation or approval. The second principle is input/output validation: all parameters must be validated against schema constraints, and output results must be sanitized, truncated, and type-checked to prevent untrusted content from contaminating subsequent reasoning.
Prompt injection and tool misuse must also be addressed. Content from external systems should be treated as untrusted data and must not directly override system instructions. Write operations should use allowlists and human confirmation. Secrets should be injected by the gateway or a key management service and must not enter the model context. For auditing, at minimum record the caller, agent identifier, skill name and version, parameter summary, task identifier, execution status, duration, and result summary, and support tracing and compliance export.
6. Developer Adoption Recommendations
When adopting this approach, enterprises should first inventory existing capabilities, classify them as read-only, write, or high-risk, and start with low-risk scenarios such as queries, retrieval, and reporting before gradually introducing write operations and long-running background tasks. API design should be contract-first: define capability descriptions and error codes before implementing the server. Contract tests should also be established to cover parameter validation, permissions, timeouts, cancellation, and retries.
On the client side, support capability negotiation and fallback, and do not assume that all servers support every extension. Set reasonable polling intervals or event subscription strategies for background tasks to avoid idle spinning. For observability, pass request identifiers and task identifiers consistently, and establish metrics for success rate, wait time, execution duration, retry count, human intervention rate, and cost. Finally, maintain compatibility with open specifications and avoid binding business logic to a single client so that capability services can be reused across multiple compatible environments.
7. Conclusion
The significance of an open protocol upgrade is not just adding two features, but moving agents from “generating answers” to “reliably executing tasks.” Professional skill invocation solves the problem of capability access, background tasks solve the problems of long duration and stability, and open interoperability solves ecosystem reuse and governance. For developers, capability services should be built according to the principles of protocolization, idempotency, observability, and security first. For enterprises, the approach should be to pilot low-risk scenarios, govern through a unified gateway, and reduce lock-in risk through open specifications. This is how an AI task execution platform can be both extensible and controllable enough for production environments.
