An open source agent runtime is the layer that executes an agent's loop (model call, tool call, result, next step) inside an isolated environment you control, with the code published under an open license. For teams that need several models and harnesses in production, the practical answer is a runtime built on an open protocol with a self-hosted edition, plus a managed cloud for the workloads you do not want to operate yourself. HarnessRouter's Community Edition is the open-source, self-hosted side of that model, and the HarnessRouter Cloud plans cover the hosted side with the same unified interface.
This article defines the term precisely, lists the capabilities a runtime has to provide, explains the isolation and credential work that self-hosting requires, and gives the cost model so you can decide what to run yourself.
HarnessRouter
Run Agents on an Open Protocol
HarnessRouter brings harnesses, models, tools and isolated sandboxes together through a unified interface built on the open Unified Harness Protocol.
VisitTL;DR
- An agent runtime operates execution, session state and tools. An agent SDK can supply the loop and session features, so the responsibilities can overlap.
- "Open" can mean open SDK code, open model weights, or an open runtime. Check which one a project actually offers.
- Containers alone are not a sufficient isolation boundary for agent-generated code. Plan for stronger sandboxing, scoped credentials and separate authorization.
- Self-hosting costs extend beyond compute to idle capacity, storage, networking, setup, maintenance and staffing.
- HarnessRouter provides one API across 30+ harnesses, an open protocol (UHP), a self-hosted Community Edition and a cloud with a free tier.
What an open source agent runtime is
Three terms get used interchangeably and should not be.
The harness is the program that runs the agent loop: it sends the prompt to a model, interprets tool calls, executes them and feeds results back. Codex, Claude Code and similar coding agents are harnesses. A reference architecture published in October 2026 separates the harness from an agent application framework, which adds project structure, development tools, evaluations, packaging, deployment and runtime support.
A model client SDK supplies API primitives, while an agent framework or SDK can also run the loop, manage sessions and expose lifecycle hooks. Deployment, isolation and persistence guarantees depend on the specific implementation and configuration. For example, the Claude Agent SDK includes the agent loop, sessions and hooks.
The runtime is what executes and keeps the agent alive in production: it provisions the environment, starts the harness, stores the session, handles files, enforces limits and tears things down. The same architecture paper describes a platform layer that turns a tested project into an immutable release and operates long-lived instances with durable workspaces, identity, security controls, governance, observability, evaluation and fleet management.
| Component | Responsibilities can include | Check separately |
|---|---|---|
| Model client SDK | Model API requests and responses | Who implements the loop and sessions |
| Agent SDK or framework | Agent loop, tools, sessions and lifecycle hooks | Deployment, persistence and sandbox guarantees |
| Production runtime | Operating execution, files and lifecycle | Configured isolation, credentials and network policy |
Three meanings of "open"
A November 2026 reference on agent SDKs distinguishes open-source SDK code, self-hosted model weights and an independently built runtime or harness as separate meanings of "open". The label alone does not establish that the model or its runtime is open. When you evaluate a project, answer three questions separately:
| Question | What it tells you |
|---|---|
| Is the runtime code published and available to self-host? | Whether you can operate it in your own infrastructure |
| Can you swap the model and provider? | Whether you are locked to one vendor's inference |
| Is the interface to harnesses a documented protocol? | Whether you can replace the harness without rewriting your product |
The third question is where a protocol matters. HarnessRouter was built on the open Unified Harness Protocol (UHP), which defines a shared task, session, streaming, file and result contract across supported harnesses. Model, provider, skill, tool, plugin, memory and environment configurations still require compatibility with the selected harness. For how that protocol relates to tool-level standards, see the UHP vs MCP comparison.
What a runtime has to provide
When a team moves from a prototype that runs on a laptop to a product feature that serves customers, the missing pieces are rarely the agent logic. They are operational. A production-grade runtime covers:
- Environment provisioning. Untrusted execution needs an appropriate isolation boundary with the right files, packages and network rules. Provision and retire environments according to the task and session lifecycle, preserving the state needed for continued work.
- Session management. Persist conversations and recoverable workspace state, and define what can resume after a restart or handoff. Live processes and external tool actions may not be recoverable.
- File handling. Inputs, outputs and workspace contents need to move in and out of the sandbox predictably.
- Plugin and tool support. Supported skills, tools and plugins should be configurable without rebuilding your product integration. Check each harness and package for compatibility and permission requirements.
- Model and provider routing. The same compatible task should be runnable against supported models, with your own API keys if you prefer.
- Observability. Traces, token counts, latency and tool calls need to be recorded so failures can be diagnosed and audited. HarnessRouter's guide to what to trace, measure and audit goes through this in detail.
- Benchmarking. Quality, latency and cost differ between harness and model combinations, so you need a way to compare them on your own tasks.
The broader architecture, including controls and costs, is covered in AI agents in production and infrastructure for AI agents.
Integrating multiple models, harnesses and tools
The integration problem is combinatorial. Each harness has its own session format, file conventions, plugin mechanism and way of calling models. Each model provider has its own authentication and rate behavior. If your product hard-codes one harness, replacing it later means rewriting the integration. If you support three, you maintain three.
A unified interface collapses that. In HarnessRouter, supported, compatible harness, model, provider and module configurations sit behind one API. Teams use tracing and task results to compare and choose a Harness × Model configuration for quality, latency or cost. HarnessRouter Cloud runs that configuration in a managed, isolated sandbox. It supports 30+ harnesses, including Codex, Claude Code, Hermes, DeepSeek and Pi, and the list continues to grow. Individual harness pages, such as Continue, QwenPaw, OpenSquilla and pool, describe each entry's integration and availability status.
A useful integration design has these properties:
- One request shape. Your product sends a task and receives a session, regardless of which harness runs it.
- Selection by objective. Compare quality, latency and cost on your own tasks, then keep the supported choice in your agent configuration.
- Key ownership. Bring-your-own-key routing keeps model billing on your provider account. On HarnessRouter Cloud, BYOK routing is free up to $25,000 a month of model usage at listed prices; a 5% routing fee applies above that volume. See current pricing.
- Benchmarks on your tasks. With supported, compatible harnesses, you can run the same task set through several combinations and compare results before committing.
If your goal is to expose agent behavior as a product feature, the AI agent API guide walks through the pattern. If you are weighing it against a general-purpose SDK, see alternatives to the Vercel AI SDK for agent harnesses and the comparison of agent SDKs, managed agents and agent CLIs.
Isolation: the part you cannot skip
An agent executes code and commands that a model generated. That makes the sandbox the central security control of any self-hosted runtime.
Why a container is not enough
The Pulumi engineering blog explains the Kubernetes Agent Sandbox project, which gives agents isolated, disposable environments backed by gVisor or Kata Containers. It points to CVE-2019-5736, a flaw in which a malicious container could overwrite the host's runc binary, as the reason plain containers are insufficient for untrusted workloads. The same post notes about one second of overhead for a fresh pod. It describes warm pools and suspend/resume, and separately discusses memory-snapshot restoration in managed GKE for sub-second startup. These are deployment-specific observations, not a startup guarantee.
That has two practical consequences for a self-hosted deployment:
- Pick a stronger isolation layer than a default container runtime, and apply it to every agent task, not only the ones that look risky.
- Budget for start-up latency. If your product is interactive, a cold sandbox on every request is visible to users. Warm pools can reduce it, but they consume idle capacity, which is a cost (see below).
HarnessRouter Cloud runs tasks in managed, isolated sandboxes, and its article on building sandboxing yourself or getting it bundled sets out the engineering involved. Community Edition runs agent CLIs in local session workspaces; self-hosting operators must configure the required host, process and network isolation.
Credentials and authorization
Two separate controls are needed. A sandbox limits what the workload can reach: files, processes, networks and credentials. Authorization decides which action a given principal may take on which resource. Neither replaces the other: a sandbox that blocks the filesystem can still let a permitted API call act on the wrong account.
In practice:
- Keep raw secrets out of the agent process. Inject scoped, short-lived credentials or route calls through a proxy that holds the real value.
- Allow network egress by an explicit list of capabilities, not an open network.
- Pin tool versions and re-review them when their descriptions or behavior change.
- Log every tool call with the principal and task that caused it.
If your organization lacks in-house security staff to design these controls, AI security consulting addresses workload isolation, secret handling and limiting what agents can do.
What self-hosting costs
The sticker price of compute understates the bill. The Modular LLM Inference Handbook's October 2026 cost guidance lists the components beyond GPUs: idle capacity, storage and networking, engineering setup, maintenance, operations and specialized staffing. It also gives an example of a regional list price: AWS listed an 8×H100 p5.48xlarge Capacity Block at about $47.76 per hour in US East as of October 2026. That is a regional snapshot, not a universal figure.
A budgeting worksheet for self-hosting should include:
| Cost line | What drives it |
|---|---|
| Compute for sandboxes | Concurrency, warm pool size, task duration |
| Model inference | Hosted API usage, or GPUs if you serve open weights yourself |
| Idle capacity | Warm pools and over-provisioned clusters |
| Storage and networking | Session history, workspaces, egress |
| Engineering and operations | Upgrades, incident response, security reviews |
| Observability | Trace storage and retention |
One swing factor is whether you also self-host the models. Calling hosted model APIs avoids operating model-serving GPUs, but runtime operations still depend on concurrency, isolation and reliability needs. Serving open-weight models on dedicated GPUs adds capacity and operational costs whose economics depend on the workload. HarnessRouter's guide to LLM inference costs breaks down what they include and how to reduce them, and the infrastructure guide covers the operating side. In a published HarnessRouter benchmark, eight Harness × Model configurations each ran the same task five times. The lowest-cost successful run cost 99.8% less than the highest-cost run. This is one task, not a general savings guarantee; compare successful completion and output quality on your own workload.
Self-hosted or managed: a decision frame
Both paths use the same open interface, so the decision is about who operates the infrastructure, not which protocol you adopt.
Self-host the Community Edition when:
- Data residency or internal policy requires that runtime execution stays inside your network. Calls to external model providers still leave that network.
- You already operate Kubernetes or similar infrastructure and have staff for upgrades and security patches.
- You want to inspect and modify the runtime source.
Use HarnessRouter Cloud when:
- You want to ship an agent feature without staffing sandbox, session and provisioning infrastructure.
- Workloads are bursty, so you want to compare a serverless runtime lifecycle with the total cost of idle capacity.
- You want to benchmark harness and model combinations before deciding what to deploy.
The shared API reduces integration changes when moving between the two. You still need destination configuration, compatible capabilities and credentials, and a plan for state and files. Community Edition's Upload to Cloud copies harness configuration, not provider keys, sessions or generated files. The steps from prototype to production are laid out in Deploying AI agents.
To run Community Edition, the official quickstart requires Docker, about 4 GB of disk and your own provider API key. Start a local instance with:
docker run -d --name harnessrouter \
-p 127.0.0.1:3000:3000 \
-v harnessrouter:/data \
harnessrouter/harnessrouter
docker logs -f harnessrouterWait for [harnessrouter] ready on :3000, then stop following logs with Ctrl+C; the container keeps running. Open http://localhost:3000, sign in as harnessrouter with the instance-generated password, and set your own password in Profile. The quickstart shows how to retrieve the generated password. Keep the loopback binding while setting up; a public deployment also needs TLS and an appropriate security configuration.
In the account menu, open Bring your own key and add your provider key. Open Start, describe the agent, save a supported harness and model setup, and send its example request. Verify that the task finishes and inspect its answer or generated files. The optional recorded examples replay a saved run; sending your own task makes model calls billed by your provider. Consult the setup guide before upgrading an existing installation.
Start with the free tier, scale on usage
HarnessRouter Cloud plans are published at harnessrouter.ai/pricing: Free at $0 per month, Developer at $20 per month, Production at $200 per month and Scale at $1,000 per month, with Enterprise available on request. Tracing (Beta) is included with Scale and is listed as a $50-per-month add-on for other plans. Short-term agent memory (Beta) is metered by GB-hour: $0.0000840 without a plan, with lower rates on paid plans. Long-term memory (Beta) is $0.0019 per memory operation, including its storage. Top-up credits carry a 5.5% processing fee, with a $0.80 minimum. BYOK routing is free up to $25,000 a month of model usage at listed prices, with a 5% routing fee above that volume. Agent work is billed for active execution; waiting for the model, user or platform is free. Check the current pricing page and checkout for applicable rates and terms.

