/**
 * LangGraph Agent with Vaultfire Trust Tools
 *
 * This example shows how to create a LangGraph ReAct agent
 * that can verify trust, check Street Cred, and read bonds.
 *
 * Prerequisites:
 *   npm install @langchain/openai @langchain/langgraph @vaultfire/langchain
 *
 * Run: OPENAI_API_KEY=sk-... npx ts-node examples/langgraph-agent.ts
 */

import { createVaultfireTools } from '@vaultfire/langchain';
// import { ChatOpenAI } from '@langchain/openai';
// import { createReactAgent } from '@langchain/langgraph/prebuilt';

// Create Vaultfire tools (read-only — no private key needed)
const tools = createVaultfireTools({ chain: 'base' });

console.log(`Created ${tools.length} Vaultfire tools for LangGraph agent`);

// Uncomment below to run with a real LLM:
//
// const model = new ChatOpenAI({ model: 'gpt-4o' });
// const agent = createReactAgent({ llm: model, tools });
//
// const result = await agent.invoke({
//   messages: [{
//     role: 'user',
//     content: 'Check the Street Cred for agent 0xA054f831B562e729F8D268291EBde1B2EDcFb84F on Base',
//   }],
// });
//
// console.log(result.messages[result.messages.length - 1].content);
