TypeScript SDK integration

Action security for TypeScript SDK.

Put an action decision before Node.js tool dispatch.

Get the package and source.

Connect the execution boundary.

The client returns a decision; your application must enforce it before executing the operation. Unknown decisions and request failures need explicit handling.

An example to test

A Node.js service is asked to update a customer record with altered arguments. Validate the final action before invoking the CRM client.

Illustrative workflow, not a customer deployment or a measured result.

Before connecting live policy

  1. Identify the handler that actually performs the side effect.
  2. Provide trusted identity, purpose and final action arguments.
  3. Configure the tenant’s assigned runtime and keep API credentials server-side.
  4. Test allowed, blocked and unavailable paths before production.

Integration example

Adapt this existing SDK pattern to your application. Names such as the agent, handler and session refer to your own objects. Follow the package documentation for compatible versions and complete setup.

# Install the core TypeScript client.
npm install agenticdome-sdk

import AgenticDomeClient from "agenticdome-sdk";

const client = new AgenticDomeClient("https://your-sidecar.example.com", {
  apiKey: process.env.AGENTICDOME_API_KEY,
  tenantId: process.env.AGENTICDOME_TENANT_ID,
});

const verdict = await client.guardrailValidate({
  sessionId: "sess_prod_01J4X", direction: "output",
  text: "Update the customer record", agentId: "support-agent-01", platform: "custom-node",
  toolName: "crm.customer.update", toolArgs: finalArgs
});
const decision = String(verdict.verdict ?? verdict.decision ?? "UNKNOWN").toUpperCase();
if (decision !== "ALLOWED") throw new Error("AgenticDome blocked the action: " + decision);
await updateCustomer(verdict.sanitized_tool_args ?? finalArgs);

client.close();

Python demo commands evaluate fixed inputs against a bundled local policy; they do not instantiate the selected framework or prove a live integration. The TypeScript client and OpenClaw runtime plugin need their documented tenant configuration.

See the decision before the action.

Try a local scenario, then bring your workflow to a deployment review. Start with one agent and one tool, and see exactly where the action can be stopped.