Skip to content

Quick Start

Terminal window
npm install @runplex/sylo

If you use an AI coding agent (Claude Code, Cursor, VS Code Copilot, etc.), install the Sylo skill so your agent knows how to use the SDK:

Terminal window
npx skills add runplex/sylo
  1. Sign in to your Sylo dashboard
  2. Go to Settings
  3. Click Create secret
  4. Copy the sylo_sk_... key — you won’t see it again

Install the Sylo tunnel client at build time:

Terminal window
curl -fsSL https://sylo.runplex.dev/install | sudo bash

This downloads the tunnel client binary and init script. At runtime, init.sh activates the proxy.

This example uses E2B as the sandbox provider, but Sylo works with any container runtime (Modal, Docker, Blaxel, etc.).

import { SyloClient, credential } from "@runplex/sylo";
import { Sandbox } from "e2b";
const sylo = new SyloClient({
apiUrl: "https://sylo.runplex.dev",
developerSecret: process.env.SYLO_SECRET,
});
// Create session — credentials are encrypted, never enter the sandbox
const session = await sylo.createSandboxToken({
tenantId: "customer-123",
expiresIn: "10m",
credentials: [
credential("anthropic", process.env.ANTHROPIC_API_KEY!),
],
policies: { default: "allow" },
});
// sandboxEnv() returns all env vars including ANTHROPIC_API_KEY=sylo_cred:anthropic
const env = sylo.sandboxEnv(session);
const sandbox = await Sandbox.create("your-template", {
envs: { ...env },
});

The credential() helper handles domain, header, prefix, and env var for 12 built-in services. MITM domains are auto-inferred from your credentials — no need to specify them.

Inside the sandbox, the proxy is active. API calls go through Sylo transparently:

# Agent code — no Sylo awareness needed
import anthropic
# ANTHROPIC_API_KEY=sylo_cred:anthropic in the env
# Sylo replaces it with the real key on the wire
client = anthropic.Anthropic()
message = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
const { events } = await sylo.queryAudit({
tenantId: "customer-123",
});
for (const event of events) {
console.log(
`${event.method} ${event.destination}${event.path}${event.policyDecision}`
);
}
// POST api.anthropic.com/v1/messages → allow (cred: anthropic)
await sylo.revokeSession(session.token);

Sessions auto-expire based on expiresIn, but you can revoke early when the agent is done.

For repeated use, save credentials + policies as a reusable profile:

const profile = await sylo.createProfile({
name: "my-agent",
profileData: {
credentials: [credential("anthropic", process.env.ANTHROPIC_API_KEY!)],
policies: { default: "deny" },
},
});
// Now sessions just reference the profile
const session = await sylo.createSandboxToken({
tenantId: "acme",
securityProfile: "my-agent",
});

Profiles can also be managed in the dashboard.