@kakunin/langchain
v0.2.2
Published
Kakunin compliance tools for LangChain JS/TS — verify agent certificates and scopes inside tools and chains
Maintainers
Readme
@kakunin/langchain
Kakunin compliance tools for LangChain JS — verify agent certificates and enforce scopes inside tools and chains.
npm install @kakunin/langchain @langchain/core @kakunin/sdkimport { Kakunin } from '@kakunin/sdk';
import { KakuninToolGuard } from '@kakunin/langchain';
const kakunin = new Kakunin({ apiKey: process.env.KAKUNIN_API_KEY! });
// Wrap any LangChain tool — scope is verified before every call
const guarded = new KakuninToolGuard({
kakunin,
agentId: 'agt-123',
tool: myTool,
requiredScopes: ['trade.execute'],
});Also exports langchainScopeCallback (chain-level guard), KakuninScopeCallbackHandler, and ScopeViolationError. Licensed under Apache-2.0.
