Skip to content
/docs

LangChain Integration

Current LangChain integration status.

The current local TypeScript SDK does not ship a dedicated veto-sdk/integrations/langchain package.

Use one of the supported paths:

  • wrap executable LangChain-style tools with protect() or veto.wrap() when they expose func or invoke
  • call veto.guard(toolName, args, context) before executing a tool
  • register LangChain tool schemas with veto.registerTools() so Charter can compile policies against them
import { Veto } from "veto-sdk";

const veto = await Veto.init();

const safeTool = veto.wrapTool({
  name: "transfer_funds",
  func: async (args: Record<string, unknown>) => {
    return JSON.stringify({ ok: true, args });
  },
});

Dedicated LangChain middleware should not be imported until veto-sdk/integrations/langchain is published.

On this page

No Headings