Guide3 min read

Hosted vs Bring-Your-Own Runtime for AI Agents

Hosted vs bring-your-own runtime for AI agents: Naïve is runtime-agnostic — governance applies at the tool-call boundary either way. Compare both paths.

Read the docs →

/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
/hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted /hosted
Guide
TL;DR
  • Where an AI agent runs and how its actions are governed are separate decisions on Naïve.
  • Governance caps, approvals, audit, revoke — applies at the tool-call boundary, not inside the runtime.
  • Bring-your-own runtime (BYO) is the lead path: inject governed tools into LangGraph, Eve, or your loop.
  • Naïve-hosted runtime (optional): declare a pool, start agents on microVMs, credentials injected at boot.
  • Same governance gateway either way; self-hosting does not bypass policy.
  • Pick BYO for fastest adoption; add hosted when you want Naïve to operate the compute.

Where an AI agent runs and how its actions are governed are separate questions. Naïve is runtime-agnostic: inject governed tools into your existing loop (bring your own) or optionally let Naïve operate microVMs (hosted). Either way, the governance gateway enforces spend caps, approvals, audit, and revoke at the tool-call boundary — self-hosting does not bypass policy.

This post compares both paths so you can choose without re-architecting the governed agent profile.

Why runtime-agnostic matters

Teams stall on agent infrastructure because they're asked to migrate the entire harness — swap LangGraph for a vendor runtime, rewrite tool calling, re-test every edge case. Naïve's lead path is the opposite: keep your loop, add real-world capabilities (identity, money, comms) as governed tools.

Governance lives in the gateway, not the runtime. That means Eve on Vercel, AgentCore on AWS, and a Naïve-hosted microVM all hit the same caps and approval gates when they call cards.charge.

Path A — Bring your own runtime (lead path)

Lowest friction if you already ship agents:

import { Naive } from "@usenaive-sdk/server";
const naive = new Naive({ apiKey: process.env.NAIVE_SECRET_KEY! });
 
const op = await naive.forUser(agentId).provision("support", { idempotencyKey: `op:${agentId}` });
const naiveTools = await op.tools();
 
await theirAgent.run({
  tools: [...theirInternalTools, ...naiveTools],
  task: "Resolve ticket #492. Refund if policy allows.",
});

A refund still routes through the gateway — capped, approval-routed above threshold, audited, instantly revocable. See introducing the Naïve SDK and launching the developer platform.

Authenticate the connection safely: mint a short-lived MCP session per tenant instead of embedding your workspace key in the runtime.

When BYO fits

  • You already run LangGraph, CrewAI, custom Python, or a vendor agent framework.
  • You want governed real-world actions this quarter, not a runtime migration.
  • Your customers host agents in their own cloud and you provide the policy layer.

Path B — Naïve-hosted runtime (optional)

Declare a pool, start agents on isolated containers:

await naive.runtime("pool").start(op.id, { goal: "Triage support email." });

Inside a hosted agent, use @usenaive-sdk/runtime:

import { agentProfile } from "@usenaive-sdk/runtime";
const tools = agentProfile.tools();
await runAgentLoop({ tools, goal: "Resolve tickets. Refunds over $50 route to a human." });

Credentials are injected at boot — never on the agent's filesystem. The container is sealed to a per-agent-profile scoped key, not your company key.

Hosted runtime is enabled per deployment. When not configured, start() returns a clear error directing you to BYO — governance is identical either way.

Hosted billing note

A claimed hosted-runtime container is duration-metered: 2 credits per vCPU-hour plus 0.25 credits per GB-hour (per published docs). Default sizing is 1 vCPU / 2 GB. BYO incurs no Naïve runtime metering — you pay your own compute; Naïve meters the governed actions.

When hosted fits

  • You want Naïve to operate agent compute without building a Firecracker fleet yourself.
  • Multi-agent systems with a declared topology (startSystem) and shared budget.
  • You prefer credentials injected by the platform over managing runtime env vars.

Comparison

BYO runtimeNaïve-hosted
Adoption frictionLowest — add tools to existing loopRequires pool setup + deployment config
GovernanceGateway on every tool callSame gateway
CredentialsSession or scoped tools from SDKInjected at boot via @usenaive-sdk/runtime
Compute billingYour infraNaïve runtime_usage credits
RevokeagentProfile.revoke()Same — tears down hosted slot

