@@ -21,7 +21,7 @@ import { HttpAgent } from "@ag-ui/client";
2121import { A2AMiddlewareAgent } from "@ag-ui/a2a-middleware" ;
2222import { A2AAgent } from "@ag-ui/a2a" ;
2323import { A2AClient } from "@a2a-js/sdk/client" ;
24- import { langChainAgents } from "@ag-ui/langchain/src/examples " ;
24+ import { LangChainAgent } from "@ag-ui/langchain" ;
2525
2626const envVars = getEnvVars ( ) ;
2727export const agentsIntegrations : AgentIntegrationConfig [ ] = [
@@ -263,7 +263,32 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
263263 } ,
264264 {
265265 id : "langchain" ,
266- agents : async ( ) => langChainAgents ,
266+ agents : async ( ) => {
267+ return {
268+ agentic_chat : new LangChainAgent ( {
269+ chainFn : async ( { messages, tools, threadId } ) => {
270+ // @ts -ignore
271+ const { ChatOpenAI } = await import ( "@langchain/openai" ) ;
272+ const chatOpenAI = new ChatOpenAI ( { model : "gpt-4o" } ) ;
273+ const model = chatOpenAI . bindTools ( tools , {
274+ strict : true ,
275+ } ) ;
276+ return model . stream ( messages , { tools, metadata : { conversation_id : threadId } } ) ;
277+ } ,
278+ } ) ,
279+ tool_based_generative_ui : new LangChainAgent ( {
280+ chainFn : async ( { messages, tools, threadId } ) => {
281+ // @ts -ignore
282+ const { ChatOpenAI } = await import ( "@langchain/openai" ) ;
283+ const chatOpenAI = new ChatOpenAI ( { model : "gpt-4o" } ) ;
284+ const model = chatOpenAI . bindTools ( tools , {
285+ strict : true ,
286+ } ) ;
287+ return model . stream ( messages , { tools, metadata : { conversation_id : threadId } } ) ;
288+ } ,
289+ } ) ,
290+ }
291+ } ,
267292 } ,
268293 {
269294 id : "agno" ,
0 commit comments