Security primitives that work without rewriting your agent
Runloop secures agent infrastructure at five layers: credential protection through the Credential Gateway, tool-level access control through MCP Hub, hardware-isolated compute through MicroVM Devboxes, DNS-level network enforcement, and authenticated ingress through Tunnels. Each layer is an independent primitive that works without the others, but together they form a defense-in-depth architecture that no competitor offers.
```python
import runloop
# Credential Gateway: agents use opaque tokens, never real keys
devbox = runloop.devboxes.create(
blueprint_id="bp_agent_runtime",
credentials=[
{"name": "RL_ANTHROPIC", "secret": "anthropic-api-key"},
{"name": "RL_GITHUB", "secret": "github-pat-readonly"}
]
)
# Inside the Devbox:
# os.environ["RL_ANTHROPIC"] = "opq_xyz..." (opaque, devbox-bound)
# Real key never touches the Devbox. Token dies on termination.
# MCP Hub: per-tool access control with pattern matching
mcp_config = runloop.mcp_configs.create(
name="github-readonly",
allowed_tools=["github.search_*", "github.get_*", "github.list_*"]
# github.delete_*, github.merge_* are invisible to the agent
)
``````typescript
import Runloop from 'runloop';
// Credential Gateway: agents use opaque tokens, never real keys
const devbox = await runloop.devboxes.create({
blueprintId: 'bp_agent_runtime',
credentials: [
{ name: 'RL_ANTHROPIC', secret: 'anthropic-api-key' },
{ name: 'RL_GITHUB', secret: 'github-pat-readonly' }
]
});
// Inside the Devbox:
// process.env.RL_ANTHROPIC = "opq_xyz..." (opaque, devbox-bound)
// Real key never touches the Devbox. Token dies on termination.
// MCP Hub: per-tool access control with pattern matching
const mcpConfig = await runloop.mcpConfigs.create({
name: 'github-readonly',
allowedTools: ['github.search_*', 'github.get_*', 'github.list_*']
// github.delete_*, github.merge_* are invisible to the agent
});
``````bash
# Credential Gateway: inject opaque tokens into Devbox
runloop devbox create \
--blueprint "bp_agent_runtime" \
--credential "RL_ANTHROPIC=anthropic-api-key" \
--credential "RL_GITHUB=github-pat-readonly"
# MCP Hub: define tool-level access control
runloop mcp-config create \
--name "github-readonly" \
--allow "github.search_*" \
--allow "github.get_*" \
--allow "github.list_*"
# Network Controls: DNS-level egress enforcement
runloop network-policy create \
--name "runtime-locked" \
--allow "api.anthropic.com" \
--allow "*.github.com"
```
Four infrastructure primitives for agent securit
Each layer is an independent primitive from the [Runloop Platform](/product). Together they form a defense-in-depth architecture that no competitor provides.
Opaque tokens replace real credentials on every Devbox. Bound to a single environment, expire on termination. Even if extracted through prompt injection, tokens are useless outside the originating Devbox.

Single endpoint for all agent tools with per-tool permissions via pattern matching. Restricted tools are invisible to the agent. Every invocation logged with user, tool, timestamp, and outcome.

Each Devbox runs in a dedicated MicroVM with its own kernel, filesystem, and network namespace. Hardware-enforced boundaries via custom bare-metal hypervisor. No shared compute between tenants.

DNS-level egress allowlists block all traffic to unlisted domains. Lifecycle-aware policies restrict access per stage: broad during build, locked during runtime. Every blocked connection logged.

Your agents use credentials without ever holding the
Credential theft through prompt injection is already happening in production. Prompt-injected PR comments have caused GitHub Copilot to exfiltrate AWS keys from private repositories via encoded image requests (CSO Online). Link Trap attacks coerce models into packaging credentials into attacker-controlled URLs (Keysight / Trend Micro). In every case, the root cause is the same: real credentials exist in the agent's environment, and a single successful prompt injection extracts them
Runloop Credential Gateway eliminates this attack surface entirely. Real credentials never exist on the Devbox. The gateway issues an opaque token that is bound to a specific Devbox, expires when that Devbox terminates, and only works through Runloop's proxy infrastructure. The agent uses the token exactly like a normal API key -- two fields change (base URL and key source) and every SDK call works as before. The gateway injects the real credential server-side and proxies to the upstream API with typically less than 10ms of added latency.
No other agent infrastructure provider offers an equivalent mechanism. E2B, Daytona, Modal, and CodeSandbox all inject real credentials into the execution environment, leaving them extractable through the same attack patterns documented above.

One endpoint for all agent tools, with per-tool permissions
Over-privileged MCP agents have already leaked secret tokens and credentials when prompted by attacker-controlled data inputs -- documented in incidents involving Supabase MCP and Obsidian RAG integrations. Unrestricted tool access is as dangerous as unrestricted code execution. Runloop MCP Hub aggregates all tool servers behind a single endpoint and gives you fine-grained control over which tools each agent can access. Your agent connects to one URL, sees a unified tool list filtered by its permissions, and calls tools by name. The Hub handles connection management, credential injection, access control, and routing.

