Skip to content

Quick Start

Terminal window
npm install @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.

import { SyloClient } 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: [
{
name: "openai",
envVar: "OPENAI_API_KEY",
domain: "api.openai.com",
header: "Authorization",
value: `Bearer ${process.env.OPENAI_API_KEY}`,
},
],
mitm: ["api.openai.com"],
policies: { default: "allow" },
});
// sandboxEnv() returns all env vars including OPENAI_API_KEY=sylo_cred:openai
const env = sylo.sandboxEnv(session);
const sandbox = await Sandbox.create("your-template", {
envs: { ...env },
});

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

# Agent code — no Sylo awareness needed
import openai
# OPENAI_API_KEY=sylo_cred:openai in the env
# Sylo replaces it with the real key on the wire
client = openai.OpenAI()
response = client.chat.completions.create(
model="gpt-4",
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.openai.com/v1/chat/completions → allow (cred: openai)
await sylo.revokeSession(session.token);

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