If you want to run the runtime yourself, the Community Edition is the open-source, self-hosted option. If you would rather have it hosted, the Free plan is the quickest way to send a first task through the unified API.
Perspective
We built HarnessRouter on one observation: the agent harness is becoming a commodity layer, and products that bind themselves to a single harness inherit that harness's roadmap, pricing and limits. The durable investment is the interface above it.
That is why we initiated the Unified Harness Protocol as an open standard and published a self-hosted Community Edition. Being able to read, run and move a runtime between hosts helps you inspect it; production trust still requires an appropriate security configuration and verification.
Our position on cost follows from the same design. With supported, compatible configurations, teams can compare task quality, latency and cost before choosing a route. The recorded savings above come from one benchmark task, not a promise for every workload. Start by measuring your own tasks across combinations, then configure the supported choice.
The sandbox is the other half. HarnessRouter Cloud runs tasks in isolated sandboxes; a self-hosted operator must configure and verify the isolation appropriate to the workload. We expect the future to look like speaking a request and having an agent assembled for it in real time. An open runtime makes that inspectable, but openness alone does not make it safe.
FAQ
What is the difference between an agent runtime and an agent framework?
A model client SDK provides API primitives, while an agent SDK can also execute a loop, manage sessions and expose lifecycle hooks. A production runtime operates the deployment, files and execution lifecycle. These responsibilities can overlap; check which isolation and persistence guarantees your implementation actually provides.
Can I self-host an agent platform and still use several model providers?
Yes. HarnessRouter's Community Edition is open source and self-hosted, and supports compatible model and provider configurations through the unified interface. On HarnessRouter Cloud, BYOK routing is free up to $25,000 a month of model usage at listed prices, with a 5% routing fee above that volume.
How should I isolate agents when I deploy them myself?
Run every task in a disposable sandbox with a stronger boundary than a default container, such as gVisor or Kata Containers. Keep raw credentials out of the agent process, restrict network egress to an explicit list, and enforce authorization separately from the sandbox. HarnessRouter Cloud supplies managed, isolated sandboxes. Community Edition operators must configure and verify the isolation boundary on their own infrastructure.
What does it cost to run an open source agent runtime?
Beyond compute, budget for idle capacity, storage, networking, setup, maintenance and staffing. Hosting open-weight models on dedicated GPUs adds capacity and operational costs. HarnessRouter Cloud starts with a Free plan at $0 per month, and the full list is on the pricing page.
