The Evolution of AI Agent Execution Frameworks and Plugin-Based Practice

    This article traces the shift from fixed workflow orchestration to intelligent agent scheduling, and lays out a practical reference architecture for production execution frameworks. It covers the six core layers (model, protocol, tool, context, sandbox, and observability), declarative tool registration with risk tiers, context engineering techniques such as layered injection and externalized artifacts, and the metrics needed for evaluation and iteration. Readers will also find deployment guidance for building these capabilities on cloud infrastructure.

    1. Where the Problem Starts: Excess Capability, Missing Delivery

    Over the past two years, model capabilities have grown faster than most people expected. Yet turning “can answer” into “can deliver” remains difficult. The bottleneck is not reasoning itself but the distance between the model and the real world: file systems, terminals, browsers, corporate intranets, databases, and messaging channels. These execution surfaces have long been absent.

    When people hear “execution framework,” they usually think of AI coding tools first. That is understandable, since code is the most easily verified form of executable text. Compilation, testing, and static analysis all provide objective feedback, making code a natural proving ground for agent capabilities. But treating such frameworks as mere coding assistants underestimates their generality. As long as a task can be broken into a loop of read values, invoke capabilities, validate results, and retry with corrections, the same framework can transfer to report generation, data cleaning, operations inspection, and content production.

    A common misconception is that “the current setup is good enough; we just haven’t felt the lack yet.” The gaps surface immediately once you discuss concrete tasks: how to resume a long workflow after a mid-way failure, how to arbitrate when multiple tools return conflicting results, how to constrain cost, and how to accept or reject results. None of these are model capability problems. They are framework design problems.

    2. From Fixed Orchestration to Intelligent Scheduling: A Shared Bottleneck for Workflow Products

    Encapsulating capabilities into composable units is not a new idea. Plugin-based workflow platforms were very popular a few years ago, stitching together nodes to build customized functions. Their ecosystems ranged from lightweight content production pipelines to fairly complex enterprise-grade processes. The open-source community has similar graphical orchestration tools, with nodes and templates contributed continuously by developers. The same class of problem often has multiple implementations, each adapted to its own data shapes and constraints. The value of this “everything is a plugin” approach lies in serving highly specific scenario needs.

    But fixed orchestration has two structural flaws:

    1. Stability and intelligence trade off against each other. Hard-coded paths yield stable results but cannot handle shifts in input distribution. Improving adaptability requires introducing branches and decisions, and orchestration cost rises quickly until you end up with a rule tree that is hard to maintain.
    2. There is no high-intelligence scheduling layer. Nodes only handle “what to do,” not “when to do it, whether to do it, or how to back off after a failure.” When a task requires cross-system collaboration, the orchestrator is forced to hard-code scheduling logic into the flow.

    The declining usage of these platforms over the past two years is not fundamentally about a weak plugin ecosystem. It is about the missing scheduling layer. A viable evolution is to keep plugins as “capability atoms” and hand decision-making to an agent with planning ability, letting it dynamically choose the next action based on intermediate results.

    3. A General Reference Architecture for Execution Frameworks

    A production-ready execution framework can usually be abstracted into six layers:

    • Model layer: handles planning, selection, and generation, and can switch between models of different parameter sizes and inference budgets.
    • Protocol layer: defines the invocation contract between models and tools, including tool descriptions, parameter schemas, return structures, and error codes.
    • Tool layer: capability atoms such as file read/write, command execution, retrieval, browser, database query, and message notification.
    • Context layer: manages the injection and trimming of prompts, history, retrieved snippets, and intermediate artifacts.
    • Execution sandbox layer: isolates the runtime environment and controls network, file system, and resource quotas.
    • Observability and evaluation layer: records traces, metrics, and replay data for regression and tuning.

    Tool registration can stay declarative, avoiding scattered invocation logic in business code:

    1. # Example: declarative tool registration; define fields per your own protocol
    2. TOOLS = [
    3. {
    4. "name": "read_file",
    5. "description": "Read text content at a given path, with line-range support",
    6. "parameters": {"path": "string", "start": "int?", "end": "int?"},
    7. "handler": read_file_impl,
    8. "risk": "low",
    9. },
    10. {
    11. "name": "run_command",
    12. "description": "Execute a command in the sandbox and return stdout and exit code",
    13. "parameters": {"cmd": "string", "timeout": "int?"},
    14. "handler": run_command_impl,
    15. "risk": "high", # requires approval and stricter quotas
    16. },
    17. ]

    Risk tiering is an often-overlooked piece. Layering tools by “read-only / write / irreversible,” combined with approval and quotas, can keep the blast radius of incidents controllable without sacrificing efficiency.

    4. Context Engineering: The Real Variable That Decides Success

    Switching context strategies for the same model often produces a larger difference in task success rate than switching models. Key practices:

    • Layered injection: organize system constraints, task goals, environment facts, and retrieved evidence separately to avoid cross-contamination.
    • Externalized artifacts: write large files and long logs to temporary artifacts and return only summaries and paths, preventing context from being filled with noise.
    • Structured memory: write reusable conclusions into tagged memory entries instead of replaying entire history.
    • Resumable failures: persist the plan and completed steps so that after an interruption you can recover from a checkpoint rather than rerun from scratch.

    5. Evaluation and Observability: No Measurement, No Iteration

    Build at least three categories of metrics: task completion rate (whether acceptance passes), process cost (number of steps, tokens, and tool calls), and security incident count (unauthorized access, blocked dangerous commands). Also retain trace replay so failed samples can be accumulated into a regression set. A practical approach is to start with a small fixed task set for smoke testing, then gradually expand to real business samples, rather than judging a framework by subjective feeling.

    6. Deployment Advice and Cloud Support

    To build this capability on the cloud, combine general-purpose categories: a container platform to host sandboxes and elastic scaling, object storage for artifacts and traces, a message queue to decouple and retry long tasks, logging and monitoring/alerting for observability, and key and permission management to consolidate credentials. Baidu AI Cloud offers corresponding capabilities across these general infrastructure categories, and you can select based on your own compliance and cost requirements.

    In one sentence: the model sets the upper bound of intelligence, while the execution framework determines whether you can reliably reach that bound. Treating plugins as capability atoms, handing scheduling to the agent, and treating context and evaluation as first-class citizens is the pragmatic path to building usable agents in 2026.