The Next Step for AI Agents: Standardized Skills and a Persistent Runtime
This article examines why combining a large model with an outer execution framework is no longer sufficient for running AI agents in production, and outlines three directions for the next stage of agent engineering: standardized skill packaging, a state-aware persistent runtime, and production-grade multi-agent orchestration. It explains the contracts, idempotency requirements, checkpointing, observability, and governance models involved, presents a layered reference architecture, and recommends a three-phase evolution path along with common pitfalls to avoid.
1. The Problem: Why “Model + Execution Framework” Is No Longer Enough
The industry has gradually converged on a shared view: a usable agent system equals a large model that provides reasoning and decision-making, plus an outer execution framework that provides runtime support. The execution framework typically handles context assembly, tool invocation, error recovery, state persistence, and safety checks. It constrains unstable model output into a predictable execution flow so that long-running tasks do not collapse midway. Precisely because this layer has matured, enterprises have become willing to put agents into real business workflows.
But if the goal is not to “get a demo working once” but to “run stably over the long term in real business,” this layer alone is still not enough. Production environments continuously expose three classes of problems:
- Hard to reuse capabilities: every time the scenario changes, prompts, tool descriptions, and flow control must be rewritten, so capabilities cannot accumulate.
- Not sustainable at runtime: process restarts, node scaling, and network jitter all interrupt tasks, and there is no recoverable execution semantics.
- Uncontrollable collaboration: when multiple agents run in parallel, there is no unified constraint on who does what at which stage, how conflicts are resolved, or how failures are rolled back.
The period around 2025 can be seen as the starting point of agent engineering: most teams tried to cover every problem with stronger model capabilities, chasing new models with more parameters and stronger reasoning. Engineering practice soon showed that improvements in model capability are continuous and gradual, while production deployment demands determinism and governability. The gap between the two is exactly what the next stage of technology must address.
2. Direction One: Standardized Skill Packaging
A “skill” means solidifying a class of reusable ways of doing things into a module with an explicit contract: what the inputs are, what the outputs are, what is returned on failure, which permissions are required, and roughly how many resources are consumed. The difference from a “tool” lies in the level of abstraction: a tool is an atomic action (read one record, send one request), while a skill is a capability with process semantics (complete one reconciliation, generate a weekly report, handle one support ticket).
Standardization delivers value in four main ways:
- Reusable: the same skill is shared by multiple agents and multiple flows, avoiding duplicate implementation.
- Testable: once the contract is explicit, a fixed set of inputs can be used for regression validation, so quality no longer depends on “feel.”
- Governable: permissions, data scope, and audit fields are declared with the skill rather than scattered across prompts.
- Replaceable: a skill implementation can be swapped out entirely (for example, a different retrieval strategy) without changes to the upper-level flow.
A recommended skill description structure is shown below (illustrative, not a specific product interface):
skill:name: invoice_reconcileversion: 1.3.0intent: Reconcile orders and payment records line by line and flag discrepanciesinputs:- name: order_rangetype: objectrequired: trueoutputs:- name: diff_listtype: arraypermissions: [read_order, read_payment]budget: { max_steps: 40, max_tokens: 60000 }failure_policy: retry_then_fallbackaudit_fields: [trace_id, operator, data_scope]
Two things to watch during adoption: skill granularity should not be too fine, or orchestration costs spike; nor too coarse, or the internal logic cannot be reused or tested. In practice, “one business action that can be accepted independently” is a sound level of granularity. In addition, a skill must declare its idempotency and side-effect level, which directly determines whether it can be safely re-executed during retries and rollbacks.
3. Direction Two: A State-Aware Persistent Runtime
The goal of a persistent runtime is to give an agent’s execution process the semantics of “interruptible, recoverable, and observable.” Its difference from a traditional workflow engine lies in being “state-aware”: the runtime not only records which step a task has reached, but also understands the semantic state of each step (waiting for human confirmation, waiting for an external callback, completed but not yet submitted).
The core design points include:
- Event-based execution: write every decision, tool call, and result as a sequenced event, so the execution history is a replayable log.
- Checkpointing: save snapshots at key points and resume from the most recent checkpoint instead of starting over.
- Idempotency and deduplication: every side-effecting action carries an idempotency key to avoid duplicate orders or duplicate sends after recovery.
- Timeouts and compensation: define timeouts, retry limits, and compensation paths (Saga-style rollback) for each class of action.
- Layered context: manage short-term context (current step), mid-term context (task summary), and long-term context (structured memory in external storage) separately to avoid unbounded context growth.
An illustrative state machine and recovery logic:
class TaskState:def __init__(self, task_id):self.task_id = task_idself.step = 0self.phase = "RUNNING" # RUNNING / WAITING / DONE / COMPENSATINGself.events = []def checkpoint(self, store):store.save(self.task_id, {"step": self.step,"phase": self.phase,"events": self.events[-200:], # keep snapshot size under control})def resume(task_id, store):snap = store.load(task_id)if snap is None:return start_new(task_id)state = TaskState(task_id)state.step, state.phase, state.events = snap["step"], snap["phase"], snap["events"]return continue_from(state)
Engineering practice must also emphasize observability: write the basis for each decision, the referenced context fragments, and tool return codes into a unified logging service, and connect it to monitoring and alerting to form closed-loop tracing of “input-decision-action-result.” Without this chain, fault localization is guesswork.
4. Direction Three: Production-Grade Multi-Agent Orchestration
When a task requires multiple specialized capabilities to work together, multi-agent orchestration becomes necessary. The essential difference between production-grade orchestration and “running a few more instances” is whether the governance model is complete. At minimum, it should include:
- Roles and responsibility boundaries: each agent is responsible only for responsibilities that can be explicitly accepted, avoiding overlap that leads to mutual overwriting.
- Scheduling and concurrency control: distinguish serial dependencies from parallel branches, and set global and per-role concurrency limits to prevent a single branch from consuming all resources.
- Shared state and conflict resolution: use version numbers or lease mechanisms for shared data, and resolve conflicts by a predefined priority rather than letting models negotiate on their own.
- Human intervention points: place confirmation gates before high-risk actions, separating “model judgment” from “human authorization.”
- Cost and quotas: set budgets per task and per role, and degrade or terminate when limits are exceeded to keep long-running tasks from spiraling out of control.
- Full-chain tracing: link the behavior of all agents with a unified trace identifier for replay and auditing.
A simplified orchestration skeleton:
def orchestrate(task):plan = planner.skill("task_decompose").run(task) # decompose and annotate dependenciesresults = {}for stage in plan.stages: # serial stagesif stage.parallel:results[stage.name] = run_parallel(stage.agents, stage.input) # parallel branchelse:results[stage.name] = run_serial(stage.agents, stage.input)runtime.checkpoint(task.id) # stage-level checkpointif stage.requires_human:results[stage.name] = human_gate(results[stage.name])return summarizer.skill("result_merge").run(results)
5. A Layered Reference Architecture
Combining the three parts above yields a clear layered structure:
- Model layer: responsible for reasoning, planning, and language expression; replaceable and eligible for canary upgrades.
- Skill layer: standardized capability units with contracts, permissions, budgets, and audit fields.
- Runtime layer: persistent execution, checkpoints, retry and compensation, and layered context management.
- Orchestration layer: multi-role scheduling, conflict resolution, human gates, quotas, and tracing.
- Infrastructure layer: a container platform to host execution, object storage to hold snapshots and artifacts, a message queue to decouple asynchronous stages, and logging and monitoring to provide observability.
The point of this layering is that “change is isolated”: swapping the model does not affect skills, changing a skill does not affect orchestration, and scaling the runtime does not require rewriting business logic.
6. Evolution Path and Common Pitfalls
A three-phase approach is recommended rather than a one-time rewrite:
- Phase one: make the execution process event-based and connect it to unified logging and tracing, solving the “invisible” problem.
- Phase two: abstract high-frequency business actions into standardized skills, and establish contract tests and version management.
- Phase three: introduce the persistent runtime and multi-agent orchestration, gradually opening up the proportion of parallelism and automation.
There are three common pitfalls: treating prompts as assets without versioning or testing; pursuing the number of agents first while ignoring responsibility boundaries and resolution rules, which amplifies errors; and enabling automatic retries without idempotency design, which causes duplicate side effects.
7. Conclusion
The goal of deploying agents is always controllable, standardized, and governable enterprise applications. The execution framework solved “whether it can run stably,” while the key to the next stage lies in the standardized accumulation of skills, state-aware persistent execution, and governable multi-agent collaboration. With the general-purpose capabilities of cloud platforms such as Baidu AI Cloud (for example, container platforms, object storage, message queues, and logging and monitoring services), teams can focus their effort on business semantics and governance rules, moving agents from “demo-ready” to truly “deliverable.”
