Reminix TypeScript SDK - v0.7.1
    Preparing search index...

    Function fromCompiledGraph

    • Create a Reminix Agent from a LangGraph CompiledGraph.

      Parameters

      • graph: CompiledGraph

        A LangGraph CompiledGraph instance (result of StateGraph.compile())

      • options: FromCompiledGraphOptions

        Configuration options

      Returns Agent

      A Reminix Agent that wraps the LangGraph graph

      import { StateGraph, START, END } from '@langchain/langgraph';
      import { fromCompiledGraph } from '@reminix/adapters/langgraph';
      import { serve } from '@reminix/runtime';

      interface State {
      input: string;
      output: string;
      }

      const graph = new StateGraph<State>({})
      .addNode('process', (state) => ({ output: `Processed: ${state.input}` }))
      .addEdge(START, 'process')
      .addEdge('process', END)
      .compile();

      const agent = fromCompiledGraph(graph, { name: 'processor', outputKey: 'output' });
      serve(agent);