Coding assistants, CI/CD agents, and infrastructure automation are powerful — and dangerous without guardrails. Kynara enforces per-action policies, requires human approval before production changes, and audits everything.
# LangChain agent with Kynara enforcement
from kynara_sdk.langchain import KynaraCallbackHandler
executor = AgentExecutor(
agent=infra_agent,
tools=infra_tools,
callbacks=[KynaraCallbackHandler(
kynara, agent_id=AGENT_ID
)],
)
# Every on_tool_start is checked before execution
# Policy: require MFA for production infra changes
{
"effect": "require_approval",
"actions": ["infra.apply", "infra.destroy"],
"condition": {
"op": "and",
"args": [
{ "op": "eq",
"args": ["ctx.context.env", "production"] },
{ "op": "eq",
"args": ["ctx.context.mfa_verified", false] }
]
}
}
# TypeScript — Express middleware for API agents
import { requirePermission } from "@kynara/sdk/express";
app.post("/infra/deploy",
requirePermission({
client,
action: "infra.deploy",
resource: (req) => ({
type: "environment",
id: req.body.env,
attrs: {
environment: req.body.env,
service: req.body.service,
}
}),
context: (req) => ({
env: req.body.env,
mfa_verified: req.user.mfaVerified,
ticket_url: req.body.ticket_url,
}),
}),
deployController,
);
Free plan to get started — 3 seats, 10,000 decisions/month, full policy engine and audit log. No credit card required.