Two Logics of Open-Sourcing an AI Agent Harness and the Paths to RSI
This article compares two open-source approaches to AI agent harnesses: a platform-based execution engine and a fully plugin-based agent runtime. It explains their engineering trade-offs, how code-based tool orchestration reduces context usage, and what safe recursive self-improvement (RSI) requires, then offers a practical checklist for choosing between the two.
1. Beyond the Surface: Shared Goals, Different Motivations
Recently, two organizations released their agent execution frameworks under permissive licenses. In the industry, this kind of framework is often called a harness: the surrounding engineering that hosts and runs a model.
On the surface, the two efforts start from the same premise. A model’s real capability is not determined by its weights alone. Engineering choices at the outer layer—sampling strategy, context organization, how tools are exposed, session state management, failure retries, and rollback mechanisms—can significantly amplify or weaken model performance. Open-sourcing the harness serves two purposes: it lets the model be tested in real scenarios under its full configuration, and it creates a chance to be integrated into third-party products and become a de facto standard.
Look closer at the motivations, however, and the two paths diverge sharply.
One path aims to productize and platformize the entire execution capability, so developers can complete integration by adding an upper-layer interface within an existing ecosystem. The value of this framework depends heavily on a specific model and its companion services.
The other path aims to make the question of “how an agent should loop, manage state, and compose tools” fully pluggable, with the model replaceable at runtime and even able to rewrite itself.
The former is ecosystem convergence; the latter is capability openness. Their engineering trade-offs, extension points, and risk surfaces are therefore completely different.
2. Path One: A Platformized Execution Engine and Ecosystem Lock-In
The platform approach moves responsibilities that were originally scattered across the application layer up into standardized services:
- Session and task lifecycles are managed by a resident service process, while the frontend handles only interaction and visualization.
- Inter-process communication uses standardized remote calls and standard input/output channels, so language and runtime are no longer integration barriers.
- Tool registration, permission checks, log collection, and artifact storage are provided uniformly as platform capabilities.
The engineering benefits are real: low integration cost, unified observability, and a clear upgrade path.
The structural cost is equally real. Many design decisions in the framework evolved around the capability boundaries of a specific model—for example, the granularity of context window splitting, the parallelism of tool calls, and the way structured output is constrained. Switch to a different model, and the optimal points for these parameters drift. The framework’s value as a “reference implementation” then exceeds its value as a “general-purpose foundation.” Put differently, it still runs outside its native ecosystem, but it is hard to achieve the intended performance.
Practical guidance for adopters: if your tech stack is already deeply coupled with a particular cloud ecosystem, a platform framework delivers stable returns fastest. Even so, design an abstraction and isolation layer up front to prevent business logic and proprietary interfaces from bleeding into each other.
3. Path Two: All Is Plugin and a Replaceable Agent Loop
The general open approach can be summarized in one sentence: every part of the agent runtime should be a plugin. Model access, the main loop, session and state storage, tool implementations, and policy and approval flows are all assembled through unified contracts and can be replaced or hot-swapped at runtime.
The key to this design is handing over the loop itself. Most frameworks hard-code a ReAct-style “think–act–observe” loop internally. A plugin-based approach abstracts it into an implementable interface, so developers can swap in a plan-driven loop, multi-agent collaboration, a state-machine-driven loop, or a tree-search loop. A sketch of the contract (illustrative only, not a specific implementation):
class ModelAdapter(Protocol):async def infer(self, ctx: Context, tools: ToolRegistry) -> Action: ...class Loop(Protocol):async def run(self, task: Task, model: ModelAdapter) -> Result: ...class SessionStore(Protocol):async def load(self, sid: str) -> State: ...async def commit(self, sid: str, st: State) -> None: ...
Composition is decided by configuration at assembly time. During a task, the model can even issue instructions to “switch the loop strategy” or “adjust its own prompts and toolset,” which take effect after the runtime validates them.
This openness comes at the cost of governance complexity. Version management of plugin contracts, permission boundaries, deterministic replay, and auditing must all be supplied by the adopter.
4. Code-Based Tool Orchestration: From Exposing Schemas to Generating an SDK
The conventional approach stuffs the structured descriptions of hundreds or thousands of tools into the context all at once, causing prompt bloat, selection difficulty, and wrong tool calls.
Code-based orchestration reverses this. The runtime exposes only a single entry point for executing code, along with a typed SDK generated from the currently available tools. The model then writes a program to perform multi-step calls, conditional branches, concurrency, and aggregation.
// Typed interface generated dynamically by the runtime (illustrative)const files = await tools.search({ query: "invoice", limit: 20 });const parsed = await Promise.all(files.map(f => tools.parse(f.id)));return parsed.filter(p => p.total > 0);
There are three benefits:
- Context usage drops from linear growth to a constant level.
- Multi-step orchestration is carried by deterministic code, reducing the jitter of step-by-step model decisions.
- Error handling and retries live in the code rather than depending on the model “remembering” rules.
The cost is a much higher requirement for sandboxing, resource quotas, dependency allowlists, and execution timeouts. The default posture must be no network, read-only mounts, and capped resource usage.
5. Design Essentials for Recursive Self-Improvement
When the framework itself can be modified by the model, you reach the engineering prerequisites for recursive self-improvement (RSI). What is truly needed is not “permission to change code” but a structure that can be safely rewritten:
- Capabilities are declared as a plugin manifest.
- Prompts, tool descriptions, and policy parameters are externalized as versionable configuration.
- Every rewrite produces an immutable snapshot.
- Changes must pass both an offline evaluation set and canary traffic.
- One-click rollback and diff auditing are retained.
Self-modification without an evaluation loop only amplifies random drift into systemic degradation.
6. Selection Checklist and Implementation Advice
- Clarify the goal: choose the platform approach for the fastest integration and unified operations; choose the plugin approach for cross-model portability and deep customization.
- Isolate proprietary interfaces: converge external dependencies such as model calls, storage, message queues, container platforms, logging, monitoring, and alerting into an adapter layer, keeping business code neutral.
- Establish an evaluation baseline: use a fixed task set to quantify the benefit of changes instead of tuning parameters by feel.
- Tighten security defaults: sandbox code execution, apply least privilege to tools, and require human approval for sensitive operations.
- Preserve observability: full-chain tracing and replay capability are prerequisites for long-term evolution.
The conclusion is not complicated. The two paths are not a matter of better versus worse, but a trade-off between governance cost and freedom to innovate. If you accept that the loop, state, and tool composition can all be redefined, a plugin-based framework is better suited as a long-term foundation. If you value delivery speed and operational certainty more, a platform framework is the safer choice. Either way, abstraction isolation and a closed evaluation loop are what keep you from being bound to ecosystem changes.
