Heroku LangChain.js - v0.4.2
    Preparing search index...

    Function createHerokuAgent

    • Creates a LangGraph agent powered by the HerokuAgent model.

      This helper initializes a HerokuAgent instance and wraps it with LangGraph's prebuilt React agent, allowing Heroku's server-side tools to be used alongside any provided LangChain tools.

      Parameters

      • Optionalfields: HerokuAgentFields

        Configuration options for the underlying HerokuAgent. Includes definitions for Heroku server-side tools.

      • tools: Tool<any>[] = []

        Optional LangChain tools to execute locally within the agent.

      Returns CompiledStateGraph<
          StateType<{}>,
          UpdateType<{}>,
          any,
          {},
          {} & {},
          StateDefinition,
      >

      A LangGraph agent executor configured with the HerokuAgent.