Two planes, one policy

Naïve separates business-action governance (budgets, approvals, audit, revoke — the differentiated layer) from system governance (microVM network/filesystem isolation on hosted paths). BYO adopters get the business layer immediately; hosted adds the system layer when you opt in.

The governance gateway docs explain how policy maps to Account Kits, approvals, and revoke.

A practical adoption sequence

  1. BYO + one primitive — provision a profile, inject op.tools(), gate card issue on approval.
  2. Sessions — replace workspace keys in MCP clients with per-user sessions.
  3. Hosted (if needed) — declare a pool when you want Naïve to run the loop, not just govern it.

If you're building into multi-tenant SaaS, BYO per customer runtime + Naïve governance is usually the first production shape.

Where to go next

Pick BYO unless you have a concrete reason for hosted compute now. The runtime docs cover pools, startSystem, and BYO examples. The governed agent profile shows how runtime choice fits the full lifecycle.

Frequently Asked Questions
What is bring-your-own runtime for AI agents?+
It means keeping your existing agent harness — LangGraph, Vercel Eve, AWS Bedrock AgentCore, CrewAI, or a custom loop — and injecting Naïve's governed tools from an agent profile. Every regulated action still routes through the governance gateway with the same caps, approvals, audit, and revoke.
What is Naïve-hosted runtime?+
Optional microVM execution: declare a runtime pool in naive.config.ts, then start agents with runtime.start. Credentials are injected at boot via @usenaive-sdk/runtime — never written to the agent's filesystem. Hosted runtime is enabled per deployment; when not configured, start() directs you to the BYO path.
Does self-hosting bypass governance?+
No. Governance is at the tool-call boundary. The agent holds handles, not provider credentials; the gateway decides, executes, and records. BYO and hosted paths share identical policy enforcement.
Which runtime path should I choose?+
Start with BYO if you already have an agent stack — lowest friction, fastest time to governed real-world actions. Add hosted when you want Naïve to operate isolated compute for agents without managing infrastructure yourself.
How do governed tools integrate with my agent loop?+
Provision an agent profile, call op.tools() to get the governed toolset, and pass those tools into your run() alongside your internal tools. A refund or card charge still hits the Naïve gateway — capped, approval-routed, audited, revocable.
How does hosted runtime billing work?+
A claimed hosted-runtime container is duration-metered in credits (runtime_usage): 2 credits per vCPU-hour plus 0.25 credits per GB-hour (per published docs). Default container sizing is 1 vCPU / 2 GB. BYO runtime incurs no Naïve runtime metering.
NT
Naïve Team

Building the agent-native backend.

Keep reading
The Governed Agent Profile: End-to-End Control for AI Agents

A governed agent profile is an AI agent with identity, spend limits, approvals, audit, and instant revoke — enforced on every action. Here's the full lifecycle.

Naïve Inside Your Agent Framework (Governed Tools, Any Orchestrator)

Naïve as the governed tool layer under any agent framework — keep your orchestrator; add identity, connections, caps, and approvals via agentTools() or MCP.

Getting started with the Naïve SDK: one TypeScript client for all of agent infrastructure

The new @usenaive-sdk/server is a single, Stripe-style TypeScript client for every Naïve primitive — email, cards, apps, LLM, vault, and more — with first-class multi-tenancy and a drop-in agent toolset. A getting-started guide.

Delegated, Revocable Access with Per-User MCP Sessions

Per-user MCP sessions give AI agents delegated, revocable access — short-lived, kit-scoped credentials instead of your workspace key. Here's the pattern.

Building AI Agents Into Your SaaS: The Multi-Tenant Playbook

Building multi-tenant AI agents into your SaaS means giving each customer an isolated, governed agent. Here's the full architecture and how to ship it.

Launching the Naïve Developer Platform: existence infrastructure for AI agents

The Naïve Developer Platform turns every Naïve primitive into a multi-tenant building block for your own products. 38 primitives across 8 groups, four surfaces (SDK, CLI, MCP, REST), per-customer isolation, governance, and metered billing — so you can give every AI agent a real existence.