VORIM
We use cookies

We use cookies to analyze site traffic and improve your experience. You can choose to accept all cookies or only essential ones. See our Privacy Policy.

LangChain and LangGraph

Wrap a tool so the permission check happens before it runs, and attach a callback handler so every step of the chain lands in the audit trail on its own.

LangChain / LangGraph

Wrap tools with permission checks, attach a callback handler for observability, or use the agent factory to register + wrap in one call.

import createVorim from "@vorim/sdk";
import { wrapTools, VorimCallbackHandler, createVorimAgent } from "@vorim/sdk/integrations/langchain";

const vorim = createVorim({ apiKey: "agid_sk_live_..." });

// Option 1: Wrap existing tools
const guardedTools = wrapTools([searchTool, analysisTool], {
  vorim,
  agentId: "agid_acme_a1b2c3d4",
  permissionMap: { search_docs: "agent:read" },
});

// Option 2: Callback handler (observability only, non-blocking)
const handler = new VorimCallbackHandler(vorim, "agid_acme_a1b2c3d4");
await agent.invoke({ messages }, { callbacks: [handler] });

// Option 3: Full agent factory (register + wrap + observe)
const { agentId, tools, callbackHandler } = await createVorimAgent({
  vorim,
  name: "research-agent",
  capabilities: ["web_search"],
  scopes: ["agent:read", "agent:execute"],
  tools: [searchTool, analysisTool],
});
typescript
Need Help?

Book a demo for a walkthrough, or contact us for support. For enterprise needs, reach out at sales@vorim.ai.