Open-Source AI Agent Runtimes: Trends and Development Foundation Practices

    This article examines the shift from "model as product" to "runtime as engineering" in AI agent development. It explains the core responsibilities of an agent runtime, why a microkernel plus plugin architecture has become a common choice, and how two open-source agent foundations differ in their approach. It also offers practical guidance for secondary development, covering contract design, context budgeting, side-effect isolation, observability, and evaluation-driven iteration.

    1. From “Model as Product” to “Runtime as Engineering”

    Recently, two open-source AI agent foundation projects aimed at developers have emerged from different technical teams. Despite their different origins, they send a highly consistent signal: the competitiveness of coding agents is shifting from “whether the model can answer correctly” to “whether the system can finish the task.”

    This change can be expressed with a simplified formula:

    1. Agent = LLM (inference core) + Harness (runtime body)

    The LLM is responsible for understanding intent, planning steps, and generating code. The runtime is responsible for turning these “ideas” into executable, rollback-capable, and observable engineering behavior. As model capabilities gradually converge and interfaces become standardized, the quality of the runtime becomes the key variable that determines the upper limit of the agent product experience.

    2. What the Runtime Actually Does

    It is not an exaggeration to think of the runtime as the “operating system of an agent.” It covers at least six responsibilities:

    1. Task decomposition and plan management: Breaking vague requirements into verifiable sub-goals, and maintaining plan state and dependencies.
    2. Tool scheduling: Uniformly registering, discovering, and invoking external capabilities, handling input validation, timeouts, rate limiting, and result normalization.
    3. Permissions and sandboxing: Applying least-privilege constraints to the file system, network, and command execution to prevent misoperations and privilege escalation.
    4. Exceptions and retries: Distinguishing retryable errors from semantic errors, designing backoff strategies, and preventing infinite loops and duplicate side effects.
    5. Session memory: Distinguishing short-term context, task-level working memory, and long-term knowledge, and controlling context budget and compression strategies.
    6. Plugin and extension lifecycle: Loading, version compatibility, hot updates, unloading, and resource reclamation.

    If any of these six responsibilities is missing, an agent will look smart in a real engineering setting but turn out to be fragile in use.

    3. Microkernel + Plugins: Why It Became the Common Choice

    Both open-source foundations adopted a “microkernel + fully plugin-based” structure: the kernel keeps only a minimal scheduling loop, while tools, memory, UI, and sandbox policies are all integrated as plugins. There are three reasons:

    • Replaceability: Models iterate quickly, and a plugin-based design makes the model layer pluggable, avoiding tight coupling with a specific inference interface.
    • Governability: Cross-cutting concerns such as permissions, auditing, and rate limiting are centralized in the plugin layer, making it easier to enforce unified policies.
    • Evolvability: The kernel interfaces stay stable, so ecosystem extensions do not require changes to the main trunk, reducing long-term maintenance costs.

    A schematic kernel loop can be abstracted as:

    1. def agent_loop(task, ctx):
    2. plan = planner.decompose(task) # Plugin: task planning
    3. while not plan.done():
    4. step = plan.next()
    5. result = executor.run(step, ctx) # Plugin: tool execution + sandbox
    6. if result.needs_retry:
    7. result = retry_policy.handle(result) # Plugin: retry policy
    8. memory.write(step, result) # Plugin: memory
    9. plan.update(result)
    10. return plan.summary()

    The kernel is only responsible for “take a step, execute, write back, update the plan,” while all other capabilities are pushed down.

    4. Differences Between the Two Foundation Approaches

    Based on public descriptions, the two foundations differ slightly in orientation: one emphasizes extreme modifiability, with the loop, tools, memory, and UI all replaceable, making it suitable for building your own agent product from scratch; the other is closer to a general-purpose coding assistant scenario, emphasizing an out-of-the-box engineering loop. When choosing, developers should not fixate on “which one is stronger” but instead answer three questions:

    • Am I building a product or an internal efficiency tool? For the former, prioritize modifiability; for the latter, prioritize the out-of-box experience.
    • Where is my compliance boundary? When code assets and network access are involved, sandbox and audit capabilities carry more weight.
    • Does the team have runtime maintenance capability? The cost of plugin-based freedom is that you must take on the kernel’s evolution yourself.

    5. Practical Advice for Secondary Development

    1. Define contracts before writing plugins: Clarify the tool registration protocol, error code conventions, and context read/write interfaces to avoid major rework later.
    2. Set the context budget first: Define token limits and compression rules for memory and retrieval to prevent quality degradation in long tasks.
    3. Isolate side effects: Grant separate authorization domains for writing files, executing commands, and making network requests, with default deny.
    4. Build in observability: Log the plan, invocation, duration, and failure reason of each step in a structured way to support replay and evaluation.
    5. Drive iteration with evaluation: Establish a fixed task set and pass-rate metrics, and use data to decide on plugin strategy adjustments.

    6. Conclusion

    The open-sourcing of agent foundations essentially turns “agent engineering” from a black box into an assemblable engineering system. For developers, the real opportunity lies not in chasing a particular project, but in understanding the responsibility boundaries of the runtime and building your own governable agent body on that basis. If you need to support large-scale invocation and team collaboration, you can combine general cloud capabilities such as container platforms, object storage, logging services, and monitoring and alerting to turn the agent foundation into engineering infrastructure that can evolve sustainably.