Menu
JavaScript / TypeScript
Protect any Node.js or TypeScript agent with the published Nodra SDK, regardless of model or agent framework.
Implementation checklist
Complete these steps in the customer-owned server or agent runtime.
- Store NODRA_BASE_URL and NODRA_CREDENTIAL server-side.
- Initialize Nodra once in the agent runtime.
- Wrap the agent identity with nodra.protect().
- Authorize consequential actions before executing the external tool.
- Use authorizeAndWait() when human approval may be required, and execute only after the final allow decision.
- Record the result after the external action completes.
Security boundary
The public JavaScript SDK is published as nodra-agent-sdk. Keep the credential server-side.
The public guide explains the integration contract without exposing Nodra's private control-plane implementation.
Reference implementation
Use this as the server-side starting point.
npm install nodra-agent-sdk
import { Nodra } from "nodra-agent-sdk";
const nodra = new Nodra({
baseUrl: "https://www.nodrasecurity.com",
credential: process.env.NODRA_CREDENTIAL!,
});
const agent = nodra.protect({ id: "finance-agent" });
const decision = await agent.authorizeAndWait(
{
resourceId: "stripe",
action: "payments.submit",
context: { environment: "production" },
},
{ timeoutMs: 5 * 60_000 },
);
if (decision.decision !== "allow") {
throw new Error("Nodra did not allow this action.");
}
// Execute the protected action only now.Ready to validate a real workflow?
Use the Demo Lab for a self-guided sandbox, or review the 7-day technical validation for a real design-partner workflow.