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',
},
)