langchain.agents.loading.load_agent¶

langchain.agents.loading.load_agent(path: Union[str, Path], **kwargs: Any) Union[BaseSingleActionAgent, BaseMultiActionAgent][source]¶

Unified method for loading an agent from LangChainHub or local fs.

Parameters
  • path – Path to the agent file.

  • **kwargs – Additional keyword arguments passed to the agent executor.

Returns

An agent executor.