Defense in depth across four infrastructure layers
Each layer operates independently. A failure at one layer does not compromise the others.
The Credential Gateway replaces real API keys with opaque, devbox-bound tokens. Even if an agent is compromised through prompt injection, the extracted token is useless outside the originating environment. Real credentials are injected server-side and never touch the Devbox.

MCP Hub enforces per-tool permissions using pattern matching. Agents only see the tools they are authorized to use -- restricted tools are invisible. Every invocation is logged with full context for compliance auditing.

Each Devbox runs inside a dedicated MicroVM on bare-metal infrastructure with two isolation layers: the hypervisor boundary and a container boundary within it. No shared kernel, no shared state, no cross-tenant access. Ephemeral by default -- environments are destroyed after use.

DNS-level allowlists block all egress traffic to unlisted domains. Lifecycle-aware policies restrict access per stage: package registries during build, API endpoints during runtime, nothing during snapshots. Every blocked connection is logged.

The only platform that gives you both the control plane and the data plane
With BYOC, both the control plane and the data plane run inside your cloud account. No other agent infrastructure provider offers this.
E2B, Daytona, Modal, and CodeSandbox inject real credentials into the execution environment. Runloop is the only platform where credentials are replaced with opaque, environment-bound tokens that are useless if extracted.

No competing platform offers per-tool permissions for agent tool access. MCP Hub provides pattern-based filtering, token binding, and full audit trails as a built-in infrastructure primitive.

Runloop SaaS or BYOC inside your own AWS, GCP, or Azure account. In BYOC, both the control plane and the data plane run in your cloud -- you own the infrastructure, network boundaries, and data residency. No other agent platform offers this.

Security and compliance questions
Common questions about Runloop's security architecture, credential protection, and compliance posture for enterprise AI agent deployments.
The Credential Gateway replaces real credentials with opaque tokens that are bound to a specific Devbox and expire when that Devbox terminates. When an agent needs to call an external API, it uses the opaque token exactly like a normal API key. The gateway intercepts the request, injects the real credential server-side, and proxies to the upstream API. The real credential never exists on the Devbox, so there is nothing for a prompt injection attack to extract. Even if an attacker successfully extracts the opaque token, it cannot be used from any other environment and becomes permanently invalid when the Devbox terminates. The gateway supports bearer tokens, custom headers, basic authentication, and query parameters across HTTP/1.1, HTTP/2, SSE, and WebSocket protocols. For how Credential Gateway integrates into agent evaluation workflows, see the [Agent Testing](/solutions/agent-testing) solution page.
MCP Hub is a single endpoint that aggregates all MCP tool servers behind a unified access control layer. Instead of connecting agents directly to individual tool servers (GitHub, Slack, Google Calendar), the agent connects to one MCP Hub URL and sees a filtered tool list based on its permissions. You define allowed tools using pattern matching -- for example, github.search_* and github.get_* grants read-only GitHub access while github.delete_* and github.merge_* remain invisible to the agent. Each Hub token is bound to a specific Devbox, so extracted tokens cannot be reused. Every tool invocation is logged with user, tool name, timestamp, and outcome for compliance auditing.
Most agent sandbox providers use containers that share the host operating system kernel. A container escape vulnerability gives an attacker access to other tenants' workloads on the same host. Runloop Devboxes run inside dedicated MicroVMs on bare-metal infrastructure with two layers of isolation: the hypervisor boundary enforced by a custom bare-metal hypervisor, and a container boundary within the VM. Each Devbox gets its own kernel, filesystem, and network namespace. There is no shared state between Devboxes, and a vulnerability in one cannot propagate to another. Devboxes are ephemeral by default -- created, used, and destroyed -- reducing the window for persistent threats.
Yes. Runloop supports Bring Your Own Cloud (BYOC) deployment inside your AWS, GCP, or Azure account. Both the control plane and the data plane run inside your cloud -- provisioned in a dedicated AWS Account, GCP Project, or Azure Subscription within your organization. You maintain complete ownership of all infrastructure, data residency, network boundaries, and access policies. No other agent infrastructure provider puts both planes in the customer's environment. Connectivity options include Private Link, VPC Peering, Transit Gateway, and VPN tunnels. See the [Deploy to VPC](/solutions/deploy-to-vpc) solution page for full architecture details and supported configurations.
Runloop Network Policies use DNS-level allowlists to control which domains a Devbox can reach. You define permitted hostnames with exact matches or wildcard prefixes, and everything not explicitly permitted is blocked -- there are no conflicting allow/deny rules to debug. Policies are lifecycle-aware: you can allow package registries during Blueprint builds, restrict to only your LLM provider endpoints during Devbox runtime, and lock down entirely during snapshot capture. Every blocked connection is logged to the Devbox log stream with the domain and timestamp, giving compliance teams complete evidence trails.