Nodra
Menu
SDK INTEGRATION

JavaScript / TypeScript

Protect any Node.js or TypeScript agent with the published Nodra SDK, regardless of model or agent framework.

Documentation Security model

Implementation checklist

Complete these steps in the customer-owned server or agent runtime.

  1. Store NODRA_BASE_URL and NODRA_CREDENTIAL server-side.
  2. Initialize Nodra once in the agent runtime.
  3. Wrap the agent identity with nodra.protect().
  4. Authorize consequential actions before executing the external tool.
  5. Use authorizeAndWait() when human approval may be required, and execute only after the final allow decision.
  6. 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.

Explore safe Demo Lab7-day validation