Install
Wrapping a Tool
Wrapping an Agent
UsewrapLangChainAgent when you want a single guard for the whole agent’s
tool surface.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Wrap any LangChain Tool or Agent so every invocation runs through Inviolet first.
npm install @inviolet/agent-sdk-langchain @inviolet/agent-sdk-core
import { DynamicTool } from '@langchain/core/tools'
import { Inviolet } from '@inviolet/agent-sdk-core'
import { wrapLangChainTool } from '@inviolet/agent-sdk-langchain'
const inviolet = new Inviolet({ /* ... */ })
const lookup = wrapLangChainTool(
new DynamicTool({
name: 'lookup_contact',
description: 'Look up a contact by id',
func: async (input) => fetchContact(input),
}),
{
inviolet,
intentId: 'intents:customer_support_lookup',
actor: 'alice@example.com',
audience: 'postgres-prod',
},
)
wrapLangChainAgent when you want a single guard for the whole agent’s
tool surface.