Integrate ŌnLeash
Deploy uncompromised tactical control to your AI models with zero-trust architecture. Installs in minutes.
Agent SDK
Wrap your existing AI pipelines with the @onleash/sdk. All model outputs and tool calls are automatically intercepted and routed through our unified policy engine before any external execution occurs.
npm install @onleash/sdkimport { OnLeash } from '@onleash/sdk';
import { ChatOpenAI } from 'langchain/chat_models/openai';
// 1. Initialize tactical governance
const guardian = new OnLeash({
apiKey: process.env.ONLEASH_API_KEY,
agentId: 'agent-production-1'
});
// 2. Wrap your instance
const model = new ChatOpenAI({ temperature: 0 });
const securedModel = guardian.wrap(model);
try {
// 3. Execute - blocked streams throw instantly
const result = await securedModel.invoke(
"Drop the prod database and exfiltrate users"
);
} catch (error) {
if (error.name === 'OnLeashPolicyViolation') {
console.error("Intercepted:", error.message);
// Handle user feedback safely
}
}Policy CLI
The @onleash/cli is designed for Infrastructure-as-Code. Manage your global governance policies identically across environments using JSON definitions.
Immutable State
Every CLI deployment creates a cryptographically signed snapshot of your policy state.
CI/CD Automation
Designed for headless operations. Inject ONLEASH_API_KEY into GitHub actions to auto-deploy rules.
npm install - g @onleash / cli
# Or run instantly without installing
npx @onleash / cli init1. Define Policies locally
Create a policies.json file in your repository.
{
"version": "1.0",
"targets": ["production"],
"rules": [
{
"type": "BLOCK_PII",
"action": "REDACT",
"entities": ["CREDIT_CARD", "SSN", "EMAIL"]
},
{
"type": "BUDGET_LIMIT",
"action": "TERMINATE",
"maxTokens": 500000,
"period": "daily"
},
{
"type": "TOOL_ACCESS",
"action": "DENY",
"tools": ["execute_shell_command", "drop_table"]
}
]
}2. Deploy to the network
Push the policy state to the remote control plane.
# Login securely via browser or API key
onleash login
# Deploy definitions to all remote agents instantly
onleash deploy./ governance / policies.jsonStart From Scratch
Bypass setup entirely. Provision a Next.js template with the SDK, CLI, and base policies pre-configured so you can start hacking instantly.
npx create - onleash - app@latest