2 layers

isolation (MicroVM + container)

<10ms

Credential Gateway latency

0 credentials

exposed on Devbox

<20ms

MCP Hub routing
THE AGENT SECURITY GAP
This is not a theoretical risk. Prompt-injected PR comments have caused GitHub Copilot to exfiltrate AWS keys from private repositories via encoded image requests. Hidden prompt injections in code repositories have driven IDE agents like Cursor to read and expose local SSH keys. Link Trap attacks coerce models into packaging credentials into attacker-controlled URLs. Over-privileged MCP agents have leaked secret tokens when prompted by attacker-controlled data inputs. OWASP now classifies system prompts embedding tool credentials as a formal risk class. The attack surface is documented, reproduced, and expanding -- and the security model must change.
Learn how Runloop solves this
-- Engineering Lead, Series B AI Startup
DEFENSE IN DEPTH AT THE INFRASTRUCTURE LAYER

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
)
```
npm install @runloop/api-client
```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
});
```
npm install @runloop/api-client
```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"
```
npm install @runloop/api-client
badge

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.

Credential Gateway

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.

MCP Hub

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.

MicroVM Isolation

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.

Network Controls

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.

Defense in depth across four infrastructure layers

Each layer operates independently. A failure at one layer does not compromise the others.

Process card icon.
Radar.
01
Credential Protection

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.

Green light and grid of the progress.
chat bubble icon
Radar.
02
Tool Access Control

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.

White light and grid of the progress.
chat bubble icon
Radar.
02
Compute Isolation

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.

White light and grid of the progress.
chat bubble icon
Radar.
02
Network Enforcement

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.

White light and grid of the progress.

Runloop is the only agent infrastructure platform where BYOC puts both the control plane and the data plane inside your cloud account. Credential protection, tool-level access control, and hardware isolation are integrated product capabilities -- not features you bolt on. Competitors provide execution environments. Runloop provides a security architecture you can fully own.

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.

Credential Gateway

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.

Tool-Level Access Control

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.

Full-Stack Ownership

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.

F.A.Q

Security and compliance questions

Common questions about Runloop's security architecture, credential protection, and compliance posture for enterprise AI agent deployments.

How does the Credential Gateway protect against prompt injection attacks?
What is MCP Hub and how does it control agent tool access?
How is Runloop's isolation different from container-based sandboxes?
Can I deploy Runloop inside my own cloud account?"
How do Runloop Network Controls work for egress enforcement?
More questions? Visit our docs or send us a message